001package org.hl7.fhir.dstu2.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import ca.uhn.fhir.model.api.annotation.Block; 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import org.hl7.fhir.exceptions.FHIRException; 047import org.hl7.fhir.utilities.Utilities; 048/** 049 * 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. 050 */ 051@ResourceDef(name="AuditEvent", profile="http://hl7.org/fhir/Profile/AuditEvent") 052public class AuditEvent extends DomainResource { 053 054 public enum AuditEventAction { 055 /** 056 * Create a new database object, such as placing an order. 057 */ 058 C, 059 /** 060 * Display or print data, such as a doctor census. 061 */ 062 R, 063 /** 064 * Update data, such as revise patient information. 065 */ 066 U, 067 /** 068 * Delete items, such as a doctor master file record. 069 */ 070 D, 071 /** 072 * 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. 073 */ 074 E, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 public static AuditEventAction fromCode(String codeString) throws FHIRException { 080 if (codeString == null || "".equals(codeString)) 081 return null; 082 if ("C".equals(codeString)) 083 return C; 084 if ("R".equals(codeString)) 085 return R; 086 if ("U".equals(codeString)) 087 return U; 088 if ("D".equals(codeString)) 089 return D; 090 if ("E".equals(codeString)) 091 return E; 092 throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case C: return "C"; 097 case R: return "R"; 098 case U: return "U"; 099 case D: return "D"; 100 case E: return "E"; 101 case NULL: return null; 102 default: return "?"; 103 } 104 } 105 public String getSystem() { 106 switch (this) { 107 case C: return "http://hl7.org/fhir/audit-event-action"; 108 case R: return "http://hl7.org/fhir/audit-event-action"; 109 case U: return "http://hl7.org/fhir/audit-event-action"; 110 case D: return "http://hl7.org/fhir/audit-event-action"; 111 case E: return "http://hl7.org/fhir/audit-event-action"; 112 case NULL: return null; 113 default: return "?"; 114 } 115 } 116 public String getDefinition() { 117 switch (this) { 118 case C: return "Create a new database object, such as placing an order."; 119 case R: return "Display or print data, such as a doctor census."; 120 case U: return "Update data, such as revise patient information."; 121 case D: return "Delete items, such as a doctor master file record."; 122 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."; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 public String getDisplay() { 128 switch (this) { 129 case C: return "Create"; 130 case R: return "Read/View/Print"; 131 case U: return "Update"; 132 case D: return "Delete"; 133 case E: return "Execute"; 134 case NULL: return null; 135 default: return "?"; 136 } 137 } 138 } 139 140 public static class AuditEventActionEnumFactory implements EnumFactory<AuditEventAction> { 141 public AuditEventAction fromCode(String codeString) throws IllegalArgumentException { 142 if (codeString == null || "".equals(codeString)) 143 if (codeString == null || "".equals(codeString)) 144 return null; 145 if ("C".equals(codeString)) 146 return AuditEventAction.C; 147 if ("R".equals(codeString)) 148 return AuditEventAction.R; 149 if ("U".equals(codeString)) 150 return AuditEventAction.U; 151 if ("D".equals(codeString)) 152 return AuditEventAction.D; 153 if ("E".equals(codeString)) 154 return AuditEventAction.E; 155 throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'"); 156 } 157 public Enumeration<AuditEventAction> fromType(Base code) throws FHIRException { 158 if (code == null || code.isEmpty()) 159 return null; 160 String codeString = ((PrimitiveType) code).asStringValue(); 161 if (codeString == null || "".equals(codeString)) 162 return null; 163 if ("C".equals(codeString)) 164 return new Enumeration<AuditEventAction>(this, AuditEventAction.C); 165 if ("R".equals(codeString)) 166 return new Enumeration<AuditEventAction>(this, AuditEventAction.R); 167 if ("U".equals(codeString)) 168 return new Enumeration<AuditEventAction>(this, AuditEventAction.U); 169 if ("D".equals(codeString)) 170 return new Enumeration<AuditEventAction>(this, AuditEventAction.D); 171 if ("E".equals(codeString)) 172 return new Enumeration<AuditEventAction>(this, AuditEventAction.E); 173 throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); 174 } 175 public String toCode(AuditEventAction code) { 176 if (code == AuditEventAction.C) 177 return "C"; 178 if (code == AuditEventAction.R) 179 return "R"; 180 if (code == AuditEventAction.U) 181 return "U"; 182 if (code == AuditEventAction.D) 183 return "D"; 184 if (code == AuditEventAction.E) 185 return "E"; 186 return "?"; 187 } 188 } 189 190 public enum AuditEventOutcome { 191 /** 192 * The operation completed successfully (whether with warnings or not). 193 */ 194 _0, 195 /** 196 * The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response). 197 */ 198 _4, 199 /** 200 * The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response). 201 */ 202 _8, 203 /** 204 * An error of such magnitude occurred that the system is no longer available for use (i.e. the system died). 205 */ 206 _12, 207 /** 208 * added to help the parsers 209 */ 210 NULL; 211 public static AuditEventOutcome fromCode(String codeString) throws FHIRException { 212 if (codeString == null || "".equals(codeString)) 213 return null; 214 if ("0".equals(codeString)) 215 return _0; 216 if ("4".equals(codeString)) 217 return _4; 218 if ("8".equals(codeString)) 219 return _8; 220 if ("12".equals(codeString)) 221 return _12; 222 throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); 223 } 224 public String toCode() { 225 switch (this) { 226 case _0: return "0"; 227 case _4: return "4"; 228 case _8: return "8"; 229 case _12: return "12"; 230 case NULL: return null; 231 default: return "?"; 232 } 233 } 234 public String getSystem() { 235 switch (this) { 236 case _0: return "http://hl7.org/fhir/audit-event-outcome"; 237 case _4: return "http://hl7.org/fhir/audit-event-outcome"; 238 case _8: return "http://hl7.org/fhir/audit-event-outcome"; 239 case _12: return "http://hl7.org/fhir/audit-event-outcome"; 240 case NULL: return null; 241 default: return "?"; 242 } 243 } 244 public String getDefinition() { 245 switch (this) { 246 case _0: return "The operation completed successfully (whether with warnings or not)."; 247 case _4: return "The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response)."; 248 case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; 249 case _12: return "An error of such magnitude occurred that the system is no longer available for use (i.e. the system died)."; 250 case NULL: return null; 251 default: return "?"; 252 } 253 } 254 public String getDisplay() { 255 switch (this) { 256 case _0: return "Success"; 257 case _4: return "Minor failure"; 258 case _8: return "Serious failure"; 259 case _12: return "Major failure"; 260 case NULL: return null; 261 default: return "?"; 262 } 263 } 264 } 265 266 public static class AuditEventOutcomeEnumFactory implements EnumFactory<AuditEventOutcome> { 267 public AuditEventOutcome fromCode(String codeString) throws IllegalArgumentException { 268 if (codeString == null || "".equals(codeString)) 269 if (codeString == null || "".equals(codeString)) 270 return null; 271 if ("0".equals(codeString)) 272 return AuditEventOutcome._0; 273 if ("4".equals(codeString)) 274 return AuditEventOutcome._4; 275 if ("8".equals(codeString)) 276 return AuditEventOutcome._8; 277 if ("12".equals(codeString)) 278 return AuditEventOutcome._12; 279 throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'"); 280 } 281 public Enumeration<AuditEventOutcome> fromType(Base code) throws FHIRException { 282 if (code == null || code.isEmpty()) 283 return null; 284 String codeString = ((PrimitiveType) code).asStringValue(); 285 if (codeString == null || "".equals(codeString)) 286 return null; 287 if ("0".equals(codeString)) 288 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._0); 289 if ("4".equals(codeString)) 290 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._4); 291 if ("8".equals(codeString)) 292 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._8); 293 if ("12".equals(codeString)) 294 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._12); 295 throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); 296 } 297 public String toCode(AuditEventOutcome code) { 298 if (code == AuditEventOutcome._0) 299 return "0"; 300 if (code == AuditEventOutcome._4) 301 return "4"; 302 if (code == AuditEventOutcome._8) 303 return "8"; 304 if (code == AuditEventOutcome._12) 305 return "12"; 306 return "?"; 307 } 308 } 309 310 public enum AuditEventParticipantNetworkType { 311 /** 312 * The machine name, including DNS name. 313 */ 314 _1, 315 /** 316 * The assigned Internet Protocol (IP) address. 317 */ 318 _2, 319 /** 320 * The assigned telephone number. 321 */ 322 _3, 323 /** 324 * The assigned email address. 325 */ 326 _4, 327 /** 328 * URI (User directory, HTTP-PUT, ftp, etc.). 329 */ 330 _5, 331 /** 332 * added to help the parsers 333 */ 334 NULL; 335 public static AuditEventParticipantNetworkType fromCode(String codeString) throws FHIRException { 336 if (codeString == null || "".equals(codeString)) 337 return null; 338 if ("1".equals(codeString)) 339 return _1; 340 if ("2".equals(codeString)) 341 return _2; 342 if ("3".equals(codeString)) 343 return _3; 344 if ("4".equals(codeString)) 345 return _4; 346 if ("5".equals(codeString)) 347 return _5; 348 throw new FHIRException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); 349 } 350 public String toCode() { 351 switch (this) { 352 case _1: return "1"; 353 case _2: return "2"; 354 case _3: return "3"; 355 case _4: return "4"; 356 case _5: return "5"; 357 case NULL: return null; 358 default: return "?"; 359 } 360 } 361 public String getSystem() { 362 switch (this) { 363 case _1: return "http://hl7.org/fhir/network-type"; 364 case _2: return "http://hl7.org/fhir/network-type"; 365 case _3: return "http://hl7.org/fhir/network-type"; 366 case _4: return "http://hl7.org/fhir/network-type"; 367 case _5: return "http://hl7.org/fhir/network-type"; 368 case NULL: return null; 369 default: return "?"; 370 } 371 } 372 public String getDefinition() { 373 switch (this) { 374 case _1: return "The machine name, including DNS name."; 375 case _2: return "The assigned Internet Protocol (IP) address."; 376 case _3: return "The assigned telephone number."; 377 case _4: return "The assigned email address."; 378 case _5: return "URI (User directory, HTTP-PUT, ftp, etc.)."; 379 case NULL: return null; 380 default: return "?"; 381 } 382 } 383 public String getDisplay() { 384 switch (this) { 385 case _1: return "Machine Name"; 386 case _2: return "IP Address"; 387 case _3: return "Telephone Number"; 388 case _4: return "Email address"; 389 case _5: return "URI"; 390 case NULL: return null; 391 default: return "?"; 392 } 393 } 394 } 395 396 public static class AuditEventParticipantNetworkTypeEnumFactory implements EnumFactory<AuditEventParticipantNetworkType> { 397 public AuditEventParticipantNetworkType fromCode(String codeString) throws IllegalArgumentException { 398 if (codeString == null || "".equals(codeString)) 399 if (codeString == null || "".equals(codeString)) 400 return null; 401 if ("1".equals(codeString)) 402 return AuditEventParticipantNetworkType._1; 403 if ("2".equals(codeString)) 404 return AuditEventParticipantNetworkType._2; 405 if ("3".equals(codeString)) 406 return AuditEventParticipantNetworkType._3; 407 if ("4".equals(codeString)) 408 return AuditEventParticipantNetworkType._4; 409 if ("5".equals(codeString)) 410 return AuditEventParticipantNetworkType._5; 411 throw new IllegalArgumentException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); 412 } 413 public Enumeration<AuditEventParticipantNetworkType> fromType(Base code) throws FHIRException { 414 if (code == null || code.isEmpty()) 415 return null; 416 String codeString = ((PrimitiveType) code).asStringValue(); 417 if (codeString == null || "".equals(codeString)) 418 return null; 419 if ("1".equals(codeString)) 420 return new Enumeration<AuditEventParticipantNetworkType>(this, AuditEventParticipantNetworkType._1); 421 if ("2".equals(codeString)) 422 return new Enumeration<AuditEventParticipantNetworkType>(this, AuditEventParticipantNetworkType._2); 423 if ("3".equals(codeString)) 424 return new Enumeration<AuditEventParticipantNetworkType>(this, AuditEventParticipantNetworkType._3); 425 if ("4".equals(codeString)) 426 return new Enumeration<AuditEventParticipantNetworkType>(this, AuditEventParticipantNetworkType._4); 427 if ("5".equals(codeString)) 428 return new Enumeration<AuditEventParticipantNetworkType>(this, AuditEventParticipantNetworkType._5); 429 throw new FHIRException("Unknown AuditEventParticipantNetworkType code '"+codeString+"'"); 430 } 431 public String toCode(AuditEventParticipantNetworkType code) { 432 if (code == AuditEventParticipantNetworkType._1) 433 return "1"; 434 if (code == AuditEventParticipantNetworkType._2) 435 return "2"; 436 if (code == AuditEventParticipantNetworkType._3) 437 return "3"; 438 if (code == AuditEventParticipantNetworkType._4) 439 return "4"; 440 if (code == AuditEventParticipantNetworkType._5) 441 return "5"; 442 return "?"; 443 } 444 } 445 446 @Block() 447 public static class AuditEventEventComponent extends BackboneElement implements IBaseBackboneElement { 448 /** 449 * 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. 450 */ 451 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) 452 @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." ) 453 protected Coding type; 454 455 /** 456 * Identifier for the category of event. 457 */ 458 @Child(name = "subtype", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 459 @Description(shortDefinition="More specific type/id for the event", formalDefinition="Identifier for the category of event." ) 460 protected List<Coding> subtype; 461 462 /** 463 * Indicator for type of action performed during the event that generated the audit. 464 */ 465 @Child(name = "action", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 466 @Description(shortDefinition="Type of action performed during the event", formalDefinition="Indicator for type of action performed during the event that generated the audit." ) 467 protected Enumeration<AuditEventAction> action; 468 469 /** 470 * The time when the event occurred on the source. 471 */ 472 @Child(name = "dateTime", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) 473 @Description(shortDefinition="Time when the event occurred on source", formalDefinition="The time when the event occurred on the source." ) 474 protected InstantType dateTime; 475 476 /** 477 * Indicates whether the event succeeded or failed. 478 */ 479 @Child(name = "outcome", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 480 @Description(shortDefinition="Whether the event succeeded or failed", formalDefinition="Indicates whether the event succeeded or failed." ) 481 protected Enumeration<AuditEventOutcome> outcome; 482 483 /** 484 * A free text description of the outcome of the event. 485 */ 486 @Child(name = "outcomeDesc", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 487 @Description(shortDefinition="Description of the event outcome", formalDefinition="A free text description of the outcome of the event." ) 488 protected StringType outcomeDesc; 489 490 /** 491 * The purposeOfUse (reason) that was used during the event being recorded. 492 */ 493 @Child(name = "purposeOfEvent", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 494 @Description(shortDefinition="The purposeOfUse of the event", formalDefinition="The purposeOfUse (reason) that was used during the event being recorded." ) 495 protected List<Coding> purposeOfEvent; 496 497 private static final long serialVersionUID = 1916806397L; 498 499 /* 500 * Constructor 501 */ 502 public AuditEventEventComponent() { 503 super(); 504 } 505 506 /* 507 * Constructor 508 */ 509 public AuditEventEventComponent(Coding type, InstantType dateTime) { 510 super(); 511 this.type = type; 512 this.dateTime = dateTime; 513 } 514 515 /** 516 * @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.) 517 */ 518 public Coding getType() { 519 if (this.type == null) 520 if (Configuration.errorOnAutoCreate()) 521 throw new Error("Attempt to auto-create AuditEventEventComponent.type"); 522 else if (Configuration.doAutoCreate()) 523 this.type = new Coding(); // cc 524 return this.type; 525 } 526 527 public boolean hasType() { 528 return this.type != null && !this.type.isEmpty(); 529 } 530 531 /** 532 * @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.) 533 */ 534 public AuditEventEventComponent setType(Coding value) { 535 this.type = value; 536 return this; 537 } 538 539 /** 540 * @return {@link #subtype} (Identifier for the category of event.) 541 */ 542 public List<Coding> getSubtype() { 543 if (this.subtype == null) 544 this.subtype = new ArrayList<Coding>(); 545 return this.subtype; 546 } 547 548 public boolean hasSubtype() { 549 if (this.subtype == null) 550 return false; 551 for (Coding item : this.subtype) 552 if (!item.isEmpty()) 553 return true; 554 return false; 555 } 556 557 /** 558 * @return {@link #subtype} (Identifier for the category of event.) 559 */ 560 // syntactic sugar 561 public Coding addSubtype() { //3 562 Coding t = new Coding(); 563 if (this.subtype == null) 564 this.subtype = new ArrayList<Coding>(); 565 this.subtype.add(t); 566 return t; 567 } 568 569 // syntactic sugar 570 public AuditEventEventComponent addSubtype(Coding t) { //3 571 if (t == null) 572 return this; 573 if (this.subtype == null) 574 this.subtype = new ArrayList<Coding>(); 575 this.subtype.add(t); 576 return this; 577 } 578 579 /** 580 * @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 581 */ 582 public Enumeration<AuditEventAction> getActionElement() { 583 if (this.action == null) 584 if (Configuration.errorOnAutoCreate()) 585 throw new Error("Attempt to auto-create AuditEventEventComponent.action"); 586 else if (Configuration.doAutoCreate()) 587 this.action = new Enumeration<AuditEventAction>(new AuditEventActionEnumFactory()); // bb 588 return this.action; 589 } 590 591 public boolean hasActionElement() { 592 return this.action != null && !this.action.isEmpty(); 593 } 594 595 public boolean hasAction() { 596 return this.action != null && !this.action.isEmpty(); 597 } 598 599 /** 600 * @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 601 */ 602 public AuditEventEventComponent setActionElement(Enumeration<AuditEventAction> value) { 603 this.action = value; 604 return this; 605 } 606 607 /** 608 * @return Indicator for type of action performed during the event that generated the audit. 609 */ 610 public AuditEventAction getAction() { 611 return this.action == null ? null : this.action.getValue(); 612 } 613 614 /** 615 * @param value Indicator for type of action performed during the event that generated the audit. 616 */ 617 public AuditEventEventComponent setAction(AuditEventAction value) { 618 if (value == null) 619 this.action = null; 620 else { 621 if (this.action == null) 622 this.action = new Enumeration<AuditEventAction>(new AuditEventActionEnumFactory()); 623 this.action.setValue(value); 624 } 625 return this; 626 } 627 628 /** 629 * @return {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 630 */ 631 public InstantType getDateTimeElement() { 632 if (this.dateTime == null) 633 if (Configuration.errorOnAutoCreate()) 634 throw new Error("Attempt to auto-create AuditEventEventComponent.dateTime"); 635 else if (Configuration.doAutoCreate()) 636 this.dateTime = new InstantType(); // bb 637 return this.dateTime; 638 } 639 640 public boolean hasDateTimeElement() { 641 return this.dateTime != null && !this.dateTime.isEmpty(); 642 } 643 644 public boolean hasDateTime() { 645 return this.dateTime != null && !this.dateTime.isEmpty(); 646 } 647 648 /** 649 * @param value {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 650 */ 651 public AuditEventEventComponent setDateTimeElement(InstantType value) { 652 this.dateTime = value; 653 return this; 654 } 655 656 /** 657 * @return The time when the event occurred on the source. 658 */ 659 public Date getDateTime() { 660 return this.dateTime == null ? null : this.dateTime.getValue(); 661 } 662 663 /** 664 * @param value The time when the event occurred on the source. 665 */ 666 public AuditEventEventComponent setDateTime(Date value) { 667 if (this.dateTime == null) 668 this.dateTime = new InstantType(); 669 this.dateTime.setValue(value); 670 return this; 671 } 672 673 /** 674 * @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 675 */ 676 public Enumeration<AuditEventOutcome> getOutcomeElement() { 677 if (this.outcome == null) 678 if (Configuration.errorOnAutoCreate()) 679 throw new Error("Attempt to auto-create AuditEventEventComponent.outcome"); 680 else if (Configuration.doAutoCreate()) 681 this.outcome = new Enumeration<AuditEventOutcome>(new AuditEventOutcomeEnumFactory()); // bb 682 return this.outcome; 683 } 684 685 public boolean hasOutcomeElement() { 686 return this.outcome != null && !this.outcome.isEmpty(); 687 } 688 689 public boolean hasOutcome() { 690 return this.outcome != null && !this.outcome.isEmpty(); 691 } 692 693 /** 694 * @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 695 */ 696 public AuditEventEventComponent setOutcomeElement(Enumeration<AuditEventOutcome> value) { 697 this.outcome = value; 698 return this; 699 } 700 701 /** 702 * @return Indicates whether the event succeeded or failed. 703 */ 704 public AuditEventOutcome getOutcome() { 705 return this.outcome == null ? null : this.outcome.getValue(); 706 } 707 708 /** 709 * @param value Indicates whether the event succeeded or failed. 710 */ 711 public AuditEventEventComponent setOutcome(AuditEventOutcome value) { 712 if (value == null) 713 this.outcome = null; 714 else { 715 if (this.outcome == null) 716 this.outcome = new Enumeration<AuditEventOutcome>(new AuditEventOutcomeEnumFactory()); 717 this.outcome.setValue(value); 718 } 719 return this; 720 } 721 722 /** 723 * @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 724 */ 725 public StringType getOutcomeDescElement() { 726 if (this.outcomeDesc == null) 727 if (Configuration.errorOnAutoCreate()) 728 throw new Error("Attempt to auto-create AuditEventEventComponent.outcomeDesc"); 729 else if (Configuration.doAutoCreate()) 730 this.outcomeDesc = new StringType(); // bb 731 return this.outcomeDesc; 732 } 733 734 public boolean hasOutcomeDescElement() { 735 return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); 736 } 737 738 public boolean hasOutcomeDesc() { 739 return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); 740 } 741 742 /** 743 * @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 744 */ 745 public AuditEventEventComponent setOutcomeDescElement(StringType value) { 746 this.outcomeDesc = value; 747 return this; 748 } 749 750 /** 751 * @return A free text description of the outcome of the event. 752 */ 753 public String getOutcomeDesc() { 754 return this.outcomeDesc == null ? null : this.outcomeDesc.getValue(); 755 } 756 757 /** 758 * @param value A free text description of the outcome of the event. 759 */ 760 public AuditEventEventComponent setOutcomeDesc(String value) { 761 if (Utilities.noString(value)) 762 this.outcomeDesc = null; 763 else { 764 if (this.outcomeDesc == null) 765 this.outcomeDesc = new StringType(); 766 this.outcomeDesc.setValue(value); 767 } 768 return this; 769 } 770 771 /** 772 * @return {@link #purposeOfEvent} (The purposeOfUse (reason) that was used during the event being recorded.) 773 */ 774 public List<Coding> getPurposeOfEvent() { 775 if (this.purposeOfEvent == null) 776 this.purposeOfEvent = new ArrayList<Coding>(); 777 return this.purposeOfEvent; 778 } 779 780 public boolean hasPurposeOfEvent() { 781 if (this.purposeOfEvent == null) 782 return false; 783 for (Coding item : this.purposeOfEvent) 784 if (!item.isEmpty()) 785 return true; 786 return false; 787 } 788 789 /** 790 * @return {@link #purposeOfEvent} (The purposeOfUse (reason) that was used during the event being recorded.) 791 */ 792 // syntactic sugar 793 public Coding addPurposeOfEvent() { //3 794 Coding t = new Coding(); 795 if (this.purposeOfEvent == null) 796 this.purposeOfEvent = new ArrayList<Coding>(); 797 this.purposeOfEvent.add(t); 798 return t; 799 } 800 801 // syntactic sugar 802 public AuditEventEventComponent addPurposeOfEvent(Coding t) { //3 803 if (t == null) 804 return this; 805 if (this.purposeOfEvent == null) 806 this.purposeOfEvent = new ArrayList<Coding>(); 807 this.purposeOfEvent.add(t); 808 return this; 809 } 810 811 protected void listChildren(List<Property> childrenList) { 812 super.listChildren(childrenList); 813 childrenList.add(new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, java.lang.Integer.MAX_VALUE, type)); 814 childrenList.add(new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype)); 815 childrenList.add(new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, java.lang.Integer.MAX_VALUE, action)); 816 childrenList.add(new Property("dateTime", "instant", "The time when the event occurred on the source.", 0, java.lang.Integer.MAX_VALUE, dateTime)); 817 childrenList.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, java.lang.Integer.MAX_VALUE, outcome)); 818 childrenList.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, java.lang.Integer.MAX_VALUE, outcomeDesc)); 819 childrenList.add(new Property("purposeOfEvent", "Coding", "The purposeOfUse (reason) that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfEvent)); 820 } 821 822 @Override 823 public void setProperty(String name, Base value) throws FHIRException { 824 if (name.equals("type")) 825 this.type = castToCoding(value); // Coding 826 else if (name.equals("subtype")) 827 this.getSubtype().add(castToCoding(value)); 828 else if (name.equals("action")) 829 this.action = new AuditEventActionEnumFactory().fromType(value); // Enumeration<AuditEventAction> 830 else if (name.equals("dateTime")) 831 this.dateTime = castToInstant(value); // InstantType 832 else if (name.equals("outcome")) 833 this.outcome = new AuditEventOutcomeEnumFactory().fromType(value); // Enumeration<AuditEventOutcome> 834 else if (name.equals("outcomeDesc")) 835 this.outcomeDesc = castToString(value); // StringType 836 else if (name.equals("purposeOfEvent")) 837 this.getPurposeOfEvent().add(castToCoding(value)); 838 else 839 super.setProperty(name, value); 840 } 841 842 @Override 843 public Base addChild(String name) throws FHIRException { 844 if (name.equals("type")) { 845 this.type = new Coding(); 846 return this.type; 847 } 848 else if (name.equals("subtype")) { 849 return addSubtype(); 850 } 851 else if (name.equals("action")) { 852 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action"); 853 } 854 else if (name.equals("dateTime")) { 855 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.dateTime"); 856 } 857 else if (name.equals("outcome")) { 858 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcome"); 859 } 860 else if (name.equals("outcomeDesc")) { 861 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcomeDesc"); 862 } 863 else if (name.equals("purposeOfEvent")) { 864 return addPurposeOfEvent(); 865 } 866 else 867 return super.addChild(name); 868 } 869 870 public AuditEventEventComponent copy() { 871 AuditEventEventComponent dst = new AuditEventEventComponent(); 872 copyValues(dst); 873 dst.type = type == null ? null : type.copy(); 874 if (subtype != null) { 875 dst.subtype = new ArrayList<Coding>(); 876 for (Coding i : subtype) 877 dst.subtype.add(i.copy()); 878 }; 879 dst.action = action == null ? null : action.copy(); 880 dst.dateTime = dateTime == null ? null : dateTime.copy(); 881 dst.outcome = outcome == null ? null : outcome.copy(); 882 dst.outcomeDesc = outcomeDesc == null ? null : outcomeDesc.copy(); 883 if (purposeOfEvent != null) { 884 dst.purposeOfEvent = new ArrayList<Coding>(); 885 for (Coding i : purposeOfEvent) 886 dst.purposeOfEvent.add(i.copy()); 887 }; 888 return dst; 889 } 890 891 @Override 892 public boolean equalsDeep(Base other) { 893 if (!super.equalsDeep(other)) 894 return false; 895 if (!(other instanceof AuditEventEventComponent)) 896 return false; 897 AuditEventEventComponent o = (AuditEventEventComponent) other; 898 return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(action, o.action, true) 899 && compareDeep(dateTime, o.dateTime, true) && compareDeep(outcome, o.outcome, true) && compareDeep(outcomeDesc, o.outcomeDesc, true) 900 && compareDeep(purposeOfEvent, o.purposeOfEvent, true); 901 } 902 903 @Override 904 public boolean equalsShallow(Base other) { 905 if (!super.equalsShallow(other)) 906 return false; 907 if (!(other instanceof AuditEventEventComponent)) 908 return false; 909 AuditEventEventComponent o = (AuditEventEventComponent) other; 910 return compareValues(action, o.action, true) && compareValues(dateTime, o.dateTime, true) && compareValues(outcome, o.outcome, true) 911 && compareValues(outcomeDesc, o.outcomeDesc, true); 912 } 913 914 public boolean isEmpty() { 915 return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty()) 916 && (action == null || action.isEmpty()) && (dateTime == null || dateTime.isEmpty()) && (outcome == null || outcome.isEmpty()) 917 && (outcomeDesc == null || outcomeDesc.isEmpty()) && (purposeOfEvent == null || purposeOfEvent.isEmpty()) 918 ; 919 } 920 921 public String fhirType() { 922 return "AuditEvent.event"; 923 924 } 925 926 } 927 928 @Block() 929 public static class AuditEventParticipantComponent extends BackboneElement implements IBaseBackboneElement { 930 /** 931 * Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context. 932 */ 933 @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 934 @Description(shortDefinition="User roles (e.g. local RBAC codes)", formalDefinition="Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context." ) 935 protected List<CodeableConcept> role; 936 937 /** 938 * Direct reference to a resource that identifies the participant. 939 */ 940 @Child(name = "reference", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) 941 @Description(shortDefinition="Direct reference to resource", formalDefinition="Direct reference to a resource that identifies the participant." ) 942 protected Reference reference; 943 944 /** 945 * The actual object that is the target of the reference (Direct reference to a resource that identifies the participant.) 946 */ 947 protected Resource referenceTarget; 948 949 /** 950 * Unique identifier for the user actively participating in the event. 951 */ 952 @Child(name = "userId", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 953 @Description(shortDefinition="Unique identifier for the user", formalDefinition="Unique identifier for the user actively participating in the event." ) 954 protected Identifier userId; 955 956 /** 957 * Alternative Participant 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. 958 */ 959 @Child(name = "altId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 960 @Description(shortDefinition="Alternative User id e.g. authentication", formalDefinition="Alternative Participant 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." ) 961 protected StringType altId; 962 963 /** 964 * Human-meaningful name for the user. 965 */ 966 @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 967 @Description(shortDefinition="Human-meaningful name for the user", formalDefinition="Human-meaningful name for the user." ) 968 protected StringType name; 969 970 /** 971 * Indicator that the user is or is not the requestor, or initiator, for the event being audited. 972 */ 973 @Child(name = "requestor", type = {BooleanType.class}, order=6, min=1, max=1, modifier=false, summary=false) 974 @Description(shortDefinition="Whether user is initiator", formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." ) 975 protected BooleanType requestor; 976 977 /** 978 * Where the event occurred. 979 */ 980 @Child(name = "location", type = {Location.class}, order=7, min=0, max=1, modifier=false, summary=false) 981 @Description(shortDefinition="Where", formalDefinition="Where the event occurred." ) 982 protected Reference location; 983 984 /** 985 * The actual object that is the target of the reference (Where the event occurred.) 986 */ 987 protected Location locationTarget; 988 989 /** 990 * 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. 991 */ 992 @Child(name = "policy", type = {UriType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 993 @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." ) 994 protected List<UriType> policy; 995 996 /** 997 * Type of media involved. Used when the event is about exporting/importing onto media. 998 */ 999 @Child(name = "media", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=false) 1000 @Description(shortDefinition="Type of media", formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media." ) 1001 protected Coding media; 1002 1003 /** 1004 * Logical network location for application activity, if the activity has a network location. 1005 */ 1006 @Child(name = "network", type = {}, order=10, min=0, max=1, modifier=false, summary=false) 1007 @Description(shortDefinition="Logical network location for application activity", formalDefinition="Logical network location for application activity, if the activity has a network location." ) 1008 protected AuditEventParticipantNetworkComponent network; 1009 1010 /** 1011 * The reason (purpose of use), specific to this participant, that was used during the event being recorded. 1012 */ 1013 @Child(name = "purposeOfUse", type = {Coding.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1014 @Description(shortDefinition="Reason given for this user", formalDefinition="The reason (purpose of use), specific to this participant, that was used during the event being recorded." ) 1015 protected List<Coding> purposeOfUse; 1016 1017 private static final long serialVersionUID = -1783296995L; 1018 1019 /* 1020 * Constructor 1021 */ 1022 public AuditEventParticipantComponent() { 1023 super(); 1024 } 1025 1026 /* 1027 * Constructor 1028 */ 1029 public AuditEventParticipantComponent(BooleanType requestor) { 1030 super(); 1031 this.requestor = requestor; 1032 } 1033 1034 /** 1035 * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) 1036 */ 1037 public List<CodeableConcept> getRole() { 1038 if (this.role == null) 1039 this.role = new ArrayList<CodeableConcept>(); 1040 return this.role; 1041 } 1042 1043 public boolean hasRole() { 1044 if (this.role == null) 1045 return false; 1046 for (CodeableConcept item : this.role) 1047 if (!item.isEmpty()) 1048 return true; 1049 return false; 1050 } 1051 1052 /** 1053 * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) 1054 */ 1055 // syntactic sugar 1056 public CodeableConcept addRole() { //3 1057 CodeableConcept t = new CodeableConcept(); 1058 if (this.role == null) 1059 this.role = new ArrayList<CodeableConcept>(); 1060 this.role.add(t); 1061 return t; 1062 } 1063 1064 // syntactic sugar 1065 public AuditEventParticipantComponent addRole(CodeableConcept t) { //3 1066 if (t == null) 1067 return this; 1068 if (this.role == null) 1069 this.role = new ArrayList<CodeableConcept>(); 1070 this.role.add(t); 1071 return this; 1072 } 1073 1074 /** 1075 * @return {@link #reference} (Direct reference to a resource that identifies the participant.) 1076 */ 1077 public Reference getReference() { 1078 if (this.reference == null) 1079 if (Configuration.errorOnAutoCreate()) 1080 throw new Error("Attempt to auto-create AuditEventParticipantComponent.reference"); 1081 else if (Configuration.doAutoCreate()) 1082 this.reference = new Reference(); // cc 1083 return this.reference; 1084 } 1085 1086 public boolean hasReference() { 1087 return this.reference != null && !this.reference.isEmpty(); 1088 } 1089 1090 /** 1091 * @param value {@link #reference} (Direct reference to a resource that identifies the participant.) 1092 */ 1093 public AuditEventParticipantComponent setReference(Reference value) { 1094 this.reference = value; 1095 return this; 1096 } 1097 1098 /** 1099 * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) 1100 */ 1101 public Resource getReferenceTarget() { 1102 return this.referenceTarget; 1103 } 1104 1105 /** 1106 * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) 1107 */ 1108 public AuditEventParticipantComponent setReferenceTarget(Resource value) { 1109 this.referenceTarget = value; 1110 return this; 1111 } 1112 1113 /** 1114 * @return {@link #userId} (Unique identifier for the user actively participating in the event.) 1115 */ 1116 public Identifier getUserId() { 1117 if (this.userId == null) 1118 if (Configuration.errorOnAutoCreate()) 1119 throw new Error("Attempt to auto-create AuditEventParticipantComponent.userId"); 1120 else if (Configuration.doAutoCreate()) 1121 this.userId = new Identifier(); // cc 1122 return this.userId; 1123 } 1124 1125 public boolean hasUserId() { 1126 return this.userId != null && !this.userId.isEmpty(); 1127 } 1128 1129 /** 1130 * @param value {@link #userId} (Unique identifier for the user actively participating in the event.) 1131 */ 1132 public AuditEventParticipantComponent setUserId(Identifier value) { 1133 this.userId = value; 1134 return this; 1135 } 1136 1137 /** 1138 * @return {@link #altId} (Alternative Participant 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 1139 */ 1140 public StringType getAltIdElement() { 1141 if (this.altId == null) 1142 if (Configuration.errorOnAutoCreate()) 1143 throw new Error("Attempt to auto-create AuditEventParticipantComponent.altId"); 1144 else if (Configuration.doAutoCreate()) 1145 this.altId = new StringType(); // bb 1146 return this.altId; 1147 } 1148 1149 public boolean hasAltIdElement() { 1150 return this.altId != null && !this.altId.isEmpty(); 1151 } 1152 1153 public boolean hasAltId() { 1154 return this.altId != null && !this.altId.isEmpty(); 1155 } 1156 1157 /** 1158 * @param value {@link #altId} (Alternative Participant 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 1159 */ 1160 public AuditEventParticipantComponent setAltIdElement(StringType value) { 1161 this.altId = value; 1162 return this; 1163 } 1164 1165 /** 1166 * @return Alternative Participant 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. 1167 */ 1168 public String getAltId() { 1169 return this.altId == null ? null : this.altId.getValue(); 1170 } 1171 1172 /** 1173 * @param value Alternative Participant 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. 1174 */ 1175 public AuditEventParticipantComponent setAltId(String value) { 1176 if (Utilities.noString(value)) 1177 this.altId = null; 1178 else { 1179 if (this.altId == null) 1180 this.altId = new StringType(); 1181 this.altId.setValue(value); 1182 } 1183 return this; 1184 } 1185 1186 /** 1187 * @return {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1188 */ 1189 public StringType getNameElement() { 1190 if (this.name == null) 1191 if (Configuration.errorOnAutoCreate()) 1192 throw new Error("Attempt to auto-create AuditEventParticipantComponent.name"); 1193 else if (Configuration.doAutoCreate()) 1194 this.name = new StringType(); // bb 1195 return this.name; 1196 } 1197 1198 public boolean hasNameElement() { 1199 return this.name != null && !this.name.isEmpty(); 1200 } 1201 1202 public boolean hasName() { 1203 return this.name != null && !this.name.isEmpty(); 1204 } 1205 1206 /** 1207 * @param value {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1208 */ 1209 public AuditEventParticipantComponent setNameElement(StringType value) { 1210 this.name = value; 1211 return this; 1212 } 1213 1214 /** 1215 * @return Human-meaningful name for the user. 1216 */ 1217 public String getName() { 1218 return this.name == null ? null : this.name.getValue(); 1219 } 1220 1221 /** 1222 * @param value Human-meaningful name for the user. 1223 */ 1224 public AuditEventParticipantComponent setName(String value) { 1225 if (Utilities.noString(value)) 1226 this.name = null; 1227 else { 1228 if (this.name == null) 1229 this.name = new StringType(); 1230 this.name.setValue(value); 1231 } 1232 return this; 1233 } 1234 1235 /** 1236 * @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 1237 */ 1238 public BooleanType getRequestorElement() { 1239 if (this.requestor == null) 1240 if (Configuration.errorOnAutoCreate()) 1241 throw new Error("Attempt to auto-create AuditEventParticipantComponent.requestor"); 1242 else if (Configuration.doAutoCreate()) 1243 this.requestor = new BooleanType(); // bb 1244 return this.requestor; 1245 } 1246 1247 public boolean hasRequestorElement() { 1248 return this.requestor != null && !this.requestor.isEmpty(); 1249 } 1250 1251 public boolean hasRequestor() { 1252 return this.requestor != null && !this.requestor.isEmpty(); 1253 } 1254 1255 /** 1256 * @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 1257 */ 1258 public AuditEventParticipantComponent setRequestorElement(BooleanType value) { 1259 this.requestor = value; 1260 return this; 1261 } 1262 1263 /** 1264 * @return Indicator that the user is or is not the requestor, or initiator, for the event being audited. 1265 */ 1266 public boolean getRequestor() { 1267 return this.requestor == null || this.requestor.isEmpty() ? false : this.requestor.getValue(); 1268 } 1269 1270 /** 1271 * @param value Indicator that the user is or is not the requestor, or initiator, for the event being audited. 1272 */ 1273 public AuditEventParticipantComponent setRequestor(boolean value) { 1274 if (this.requestor == null) 1275 this.requestor = new BooleanType(); 1276 this.requestor.setValue(value); 1277 return this; 1278 } 1279 1280 /** 1281 * @return {@link #location} (Where the event occurred.) 1282 */ 1283 public Reference getLocation() { 1284 if (this.location == null) 1285 if (Configuration.errorOnAutoCreate()) 1286 throw new Error("Attempt to auto-create AuditEventParticipantComponent.location"); 1287 else if (Configuration.doAutoCreate()) 1288 this.location = new Reference(); // cc 1289 return this.location; 1290 } 1291 1292 public boolean hasLocation() { 1293 return this.location != null && !this.location.isEmpty(); 1294 } 1295 1296 /** 1297 * @param value {@link #location} (Where the event occurred.) 1298 */ 1299 public AuditEventParticipantComponent setLocation(Reference value) { 1300 this.location = value; 1301 return this; 1302 } 1303 1304 /** 1305 * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the event occurred.) 1306 */ 1307 public Location getLocationTarget() { 1308 if (this.locationTarget == null) 1309 if (Configuration.errorOnAutoCreate()) 1310 throw new Error("Attempt to auto-create AuditEventParticipantComponent.location"); 1311 else if (Configuration.doAutoCreate()) 1312 this.locationTarget = new Location(); // aa 1313 return this.locationTarget; 1314 } 1315 1316 /** 1317 * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the event occurred.) 1318 */ 1319 public AuditEventParticipantComponent setLocationTarget(Location value) { 1320 this.locationTarget = value; 1321 return this; 1322 } 1323 1324 /** 1325 * @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.) 1326 */ 1327 public List<UriType> getPolicy() { 1328 if (this.policy == null) 1329 this.policy = new ArrayList<UriType>(); 1330 return this.policy; 1331 } 1332 1333 public boolean hasPolicy() { 1334 if (this.policy == null) 1335 return false; 1336 for (UriType item : this.policy) 1337 if (!item.isEmpty()) 1338 return true; 1339 return false; 1340 } 1341 1342 /** 1343 * @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.) 1344 */ 1345 // syntactic sugar 1346 public UriType addPolicyElement() {//2 1347 UriType t = new UriType(); 1348 if (this.policy == null) 1349 this.policy = new ArrayList<UriType>(); 1350 this.policy.add(t); 1351 return t; 1352 } 1353 1354 /** 1355 * @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.) 1356 */ 1357 public AuditEventParticipantComponent addPolicy(String value) { //1 1358 UriType t = new UriType(); 1359 t.setValue(value); 1360 if (this.policy == null) 1361 this.policy = new ArrayList<UriType>(); 1362 this.policy.add(t); 1363 return this; 1364 } 1365 1366 /** 1367 * @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.) 1368 */ 1369 public boolean hasPolicy(String value) { 1370 if (this.policy == null) 1371 return false; 1372 for (UriType v : this.policy) 1373 if (v.equals(value)) // uri 1374 return true; 1375 return false; 1376 } 1377 1378 /** 1379 * @return {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) 1380 */ 1381 public Coding getMedia() { 1382 if (this.media == null) 1383 if (Configuration.errorOnAutoCreate()) 1384 throw new Error("Attempt to auto-create AuditEventParticipantComponent.media"); 1385 else if (Configuration.doAutoCreate()) 1386 this.media = new Coding(); // cc 1387 return this.media; 1388 } 1389 1390 public boolean hasMedia() { 1391 return this.media != null && !this.media.isEmpty(); 1392 } 1393 1394 /** 1395 * @param value {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) 1396 */ 1397 public AuditEventParticipantComponent setMedia(Coding value) { 1398 this.media = value; 1399 return this; 1400 } 1401 1402 /** 1403 * @return {@link #network} (Logical network location for application activity, if the activity has a network location.) 1404 */ 1405 public AuditEventParticipantNetworkComponent getNetwork() { 1406 if (this.network == null) 1407 if (Configuration.errorOnAutoCreate()) 1408 throw new Error("Attempt to auto-create AuditEventParticipantComponent.network"); 1409 else if (Configuration.doAutoCreate()) 1410 this.network = new AuditEventParticipantNetworkComponent(); // cc 1411 return this.network; 1412 } 1413 1414 public boolean hasNetwork() { 1415 return this.network != null && !this.network.isEmpty(); 1416 } 1417 1418 /** 1419 * @param value {@link #network} (Logical network location for application activity, if the activity has a network location.) 1420 */ 1421 public AuditEventParticipantComponent setNetwork(AuditEventParticipantNetworkComponent value) { 1422 this.network = value; 1423 return this; 1424 } 1425 1426 /** 1427 * @return {@link #purposeOfUse} (The reason (purpose of use), specific to this participant, that was used during the event being recorded.) 1428 */ 1429 public List<Coding> getPurposeOfUse() { 1430 if (this.purposeOfUse == null) 1431 this.purposeOfUse = new ArrayList<Coding>(); 1432 return this.purposeOfUse; 1433 } 1434 1435 public boolean hasPurposeOfUse() { 1436 if (this.purposeOfUse == null) 1437 return false; 1438 for (Coding item : this.purposeOfUse) 1439 if (!item.isEmpty()) 1440 return true; 1441 return false; 1442 } 1443 1444 /** 1445 * @return {@link #purposeOfUse} (The reason (purpose of use), specific to this participant, that was used during the event being recorded.) 1446 */ 1447 // syntactic sugar 1448 public Coding addPurposeOfUse() { //3 1449 Coding t = new Coding(); 1450 if (this.purposeOfUse == null) 1451 this.purposeOfUse = new ArrayList<Coding>(); 1452 this.purposeOfUse.add(t); 1453 return t; 1454 } 1455 1456 // syntactic sugar 1457 public AuditEventParticipantComponent addPurposeOfUse(Coding t) { //3 1458 if (t == null) 1459 return this; 1460 if (this.purposeOfUse == null) 1461 this.purposeOfUse = new ArrayList<Coding>(); 1462 this.purposeOfUse.add(t); 1463 return this; 1464 } 1465 1466 protected void listChildren(List<Property> childrenList) { 1467 super.listChildren(childrenList); 1468 childrenList.add(new Property("role", "CodeableConcept", "Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); 1469 childrenList.add(new Property("reference", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the participant.", 0, java.lang.Integer.MAX_VALUE, reference)); 1470 childrenList.add(new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, java.lang.Integer.MAX_VALUE, userId)); 1471 childrenList.add(new Property("altId", "string", "Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, java.lang.Integer.MAX_VALUE, altId)); 1472 childrenList.add(new Property("name", "string", "Human-meaningful name for the user.", 0, java.lang.Integer.MAX_VALUE, name)); 1473 childrenList.add(new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, java.lang.Integer.MAX_VALUE, requestor)); 1474 childrenList.add(new Property("location", "Reference(Location)", "Where the event occurred.", 0, java.lang.Integer.MAX_VALUE, location)); 1475 childrenList.add(new Property("policy", "uri", "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", 0, java.lang.Integer.MAX_VALUE, policy)); 1476 childrenList.add(new Property("media", "Coding", "Type of media involved. Used when the event is about exporting/importing onto media.", 0, java.lang.Integer.MAX_VALUE, media)); 1477 childrenList.add(new Property("network", "", "Logical network location for application activity, if the activity has a network location.", 0, java.lang.Integer.MAX_VALUE, network)); 1478 childrenList.add(new Property("purposeOfUse", "Coding", "The reason (purpose of use), specific to this participant, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse)); 1479 } 1480 1481 @Override 1482 public void setProperty(String name, Base value) throws FHIRException { 1483 if (name.equals("role")) 1484 this.getRole().add(castToCodeableConcept(value)); 1485 else if (name.equals("reference")) 1486 this.reference = castToReference(value); // Reference 1487 else if (name.equals("userId")) 1488 this.userId = castToIdentifier(value); // Identifier 1489 else if (name.equals("altId")) 1490 this.altId = castToString(value); // StringType 1491 else if (name.equals("name")) 1492 this.name = castToString(value); // StringType 1493 else if (name.equals("requestor")) 1494 this.requestor = castToBoolean(value); // BooleanType 1495 else if (name.equals("location")) 1496 this.location = castToReference(value); // Reference 1497 else if (name.equals("policy")) 1498 this.getPolicy().add(castToUri(value)); 1499 else if (name.equals("media")) 1500 this.media = castToCoding(value); // Coding 1501 else if (name.equals("network")) 1502 this.network = (AuditEventParticipantNetworkComponent) value; // AuditEventParticipantNetworkComponent 1503 else if (name.equals("purposeOfUse")) 1504 this.getPurposeOfUse().add(castToCoding(value)); 1505 else 1506 super.setProperty(name, value); 1507 } 1508 1509 @Override 1510 public Base addChild(String name) throws FHIRException { 1511 if (name.equals("role")) { 1512 return addRole(); 1513 } 1514 else if (name.equals("reference")) { 1515 this.reference = new Reference(); 1516 return this.reference; 1517 } 1518 else if (name.equals("userId")) { 1519 this.userId = new Identifier(); 1520 return this.userId; 1521 } 1522 else if (name.equals("altId")) { 1523 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.altId"); 1524 } 1525 else if (name.equals("name")) { 1526 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); 1527 } 1528 else if (name.equals("requestor")) { 1529 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.requestor"); 1530 } 1531 else if (name.equals("location")) { 1532 this.location = new Reference(); 1533 return this.location; 1534 } 1535 else if (name.equals("policy")) { 1536 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.policy"); 1537 } 1538 else if (name.equals("media")) { 1539 this.media = new Coding(); 1540 return this.media; 1541 } 1542 else if (name.equals("network")) { 1543 this.network = new AuditEventParticipantNetworkComponent(); 1544 return this.network; 1545 } 1546 else if (name.equals("purposeOfUse")) { 1547 return addPurposeOfUse(); 1548 } 1549 else 1550 return super.addChild(name); 1551 } 1552 1553 public AuditEventParticipantComponent copy() { 1554 AuditEventParticipantComponent dst = new AuditEventParticipantComponent(); 1555 copyValues(dst); 1556 if (role != null) { 1557 dst.role = new ArrayList<CodeableConcept>(); 1558 for (CodeableConcept i : role) 1559 dst.role.add(i.copy()); 1560 }; 1561 dst.reference = reference == null ? null : reference.copy(); 1562 dst.userId = userId == null ? null : userId.copy(); 1563 dst.altId = altId == null ? null : altId.copy(); 1564 dst.name = name == null ? null : name.copy(); 1565 dst.requestor = requestor == null ? null : requestor.copy(); 1566 dst.location = location == null ? null : location.copy(); 1567 if (policy != null) { 1568 dst.policy = new ArrayList<UriType>(); 1569 for (UriType i : policy) 1570 dst.policy.add(i.copy()); 1571 }; 1572 dst.media = media == null ? null : media.copy(); 1573 dst.network = network == null ? null : network.copy(); 1574 if (purposeOfUse != null) { 1575 dst.purposeOfUse = new ArrayList<Coding>(); 1576 for (Coding i : purposeOfUse) 1577 dst.purposeOfUse.add(i.copy()); 1578 }; 1579 return dst; 1580 } 1581 1582 @Override 1583 public boolean equalsDeep(Base other) { 1584 if (!super.equalsDeep(other)) 1585 return false; 1586 if (!(other instanceof AuditEventParticipantComponent)) 1587 return false; 1588 AuditEventParticipantComponent o = (AuditEventParticipantComponent) other; 1589 return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) && compareDeep(userId, o.userId, true) 1590 && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) && compareDeep(requestor, o.requestor, true) 1591 && compareDeep(location, o.location, true) && compareDeep(policy, o.policy, true) && compareDeep(media, o.media, true) 1592 && compareDeep(network, o.network, true) && compareDeep(purposeOfUse, o.purposeOfUse, true); 1593 } 1594 1595 @Override 1596 public boolean equalsShallow(Base other) { 1597 if (!super.equalsShallow(other)) 1598 return false; 1599 if (!(other instanceof AuditEventParticipantComponent)) 1600 return false; 1601 AuditEventParticipantComponent o = (AuditEventParticipantComponent) other; 1602 return compareValues(altId, o.altId, true) && compareValues(name, o.name, true) && compareValues(requestor, o.requestor, true) 1603 && compareValues(policy, o.policy, true); 1604 } 1605 1606 public boolean isEmpty() { 1607 return super.isEmpty() && (role == null || role.isEmpty()) && (reference == null || reference.isEmpty()) 1608 && (userId == null || userId.isEmpty()) && (altId == null || altId.isEmpty()) && (name == null || name.isEmpty()) 1609 && (requestor == null || requestor.isEmpty()) && (location == null || location.isEmpty()) 1610 && (policy == null || policy.isEmpty()) && (media == null || media.isEmpty()) && (network == null || network.isEmpty()) 1611 && (purposeOfUse == null || purposeOfUse.isEmpty()); 1612 } 1613 1614 public String fhirType() { 1615 return "AuditEvent.participant"; 1616 1617 } 1618 1619 } 1620 1621 @Block() 1622 public static class AuditEventParticipantNetworkComponent extends BackboneElement implements IBaseBackboneElement { 1623 /** 1624 * An identifier for the network access point of the user device for the audit event. 1625 */ 1626 @Child(name = "address", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1627 @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." ) 1628 protected StringType address; 1629 1630 /** 1631 * An identifier for the type of network access point that originated the audit event. 1632 */ 1633 @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1634 @Description(shortDefinition="The type of network access point", formalDefinition="An identifier for the type of network access point that originated the audit event." ) 1635 protected Enumeration<AuditEventParticipantNetworkType> type; 1636 1637 private static final long serialVersionUID = -1355220390L; 1638 1639 /* 1640 * Constructor 1641 */ 1642 public AuditEventParticipantNetworkComponent() { 1643 super(); 1644 } 1645 1646 /** 1647 * @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 1648 */ 1649 public StringType getAddressElement() { 1650 if (this.address == null) 1651 if (Configuration.errorOnAutoCreate()) 1652 throw new Error("Attempt to auto-create AuditEventParticipantNetworkComponent.address"); 1653 else if (Configuration.doAutoCreate()) 1654 this.address = new StringType(); // bb 1655 return this.address; 1656 } 1657 1658 public boolean hasAddressElement() { 1659 return this.address != null && !this.address.isEmpty(); 1660 } 1661 1662 public boolean hasAddress() { 1663 return this.address != null && !this.address.isEmpty(); 1664 } 1665 1666 /** 1667 * @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 1668 */ 1669 public AuditEventParticipantNetworkComponent setAddressElement(StringType value) { 1670 this.address = value; 1671 return this; 1672 } 1673 1674 /** 1675 * @return An identifier for the network access point of the user device for the audit event. 1676 */ 1677 public String getAddress() { 1678 return this.address == null ? null : this.address.getValue(); 1679 } 1680 1681 /** 1682 * @param value An identifier for the network access point of the user device for the audit event. 1683 */ 1684 public AuditEventParticipantNetworkComponent setAddress(String value) { 1685 if (Utilities.noString(value)) 1686 this.address = null; 1687 else { 1688 if (this.address == null) 1689 this.address = new StringType(); 1690 this.address.setValue(value); 1691 } 1692 return this; 1693 } 1694 1695 /** 1696 * @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 1697 */ 1698 public Enumeration<AuditEventParticipantNetworkType> getTypeElement() { 1699 if (this.type == null) 1700 if (Configuration.errorOnAutoCreate()) 1701 throw new Error("Attempt to auto-create AuditEventParticipantNetworkComponent.type"); 1702 else if (Configuration.doAutoCreate()) 1703 this.type = new Enumeration<AuditEventParticipantNetworkType>(new AuditEventParticipantNetworkTypeEnumFactory()); // bb 1704 return this.type; 1705 } 1706 1707 public boolean hasTypeElement() { 1708 return this.type != null && !this.type.isEmpty(); 1709 } 1710 1711 public boolean hasType() { 1712 return this.type != null && !this.type.isEmpty(); 1713 } 1714 1715 /** 1716 * @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 1717 */ 1718 public AuditEventParticipantNetworkComponent setTypeElement(Enumeration<AuditEventParticipantNetworkType> value) { 1719 this.type = value; 1720 return this; 1721 } 1722 1723 /** 1724 * @return An identifier for the type of network access point that originated the audit event. 1725 */ 1726 public AuditEventParticipantNetworkType getType() { 1727 return this.type == null ? null : this.type.getValue(); 1728 } 1729 1730 /** 1731 * @param value An identifier for the type of network access point that originated the audit event. 1732 */ 1733 public AuditEventParticipantNetworkComponent setType(AuditEventParticipantNetworkType value) { 1734 if (value == null) 1735 this.type = null; 1736 else { 1737 if (this.type == null) 1738 this.type = new Enumeration<AuditEventParticipantNetworkType>(new AuditEventParticipantNetworkTypeEnumFactory()); 1739 this.type.setValue(value); 1740 } 1741 return this; 1742 } 1743 1744 protected void listChildren(List<Property> childrenList) { 1745 super.listChildren(childrenList); 1746 childrenList.add(new Property("address", "string", "An identifier for the network access point of the user device for the audit event.", 0, java.lang.Integer.MAX_VALUE, address)); 1747 childrenList.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, java.lang.Integer.MAX_VALUE, type)); 1748 } 1749 1750 @Override 1751 public void setProperty(String name, Base value) throws FHIRException { 1752 if (name.equals("address")) 1753 this.address = castToString(value); // StringType 1754 else if (name.equals("type")) 1755 this.type = new AuditEventParticipantNetworkTypeEnumFactory().fromType(value); // Enumeration<AuditEventParticipantNetworkType> 1756 else 1757 super.setProperty(name, value); 1758 } 1759 1760 @Override 1761 public Base addChild(String name) throws FHIRException { 1762 if (name.equals("address")) { 1763 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.address"); 1764 } 1765 else if (name.equals("type")) { 1766 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); 1767 } 1768 else 1769 return super.addChild(name); 1770 } 1771 1772 public AuditEventParticipantNetworkComponent copy() { 1773 AuditEventParticipantNetworkComponent dst = new AuditEventParticipantNetworkComponent(); 1774 copyValues(dst); 1775 dst.address = address == null ? null : address.copy(); 1776 dst.type = type == null ? null : type.copy(); 1777 return dst; 1778 } 1779 1780 @Override 1781 public boolean equalsDeep(Base other) { 1782 if (!super.equalsDeep(other)) 1783 return false; 1784 if (!(other instanceof AuditEventParticipantNetworkComponent)) 1785 return false; 1786 AuditEventParticipantNetworkComponent o = (AuditEventParticipantNetworkComponent) other; 1787 return compareDeep(address, o.address, true) && compareDeep(type, o.type, true); 1788 } 1789 1790 @Override 1791 public boolean equalsShallow(Base other) { 1792 if (!super.equalsShallow(other)) 1793 return false; 1794 if (!(other instanceof AuditEventParticipantNetworkComponent)) 1795 return false; 1796 AuditEventParticipantNetworkComponent o = (AuditEventParticipantNetworkComponent) other; 1797 return compareValues(address, o.address, true) && compareValues(type, o.type, true); 1798 } 1799 1800 public boolean isEmpty() { 1801 return super.isEmpty() && (address == null || address.isEmpty()) && (type == null || type.isEmpty()) 1802 ; 1803 } 1804 1805 public String fhirType() { 1806 return "AuditEvent.participant.network"; 1807 1808 } 1809 1810 } 1811 1812 @Block() 1813 public static class AuditEventSourceComponent extends BackboneElement implements IBaseBackboneElement { 1814 /** 1815 * Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1816 */ 1817 @Child(name = "site", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1818 @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." ) 1819 protected StringType site; 1820 1821 /** 1822 * Identifier of the source where the event was detected. 1823 */ 1824 @Child(name = "identifier", type = {Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) 1825 @Description(shortDefinition="The identity of source detecting the event", formalDefinition="Identifier of the source where the event was detected." ) 1826 protected Identifier identifier; 1827 1828 /** 1829 * Code specifying the type of source where event originated. 1830 */ 1831 @Child(name = "type", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1832 @Description(shortDefinition="The type of source where event originated", formalDefinition="Code specifying the type of source where event originated." ) 1833 protected List<Coding> type; 1834 1835 private static final long serialVersionUID = -1562673890L; 1836 1837 /* 1838 * Constructor 1839 */ 1840 public AuditEventSourceComponent() { 1841 super(); 1842 } 1843 1844 /* 1845 * Constructor 1846 */ 1847 public AuditEventSourceComponent(Identifier identifier) { 1848 super(); 1849 this.identifier = identifier; 1850 } 1851 1852 /** 1853 * @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 1854 */ 1855 public StringType getSiteElement() { 1856 if (this.site == null) 1857 if (Configuration.errorOnAutoCreate()) 1858 throw new Error("Attempt to auto-create AuditEventSourceComponent.site"); 1859 else if (Configuration.doAutoCreate()) 1860 this.site = new StringType(); // bb 1861 return this.site; 1862 } 1863 1864 public boolean hasSiteElement() { 1865 return this.site != null && !this.site.isEmpty(); 1866 } 1867 1868 public boolean hasSite() { 1869 return this.site != null && !this.site.isEmpty(); 1870 } 1871 1872 /** 1873 * @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 1874 */ 1875 public AuditEventSourceComponent setSiteElement(StringType value) { 1876 this.site = value; 1877 return this; 1878 } 1879 1880 /** 1881 * @return Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1882 */ 1883 public String getSite() { 1884 return this.site == null ? null : this.site.getValue(); 1885 } 1886 1887 /** 1888 * @param value Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1889 */ 1890 public AuditEventSourceComponent setSite(String value) { 1891 if (Utilities.noString(value)) 1892 this.site = null; 1893 else { 1894 if (this.site == null) 1895 this.site = new StringType(); 1896 this.site.setValue(value); 1897 } 1898 return this; 1899 } 1900 1901 /** 1902 * @return {@link #identifier} (Identifier of the source where the event was detected.) 1903 */ 1904 public Identifier getIdentifier() { 1905 if (this.identifier == null) 1906 if (Configuration.errorOnAutoCreate()) 1907 throw new Error("Attempt to auto-create AuditEventSourceComponent.identifier"); 1908 else if (Configuration.doAutoCreate()) 1909 this.identifier = new Identifier(); // cc 1910 return this.identifier; 1911 } 1912 1913 public boolean hasIdentifier() { 1914 return this.identifier != null && !this.identifier.isEmpty(); 1915 } 1916 1917 /** 1918 * @param value {@link #identifier} (Identifier of the source where the event was detected.) 1919 */ 1920 public AuditEventSourceComponent setIdentifier(Identifier value) { 1921 this.identifier = value; 1922 return this; 1923 } 1924 1925 /** 1926 * @return {@link #type} (Code specifying the type of source where event originated.) 1927 */ 1928 public List<Coding> getType() { 1929 if (this.type == null) 1930 this.type = new ArrayList<Coding>(); 1931 return this.type; 1932 } 1933 1934 public boolean hasType() { 1935 if (this.type == null) 1936 return false; 1937 for (Coding item : this.type) 1938 if (!item.isEmpty()) 1939 return true; 1940 return false; 1941 } 1942 1943 /** 1944 * @return {@link #type} (Code specifying the type of source where event originated.) 1945 */ 1946 // syntactic sugar 1947 public Coding addType() { //3 1948 Coding t = new Coding(); 1949 if (this.type == null) 1950 this.type = new ArrayList<Coding>(); 1951 this.type.add(t); 1952 return t; 1953 } 1954 1955 // syntactic sugar 1956 public AuditEventSourceComponent addType(Coding t) { //3 1957 if (t == null) 1958 return this; 1959 if (this.type == null) 1960 this.type = new ArrayList<Coding>(); 1961 this.type.add(t); 1962 return this; 1963 } 1964 1965 protected void listChildren(List<Property> childrenList) { 1966 super.listChildren(childrenList); 1967 childrenList.add(new Property("site", "string", "Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.", 0, java.lang.Integer.MAX_VALUE, site)); 1968 childrenList.add(new Property("identifier", "Identifier", "Identifier of the source where the event was detected.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1969 childrenList.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type)); 1970 } 1971 1972 @Override 1973 public void setProperty(String name, Base value) throws FHIRException { 1974 if (name.equals("site")) 1975 this.site = castToString(value); // StringType 1976 else if (name.equals("identifier")) 1977 this.identifier = castToIdentifier(value); // Identifier 1978 else if (name.equals("type")) 1979 this.getType().add(castToCoding(value)); 1980 else 1981 super.setProperty(name, value); 1982 } 1983 1984 @Override 1985 public Base addChild(String name) throws FHIRException { 1986 if (name.equals("site")) { 1987 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.site"); 1988 } 1989 else if (name.equals("identifier")) { 1990 this.identifier = new Identifier(); 1991 return this.identifier; 1992 } 1993 else if (name.equals("type")) { 1994 return addType(); 1995 } 1996 else 1997 return super.addChild(name); 1998 } 1999 2000 public AuditEventSourceComponent copy() { 2001 AuditEventSourceComponent dst = new AuditEventSourceComponent(); 2002 copyValues(dst); 2003 dst.site = site == null ? null : site.copy(); 2004 dst.identifier = identifier == null ? null : identifier.copy(); 2005 if (type != null) { 2006 dst.type = new ArrayList<Coding>(); 2007 for (Coding i : type) 2008 dst.type.add(i.copy()); 2009 }; 2010 return dst; 2011 } 2012 2013 @Override 2014 public boolean equalsDeep(Base other) { 2015 if (!super.equalsDeep(other)) 2016 return false; 2017 if (!(other instanceof AuditEventSourceComponent)) 2018 return false; 2019 AuditEventSourceComponent o = (AuditEventSourceComponent) other; 2020 return compareDeep(site, o.site, true) && compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) 2021 ; 2022 } 2023 2024 @Override 2025 public boolean equalsShallow(Base other) { 2026 if (!super.equalsShallow(other)) 2027 return false; 2028 if (!(other instanceof AuditEventSourceComponent)) 2029 return false; 2030 AuditEventSourceComponent o = (AuditEventSourceComponent) other; 2031 return compareValues(site, o.site, true); 2032 } 2033 2034 public boolean isEmpty() { 2035 return super.isEmpty() && (site == null || site.isEmpty()) && (identifier == null || identifier.isEmpty()) 2036 && (type == null || type.isEmpty()); 2037 } 2038 2039 public String fhirType() { 2040 return "AuditEvent.source"; 2041 2042 } 2043 2044 } 2045 2046 @Block() 2047 public static class AuditEventObjectComponent extends BackboneElement implements IBaseBackboneElement { 2048 /** 2049 * Identifies a specific instance of the participant object. The reference should always be version specific. 2050 */ 2051 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 2052 @Description(shortDefinition="Specific instance of object (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) 2053 protected Identifier identifier; 2054 2055 /** 2056 * Identifies a specific instance of the participant object. The reference should always be version specific. 2057 */ 2058 @Child(name = "reference", type = {}, order=2, min=0, max=1, modifier=false, summary=true) 2059 @Description(shortDefinition="Specific instance of resource (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) 2060 protected Reference reference; 2061 2062 /** 2063 * The actual object that is the target of the reference (Identifies a specific instance of the participant object. The reference should always be version specific.) 2064 */ 2065 protected Resource referenceTarget; 2066 2067 /** 2068 * The type of the object that was involved in this audit event. 2069 */ 2070 @Child(name = "type", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) 2071 @Description(shortDefinition="Type of object involved", formalDefinition="The type of the object that was involved in this audit event." ) 2072 protected Coding type; 2073 2074 /** 2075 * Code representing the functional application role of Participant Object being audited. 2076 */ 2077 @Child(name = "role", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=false) 2078 @Description(shortDefinition="What role the Object played", formalDefinition="Code representing the functional application role of Participant Object being audited." ) 2079 protected Coding role; 2080 2081 /** 2082 * Identifier for the data life-cycle stage for the participant object. 2083 */ 2084 @Child(name = "lifecycle", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=false) 2085 @Description(shortDefinition="Life-cycle stage for the object", formalDefinition="Identifier for the data life-cycle stage for the participant object." ) 2086 protected Coding lifecycle; 2087 2088 /** 2089 * Denotes security labels for the identified object. 2090 */ 2091 @Child(name = "securityLabel", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2092 @Description(shortDefinition="Security labels applied to the object", formalDefinition="Denotes security labels for the identified object." ) 2093 protected List<Coding> securityLabel; 2094 2095 /** 2096 * An instance-specific descriptor of the Participant Object ID audited, such as a person's name. 2097 */ 2098 @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 2099 @Description(shortDefinition="Instance-specific descriptor for Object", formalDefinition="An instance-specific descriptor of the Participant Object ID audited, such as a person's name." ) 2100 protected StringType name; 2101 2102 /** 2103 * Text that describes the object in more detail. 2104 */ 2105 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2106 @Description(shortDefinition="Descriptive text", formalDefinition="Text that describes the object in more detail." ) 2107 protected StringType description; 2108 2109 /** 2110 * The actual query for a query-type participant object. 2111 */ 2112 @Child(name = "query", type = {Base64BinaryType.class}, order=9, min=0, max=1, modifier=false, summary=true) 2113 @Description(shortDefinition="Actual query for object", formalDefinition="The actual query for a query-type participant object." ) 2114 protected Base64BinaryType query; 2115 2116 /** 2117 * Additional Information about the Object. 2118 */ 2119 @Child(name = "detail", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2120 @Description(shortDefinition="Additional Information about the Object", formalDefinition="Additional Information about the Object." ) 2121 protected List<AuditEventObjectDetailComponent> detail; 2122 2123 private static final long serialVersionUID = 997591908L; 2124 2125 /* 2126 * Constructor 2127 */ 2128 public AuditEventObjectComponent() { 2129 super(); 2130 } 2131 2132 /** 2133 * @return {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) 2134 */ 2135 public Identifier getIdentifier() { 2136 if (this.identifier == null) 2137 if (Configuration.errorOnAutoCreate()) 2138 throw new Error("Attempt to auto-create AuditEventObjectComponent.identifier"); 2139 else if (Configuration.doAutoCreate()) 2140 this.identifier = new Identifier(); // cc 2141 return this.identifier; 2142 } 2143 2144 public boolean hasIdentifier() { 2145 return this.identifier != null && !this.identifier.isEmpty(); 2146 } 2147 2148 /** 2149 * @param value {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) 2150 */ 2151 public AuditEventObjectComponent setIdentifier(Identifier value) { 2152 this.identifier = value; 2153 return this; 2154 } 2155 2156 /** 2157 * @return {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) 2158 */ 2159 public Reference getReference() { 2160 if (this.reference == null) 2161 if (Configuration.errorOnAutoCreate()) 2162 throw new Error("Attempt to auto-create AuditEventObjectComponent.reference"); 2163 else if (Configuration.doAutoCreate()) 2164 this.reference = new Reference(); // cc 2165 return this.reference; 2166 } 2167 2168 public boolean hasReference() { 2169 return this.reference != null && !this.reference.isEmpty(); 2170 } 2171 2172 /** 2173 * @param value {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) 2174 */ 2175 public AuditEventObjectComponent setReference(Reference value) { 2176 this.reference = value; 2177 return this; 2178 } 2179 2180 /** 2181 * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) 2182 */ 2183 public Resource getReferenceTarget() { 2184 return this.referenceTarget; 2185 } 2186 2187 /** 2188 * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) 2189 */ 2190 public AuditEventObjectComponent setReferenceTarget(Resource value) { 2191 this.referenceTarget = value; 2192 return this; 2193 } 2194 2195 /** 2196 * @return {@link #type} (The type of the object that was involved in this audit event.) 2197 */ 2198 public Coding getType() { 2199 if (this.type == null) 2200 if (Configuration.errorOnAutoCreate()) 2201 throw new Error("Attempt to auto-create AuditEventObjectComponent.type"); 2202 else if (Configuration.doAutoCreate()) 2203 this.type = new Coding(); // cc 2204 return this.type; 2205 } 2206 2207 public boolean hasType() { 2208 return this.type != null && !this.type.isEmpty(); 2209 } 2210 2211 /** 2212 * @param value {@link #type} (The type of the object that was involved in this audit event.) 2213 */ 2214 public AuditEventObjectComponent setType(Coding value) { 2215 this.type = value; 2216 return this; 2217 } 2218 2219 /** 2220 * @return {@link #role} (Code representing the functional application role of Participant Object being audited.) 2221 */ 2222 public Coding getRole() { 2223 if (this.role == null) 2224 if (Configuration.errorOnAutoCreate()) 2225 throw new Error("Attempt to auto-create AuditEventObjectComponent.role"); 2226 else if (Configuration.doAutoCreate()) 2227 this.role = new Coding(); // cc 2228 return this.role; 2229 } 2230 2231 public boolean hasRole() { 2232 return this.role != null && !this.role.isEmpty(); 2233 } 2234 2235 /** 2236 * @param value {@link #role} (Code representing the functional application role of Participant Object being audited.) 2237 */ 2238 public AuditEventObjectComponent setRole(Coding value) { 2239 this.role = value; 2240 return this; 2241 } 2242 2243 /** 2244 * @return {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.) 2245 */ 2246 public Coding getLifecycle() { 2247 if (this.lifecycle == null) 2248 if (Configuration.errorOnAutoCreate()) 2249 throw new Error("Attempt to auto-create AuditEventObjectComponent.lifecycle"); 2250 else if (Configuration.doAutoCreate()) 2251 this.lifecycle = new Coding(); // cc 2252 return this.lifecycle; 2253 } 2254 2255 public boolean hasLifecycle() { 2256 return this.lifecycle != null && !this.lifecycle.isEmpty(); 2257 } 2258 2259 /** 2260 * @param value {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.) 2261 */ 2262 public AuditEventObjectComponent setLifecycle(Coding value) { 2263 this.lifecycle = value; 2264 return this; 2265 } 2266 2267 /** 2268 * @return {@link #securityLabel} (Denotes security labels for the identified object.) 2269 */ 2270 public List<Coding> getSecurityLabel() { 2271 if (this.securityLabel == null) 2272 this.securityLabel = new ArrayList<Coding>(); 2273 return this.securityLabel; 2274 } 2275 2276 public boolean hasSecurityLabel() { 2277 if (this.securityLabel == null) 2278 return false; 2279 for (Coding item : this.securityLabel) 2280 if (!item.isEmpty()) 2281 return true; 2282 return false; 2283 } 2284 2285 /** 2286 * @return {@link #securityLabel} (Denotes security labels for the identified object.) 2287 */ 2288 // syntactic sugar 2289 public Coding addSecurityLabel() { //3 2290 Coding t = new Coding(); 2291 if (this.securityLabel == null) 2292 this.securityLabel = new ArrayList<Coding>(); 2293 this.securityLabel.add(t); 2294 return t; 2295 } 2296 2297 // syntactic sugar 2298 public AuditEventObjectComponent addSecurityLabel(Coding t) { //3 2299 if (t == null) 2300 return this; 2301 if (this.securityLabel == null) 2302 this.securityLabel = new ArrayList<Coding>(); 2303 this.securityLabel.add(t); 2304 return this; 2305 } 2306 2307 /** 2308 * @return {@link #name} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2309 */ 2310 public StringType getNameElement() { 2311 if (this.name == null) 2312 if (Configuration.errorOnAutoCreate()) 2313 throw new Error("Attempt to auto-create AuditEventObjectComponent.name"); 2314 else if (Configuration.doAutoCreate()) 2315 this.name = new StringType(); // bb 2316 return this.name; 2317 } 2318 2319 public boolean hasNameElement() { 2320 return this.name != null && !this.name.isEmpty(); 2321 } 2322 2323 public boolean hasName() { 2324 return this.name != null && !this.name.isEmpty(); 2325 } 2326 2327 /** 2328 * @param value {@link #name} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2329 */ 2330 public AuditEventObjectComponent setNameElement(StringType value) { 2331 this.name = value; 2332 return this; 2333 } 2334 2335 /** 2336 * @return An instance-specific descriptor of the Participant Object ID audited, such as a person's name. 2337 */ 2338 public String getName() { 2339 return this.name == null ? null : this.name.getValue(); 2340 } 2341 2342 /** 2343 * @param value An instance-specific descriptor of the Participant Object ID audited, such as a person's name. 2344 */ 2345 public AuditEventObjectComponent setName(String value) { 2346 if (Utilities.noString(value)) 2347 this.name = null; 2348 else { 2349 if (this.name == null) 2350 this.name = new StringType(); 2351 this.name.setValue(value); 2352 } 2353 return this; 2354 } 2355 2356 /** 2357 * @return {@link #description} (Text that describes the object in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2358 */ 2359 public StringType getDescriptionElement() { 2360 if (this.description == null) 2361 if (Configuration.errorOnAutoCreate()) 2362 throw new Error("Attempt to auto-create AuditEventObjectComponent.description"); 2363 else if (Configuration.doAutoCreate()) 2364 this.description = new StringType(); // bb 2365 return this.description; 2366 } 2367 2368 public boolean hasDescriptionElement() { 2369 return this.description != null && !this.description.isEmpty(); 2370 } 2371 2372 public boolean hasDescription() { 2373 return this.description != null && !this.description.isEmpty(); 2374 } 2375 2376 /** 2377 * @param value {@link #description} (Text that describes the object in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2378 */ 2379 public AuditEventObjectComponent setDescriptionElement(StringType value) { 2380 this.description = value; 2381 return this; 2382 } 2383 2384 /** 2385 * @return Text that describes the object in more detail. 2386 */ 2387 public String getDescription() { 2388 return this.description == null ? null : this.description.getValue(); 2389 } 2390 2391 /** 2392 * @param value Text that describes the object in more detail. 2393 */ 2394 public AuditEventObjectComponent setDescription(String value) { 2395 if (Utilities.noString(value)) 2396 this.description = null; 2397 else { 2398 if (this.description == null) 2399 this.description = new StringType(); 2400 this.description.setValue(value); 2401 } 2402 return this; 2403 } 2404 2405 /** 2406 * @return {@link #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value 2407 */ 2408 public Base64BinaryType getQueryElement() { 2409 if (this.query == null) 2410 if (Configuration.errorOnAutoCreate()) 2411 throw new Error("Attempt to auto-create AuditEventObjectComponent.query"); 2412 else if (Configuration.doAutoCreate()) 2413 this.query = new Base64BinaryType(); // bb 2414 return this.query; 2415 } 2416 2417 public boolean hasQueryElement() { 2418 return this.query != null && !this.query.isEmpty(); 2419 } 2420 2421 public boolean hasQuery() { 2422 return this.query != null && !this.query.isEmpty(); 2423 } 2424 2425 /** 2426 * @param value {@link #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value 2427 */ 2428 public AuditEventObjectComponent setQueryElement(Base64BinaryType value) { 2429 this.query = value; 2430 return this; 2431 } 2432 2433 /** 2434 * @return The actual query for a query-type participant object. 2435 */ 2436 public byte[] getQuery() { 2437 return this.query == null ? null : this.query.getValue(); 2438 } 2439 2440 /** 2441 * @param value The actual query for a query-type participant object. 2442 */ 2443 public AuditEventObjectComponent setQuery(byte[] value) { 2444 if (value == null) 2445 this.query = null; 2446 else { 2447 if (this.query == null) 2448 this.query = new Base64BinaryType(); 2449 this.query.setValue(value); 2450 } 2451 return this; 2452 } 2453 2454 /** 2455 * @return {@link #detail} (Additional Information about the Object.) 2456 */ 2457 public List<AuditEventObjectDetailComponent> getDetail() { 2458 if (this.detail == null) 2459 this.detail = new ArrayList<AuditEventObjectDetailComponent>(); 2460 return this.detail; 2461 } 2462 2463 public boolean hasDetail() { 2464 if (this.detail == null) 2465 return false; 2466 for (AuditEventObjectDetailComponent item : this.detail) 2467 if (!item.isEmpty()) 2468 return true; 2469 return false; 2470 } 2471 2472 /** 2473 * @return {@link #detail} (Additional Information about the Object.) 2474 */ 2475 // syntactic sugar 2476 public AuditEventObjectDetailComponent addDetail() { //3 2477 AuditEventObjectDetailComponent t = new AuditEventObjectDetailComponent(); 2478 if (this.detail == null) 2479 this.detail = new ArrayList<AuditEventObjectDetailComponent>(); 2480 this.detail.add(t); 2481 return t; 2482 } 2483 2484 // syntactic sugar 2485 public AuditEventObjectComponent addDetail(AuditEventObjectDetailComponent t) { //3 2486 if (t == null) 2487 return this; 2488 if (this.detail == null) 2489 this.detail = new ArrayList<AuditEventObjectDetailComponent>(); 2490 this.detail.add(t); 2491 return this; 2492 } 2493 2494 protected void listChildren(List<Property> childrenList) { 2495 super.listChildren(childrenList); 2496 childrenList.add(new Property("identifier", "Identifier", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2497 childrenList.add(new Property("reference", "Reference(Any)", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, reference)); 2498 childrenList.add(new Property("type", "Coding", "The type of the object that was involved in this audit event.", 0, java.lang.Integer.MAX_VALUE, type)); 2499 childrenList.add(new Property("role", "Coding", "Code representing the functional application role of Participant Object being audited.", 0, java.lang.Integer.MAX_VALUE, role)); 2500 childrenList.add(new Property("lifecycle", "Coding", "Identifier for the data life-cycle stage for the participant object.", 0, java.lang.Integer.MAX_VALUE, lifecycle)); 2501 childrenList.add(new Property("securityLabel", "Coding", "Denotes security labels for the identified object.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); 2502 childrenList.add(new Property("name", "string", "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", 0, java.lang.Integer.MAX_VALUE, name)); 2503 childrenList.add(new Property("description", "string", "Text that describes the object in more detail.", 0, java.lang.Integer.MAX_VALUE, description)); 2504 childrenList.add(new Property("query", "base64Binary", "The actual query for a query-type participant object.", 0, java.lang.Integer.MAX_VALUE, query)); 2505 childrenList.add(new Property("detail", "", "Additional Information about the Object.", 0, java.lang.Integer.MAX_VALUE, detail)); 2506 } 2507 2508 @Override 2509 public void setProperty(String name, Base value) throws FHIRException { 2510 if (name.equals("identifier")) 2511 this.identifier = castToIdentifier(value); // Identifier 2512 else if (name.equals("reference")) 2513 this.reference = castToReference(value); // Reference 2514 else if (name.equals("type")) 2515 this.type = castToCoding(value); // Coding 2516 else if (name.equals("role")) 2517 this.role = castToCoding(value); // Coding 2518 else if (name.equals("lifecycle")) 2519 this.lifecycle = castToCoding(value); // Coding 2520 else if (name.equals("securityLabel")) 2521 this.getSecurityLabel().add(castToCoding(value)); 2522 else if (name.equals("name")) 2523 this.name = castToString(value); // StringType 2524 else if (name.equals("description")) 2525 this.description = castToString(value); // StringType 2526 else if (name.equals("query")) 2527 this.query = castToBase64Binary(value); // Base64BinaryType 2528 else if (name.equals("detail")) 2529 this.getDetail().add((AuditEventObjectDetailComponent) value); 2530 else 2531 super.setProperty(name, value); 2532 } 2533 2534 @Override 2535 public Base addChild(String name) throws FHIRException { 2536 if (name.equals("identifier")) { 2537 this.identifier = new Identifier(); 2538 return this.identifier; 2539 } 2540 else if (name.equals("reference")) { 2541 this.reference = new Reference(); 2542 return this.reference; 2543 } 2544 else if (name.equals("type")) { 2545 this.type = new Coding(); 2546 return this.type; 2547 } 2548 else if (name.equals("role")) { 2549 this.role = new Coding(); 2550 return this.role; 2551 } 2552 else if (name.equals("lifecycle")) { 2553 this.lifecycle = new Coding(); 2554 return this.lifecycle; 2555 } 2556 else if (name.equals("securityLabel")) { 2557 return addSecurityLabel(); 2558 } 2559 else if (name.equals("name")) { 2560 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); 2561 } 2562 else if (name.equals("description")) { 2563 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.description"); 2564 } 2565 else if (name.equals("query")) { 2566 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.query"); 2567 } 2568 else if (name.equals("detail")) { 2569 return addDetail(); 2570 } 2571 else 2572 return super.addChild(name); 2573 } 2574 2575 public AuditEventObjectComponent copy() { 2576 AuditEventObjectComponent dst = new AuditEventObjectComponent(); 2577 copyValues(dst); 2578 dst.identifier = identifier == null ? null : identifier.copy(); 2579 dst.reference = reference == null ? null : reference.copy(); 2580 dst.type = type == null ? null : type.copy(); 2581 dst.role = role == null ? null : role.copy(); 2582 dst.lifecycle = lifecycle == null ? null : lifecycle.copy(); 2583 if (securityLabel != null) { 2584 dst.securityLabel = new ArrayList<Coding>(); 2585 for (Coding i : securityLabel) 2586 dst.securityLabel.add(i.copy()); 2587 }; 2588 dst.name = name == null ? null : name.copy(); 2589 dst.description = description == null ? null : description.copy(); 2590 dst.query = query == null ? null : query.copy(); 2591 if (detail != null) { 2592 dst.detail = new ArrayList<AuditEventObjectDetailComponent>(); 2593 for (AuditEventObjectDetailComponent i : detail) 2594 dst.detail.add(i.copy()); 2595 }; 2596 return dst; 2597 } 2598 2599 @Override 2600 public boolean equalsDeep(Base other) { 2601 if (!super.equalsDeep(other)) 2602 return false; 2603 if (!(other instanceof AuditEventObjectComponent)) 2604 return false; 2605 AuditEventObjectComponent o = (AuditEventObjectComponent) other; 2606 return compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true) 2607 && compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(lifecycle, o.lifecycle, true) 2608 && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) 2609 && compareDeep(query, o.query, true) && compareDeep(detail, o.detail, true); 2610 } 2611 2612 @Override 2613 public boolean equalsShallow(Base other) { 2614 if (!super.equalsShallow(other)) 2615 return false; 2616 if (!(other instanceof AuditEventObjectComponent)) 2617 return false; 2618 AuditEventObjectComponent o = (AuditEventObjectComponent) other; 2619 return compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(query, o.query, true) 2620 ; 2621 } 2622 2623 public boolean isEmpty() { 2624 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) 2625 && (type == null || type.isEmpty()) && (role == null || role.isEmpty()) && (lifecycle == null || lifecycle.isEmpty()) 2626 && (securityLabel == null || securityLabel.isEmpty()) && (name == null || name.isEmpty()) 2627 && (description == null || description.isEmpty()) && (query == null || query.isEmpty()) && (detail == null || detail.isEmpty()) 2628 ; 2629 } 2630 2631 public String fhirType() { 2632 return "AuditEvent.object"; 2633 2634 } 2635 2636 } 2637 2638 @Block() 2639 public static class AuditEventObjectDetailComponent extends BackboneElement implements IBaseBackboneElement { 2640 /** 2641 * Name of the property. 2642 */ 2643 @Child(name = "type", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2644 @Description(shortDefinition="Name of the property", formalDefinition="Name of the property." ) 2645 protected StringType type; 2646 2647 /** 2648 * Property value. 2649 */ 2650 @Child(name = "value", type = {Base64BinaryType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2651 @Description(shortDefinition="Property value", formalDefinition="Property value." ) 2652 protected Base64BinaryType value; 2653 2654 private static final long serialVersionUID = 11139504L; 2655 2656 /* 2657 * Constructor 2658 */ 2659 public AuditEventObjectDetailComponent() { 2660 super(); 2661 } 2662 2663 /* 2664 * Constructor 2665 */ 2666 public AuditEventObjectDetailComponent(StringType type, Base64BinaryType value) { 2667 super(); 2668 this.type = type; 2669 this.value = value; 2670 } 2671 2672 /** 2673 * @return {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2674 */ 2675 public StringType getTypeElement() { 2676 if (this.type == null) 2677 if (Configuration.errorOnAutoCreate()) 2678 throw new Error("Attempt to auto-create AuditEventObjectDetailComponent.type"); 2679 else if (Configuration.doAutoCreate()) 2680 this.type = new StringType(); // bb 2681 return this.type; 2682 } 2683 2684 public boolean hasTypeElement() { 2685 return this.type != null && !this.type.isEmpty(); 2686 } 2687 2688 public boolean hasType() { 2689 return this.type != null && !this.type.isEmpty(); 2690 } 2691 2692 /** 2693 * @param value {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2694 */ 2695 public AuditEventObjectDetailComponent setTypeElement(StringType value) { 2696 this.type = value; 2697 return this; 2698 } 2699 2700 /** 2701 * @return Name of the property. 2702 */ 2703 public String getType() { 2704 return this.type == null ? null : this.type.getValue(); 2705 } 2706 2707 /** 2708 * @param value Name of the property. 2709 */ 2710 public AuditEventObjectDetailComponent setType(String value) { 2711 if (this.type == null) 2712 this.type = new StringType(); 2713 this.type.setValue(value); 2714 return this; 2715 } 2716 2717 /** 2718 * @return {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2719 */ 2720 public Base64BinaryType getValueElement() { 2721 if (this.value == null) 2722 if (Configuration.errorOnAutoCreate()) 2723 throw new Error("Attempt to auto-create AuditEventObjectDetailComponent.value"); 2724 else if (Configuration.doAutoCreate()) 2725 this.value = new Base64BinaryType(); // bb 2726 return this.value; 2727 } 2728 2729 public boolean hasValueElement() { 2730 return this.value != null && !this.value.isEmpty(); 2731 } 2732 2733 public boolean hasValue() { 2734 return this.value != null && !this.value.isEmpty(); 2735 } 2736 2737 /** 2738 * @param value {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2739 */ 2740 public AuditEventObjectDetailComponent setValueElement(Base64BinaryType value) { 2741 this.value = value; 2742 return this; 2743 } 2744 2745 /** 2746 * @return Property value. 2747 */ 2748 public byte[] getValue() { 2749 return this.value == null ? null : this.value.getValue(); 2750 } 2751 2752 /** 2753 * @param value Property value. 2754 */ 2755 public AuditEventObjectDetailComponent setValue(byte[] value) { 2756 if (this.value == null) 2757 this.value = new Base64BinaryType(); 2758 this.value.setValue(value); 2759 return this; 2760 } 2761 2762 protected void listChildren(List<Property> childrenList) { 2763 super.listChildren(childrenList); 2764 childrenList.add(new Property("type", "string", "Name of the property.", 0, java.lang.Integer.MAX_VALUE, type)); 2765 childrenList.add(new Property("value", "base64Binary", "Property value.", 0, java.lang.Integer.MAX_VALUE, value)); 2766 } 2767 2768 @Override 2769 public void setProperty(String name, Base value) throws FHIRException { 2770 if (name.equals("type")) 2771 this.type = castToString(value); // StringType 2772 else if (name.equals("value")) 2773 this.value = castToBase64Binary(value); // Base64BinaryType 2774 else 2775 super.setProperty(name, value); 2776 } 2777 2778 @Override 2779 public Base addChild(String name) throws FHIRException { 2780 if (name.equals("type")) { 2781 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); 2782 } 2783 else if (name.equals("value")) { 2784 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.value"); 2785 } 2786 else 2787 return super.addChild(name); 2788 } 2789 2790 public AuditEventObjectDetailComponent copy() { 2791 AuditEventObjectDetailComponent dst = new AuditEventObjectDetailComponent(); 2792 copyValues(dst); 2793 dst.type = type == null ? null : type.copy(); 2794 dst.value = value == null ? null : value.copy(); 2795 return dst; 2796 } 2797 2798 @Override 2799 public boolean equalsDeep(Base other) { 2800 if (!super.equalsDeep(other)) 2801 return false; 2802 if (!(other instanceof AuditEventObjectDetailComponent)) 2803 return false; 2804 AuditEventObjectDetailComponent o = (AuditEventObjectDetailComponent) other; 2805 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 2806 } 2807 2808 @Override 2809 public boolean equalsShallow(Base other) { 2810 if (!super.equalsShallow(other)) 2811 return false; 2812 if (!(other instanceof AuditEventObjectDetailComponent)) 2813 return false; 2814 AuditEventObjectDetailComponent o = (AuditEventObjectDetailComponent) other; 2815 return compareValues(type, o.type, true) && compareValues(value, o.value, true); 2816 } 2817 2818 public boolean isEmpty() { 2819 return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) 2820 ; 2821 } 2822 2823 public String fhirType() { 2824 return "AuditEvent.object.detail"; 2825 2826 } 2827 2828 } 2829 2830 /** 2831 * Identifies the name, action type, time, and disposition of the audited event. 2832 */ 2833 @Child(name = "event", type = {}, order=0, min=1, max=1, modifier=false, summary=false) 2834 @Description(shortDefinition="What was done", formalDefinition="Identifies the name, action type, time, and disposition of the audited event." ) 2835 protected AuditEventEventComponent event; 2836 2837 /** 2838 * A person, a hardware device or software process. 2839 */ 2840 @Child(name = "participant", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2841 @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) 2842 protected List<AuditEventParticipantComponent> participant; 2843 2844 /** 2845 * Application systems and processes. 2846 */ 2847 @Child(name = "source", type = {}, order=2, min=1, max=1, modifier=false, summary=false) 2848 @Description(shortDefinition="Application systems and processes", formalDefinition="Application systems and processes." ) 2849 protected AuditEventSourceComponent source; 2850 2851 /** 2852 * Specific instances of data or objects that have been accessed. 2853 */ 2854 @Child(name = "object", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2855 @Description(shortDefinition="Specific instances of data or objects that have been accessed", formalDefinition="Specific instances of data or objects that have been accessed." ) 2856 protected List<AuditEventObjectComponent> object; 2857 2858 private static final long serialVersionUID = -1495151000L; 2859 2860 /* 2861 * Constructor 2862 */ 2863 public AuditEvent() { 2864 super(); 2865 } 2866 2867 /* 2868 * Constructor 2869 */ 2870 public AuditEvent(AuditEventEventComponent event, AuditEventSourceComponent source) { 2871 super(); 2872 this.event = event; 2873 this.source = source; 2874 } 2875 2876 /** 2877 * @return {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) 2878 */ 2879 public AuditEventEventComponent getEvent() { 2880 if (this.event == null) 2881 if (Configuration.errorOnAutoCreate()) 2882 throw new Error("Attempt to auto-create AuditEvent.event"); 2883 else if (Configuration.doAutoCreate()) 2884 this.event = new AuditEventEventComponent(); // cc 2885 return this.event; 2886 } 2887 2888 public boolean hasEvent() { 2889 return this.event != null && !this.event.isEmpty(); 2890 } 2891 2892 /** 2893 * @param value {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) 2894 */ 2895 public AuditEvent setEvent(AuditEventEventComponent value) { 2896 this.event = value; 2897 return this; 2898 } 2899 2900 /** 2901 * @return {@link #participant} (A person, a hardware device or software process.) 2902 */ 2903 public List<AuditEventParticipantComponent> getParticipant() { 2904 if (this.participant == null) 2905 this.participant = new ArrayList<AuditEventParticipantComponent>(); 2906 return this.participant; 2907 } 2908 2909 public boolean hasParticipant() { 2910 if (this.participant == null) 2911 return false; 2912 for (AuditEventParticipantComponent item : this.participant) 2913 if (!item.isEmpty()) 2914 return true; 2915 return false; 2916 } 2917 2918 /** 2919 * @return {@link #participant} (A person, a hardware device or software process.) 2920 */ 2921 // syntactic sugar 2922 public AuditEventParticipantComponent addParticipant() { //3 2923 AuditEventParticipantComponent t = new AuditEventParticipantComponent(); 2924 if (this.participant == null) 2925 this.participant = new ArrayList<AuditEventParticipantComponent>(); 2926 this.participant.add(t); 2927 return t; 2928 } 2929 2930 // syntactic sugar 2931 public AuditEvent addParticipant(AuditEventParticipantComponent t) { //3 2932 if (t == null) 2933 return this; 2934 if (this.participant == null) 2935 this.participant = new ArrayList<AuditEventParticipantComponent>(); 2936 this.participant.add(t); 2937 return this; 2938 } 2939 2940 /** 2941 * @return {@link #source} (Application systems and processes.) 2942 */ 2943 public AuditEventSourceComponent getSource() { 2944 if (this.source == null) 2945 if (Configuration.errorOnAutoCreate()) 2946 throw new Error("Attempt to auto-create AuditEvent.source"); 2947 else if (Configuration.doAutoCreate()) 2948 this.source = new AuditEventSourceComponent(); // cc 2949 return this.source; 2950 } 2951 2952 public boolean hasSource() { 2953 return this.source != null && !this.source.isEmpty(); 2954 } 2955 2956 /** 2957 * @param value {@link #source} (Application systems and processes.) 2958 */ 2959 public AuditEvent setSource(AuditEventSourceComponent value) { 2960 this.source = value; 2961 return this; 2962 } 2963 2964 /** 2965 * @return {@link #object} (Specific instances of data or objects that have been accessed.) 2966 */ 2967 public List<AuditEventObjectComponent> getObject() { 2968 if (this.object == null) 2969 this.object = new ArrayList<AuditEventObjectComponent>(); 2970 return this.object; 2971 } 2972 2973 public boolean hasObject() { 2974 if (this.object == null) 2975 return false; 2976 for (AuditEventObjectComponent item : this.object) 2977 if (!item.isEmpty()) 2978 return true; 2979 return false; 2980 } 2981 2982 /** 2983 * @return {@link #object} (Specific instances of data or objects that have been accessed.) 2984 */ 2985 // syntactic sugar 2986 public AuditEventObjectComponent addObject() { //3 2987 AuditEventObjectComponent t = new AuditEventObjectComponent(); 2988 if (this.object == null) 2989 this.object = new ArrayList<AuditEventObjectComponent>(); 2990 this.object.add(t); 2991 return t; 2992 } 2993 2994 // syntactic sugar 2995 public AuditEvent addObject(AuditEventObjectComponent t) { //3 2996 if (t == null) 2997 return this; 2998 if (this.object == null) 2999 this.object = new ArrayList<AuditEventObjectComponent>(); 3000 this.object.add(t); 3001 return this; 3002 } 3003 3004 protected void listChildren(List<Property> childrenList) { 3005 super.listChildren(childrenList); 3006 childrenList.add(new Property("event", "", "Identifies the name, action type, time, and disposition of the audited event.", 0, java.lang.Integer.MAX_VALUE, event)); 3007 childrenList.add(new Property("participant", "", "A person, a hardware device or software process.", 0, java.lang.Integer.MAX_VALUE, participant)); 3008 childrenList.add(new Property("source", "", "Application systems and processes.", 0, java.lang.Integer.MAX_VALUE, source)); 3009 childrenList.add(new Property("object", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, object)); 3010 } 3011 3012 @Override 3013 public void setProperty(String name, Base value) throws FHIRException { 3014 if (name.equals("event")) 3015 this.event = (AuditEventEventComponent) value; // AuditEventEventComponent 3016 else if (name.equals("participant")) 3017 this.getParticipant().add((AuditEventParticipantComponent) value); 3018 else if (name.equals("source")) 3019 this.source = (AuditEventSourceComponent) value; // AuditEventSourceComponent 3020 else if (name.equals("object")) 3021 this.getObject().add((AuditEventObjectComponent) value); 3022 else 3023 super.setProperty(name, value); 3024 } 3025 3026 @Override 3027 public Base addChild(String name) throws FHIRException { 3028 if (name.equals("event")) { 3029 this.event = new AuditEventEventComponent(); 3030 return this.event; 3031 } 3032 else if (name.equals("participant")) { 3033 return addParticipant(); 3034 } 3035 else if (name.equals("source")) { 3036 this.source = new AuditEventSourceComponent(); 3037 return this.source; 3038 } 3039 else if (name.equals("object")) { 3040 return addObject(); 3041 } 3042 else 3043 return super.addChild(name); 3044 } 3045 3046 public String fhirType() { 3047 return "AuditEvent"; 3048 3049 } 3050 3051 public AuditEvent copy() { 3052 AuditEvent dst = new AuditEvent(); 3053 copyValues(dst); 3054 dst.event = event == null ? null : event.copy(); 3055 if (participant != null) { 3056 dst.participant = new ArrayList<AuditEventParticipantComponent>(); 3057 for (AuditEventParticipantComponent i : participant) 3058 dst.participant.add(i.copy()); 3059 }; 3060 dst.source = source == null ? null : source.copy(); 3061 if (object != null) { 3062 dst.object = new ArrayList<AuditEventObjectComponent>(); 3063 for (AuditEventObjectComponent i : object) 3064 dst.object.add(i.copy()); 3065 }; 3066 return dst; 3067 } 3068 3069 protected AuditEvent typedCopy() { 3070 return copy(); 3071 } 3072 3073 @Override 3074 public boolean equalsDeep(Base other) { 3075 if (!super.equalsDeep(other)) 3076 return false; 3077 if (!(other instanceof AuditEvent)) 3078 return false; 3079 AuditEvent o = (AuditEvent) other; 3080 return compareDeep(event, o.event, true) && compareDeep(participant, o.participant, true) && compareDeep(source, o.source, true) 3081 && compareDeep(object, o.object, true); 3082 } 3083 3084 @Override 3085 public boolean equalsShallow(Base other) { 3086 if (!super.equalsShallow(other)) 3087 return false; 3088 if (!(other instanceof AuditEvent)) 3089 return false; 3090 AuditEvent o = (AuditEvent) other; 3091 return true; 3092 } 3093 3094 public boolean isEmpty() { 3095 return super.isEmpty() && (event == null || event.isEmpty()) && (participant == null || participant.isEmpty()) 3096 && (source == null || source.isEmpty()) && (object == null || object.isEmpty()); 3097 } 3098 3099 @Override 3100 public ResourceType getResourceType() { 3101 return ResourceType.AuditEvent; 3102 } 3103 3104 @SearchParamDefinition(name="date", path="AuditEvent.event.dateTime", description="Time when the event occurred on source", type="date" ) 3105 public static final String SP_DATE = "date"; 3106 @SearchParamDefinition(name="address", path="AuditEvent.participant.network.address", description="Identifier for the network access point of the user device", type="token" ) 3107 public static final String SP_ADDRESS = "address"; 3108 @SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The identity of source detecting the event", type="token" ) 3109 public static final String SP_SOURCE = "source"; 3110 @SearchParamDefinition(name="type", path="AuditEvent.event.type", description="Type/identifier of event", type="token" ) 3111 public static final String SP_TYPE = "type"; 3112 @SearchParamDefinition(name="altid", path="AuditEvent.participant.altId", description="Alternative User id e.g. authentication", type="token" ) 3113 public static final String SP_ALTID = "altid"; 3114 @SearchParamDefinition(name="participant", path="AuditEvent.participant.reference", description="Direct reference to resource", type="reference" ) 3115 public static final String SP_PARTICIPANT = "participant"; 3116 @SearchParamDefinition(name="reference", path="AuditEvent.object.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) 3117 public static final String SP_REFERENCE = "reference"; 3118 @SearchParamDefinition(name="site", path="AuditEvent.source.site", description="Logical source location within the enterprise", type="token" ) 3119 public static final String SP_SITE = "site"; 3120 @SearchParamDefinition(name="subtype", path="AuditEvent.event.subtype", description="More specific type/id for the event", type="token" ) 3121 public static final String SP_SUBTYPE = "subtype"; 3122 @SearchParamDefinition(name="identity", path="AuditEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) 3123 public static final String SP_IDENTITY = "identity"; 3124 @SearchParamDefinition(name="patient", path="AuditEvent.participant.reference | AuditEvent.object.reference", description="Direct reference to resource", type="reference" ) 3125 public static final String SP_PATIENT = "patient"; 3126 @SearchParamDefinition(name="object-type", path="AuditEvent.object.type", description="Type of object involved", type="token" ) 3127 public static final String SP_OBJECTTYPE = "object-type"; 3128 @SearchParamDefinition(name="name", path="AuditEvent.participant.name", description="Human-meaningful name for the user", type="string" ) 3129 public static final String SP_NAME = "name"; 3130 @SearchParamDefinition(name="action", path="AuditEvent.event.action", description="Type of action performed during the event", type="token" ) 3131 public static final String SP_ACTION = "action"; 3132 @SearchParamDefinition(name="user", path="AuditEvent.participant.userId", description="Unique identifier for the user", type="token" ) 3133 public static final String SP_USER = "user"; 3134 @SearchParamDefinition(name="desc", path="AuditEvent.object.name", description="Instance-specific descriptor for Object", type="string" ) 3135 public static final String SP_DESC = "desc"; 3136 @SearchParamDefinition(name="policy", path="AuditEvent.participant.policy", description="Policy that authorized event", type="uri" ) 3137 public static final String SP_POLICY = "policy"; 3138 3139}