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