001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
043import ca.uhn.fhir.model.dstu2.resource.Appointment;
044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
057import ca.uhn.fhir.model.dstu2.resource.BodySite;
058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
059import ca.uhn.fhir.model.dstu2.resource.CarePlan;
060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
063import ca.uhn.fhir.model.dstu2.resource.Claim;
064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
069import ca.uhn.fhir.model.dstu2.composite.CodingDt;
070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
073import ca.uhn.fhir.model.dstu2.resource.Composition;
074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
077import ca.uhn.fhir.model.dstu2.resource.Condition;
078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
082import ca.uhn.fhir.model.dstu2.resource.Conformance;
083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
088import ca.uhn.fhir.model.dstu2.resource.Contract;
089import ca.uhn.fhir.model.dstu2.resource.Coverage;
090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
093import ca.uhn.fhir.model.dstu2.resource.Device;
094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
112import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
117import ca.uhn.fhir.model.dstu2.resource.Encounter;
118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
129import ca.uhn.fhir.model.dstu2.resource.Goal;
130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
132import ca.uhn.fhir.model.dstu2.resource.Group;
133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
138import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
145import ca.uhn.fhir.model.dstu2.resource.Immunization;
146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
154import ca.uhn.fhir.model.dstu2.resource.Location;
155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
160import ca.uhn.fhir.model.dstu2.resource.Media;
161import ca.uhn.fhir.model.dstu2.resource.Medication;
162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
171import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
177import ca.uhn.fhir.model.dstu2.resource.Observation;
178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
184import ca.uhn.fhir.model.dstu2.resource.Order;
185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.Organization;
187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
191import ca.uhn.fhir.model.dstu2.resource.Patient;
192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
193import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
194import ca.uhn.fhir.model.dstu2.resource.Person;
195import ca.uhn.fhir.model.dstu2.resource.Practitioner;
196import ca.uhn.fhir.model.dstu2.resource.Procedure;
197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
203import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
204import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
208import ca.uhn.fhir.model.dstu2.composite.RangeDt;
209import ca.uhn.fhir.model.dstu2.composite.RatioDt;
210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
223import ca.uhn.fhir.model.dstu2.resource.Schedule;
224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
228import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
229import ca.uhn.fhir.model.dstu2.resource.Slot;
230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.Specimen;
232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
237import ca.uhn.fhir.model.dstu2.resource.Substance;
238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
243import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
244import ca.uhn.fhir.model.dstu2.composite.TimingDt;
245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
249import ca.uhn.fhir.model.dstu2.resource.ValueSet;
250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
254import ca.uhn.fhir.model.api.IResource;
255import ca.uhn.fhir.model.dstu2.composite.AgeDt;
256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
257import ca.uhn.fhir.model.dstu2.composite.DurationDt;
258import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
262import ca.uhn.fhir.model.primitive.Base64BinaryDt;
263import ca.uhn.fhir.model.primitive.BooleanDt;
264import ca.uhn.fhir.model.primitive.BoundCodeDt;
265import ca.uhn.fhir.model.primitive.CodeDt;
266import ca.uhn.fhir.model.primitive.DateDt;
267import ca.uhn.fhir.model.primitive.DateTimeDt;
268import ca.uhn.fhir.model.primitive.DecimalDt;
269import ca.uhn.fhir.model.primitive.IdDt;
270import ca.uhn.fhir.model.primitive.InstantDt;
271import ca.uhn.fhir.model.primitive.IntegerDt;
272import ca.uhn.fhir.model.primitive.OidDt;
273import ca.uhn.fhir.model.primitive.PositiveIntDt;
274import ca.uhn.fhir.model.primitive.StringDt;
275import ca.uhn.fhir.model.primitive.TimeDt;
276import ca.uhn.fhir.model.primitive.UnsignedIntDt;
277import ca.uhn.fhir.model.primitive.UriDt;
278
279
280/**
281 * HAPI/FHIR <b>AuditEvent</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * 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
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/AuditEvent">http://hl7.org/fhir/profiles/AuditEvent</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="AuditEvent", profile="http://hl7.org/fhir/profiles/AuditEvent", id="auditevent")
301public class AuditEvent extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>type</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>AuditEvent.event.type</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="type", path="AuditEvent.event.type", description="", type="token" 
314 )
315        public static final String SP_TYPE = "type";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>type</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>AuditEvent.event.type</b><br>
323         * </p>
324         */
325        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
326
327        /**
328         * Search parameter constant for <b>action</b>
329         * <p>
330         * Description: <b></b><br>
331         * Type: <b>token</b><br>
332         * Path: <b>AuditEvent.event.action</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="action", path="AuditEvent.event.action", description="", type="token" 
336 )
337        public static final String SP_ACTION = "action";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>action</b>
341         * <p>
342         * Description: <b></b><br>
343         * Type: <b>token</b><br>
344         * Path: <b>AuditEvent.event.action</b><br>
345         * </p>
346         */
347        public static final TokenClientParam ACTION = new TokenClientParam(SP_ACTION);
348
349        /**
350         * Search parameter constant for <b>date</b>
351         * <p>
352         * Description: <b></b><br>
353         * Type: <b>date</b><br>
354         * Path: <b>AuditEvent.event.dateTime</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="date", path="AuditEvent.event.dateTime", description="", type="date" 
358 )
359        public static final String SP_DATE = "date";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>date</b>
363         * <p>
364         * Description: <b></b><br>
365         * Type: <b>date</b><br>
366         * Path: <b>AuditEvent.event.dateTime</b><br>
367         * </p>
368         */
369        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
370
371        /**
372         * Search parameter constant for <b>subtype</b>
373         * <p>
374         * Description: <b></b><br>
375         * Type: <b>token</b><br>
376         * Path: <b>AuditEvent.event.subtype</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="subtype", path="AuditEvent.event.subtype", description="", type="token" 
380 )
381        public static final String SP_SUBTYPE = "subtype";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>subtype</b>
385         * <p>
386         * Description: <b></b><br>
387         * Type: <b>token</b><br>
388         * Path: <b>AuditEvent.event.subtype</b><br>
389         * </p>
390         */
391        public static final TokenClientParam SUBTYPE = new TokenClientParam(SP_SUBTYPE);
392
393        /**
394         * Search parameter constant for <b>user</b>
395         * <p>
396         * Description: <b></b><br>
397         * Type: <b>token</b><br>
398         * Path: <b>AuditEvent.participant.userId</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="user", path="AuditEvent.participant.userId", description="", type="token" 
402 )
403        public static final String SP_USER = "user";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>user</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>token</b><br>
410         * Path: <b>AuditEvent.participant.userId</b><br>
411         * </p>
412         */
413        public static final TokenClientParam USER = new TokenClientParam(SP_USER);
414
415        /**
416         * Search parameter constant for <b>name</b>
417         * <p>
418         * Description: <b></b><br>
419         * Type: <b>string</b><br>
420         * Path: <b>AuditEvent.participant.name</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="name", path="AuditEvent.participant.name", description="", type="string" 
424 )
425        public static final String SP_NAME = "name";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>name</b>
429         * <p>
430         * Description: <b></b><br>
431         * Type: <b>string</b><br>
432         * Path: <b>AuditEvent.participant.name</b><br>
433         * </p>
434         */
435        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
436
437        /**
438         * Search parameter constant for <b>address</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>AuditEvent.participant.network.address</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="address", path="AuditEvent.participant.network.address", description="", type="token" 
446 )
447        public static final String SP_ADDRESS = "address";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>address</b>
451         * <p>
452         * Description: <b></b><br>
453         * Type: <b>token</b><br>
454         * Path: <b>AuditEvent.participant.network.address</b><br>
455         * </p>
456         */
457        public static final TokenClientParam ADDRESS = new TokenClientParam(SP_ADDRESS);
458
459        /**
460         * Search parameter constant for <b>source</b>
461         * <p>
462         * Description: <b></b><br>
463         * Type: <b>token</b><br>
464         * Path: <b>AuditEvent.source.identifier</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="", type="token" 
468 )
469        public static final String SP_SOURCE = "source";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>source</b>
473         * <p>
474         * Description: <b></b><br>
475         * Type: <b>token</b><br>
476         * Path: <b>AuditEvent.source.identifier</b><br>
477         * </p>
478         */
479        public static final TokenClientParam SOURCE = new TokenClientParam(SP_SOURCE);
480
481        /**
482         * Search parameter constant for <b>site</b>
483         * <p>
484         * Description: <b></b><br>
485         * Type: <b>token</b><br>
486         * Path: <b>AuditEvent.source.site</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="site", path="AuditEvent.source.site", description="", type="token" 
490 )
491        public static final String SP_SITE = "site";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>site</b>
495         * <p>
496         * Description: <b></b><br>
497         * Type: <b>token</b><br>
498         * Path: <b>AuditEvent.source.site</b><br>
499         * </p>
500         */
501        public static final TokenClientParam SITE = new TokenClientParam(SP_SITE);
502
503        /**
504         * Search parameter constant for <b>object-type</b>
505         * <p>
506         * Description: <b></b><br>
507         * Type: <b>token</b><br>
508         * Path: <b>AuditEvent.object.type</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="object-type", path="AuditEvent.object.type", description="", type="token" 
512 )
513        public static final String SP_OBJECT_TYPE = "object-type";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>object-type</b>
517         * <p>
518         * Description: <b></b><br>
519         * Type: <b>token</b><br>
520         * Path: <b>AuditEvent.object.type</b><br>
521         * </p>
522         */
523        public static final TokenClientParam OBJECT_TYPE = new TokenClientParam(SP_OBJECT_TYPE);
524
525        /**
526         * Search parameter constant for <b>identity</b>
527         * <p>
528         * Description: <b></b><br>
529         * Type: <b>token</b><br>
530         * Path: <b>AuditEvent.object.identifier</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="identity", path="AuditEvent.object.identifier", description="", type="token" 
534 )
535        public static final String SP_IDENTITY = "identity";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>identity</b>
539         * <p>
540         * Description: <b></b><br>
541         * Type: <b>token</b><br>
542         * Path: <b>AuditEvent.object.identifier</b><br>
543         * </p>
544         */
545        public static final TokenClientParam IDENTITY = new TokenClientParam(SP_IDENTITY);
546
547        /**
548         * Search parameter constant for <b>reference</b>
549         * <p>
550         * Description: <b></b><br>
551         * Type: <b>reference</b><br>
552         * Path: <b>AuditEvent.object.reference</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="reference", path="AuditEvent.object.reference", description="", type="reference" 
556, providesMembershipIn={
557 @Compartment(name="Patient")   }
558 )
559        public static final String SP_REFERENCE = "reference";
560
561        /**
562         * <b>Fluent Client</b> search parameter constant for <b>reference</b>
563         * <p>
564         * Description: <b></b><br>
565         * Type: <b>reference</b><br>
566         * Path: <b>AuditEvent.object.reference</b><br>
567         * </p>
568         */
569        public static final ReferenceClientParam REFERENCE = new ReferenceClientParam(SP_REFERENCE);
570
571        /**
572         * Search parameter constant for <b>desc</b>
573         * <p>
574         * Description: <b></b><br>
575         * Type: <b>string</b><br>
576         * Path: <b>AuditEvent.object.name</b><br>
577         * </p>
578         */
579        @SearchParamDefinition(name="desc", path="AuditEvent.object.name", description="", type="string" 
580 )
581        public static final String SP_DESC = "desc";
582
583        /**
584         * <b>Fluent Client</b> search parameter constant for <b>desc</b>
585         * <p>
586         * Description: <b></b><br>
587         * Type: <b>string</b><br>
588         * Path: <b>AuditEvent.object.name</b><br>
589         * </p>
590         */
591        public static final StringClientParam DESC = new StringClientParam(SP_DESC);
592
593        /**
594         * Search parameter constant for <b>patient</b>
595         * <p>
596         * Description: <b></b><br>
597         * Type: <b>reference</b><br>
598         * Path: <b>AuditEvent.participant.reference | AuditEvent.object.reference</b><br>
599         * </p>
600         */
601        @SearchParamDefinition(name="patient", path="AuditEvent.participant.reference | AuditEvent.object.reference", description="", type="reference" 
602, providesMembershipIn={
603 @Compartment(name="Patient")   }
604, target={
605 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
606 )
607        public static final String SP_PATIENT = "patient";
608
609        /**
610         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
611         * <p>
612         * Description: <b></b><br>
613         * Type: <b>reference</b><br>
614         * Path: <b>AuditEvent.participant.reference | AuditEvent.object.reference</b><br>
615         * </p>
616         */
617        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
618
619        /**
620         * Search parameter constant for <b>altid</b>
621         * <p>
622         * Description: <b></b><br>
623         * Type: <b>token</b><br>
624         * Path: <b>AuditEvent.participant.altId</b><br>
625         * </p>
626         */
627        @SearchParamDefinition(name="altid", path="AuditEvent.participant.altId", description="", type="token" 
628 )
629        public static final String SP_ALTID = "altid";
630
631        /**
632         * <b>Fluent Client</b> search parameter constant for <b>altid</b>
633         * <p>
634         * Description: <b></b><br>
635         * Type: <b>token</b><br>
636         * Path: <b>AuditEvent.participant.altId</b><br>
637         * </p>
638         */
639        public static final TokenClientParam ALTID = new TokenClientParam(SP_ALTID);
640
641        /**
642         * Search parameter constant for <b>participant</b>
643         * <p>
644         * Description: <b></b><br>
645         * Type: <b>reference</b><br>
646         * Path: <b>AuditEvent.participant.reference</b><br>
647         * </p>
648         */
649        @SearchParamDefinition(name="participant", path="AuditEvent.participant.reference", description="", type="reference" 
650, providesMembershipIn={
651 @Compartment(name="Patient") ,  @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson")   }
652 )
653        public static final String SP_PARTICIPANT = "participant";
654
655        /**
656         * <b>Fluent Client</b> search parameter constant for <b>participant</b>
657         * <p>
658         * Description: <b></b><br>
659         * Type: <b>reference</b><br>
660         * Path: <b>AuditEvent.participant.reference</b><br>
661         * </p>
662         */
663        public static final ReferenceClientParam PARTICIPANT = new ReferenceClientParam(SP_PARTICIPANT);
664
665        /**
666         * Search parameter constant for <b>policy</b>
667         * <p>
668         * Description: <b></b><br>
669         * Type: <b>uri</b><br>
670         * Path: <b>AuditEvent.participant.policy</b><br>
671         * </p>
672         */
673        @SearchParamDefinition(name="policy", path="AuditEvent.participant.policy", description="", type="uri" 
674 )
675        public static final String SP_POLICY = "policy";
676
677        /**
678         * <b>Fluent Client</b> search parameter constant for <b>policy</b>
679         * <p>
680         * Description: <b></b><br>
681         * Type: <b>uri</b><br>
682         * Path: <b>AuditEvent.participant.policy</b><br>
683         * </p>
684         */
685        public static final UriClientParam POLICY = new UriClientParam(SP_POLICY);
686
687
688        /**
689         * Constant for fluent queries to be used to add include statements. Specifies
690         * the path value of "<b>AuditEvent:participant</b>".
691         */
692        public static final Include INCLUDE_PARTICIPANT = new Include("AuditEvent:participant");
693
694        /**
695         * Constant for fluent queries to be used to add include statements. Specifies
696         * the path value of "<b>AuditEvent:patient</b>".
697         */
698        public static final Include INCLUDE_PATIENT = new Include("AuditEvent:patient");
699
700        /**
701         * Constant for fluent queries to be used to add include statements. Specifies
702         * the path value of "<b>AuditEvent:reference</b>".
703         */
704        public static final Include INCLUDE_REFERENCE = new Include("AuditEvent:reference");
705
706
707        @Child(name="event", order=0, min=1, max=1, summary=false, modifier=false)      
708        @Description(
709                shortDefinition="",
710                formalDefinition="Identifies the name, action type, time, and disposition of the audited event"
711        )
712        private Event myEvent;
713        
714        @Child(name="participant", order=1, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
715        @Description(
716                shortDefinition="",
717                formalDefinition=""
718        )
719        private java.util.List<Participant> myParticipant;
720        
721        @Child(name="source", order=2, min=1, max=1, summary=false, modifier=false)     
722        @Description(
723                shortDefinition="",
724                formalDefinition=""
725        )
726        private Source mySource;
727        
728        @Child(name="object", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
729        @Description(
730                shortDefinition="",
731                formalDefinition="Specific instances of data or objects that have been accessed"
732        )
733        private java.util.List<ObjectElement> myObject;
734        
735
736        @Override
737        public boolean isEmpty() {
738                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEvent,  myParticipant,  mySource,  myObject);
739        }
740        
741        @Override
742        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
743                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEvent, myParticipant, mySource, myObject);
744        }
745
746        /**
747         * Gets the value(s) for <b>event</b> ().
748         * creating it if it does
749         * not exist. Will not return <code>null</code>.
750         *
751     * <p>
752     * <b>Definition:</b>
753     * Identifies the name, action type, time, and disposition of the audited event
754     * </p> 
755         */
756        public Event getEvent() {  
757                if (myEvent == null) {
758                        myEvent = new Event();
759                }
760                return myEvent;
761        }
762
763        /**
764         * Sets the value(s) for <b>event</b> ()
765         *
766     * <p>
767     * <b>Definition:</b>
768     * Identifies the name, action type, time, and disposition of the audited event
769     * </p> 
770         */
771        public AuditEvent setEvent(Event theValue) {
772                myEvent = theValue;
773                return this;
774        }
775        
776        
777
778  
779        /**
780         * Gets the value(s) for <b>participant</b> ().
781         * creating it if it does
782         * not exist. Will not return <code>null</code>.
783         *
784     * <p>
785     * <b>Definition:</b>
786     * 
787     * </p> 
788         */
789        public java.util.List<Participant> getParticipant() {  
790                if (myParticipant == null) {
791                        myParticipant = new java.util.ArrayList<Participant>();
792                }
793                return myParticipant;
794        }
795
796        /**
797         * Sets the value(s) for <b>participant</b> ()
798         *
799     * <p>
800     * <b>Definition:</b>
801     * 
802     * </p> 
803         */
804        public AuditEvent setParticipant(java.util.List<Participant> theValue) {
805                myParticipant = theValue;
806                return this;
807        }
808        
809        
810
811        /**
812         * Adds and returns a new value for <b>participant</b> ()
813         *
814     * <p>
815     * <b>Definition:</b>
816     * 
817     * </p> 
818         */
819        public Participant addParticipant() {
820                Participant newType = new Participant();
821                getParticipant().add(newType);
822                return newType; 
823        }
824
825        /**
826         * Adds a given new value for <b>participant</b> ()
827         *
828         * <p>
829         * <b>Definition:</b>
830         * 
831         * </p>
832         * @param theValue The participant to add (must not be <code>null</code>)
833         */
834        public AuditEvent addParticipant(Participant theValue) {
835                if (theValue == null) {
836                        throw new NullPointerException("theValue must not be null");
837                }
838                getParticipant().add(theValue);
839                return this;
840        }
841
842        /**
843         * Gets the first repetition for <b>participant</b> (),
844         * creating it if it does not already exist.
845         *
846     * <p>
847     * <b>Definition:</b>
848     * 
849     * </p> 
850         */
851        public Participant getParticipantFirstRep() {
852                if (getParticipant().isEmpty()) {
853                        return addParticipant();
854                }
855                return getParticipant().get(0); 
856        }
857  
858        /**
859         * Gets the value(s) for <b>source</b> ().
860         * creating it if it does
861         * not exist. Will not return <code>null</code>.
862         *
863     * <p>
864     * <b>Definition:</b>
865     * 
866     * </p> 
867         */
868        public Source getSource() {  
869                if (mySource == null) {
870                        mySource = new Source();
871                }
872                return mySource;
873        }
874
875        /**
876         * Sets the value(s) for <b>source</b> ()
877         *
878     * <p>
879     * <b>Definition:</b>
880     * 
881     * </p> 
882         */
883        public AuditEvent setSource(Source theValue) {
884                mySource = theValue;
885                return this;
886        }
887        
888        
889
890  
891        /**
892         * Gets the value(s) for <b>object</b> ().
893         * creating it if it does
894         * not exist. Will not return <code>null</code>.
895         *
896     * <p>
897     * <b>Definition:</b>
898     * Specific instances of data or objects that have been accessed
899     * </p> 
900         */
901        public java.util.List<ObjectElement> getObject() {  
902                if (myObject == null) {
903                        myObject = new java.util.ArrayList<ObjectElement>();
904                }
905                return myObject;
906        }
907
908        /**
909         * Sets the value(s) for <b>object</b> ()
910         *
911     * <p>
912     * <b>Definition:</b>
913     * Specific instances of data or objects that have been accessed
914     * </p> 
915         */
916        public AuditEvent setObject(java.util.List<ObjectElement> theValue) {
917                myObject = theValue;
918                return this;
919        }
920        
921        
922
923        /**
924         * Adds and returns a new value for <b>object</b> ()
925         *
926     * <p>
927     * <b>Definition:</b>
928     * Specific instances of data or objects that have been accessed
929     * </p> 
930         */
931        public ObjectElement addObject() {
932                ObjectElement newType = new ObjectElement();
933                getObject().add(newType);
934                return newType; 
935        }
936
937        /**
938         * Adds a given new value for <b>object</b> ()
939         *
940         * <p>
941         * <b>Definition:</b>
942         * Specific instances of data or objects that have been accessed
943         * </p>
944         * @param theValue The object to add (must not be <code>null</code>)
945         */
946        public AuditEvent addObject(ObjectElement theValue) {
947                if (theValue == null) {
948                        throw new NullPointerException("theValue must not be null");
949                }
950                getObject().add(theValue);
951                return this;
952        }
953
954        /**
955         * Gets the first repetition for <b>object</b> (),
956         * creating it if it does not already exist.
957         *
958     * <p>
959     * <b>Definition:</b>
960     * Specific instances of data or objects that have been accessed
961     * </p> 
962         */
963        public ObjectElement getObjectFirstRep() {
964                if (getObject().isEmpty()) {
965                        return addObject();
966                }
967                return getObject().get(0); 
968        }
969  
970        /**
971         * Block class for child element: <b>AuditEvent.event</b> ()
972         *
973     * <p>
974     * <b>Definition:</b>
975     * Identifies the name, action type, time, and disposition of the audited event
976     * </p> 
977         */
978        @Block()        
979        public static class Event 
980            extends  BaseIdentifiableElement  
981            implements IResourceBlock {
982        
983        @Child(name="type", type=CodingDt.class, order=0, min=1, max=1, summary=true, modifier=false)   
984        @Description(
985                shortDefinition="",
986                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"
987        )
988        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-audit-event-type")
989        private CodingDt myType;
990        
991        @Child(name="subtype", type=CodingDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)      
992        @Description(
993                shortDefinition="",
994                formalDefinition="Identifier for the category of event"
995        )
996        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-audit-event-sub-type")
997        private java.util.List<CodingDt> mySubtype;
998        
999        @Child(name="action", type=CodeDt.class, order=2, min=0, max=1, summary=true, modifier=false)   
1000        @Description(
1001                shortDefinition="",
1002                formalDefinition="Indicator for type of action performed during the event that generated the audit"
1003        )
1004        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/audit-event-action")
1005        private BoundCodeDt<AuditEventActionEnum> myAction;
1006        
1007        @Child(name="dateTime", type=InstantDt.class, order=3, min=1, max=1, summary=true, modifier=false)      
1008        @Description(
1009                shortDefinition="",
1010                formalDefinition="The time when the event occurred on the source"
1011        )
1012        private InstantDt myDateTime;
1013        
1014        @Child(name="outcome", type=CodeDt.class, order=4, min=0, max=1, summary=true, modifier=false)  
1015        @Description(
1016                shortDefinition="",
1017                formalDefinition="Indicates whether the event succeeded or failed"
1018        )
1019        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/audit-event-outcome")
1020        private BoundCodeDt<AuditEventOutcomeEnum> myOutcome;
1021        
1022        @Child(name="outcomeDesc", type=StringDt.class, order=5, min=0, max=1, summary=true, modifier=false)    
1023        @Description(
1024                shortDefinition="",
1025                formalDefinition="A free text description of the outcome of the event"
1026        )
1027        private StringDt myOutcomeDesc;
1028        
1029        @Child(name="purposeOfEvent", type=CodingDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
1030        @Description(
1031                shortDefinition="",
1032                formalDefinition="The purposeOfUse (reason) that was used during the event being recorded."
1033        )
1034        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse")
1035        private java.util.List<CodingDt> myPurposeOfEvent;
1036        
1037
1038        @Override
1039        public boolean isEmpty() {
1040                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  mySubtype,  myAction,  myDateTime,  myOutcome,  myOutcomeDesc,  myPurposeOfEvent);
1041        }
1042        
1043        @Override
1044        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1045                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, mySubtype, myAction, myDateTime, myOutcome, myOutcomeDesc, myPurposeOfEvent);
1046        }
1047
1048        /**
1049         * Gets the value(s) for <b>type</b> ().
1050         * creating it if it does
1051         * not exist. Will not return <code>null</code>.
1052         *
1053     * <p>
1054     * <b>Definition:</b>
1055     * 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
1056     * </p> 
1057         */
1058        public CodingDt getType() {  
1059                if (myType == null) {
1060                        myType = new CodingDt();
1061                }
1062                return myType;
1063        }
1064
1065        /**
1066         * Sets the value(s) for <b>type</b> ()
1067         *
1068     * <p>
1069     * <b>Definition:</b>
1070     * 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
1071     * </p> 
1072         */
1073        public Event setType(CodingDt theValue) {
1074                myType = theValue;
1075                return this;
1076        }
1077        
1078        
1079
1080  
1081        /**
1082         * Gets the value(s) for <b>subtype</b> ().
1083         * creating it if it does
1084         * not exist. Will not return <code>null</code>.
1085         *
1086     * <p>
1087     * <b>Definition:</b>
1088     * Identifier for the category of event
1089     * </p> 
1090         */
1091        public java.util.List<CodingDt> getSubtype() {  
1092                if (mySubtype == null) {
1093                        mySubtype = new java.util.ArrayList<CodingDt>();
1094                }
1095                return mySubtype;
1096        }
1097
1098        /**
1099         * Sets the value(s) for <b>subtype</b> ()
1100         *
1101     * <p>
1102     * <b>Definition:</b>
1103     * Identifier for the category of event
1104     * </p> 
1105         */
1106        public Event setSubtype(java.util.List<CodingDt> theValue) {
1107                mySubtype = theValue;
1108                return this;
1109        }
1110        
1111        
1112
1113        /**
1114         * Adds and returns a new value for <b>subtype</b> ()
1115         *
1116     * <p>
1117     * <b>Definition:</b>
1118     * Identifier for the category of event
1119     * </p> 
1120         */
1121        public CodingDt addSubtype() {
1122                CodingDt newType = new CodingDt();
1123                getSubtype().add(newType);
1124                return newType; 
1125        }
1126
1127        /**
1128         * Adds a given new value for <b>subtype</b> ()
1129         *
1130         * <p>
1131         * <b>Definition:</b>
1132         * Identifier for the category of event
1133         * </p>
1134         * @param theValue The subtype to add (must not be <code>null</code>)
1135         */
1136        public Event addSubtype(CodingDt theValue) {
1137                if (theValue == null) {
1138                        throw new NullPointerException("theValue must not be null");
1139                }
1140                getSubtype().add(theValue);
1141                return this;
1142        }
1143
1144        /**
1145         * Gets the first repetition for <b>subtype</b> (),
1146         * creating it if it does not already exist.
1147         *
1148     * <p>
1149     * <b>Definition:</b>
1150     * Identifier for the category of event
1151     * </p> 
1152         */
1153        public CodingDt getSubtypeFirstRep() {
1154                if (getSubtype().isEmpty()) {
1155                        return addSubtype();
1156                }
1157                return getSubtype().get(0); 
1158        }
1159  
1160        /**
1161         * Gets the value(s) for <b>action</b> ().
1162         * creating it if it does
1163         * not exist. Will not return <code>null</code>.
1164         *
1165     * <p>
1166     * <b>Definition:</b>
1167     * Indicator for type of action performed during the event that generated the audit
1168     * </p> 
1169         */
1170        public BoundCodeDt<AuditEventActionEnum> getActionElement() {  
1171                if (myAction == null) {
1172                        myAction = new BoundCodeDt<AuditEventActionEnum>(AuditEventActionEnum.VALUESET_BINDER);
1173                }
1174                return myAction;
1175        }
1176
1177        
1178        /**
1179         * Gets the value(s) for <b>action</b> ().
1180         * creating it if it does
1181         * not exist. This method may return <code>null</code>.
1182         *
1183     * <p>
1184     * <b>Definition:</b>
1185     * Indicator for type of action performed during the event that generated the audit
1186     * </p> 
1187         */
1188        public String getAction() {  
1189                return getActionElement().getValue();
1190        }
1191
1192        /**
1193         * Sets the value(s) for <b>action</b> ()
1194         *
1195     * <p>
1196     * <b>Definition:</b>
1197     * Indicator for type of action performed during the event that generated the audit
1198     * </p> 
1199         */
1200        public Event setAction(BoundCodeDt<AuditEventActionEnum> theValue) {
1201                myAction = theValue;
1202                return this;
1203        }
1204        
1205        
1206
1207        /**
1208         * Sets the value(s) for <b>action</b> ()
1209         *
1210     * <p>
1211     * <b>Definition:</b>
1212     * Indicator for type of action performed during the event that generated the audit
1213     * </p> 
1214         */
1215        public Event setAction(AuditEventActionEnum theValue) {
1216                setAction(new BoundCodeDt<AuditEventActionEnum>(AuditEventActionEnum.VALUESET_BINDER, theValue));
1217                
1218/*
1219                getActionElement().setValueAsEnum(theValue);
1220*/
1221                return this;
1222        }
1223
1224  
1225        /**
1226         * Gets the value(s) for <b>dateTime</b> ().
1227         * creating it if it does
1228         * not exist. Will not return <code>null</code>.
1229         *
1230     * <p>
1231     * <b>Definition:</b>
1232     * The time when the event occurred on the source
1233     * </p> 
1234         */
1235        public InstantDt getDateTimeElement() {  
1236                if (myDateTime == null) {
1237                        myDateTime = new InstantDt();
1238                }
1239                return myDateTime;
1240        }
1241
1242        
1243        /**
1244         * Gets the value(s) for <b>dateTime</b> ().
1245         * creating it if it does
1246         * not exist. This method may return <code>null</code>.
1247         *
1248     * <p>
1249     * <b>Definition:</b>
1250     * The time when the event occurred on the source
1251     * </p> 
1252         */
1253        public Date getDateTime() {  
1254                return getDateTimeElement().getValue();
1255        }
1256
1257        /**
1258         * Sets the value(s) for <b>dateTime</b> ()
1259         *
1260     * <p>
1261     * <b>Definition:</b>
1262     * The time when the event occurred on the source
1263     * </p> 
1264         */
1265        public Event setDateTime(InstantDt theValue) {
1266                myDateTime = theValue;
1267                return this;
1268        }
1269        
1270        
1271
1272        /**
1273         * Sets the value for <b>dateTime</b> ()
1274         *
1275     * <p>
1276     * <b>Definition:</b>
1277     * The time when the event occurred on the source
1278     * </p> 
1279         */
1280        public Event setDateTimeWithMillisPrecision( Date theDate) {
1281                myDateTime = new InstantDt(theDate); 
1282                return this; 
1283        }
1284
1285        /**
1286         * Sets the value for <b>dateTime</b> ()
1287         *
1288     * <p>
1289     * <b>Definition:</b>
1290     * The time when the event occurred on the source
1291     * </p> 
1292         */
1293        public Event setDateTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
1294                myDateTime = new InstantDt(theDate, thePrecision); 
1295                return this; 
1296        }
1297
1298 
1299        /**
1300         * Gets the value(s) for <b>outcome</b> ().
1301         * creating it if it does
1302         * not exist. Will not return <code>null</code>.
1303         *
1304     * <p>
1305     * <b>Definition:</b>
1306     * Indicates whether the event succeeded or failed
1307     * </p> 
1308         */
1309        public BoundCodeDt<AuditEventOutcomeEnum> getOutcomeElement() {  
1310                if (myOutcome == null) {
1311                        myOutcome = new BoundCodeDt<AuditEventOutcomeEnum>(AuditEventOutcomeEnum.VALUESET_BINDER);
1312                }
1313                return myOutcome;
1314        }
1315
1316        
1317        /**
1318         * Gets the value(s) for <b>outcome</b> ().
1319         * creating it if it does
1320         * not exist. This method may return <code>null</code>.
1321         *
1322     * <p>
1323     * <b>Definition:</b>
1324     * Indicates whether the event succeeded or failed
1325     * </p> 
1326         */
1327        public String getOutcome() {  
1328                return getOutcomeElement().getValue();
1329        }
1330
1331        /**
1332         * Sets the value(s) for <b>outcome</b> ()
1333         *
1334     * <p>
1335     * <b>Definition:</b>
1336     * Indicates whether the event succeeded or failed
1337     * </p> 
1338         */
1339        public Event setOutcome(BoundCodeDt<AuditEventOutcomeEnum> theValue) {
1340                myOutcome = theValue;
1341                return this;
1342        }
1343        
1344        
1345
1346        /**
1347         * Sets the value(s) for <b>outcome</b> ()
1348         *
1349     * <p>
1350     * <b>Definition:</b>
1351     * Indicates whether the event succeeded or failed
1352     * </p> 
1353         */
1354        public Event setOutcome(AuditEventOutcomeEnum theValue) {
1355                setOutcome(new BoundCodeDt<AuditEventOutcomeEnum>(AuditEventOutcomeEnum.VALUESET_BINDER, theValue));
1356                
1357/*
1358                getOutcomeElement().setValueAsEnum(theValue);
1359*/
1360                return this;
1361        }
1362
1363  
1364        /**
1365         * Gets the value(s) for <b>outcomeDesc</b> ().
1366         * creating it if it does
1367         * not exist. Will not return <code>null</code>.
1368         *
1369     * <p>
1370     * <b>Definition:</b>
1371     * A free text description of the outcome of the event
1372     * </p> 
1373         */
1374        public StringDt getOutcomeDescElement() {  
1375                if (myOutcomeDesc == null) {
1376                        myOutcomeDesc = new StringDt();
1377                }
1378                return myOutcomeDesc;
1379        }
1380
1381        
1382        /**
1383         * Gets the value(s) for <b>outcomeDesc</b> ().
1384         * creating it if it does
1385         * not exist. This method may return <code>null</code>.
1386         *
1387     * <p>
1388     * <b>Definition:</b>
1389     * A free text description of the outcome of the event
1390     * </p> 
1391         */
1392        public String getOutcomeDesc() {  
1393                return getOutcomeDescElement().getValue();
1394        }
1395
1396        /**
1397         * Sets the value(s) for <b>outcomeDesc</b> ()
1398         *
1399     * <p>
1400     * <b>Definition:</b>
1401     * A free text description of the outcome of the event
1402     * </p> 
1403         */
1404        public Event setOutcomeDesc(StringDt theValue) {
1405                myOutcomeDesc = theValue;
1406                return this;
1407        }
1408        
1409        
1410
1411        /**
1412         * Sets the value for <b>outcomeDesc</b> ()
1413         *
1414     * <p>
1415     * <b>Definition:</b>
1416     * A free text description of the outcome of the event
1417     * </p> 
1418         */
1419        public Event setOutcomeDesc( String theString) {
1420                myOutcomeDesc = new StringDt(theString); 
1421                return this; 
1422        }
1423
1424 
1425        /**
1426         * Gets the value(s) for <b>purposeOfEvent</b> ().
1427         * creating it if it does
1428         * not exist. Will not return <code>null</code>.
1429         *
1430     * <p>
1431     * <b>Definition:</b>
1432     * The purposeOfUse (reason) that was used during the event being recorded.
1433     * </p> 
1434         */
1435        public java.util.List<CodingDt> getPurposeOfEvent() {  
1436                if (myPurposeOfEvent == null) {
1437                        myPurposeOfEvent = new java.util.ArrayList<CodingDt>();
1438                }
1439                return myPurposeOfEvent;
1440        }
1441
1442        /**
1443         * Sets the value(s) for <b>purposeOfEvent</b> ()
1444         *
1445     * <p>
1446     * <b>Definition:</b>
1447     * The purposeOfUse (reason) that was used during the event being recorded.
1448     * </p> 
1449         */
1450        public Event setPurposeOfEvent(java.util.List<CodingDt> theValue) {
1451                myPurposeOfEvent = theValue;
1452                return this;
1453        }
1454        
1455        
1456
1457        /**
1458         * Adds and returns a new value for <b>purposeOfEvent</b> ()
1459         *
1460     * <p>
1461     * <b>Definition:</b>
1462     * The purposeOfUse (reason) that was used during the event being recorded.
1463     * </p> 
1464         */
1465        public CodingDt addPurposeOfEvent() {
1466                CodingDt newType = new CodingDt();
1467                getPurposeOfEvent().add(newType);
1468                return newType; 
1469        }
1470
1471        /**
1472         * Adds a given new value for <b>purposeOfEvent</b> ()
1473         *
1474         * <p>
1475         * <b>Definition:</b>
1476         * The purposeOfUse (reason) that was used during the event being recorded.
1477         * </p>
1478         * @param theValue The purposeOfEvent to add (must not be <code>null</code>)
1479         */
1480        public Event addPurposeOfEvent(CodingDt theValue) {
1481                if (theValue == null) {
1482                        throw new NullPointerException("theValue must not be null");
1483                }
1484                getPurposeOfEvent().add(theValue);
1485                return this;
1486        }
1487
1488        /**
1489         * Gets the first repetition for <b>purposeOfEvent</b> (),
1490         * creating it if it does not already exist.
1491         *
1492     * <p>
1493     * <b>Definition:</b>
1494     * The purposeOfUse (reason) that was used during the event being recorded.
1495     * </p> 
1496         */
1497        public CodingDt getPurposeOfEventFirstRep() {
1498                if (getPurposeOfEvent().isEmpty()) {
1499                        return addPurposeOfEvent();
1500                }
1501                return getPurposeOfEvent().get(0); 
1502        }
1503  
1504
1505
1506        }
1507
1508
1509        /**
1510         * Block class for child element: <b>AuditEvent.participant</b> ()
1511         *
1512     * <p>
1513     * <b>Definition:</b>
1514     * 
1515     * </p> 
1516         */
1517        @Block()        
1518        public static class Participant 
1519            extends  BaseIdentifiableElement  
1520            implements IResourceBlock {
1521        
1522        @Child(name="role", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
1523        @Description(
1524                shortDefinition="",
1525                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"
1526        )
1527        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-dicm-402-roleid")
1528        private java.util.List<CodeableConceptDt> myRole;
1529        
1530        @Child(name="reference", order=1, min=0, max=1, summary=true, modifier=false, type={
1531                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
1532                ca.uhn.fhir.model.dstu2.resource.Organization.class, 
1533                ca.uhn.fhir.model.dstu2.resource.Device.class, 
1534                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
1535                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
1536        })
1537        @Description(
1538                shortDefinition="",
1539                formalDefinition="Direct reference to a resource that identifies the participant"
1540        )
1541        private ResourceReferenceDt myReference;
1542        
1543        @Child(name="userId", type=IdentifierDt.class, order=2, min=0, max=1, summary=true, modifier=false)     
1544        @Description(
1545                shortDefinition="",
1546                formalDefinition="Unique identifier for the user actively participating in the event"
1547        )
1548        private IdentifierDt myUserId;
1549        
1550        @Child(name="altId", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false) 
1551        @Description(
1552                shortDefinition="",
1553                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"
1554        )
1555        private StringDt myAltId;
1556        
1557        @Child(name="name", type=StringDt.class, order=4, min=0, max=1, summary=false, modifier=false)  
1558        @Description(
1559                shortDefinition="",
1560                formalDefinition="Human-meaningful name for the user"
1561        )
1562        private StringDt myName;
1563        
1564        @Child(name="requestor", type=BooleanDt.class, order=5, min=1, max=1, summary=false, modifier=false)    
1565        @Description(
1566                shortDefinition="",
1567                formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited."
1568        )
1569        private BooleanDt myRequestor;
1570        
1571        @Child(name="location", order=6, min=0, max=1, summary=false, modifier=false, type={
1572                ca.uhn.fhir.model.dstu2.resource.Location.class
1573        })
1574        @Description(
1575                shortDefinition="",
1576                formalDefinition="Where the event occurred"
1577        )
1578        private ResourceReferenceDt myLocation;
1579        
1580        @Child(name="policy", type=UriDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
1581        @Description(
1582                shortDefinition="",
1583                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."
1584        )
1585        private java.util.List<UriDt> myPolicy;
1586        
1587        @Child(name="media", type=CodingDt.class, order=8, min=0, max=1, summary=false, modifier=false) 
1588        @Description(
1589                shortDefinition="",
1590                formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media"
1591        )
1592        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-dicm-405-mediatype")
1593        private CodingDt myMedia;
1594        
1595        @Child(name="network", order=9, min=0, max=1, summary=false, modifier=false)    
1596        @Description(
1597                shortDefinition="",
1598                formalDefinition="Logical network location for application activity, if the activity has a network location"
1599        )
1600        private ParticipantNetwork myNetwork;
1601        
1602        @Child(name="purposeOfUse", type=CodingDt.class, order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
1603        @Description(
1604                shortDefinition="",
1605                formalDefinition="The reason (purpose of use), specific to this participant, that was used during the event being recorded."
1606        )
1607        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse")
1608        private java.util.List<CodingDt> myPurposeOfUse;
1609        
1610
1611        @Override
1612        public boolean isEmpty() {
1613                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myRole,  myReference,  myUserId,  myAltId,  myName,  myRequestor,  myLocation,  myPolicy,  myMedia,  myNetwork,  myPurposeOfUse);
1614        }
1615        
1616        @Override
1617        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1618                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myRole, myReference, myUserId, myAltId, myName, myRequestor, myLocation, myPolicy, myMedia, myNetwork, myPurposeOfUse);
1619        }
1620
1621        /**
1622         * Gets the value(s) for <b>role</b> ().
1623         * creating it if it does
1624         * not exist. Will not return <code>null</code>.
1625         *
1626     * <p>
1627     * <b>Definition:</b>
1628     * 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
1629     * </p> 
1630         */
1631        public java.util.List<CodeableConceptDt> getRole() {  
1632                if (myRole == null) {
1633                        myRole = new java.util.ArrayList<CodeableConceptDt>();
1634                }
1635                return myRole;
1636        }
1637
1638        /**
1639         * Sets the value(s) for <b>role</b> ()
1640         *
1641     * <p>
1642     * <b>Definition:</b>
1643     * 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
1644     * </p> 
1645         */
1646        public Participant setRole(java.util.List<CodeableConceptDt> theValue) {
1647                myRole = theValue;
1648                return this;
1649        }
1650        
1651        
1652
1653        /**
1654         * Adds and returns a new value for <b>role</b> ()
1655         *
1656     * <p>
1657     * <b>Definition:</b>
1658     * 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
1659     * </p> 
1660         */
1661        public CodeableConceptDt addRole() {
1662                CodeableConceptDt newType = new CodeableConceptDt();
1663                getRole().add(newType);
1664                return newType; 
1665        }
1666
1667        /**
1668         * Adds a given new value for <b>role</b> ()
1669         *
1670         * <p>
1671         * <b>Definition:</b>
1672         * 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
1673         * </p>
1674         * @param theValue The role to add (must not be <code>null</code>)
1675         */
1676        public Participant addRole(CodeableConceptDt theValue) {
1677                if (theValue == null) {
1678                        throw new NullPointerException("theValue must not be null");
1679                }
1680                getRole().add(theValue);
1681                return this;
1682        }
1683
1684        /**
1685         * Gets the first repetition for <b>role</b> (),
1686         * creating it if it does not already exist.
1687         *
1688     * <p>
1689     * <b>Definition:</b>
1690     * 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
1691     * </p> 
1692         */
1693        public CodeableConceptDt getRoleFirstRep() {
1694                if (getRole().isEmpty()) {
1695                        return addRole();
1696                }
1697                return getRole().get(0); 
1698        }
1699  
1700        /**
1701         * Gets the value(s) for <b>reference</b> ().
1702         * creating it if it does
1703         * not exist. Will not return <code>null</code>.
1704         *
1705     * <p>
1706     * <b>Definition:</b>
1707     * Direct reference to a resource that identifies the participant
1708     * </p> 
1709         */
1710        public ResourceReferenceDt getReference() {  
1711                if (myReference == null) {
1712                        myReference = new ResourceReferenceDt();
1713                }
1714                return myReference;
1715        }
1716
1717        /**
1718         * Sets the value(s) for <b>reference</b> ()
1719         *
1720     * <p>
1721     * <b>Definition:</b>
1722     * Direct reference to a resource that identifies the participant
1723     * </p> 
1724         */
1725        public Participant setReference(ResourceReferenceDt theValue) {
1726                myReference = theValue;
1727                return this;
1728        }
1729        
1730        
1731
1732  
1733        /**
1734         * Gets the value(s) for <b>userId</b> ().
1735         * creating it if it does
1736         * not exist. Will not return <code>null</code>.
1737         *
1738     * <p>
1739     * <b>Definition:</b>
1740     * Unique identifier for the user actively participating in the event
1741     * </p> 
1742         */
1743        public IdentifierDt getUserId() {  
1744                if (myUserId == null) {
1745                        myUserId = new IdentifierDt();
1746                }
1747                return myUserId;
1748        }
1749
1750        /**
1751         * Sets the value(s) for <b>userId</b> ()
1752         *
1753     * <p>
1754     * <b>Definition:</b>
1755     * Unique identifier for the user actively participating in the event
1756     * </p> 
1757         */
1758        public Participant setUserId(IdentifierDt theValue) {
1759                myUserId = theValue;
1760                return this;
1761        }
1762        
1763        
1764
1765  
1766        /**
1767         * Gets the value(s) for <b>altId</b> ().
1768         * creating it if it does
1769         * not exist. Will not return <code>null</code>.
1770         *
1771     * <p>
1772     * <b>Definition:</b>
1773     * 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
1774     * </p> 
1775         */
1776        public StringDt getAltIdElement() {  
1777                if (myAltId == null) {
1778                        myAltId = new StringDt();
1779                }
1780                return myAltId;
1781        }
1782
1783        
1784        /**
1785         * Gets the value(s) for <b>altId</b> ().
1786         * creating it if it does
1787         * not exist. This method may return <code>null</code>.
1788         *
1789     * <p>
1790     * <b>Definition:</b>
1791     * 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
1792     * </p> 
1793         */
1794        public String getAltId() {  
1795                return getAltIdElement().getValue();
1796        }
1797
1798        /**
1799         * Sets the value(s) for <b>altId</b> ()
1800         *
1801     * <p>
1802     * <b>Definition:</b>
1803     * 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
1804     * </p> 
1805         */
1806        public Participant setAltId(StringDt theValue) {
1807                myAltId = theValue;
1808                return this;
1809        }
1810        
1811        
1812
1813        /**
1814         * Sets the value for <b>altId</b> ()
1815         *
1816     * <p>
1817     * <b>Definition:</b>
1818     * 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
1819     * </p> 
1820         */
1821        public Participant setAltId( String theString) {
1822                myAltId = new StringDt(theString); 
1823                return this; 
1824        }
1825
1826 
1827        /**
1828         * Gets the value(s) for <b>name</b> ().
1829         * creating it if it does
1830         * not exist. Will not return <code>null</code>.
1831         *
1832     * <p>
1833     * <b>Definition:</b>
1834     * Human-meaningful name for the user
1835     * </p> 
1836         */
1837        public StringDt getNameElement() {  
1838                if (myName == null) {
1839                        myName = new StringDt();
1840                }
1841                return myName;
1842        }
1843
1844        
1845        /**
1846         * Gets the value(s) for <b>name</b> ().
1847         * creating it if it does
1848         * not exist. This method may return <code>null</code>.
1849         *
1850     * <p>
1851     * <b>Definition:</b>
1852     * Human-meaningful name for the user
1853     * </p> 
1854         */
1855        public String getName() {  
1856                return getNameElement().getValue();
1857        }
1858
1859        /**
1860         * Sets the value(s) for <b>name</b> ()
1861         *
1862     * <p>
1863     * <b>Definition:</b>
1864     * Human-meaningful name for the user
1865     * </p> 
1866         */
1867        public Participant setName(StringDt theValue) {
1868                myName = theValue;
1869                return this;
1870        }
1871        
1872        
1873
1874        /**
1875         * Sets the value for <b>name</b> ()
1876         *
1877     * <p>
1878     * <b>Definition:</b>
1879     * Human-meaningful name for the user
1880     * </p> 
1881         */
1882        public Participant setName( String theString) {
1883                myName = new StringDt(theString); 
1884                return this; 
1885        }
1886
1887 
1888        /**
1889         * Gets the value(s) for <b>requestor</b> ().
1890         * creating it if it does
1891         * not exist. Will not return <code>null</code>.
1892         *
1893     * <p>
1894     * <b>Definition:</b>
1895     * Indicator that the user is or is not the requestor, or initiator, for the event being audited.
1896     * </p> 
1897         */
1898        public BooleanDt getRequestorElement() {  
1899                if (myRequestor == null) {
1900                        myRequestor = new BooleanDt();
1901                }
1902                return myRequestor;
1903        }
1904
1905        
1906        /**
1907         * Gets the value(s) for <b>requestor</b> ().
1908         * creating it if it does
1909         * not exist. This method may return <code>null</code>.
1910         *
1911     * <p>
1912     * <b>Definition:</b>
1913     * Indicator that the user is or is not the requestor, or initiator, for the event being audited.
1914     * </p> 
1915         */
1916        public Boolean getRequestor() {  
1917                return getRequestorElement().getValue();
1918        }
1919
1920        /**
1921         * Sets the value(s) for <b>requestor</b> ()
1922         *
1923     * <p>
1924     * <b>Definition:</b>
1925     * Indicator that the user is or is not the requestor, or initiator, for the event being audited.
1926     * </p> 
1927         */
1928        public Participant setRequestor(BooleanDt theValue) {
1929                myRequestor = theValue;
1930                return this;
1931        }
1932        
1933        
1934
1935        /**
1936         * Sets the value for <b>requestor</b> ()
1937         *
1938     * <p>
1939     * <b>Definition:</b>
1940     * Indicator that the user is or is not the requestor, or initiator, for the event being audited.
1941     * </p> 
1942         */
1943        public Participant setRequestor( boolean theBoolean) {
1944                myRequestor = new BooleanDt(theBoolean); 
1945                return this; 
1946        }
1947
1948 
1949        /**
1950         * Gets the value(s) for <b>location</b> ().
1951         * creating it if it does
1952         * not exist. Will not return <code>null</code>.
1953         *
1954     * <p>
1955     * <b>Definition:</b>
1956     * Where the event occurred
1957     * </p> 
1958         */
1959        public ResourceReferenceDt getLocation() {  
1960                if (myLocation == null) {
1961                        myLocation = new ResourceReferenceDt();
1962                }
1963                return myLocation;
1964        }
1965
1966        /**
1967         * Sets the value(s) for <b>location</b> ()
1968         *
1969     * <p>
1970     * <b>Definition:</b>
1971     * Where the event occurred
1972     * </p> 
1973         */
1974        public Participant setLocation(ResourceReferenceDt theValue) {
1975                myLocation = theValue;
1976                return this;
1977        }
1978        
1979        
1980
1981  
1982        /**
1983         * Gets the value(s) for <b>policy</b> ().
1984         * creating it if it does
1985         * not exist. Will not return <code>null</code>.
1986         *
1987     * <p>
1988     * <b>Definition:</b>
1989     * 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.
1990     * </p> 
1991         */
1992        public java.util.List<UriDt> getPolicy() {  
1993                if (myPolicy == null) {
1994                        myPolicy = new java.util.ArrayList<UriDt>();
1995                }
1996                return myPolicy;
1997        }
1998
1999        /**
2000         * Sets the value(s) for <b>policy</b> ()
2001         *
2002     * <p>
2003     * <b>Definition:</b>
2004     * 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.
2005     * </p> 
2006         */
2007        public Participant setPolicy(java.util.List<UriDt> theValue) {
2008                myPolicy = theValue;
2009                return this;
2010        }
2011        
2012        
2013
2014        /**
2015         * Adds and returns a new value for <b>policy</b> ()
2016         *
2017     * <p>
2018     * <b>Definition:</b>
2019     * 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.
2020     * </p> 
2021         */
2022        public UriDt addPolicy() {
2023                UriDt newType = new UriDt();
2024                getPolicy().add(newType);
2025                return newType; 
2026        }
2027
2028        /**
2029         * Adds a given new value for <b>policy</b> ()
2030         *
2031         * <p>
2032         * <b>Definition:</b>
2033         * 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.
2034         * </p>
2035         * @param theValue The policy to add (must not be <code>null</code>)
2036         */
2037        public Participant addPolicy(UriDt theValue) {
2038                if (theValue == null) {
2039                        throw new NullPointerException("theValue must not be null");
2040                }
2041                getPolicy().add(theValue);
2042                return this;
2043        }
2044
2045        /**
2046         * Gets the first repetition for <b>policy</b> (),
2047         * creating it if it does not already exist.
2048         *
2049     * <p>
2050     * <b>Definition:</b>
2051     * 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.
2052     * </p> 
2053         */
2054        public UriDt getPolicyFirstRep() {
2055                if (getPolicy().isEmpty()) {
2056                        return addPolicy();
2057                }
2058                return getPolicy().get(0); 
2059        }
2060        /**
2061         * Adds a new value for <b>policy</b> ()
2062         *
2063     * <p>
2064     * <b>Definition:</b>
2065     * 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.
2066     * </p> 
2067     *
2068     * @return Returns a reference to this object, to allow for simple chaining.
2069         */
2070        public Participant addPolicy( String theUri) {
2071                if (myPolicy == null) {
2072                        myPolicy = new java.util.ArrayList<UriDt>();
2073                }
2074                myPolicy.add(new UriDt(theUri));
2075                return this; 
2076        }
2077
2078 
2079        /**
2080         * Gets the value(s) for <b>media</b> ().
2081         * creating it if it does
2082         * not exist. Will not return <code>null</code>.
2083         *
2084     * <p>
2085     * <b>Definition:</b>
2086     * Type of media involved. Used when the event is about exporting/importing onto media
2087     * </p> 
2088         */
2089        public CodingDt getMedia() {  
2090                if (myMedia == null) {
2091                        myMedia = new CodingDt();
2092                }
2093                return myMedia;
2094        }
2095
2096        /**
2097         * Sets the value(s) for <b>media</b> ()
2098         *
2099     * <p>
2100     * <b>Definition:</b>
2101     * Type of media involved. Used when the event is about exporting/importing onto media
2102     * </p> 
2103         */
2104        public Participant setMedia(CodingDt theValue) {
2105                myMedia = theValue;
2106                return this;
2107        }
2108        
2109        
2110
2111  
2112        /**
2113         * Gets the value(s) for <b>network</b> ().
2114         * creating it if it does
2115         * not exist. Will not return <code>null</code>.
2116         *
2117     * <p>
2118     * <b>Definition:</b>
2119     * Logical network location for application activity, if the activity has a network location
2120     * </p> 
2121         */
2122        public ParticipantNetwork getNetwork() {  
2123                if (myNetwork == null) {
2124                        myNetwork = new ParticipantNetwork();
2125                }
2126                return myNetwork;
2127        }
2128
2129        /**
2130         * Sets the value(s) for <b>network</b> ()
2131         *
2132     * <p>
2133     * <b>Definition:</b>
2134     * Logical network location for application activity, if the activity has a network location
2135     * </p> 
2136         */
2137        public Participant setNetwork(ParticipantNetwork theValue) {
2138                myNetwork = theValue;
2139                return this;
2140        }
2141        
2142        
2143
2144  
2145        /**
2146         * Gets the value(s) for <b>purposeOfUse</b> ().
2147         * creating it if it does
2148         * not exist. Will not return <code>null</code>.
2149         *
2150     * <p>
2151     * <b>Definition:</b>
2152     * The reason (purpose of use), specific to this participant, that was used during the event being recorded.
2153     * </p> 
2154         */
2155        public java.util.List<CodingDt> getPurposeOfUse() {  
2156                if (myPurposeOfUse == null) {
2157                        myPurposeOfUse = new java.util.ArrayList<CodingDt>();
2158                }
2159                return myPurposeOfUse;
2160        }
2161
2162        /**
2163         * Sets the value(s) for <b>purposeOfUse</b> ()
2164         *
2165     * <p>
2166     * <b>Definition:</b>
2167     * The reason (purpose of use), specific to this participant, that was used during the event being recorded.
2168     * </p> 
2169         */
2170        public Participant setPurposeOfUse(java.util.List<CodingDt> theValue) {
2171                myPurposeOfUse = theValue;
2172                return this;
2173        }
2174        
2175        
2176
2177        /**
2178         * Adds and returns a new value for <b>purposeOfUse</b> ()
2179         *
2180     * <p>
2181     * <b>Definition:</b>
2182     * The reason (purpose of use), specific to this participant, that was used during the event being recorded.
2183     * </p> 
2184         */
2185        public CodingDt addPurposeOfUse() {
2186                CodingDt newType = new CodingDt();
2187                getPurposeOfUse().add(newType);
2188                return newType; 
2189        }
2190
2191        /**
2192         * Adds a given new value for <b>purposeOfUse</b> ()
2193         *
2194         * <p>
2195         * <b>Definition:</b>
2196         * The reason (purpose of use), specific to this participant, that was used during the event being recorded.
2197         * </p>
2198         * @param theValue The purposeOfUse to add (must not be <code>null</code>)
2199         */
2200        public Participant addPurposeOfUse(CodingDt theValue) {
2201                if (theValue == null) {
2202                        throw new NullPointerException("theValue must not be null");
2203                }
2204                getPurposeOfUse().add(theValue);
2205                return this;
2206        }
2207
2208        /**
2209         * Gets the first repetition for <b>purposeOfUse</b> (),
2210         * creating it if it does not already exist.
2211         *
2212     * <p>
2213     * <b>Definition:</b>
2214     * The reason (purpose of use), specific to this participant, that was used during the event being recorded.
2215     * </p> 
2216         */
2217        public CodingDt getPurposeOfUseFirstRep() {
2218                if (getPurposeOfUse().isEmpty()) {
2219                        return addPurposeOfUse();
2220                }
2221                return getPurposeOfUse().get(0); 
2222        }
2223  
2224
2225
2226        }
2227
2228        /**
2229         * Block class for child element: <b>AuditEvent.participant.network</b> ()
2230         *
2231     * <p>
2232     * <b>Definition:</b>
2233     * Logical network location for application activity, if the activity has a network location
2234     * </p> 
2235         */
2236        @Block()        
2237        public static class ParticipantNetwork 
2238            extends  BaseIdentifiableElement  
2239            implements IResourceBlock {
2240        
2241        @Child(name="address", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)       
2242        @Description(
2243                shortDefinition="",
2244                formalDefinition="An identifier for the network access point of the user device for the audit event"
2245        )
2246        private StringDt myAddress;
2247        
2248        @Child(name="type", type=CodeDt.class, order=1, min=0, max=1, summary=false, modifier=false)    
2249        @Description(
2250                shortDefinition="",
2251                formalDefinition="An identifier for the type of network access point that originated the audit event"
2252        )
2253        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/network-type")
2254        private BoundCodeDt<AuditEventParticipantNetworkTypeEnum> myType;
2255        
2256
2257        @Override
2258        public boolean isEmpty() {
2259                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myAddress,  myType);
2260        }
2261        
2262        @Override
2263        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2264                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myAddress, myType);
2265        }
2266
2267        /**
2268         * Gets the value(s) for <b>address</b> ().
2269         * creating it if it does
2270         * not exist. Will not return <code>null</code>.
2271         *
2272     * <p>
2273     * <b>Definition:</b>
2274     * An identifier for the network access point of the user device for the audit event
2275     * </p> 
2276         */
2277        public StringDt getAddressElement() {  
2278                if (myAddress == null) {
2279                        myAddress = new StringDt();
2280                }
2281                return myAddress;
2282        }
2283
2284        
2285        /**
2286         * Gets the value(s) for <b>address</b> ().
2287         * creating it if it does
2288         * not exist. This method may return <code>null</code>.
2289         *
2290     * <p>
2291     * <b>Definition:</b>
2292     * An identifier for the network access point of the user device for the audit event
2293     * </p> 
2294         */
2295        public String getAddress() {  
2296                return getAddressElement().getValue();
2297        }
2298
2299        /**
2300         * Sets the value(s) for <b>address</b> ()
2301         *
2302     * <p>
2303     * <b>Definition:</b>
2304     * An identifier for the network access point of the user device for the audit event
2305     * </p> 
2306         */
2307        public ParticipantNetwork setAddress(StringDt theValue) {
2308                myAddress = theValue;
2309                return this;
2310        }
2311        
2312        
2313
2314        /**
2315         * Sets the value for <b>address</b> ()
2316         *
2317     * <p>
2318     * <b>Definition:</b>
2319     * An identifier for the network access point of the user device for the audit event
2320     * </p> 
2321         */
2322        public ParticipantNetwork setAddress( String theString) {
2323                myAddress = new StringDt(theString); 
2324                return this; 
2325        }
2326
2327 
2328        /**
2329         * Gets the value(s) for <b>type</b> ().
2330         * creating it if it does
2331         * not exist. Will not return <code>null</code>.
2332         *
2333     * <p>
2334     * <b>Definition:</b>
2335     * An identifier for the type of network access point that originated the audit event
2336     * </p> 
2337         */
2338        public BoundCodeDt<AuditEventParticipantNetworkTypeEnum> getTypeElement() {  
2339                if (myType == null) {
2340                        myType = new BoundCodeDt<AuditEventParticipantNetworkTypeEnum>(AuditEventParticipantNetworkTypeEnum.VALUESET_BINDER);
2341                }
2342                return myType;
2343        }
2344
2345        
2346        /**
2347         * Gets the value(s) for <b>type</b> ().
2348         * creating it if it does
2349         * not exist. This method may return <code>null</code>.
2350         *
2351     * <p>
2352     * <b>Definition:</b>
2353     * An identifier for the type of network access point that originated the audit event
2354     * </p> 
2355         */
2356        public String getType() {  
2357                return getTypeElement().getValue();
2358        }
2359
2360        /**
2361         * Sets the value(s) for <b>type</b> ()
2362         *
2363     * <p>
2364     * <b>Definition:</b>
2365     * An identifier for the type of network access point that originated the audit event
2366     * </p> 
2367         */
2368        public ParticipantNetwork setType(BoundCodeDt<AuditEventParticipantNetworkTypeEnum> theValue) {
2369                myType = theValue;
2370                return this;
2371        }
2372        
2373        
2374
2375        /**
2376         * Sets the value(s) for <b>type</b> ()
2377         *
2378     * <p>
2379     * <b>Definition:</b>
2380     * An identifier for the type of network access point that originated the audit event
2381     * </p> 
2382         */
2383        public ParticipantNetwork setType(AuditEventParticipantNetworkTypeEnum theValue) {
2384                setType(new BoundCodeDt<AuditEventParticipantNetworkTypeEnum>(AuditEventParticipantNetworkTypeEnum.VALUESET_BINDER, theValue));
2385                
2386/*
2387                getTypeElement().setValueAsEnum(theValue);
2388*/
2389                return this;
2390        }
2391
2392  
2393
2394
2395        }
2396
2397
2398
2399        /**
2400         * Block class for child element: <b>AuditEvent.source</b> ()
2401         *
2402     * <p>
2403     * <b>Definition:</b>
2404     * 
2405     * </p> 
2406         */
2407        @Block()        
2408        public static class Source 
2409            extends  BaseIdentifiableElement  
2410            implements IResourceBlock {
2411        
2412        @Child(name="site", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)  
2413        @Description(
2414                shortDefinition="",
2415                formalDefinition="Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group"
2416        )
2417        private StringDt mySite;
2418        
2419        @Child(name="identifier", type=IdentifierDt.class, order=1, min=1, max=1, summary=true, modifier=false) 
2420        @Description(
2421                shortDefinition="",
2422                formalDefinition="Identifier of the source where the event was detected"
2423        )
2424        private IdentifierDt myIdentifier;
2425        
2426        @Child(name="type", type=CodingDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
2427        @Description(
2428                shortDefinition="",
2429                formalDefinition="Code specifying the type of source where event originated"
2430        )
2431        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-audit-source-type")
2432        private java.util.List<CodingDt> myType;
2433        
2434
2435        @Override
2436        public boolean isEmpty() {
2437                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySite,  myIdentifier,  myType);
2438        }
2439        
2440        @Override
2441        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2442                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySite, myIdentifier, myType);
2443        }
2444
2445        /**
2446         * Gets the value(s) for <b>site</b> ().
2447         * creating it if it does
2448         * not exist. Will not return <code>null</code>.
2449         *
2450     * <p>
2451     * <b>Definition:</b>
2452     * Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group
2453     * </p> 
2454         */
2455        public StringDt getSiteElement() {  
2456                if (mySite == null) {
2457                        mySite = new StringDt();
2458                }
2459                return mySite;
2460        }
2461
2462        
2463        /**
2464         * Gets the value(s) for <b>site</b> ().
2465         * creating it if it does
2466         * not exist. This method may return <code>null</code>.
2467         *
2468     * <p>
2469     * <b>Definition:</b>
2470     * Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group
2471     * </p> 
2472         */
2473        public String getSite() {  
2474                return getSiteElement().getValue();
2475        }
2476
2477        /**
2478         * Sets the value(s) for <b>site</b> ()
2479         *
2480     * <p>
2481     * <b>Definition:</b>
2482     * Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group
2483     * </p> 
2484         */
2485        public Source setSite(StringDt theValue) {
2486                mySite = theValue;
2487                return this;
2488        }
2489        
2490        
2491
2492        /**
2493         * Sets the value for <b>site</b> ()
2494         *
2495     * <p>
2496     * <b>Definition:</b>
2497     * Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group
2498     * </p> 
2499         */
2500        public Source setSite( String theString) {
2501                mySite = new StringDt(theString); 
2502                return this; 
2503        }
2504
2505 
2506        /**
2507         * Gets the value(s) for <b>identifier</b> ().
2508         * creating it if it does
2509         * not exist. Will not return <code>null</code>.
2510         *
2511     * <p>
2512     * <b>Definition:</b>
2513     * Identifier of the source where the event was detected
2514     * </p> 
2515         */
2516        public IdentifierDt getIdentifier() {  
2517                if (myIdentifier == null) {
2518                        myIdentifier = new IdentifierDt();
2519                }
2520                return myIdentifier;
2521        }
2522
2523        /**
2524         * Sets the value(s) for <b>identifier</b> ()
2525         *
2526     * <p>
2527     * <b>Definition:</b>
2528     * Identifier of the source where the event was detected
2529     * </p> 
2530         */
2531        public Source setIdentifier(IdentifierDt theValue) {
2532                myIdentifier = theValue;
2533                return this;
2534        }
2535        
2536        
2537
2538  
2539        /**
2540         * Gets the value(s) for <b>type</b> ().
2541         * creating it if it does
2542         * not exist. Will not return <code>null</code>.
2543         *
2544     * <p>
2545     * <b>Definition:</b>
2546     * Code specifying the type of source where event originated
2547     * </p> 
2548         */
2549        public java.util.List<CodingDt> getType() {  
2550                if (myType == null) {
2551                        myType = new java.util.ArrayList<CodingDt>();
2552                }
2553                return myType;
2554        }
2555
2556        /**
2557         * Sets the value(s) for <b>type</b> ()
2558         *
2559     * <p>
2560     * <b>Definition:</b>
2561     * Code specifying the type of source where event originated
2562     * </p> 
2563         */
2564        public Source setType(java.util.List<CodingDt> theValue) {
2565                myType = theValue;
2566                return this;
2567        }
2568        
2569        
2570
2571        /**
2572         * Adds and returns a new value for <b>type</b> ()
2573         *
2574     * <p>
2575     * <b>Definition:</b>
2576     * Code specifying the type of source where event originated
2577     * </p> 
2578         */
2579        public CodingDt addType() {
2580                CodingDt newType = new CodingDt();
2581                getType().add(newType);
2582                return newType; 
2583        }
2584
2585        /**
2586         * Adds a given new value for <b>type</b> ()
2587         *
2588         * <p>
2589         * <b>Definition:</b>
2590         * Code specifying the type of source where event originated
2591         * </p>
2592         * @param theValue The type to add (must not be <code>null</code>)
2593         */
2594        public Source addType(CodingDt theValue) {
2595                if (theValue == null) {
2596                        throw new NullPointerException("theValue must not be null");
2597                }
2598                getType().add(theValue);
2599                return this;
2600        }
2601
2602        /**
2603         * Gets the first repetition for <b>type</b> (),
2604         * creating it if it does not already exist.
2605         *
2606     * <p>
2607     * <b>Definition:</b>
2608     * Code specifying the type of source where event originated
2609     * </p> 
2610         */
2611        public CodingDt getTypeFirstRep() {
2612                if (getType().isEmpty()) {
2613                        return addType();
2614                }
2615                return getType().get(0); 
2616        }
2617  
2618
2619
2620        }
2621
2622
2623        /**
2624         * Block class for child element: <b>AuditEvent.object</b> ()
2625         *
2626     * <p>
2627     * <b>Definition:</b>
2628     * Specific instances of data or objects that have been accessed
2629     * </p> 
2630         */
2631        @Block()        
2632        public static class ObjectElement 
2633            extends  BaseIdentifiableElement  
2634            implements IResourceBlock {
2635        
2636        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
2637        @Description(
2638                shortDefinition="",
2639                formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific"
2640        )
2641        private IdentifierDt myIdentifier;
2642        
2643        @Child(name="reference", order=1, min=0, max=1, summary=true, modifier=false, type={
2644                IResource.class
2645        })
2646        @Description(
2647                shortDefinition="",
2648                formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific"
2649        )
2650        private ResourceReferenceDt myReference;
2651        
2652        @Child(name="type", type=CodingDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
2653        @Description(
2654                shortDefinition="",
2655                formalDefinition="The type of the object that was involved in this audit event."
2656        )
2657        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/object-type")
2658        private CodingDt myType;
2659        
2660        @Child(name="role", type=CodingDt.class, order=3, min=0, max=1, summary=false, modifier=false)  
2661        @Description(
2662                shortDefinition="",
2663                formalDefinition="Code representing the functional application role of Participant Object being audited"
2664        )
2665        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/object-role")
2666        private CodingDt myRole;
2667        
2668        @Child(name="lifecycle", type=CodingDt.class, order=4, min=0, max=1, summary=false, modifier=false)     
2669        @Description(
2670                shortDefinition="",
2671                formalDefinition="Identifier for the data life-cycle stage for the participant object"
2672        )
2673        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/object-lifecycle")
2674        private CodingDt myLifecycle;
2675        
2676        @Child(name="securityLabel", type=CodingDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
2677        @Description(
2678                shortDefinition="",
2679                formalDefinition="Denotes security labels for the identified object."
2680        )
2681        private java.util.List<CodingDt> mySecurityLabel;
2682        
2683        @Child(name="name", type=StringDt.class, order=6, min=0, max=1, summary=true, modifier=false)   
2684        @Description(
2685                shortDefinition="",
2686                formalDefinition="An instance-specific descriptor of the Participant Object ID audited, such as a person's name"
2687        )
2688        private StringDt myName;
2689        
2690        @Child(name="description", type=StringDt.class, order=7, min=0, max=1, summary=false, modifier=false)   
2691        @Description(
2692                shortDefinition="",
2693                formalDefinition="Text that describes the object in more detail"
2694        )
2695        private StringDt myDescription;
2696        
2697        @Child(name="query", type=Base64BinaryDt.class, order=8, min=0, max=1, summary=true, modifier=false)    
2698        @Description(
2699                shortDefinition="",
2700                formalDefinition="The actual query for a query-type participant object"
2701        )
2702        private Base64BinaryDt myQuery;
2703        
2704        @Child(name="detail", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
2705        @Description(
2706                shortDefinition="",
2707                formalDefinition=""
2708        )
2709        private java.util.List<ObjectDetail> myDetail;
2710        
2711
2712        @Override
2713        public boolean isEmpty() {
2714                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myReference,  myType,  myRole,  myLifecycle,  mySecurityLabel,  myName,  myDescription,  myQuery,  myDetail);
2715        }
2716        
2717        @Override
2718        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2719                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myReference, myType, myRole, myLifecycle, mySecurityLabel, myName, myDescription, myQuery, myDetail);
2720        }
2721
2722        /**
2723         * Gets the value(s) for <b>identifier</b> ().
2724         * creating it if it does
2725         * not exist. Will not return <code>null</code>.
2726         *
2727     * <p>
2728     * <b>Definition:</b>
2729     * Identifies a specific instance of the participant object. The reference should always be version specific
2730     * </p> 
2731         */
2732        public IdentifierDt getIdentifier() {  
2733                if (myIdentifier == null) {
2734                        myIdentifier = new IdentifierDt();
2735                }
2736                return myIdentifier;
2737        }
2738
2739        /**
2740         * Sets the value(s) for <b>identifier</b> ()
2741         *
2742     * <p>
2743     * <b>Definition:</b>
2744     * Identifies a specific instance of the participant object. The reference should always be version specific
2745     * </p> 
2746         */
2747        public ObjectElement setIdentifier(IdentifierDt theValue) {
2748                myIdentifier = theValue;
2749                return this;
2750        }
2751        
2752        
2753
2754  
2755        /**
2756         * Gets the value(s) for <b>reference</b> ().
2757         * creating it if it does
2758         * not exist. Will not return <code>null</code>.
2759         *
2760     * <p>
2761     * <b>Definition:</b>
2762     * Identifies a specific instance of the participant object. The reference should always be version specific
2763     * </p> 
2764         */
2765        public ResourceReferenceDt getReference() {  
2766                if (myReference == null) {
2767                        myReference = new ResourceReferenceDt();
2768                }
2769                return myReference;
2770        }
2771
2772        /**
2773         * Sets the value(s) for <b>reference</b> ()
2774         *
2775     * <p>
2776     * <b>Definition:</b>
2777     * Identifies a specific instance of the participant object. The reference should always be version specific
2778     * </p> 
2779         */
2780        public ObjectElement setReference(ResourceReferenceDt theValue) {
2781                myReference = theValue;
2782                return this;
2783        }
2784        
2785        
2786
2787  
2788        /**
2789         * Gets the value(s) for <b>type</b> ().
2790         * creating it if it does
2791         * not exist. Will not return <code>null</code>.
2792         *
2793     * <p>
2794     * <b>Definition:</b>
2795     * The type of the object that was involved in this audit event.
2796     * </p> 
2797         */
2798        public CodingDt getType() {  
2799                if (myType == null) {
2800                        myType = new CodingDt();
2801                }
2802                return myType;
2803        }
2804
2805        /**
2806         * Sets the value(s) for <b>type</b> ()
2807         *
2808     * <p>
2809     * <b>Definition:</b>
2810     * The type of the object that was involved in this audit event.
2811     * </p> 
2812         */
2813        public ObjectElement setType(CodingDt theValue) {
2814                myType = theValue;
2815                return this;
2816        }
2817        
2818        
2819
2820  
2821        /**
2822         * Gets the value(s) for <b>role</b> ().
2823         * creating it if it does
2824         * not exist. Will not return <code>null</code>.
2825         *
2826     * <p>
2827     * <b>Definition:</b>
2828     * Code representing the functional application role of Participant Object being audited
2829     * </p> 
2830         */
2831        public CodingDt getRole() {  
2832                if (myRole == null) {
2833                        myRole = new CodingDt();
2834                }
2835                return myRole;
2836        }
2837
2838        /**
2839         * Sets the value(s) for <b>role</b> ()
2840         *
2841     * <p>
2842     * <b>Definition:</b>
2843     * Code representing the functional application role of Participant Object being audited
2844     * </p> 
2845         */
2846        public ObjectElement setRole(CodingDt theValue) {
2847                myRole = theValue;
2848                return this;
2849        }
2850        
2851        
2852
2853  
2854        /**
2855         * Gets the value(s) for <b>lifecycle</b> ().
2856         * creating it if it does
2857         * not exist. Will not return <code>null</code>.
2858         *
2859     * <p>
2860     * <b>Definition:</b>
2861     * Identifier for the data life-cycle stage for the participant object
2862     * </p> 
2863         */
2864        public CodingDt getLifecycle() {  
2865                if (myLifecycle == null) {
2866                        myLifecycle = new CodingDt();
2867                }
2868                return myLifecycle;
2869        }
2870
2871        /**
2872         * Sets the value(s) for <b>lifecycle</b> ()
2873         *
2874     * <p>
2875     * <b>Definition:</b>
2876     * Identifier for the data life-cycle stage for the participant object
2877     * </p> 
2878         */
2879        public ObjectElement setLifecycle(CodingDt theValue) {
2880                myLifecycle = theValue;
2881                return this;
2882        }
2883        
2884        
2885
2886  
2887        /**
2888         * Gets the value(s) for <b>securityLabel</b> ().
2889         * creating it if it does
2890         * not exist. Will not return <code>null</code>.
2891         *
2892     * <p>
2893     * <b>Definition:</b>
2894     * Denotes security labels for the identified object.
2895     * </p> 
2896         */
2897        public java.util.List<CodingDt> getSecurityLabel() {  
2898                if (mySecurityLabel == null) {
2899                        mySecurityLabel = new java.util.ArrayList<CodingDt>();
2900                }
2901                return mySecurityLabel;
2902        }
2903
2904        /**
2905         * Sets the value(s) for <b>securityLabel</b> ()
2906         *
2907     * <p>
2908     * <b>Definition:</b>
2909     * Denotes security labels for the identified object.
2910     * </p> 
2911         */
2912        public ObjectElement setSecurityLabel(java.util.List<CodingDt> theValue) {
2913                mySecurityLabel = theValue;
2914                return this;
2915        }
2916        
2917        
2918
2919        /**
2920         * Adds and returns a new value for <b>securityLabel</b> ()
2921         *
2922     * <p>
2923     * <b>Definition:</b>
2924     * Denotes security labels for the identified object.
2925     * </p> 
2926         */
2927        public CodingDt addSecurityLabel() {
2928                CodingDt newType = new CodingDt();
2929                getSecurityLabel().add(newType);
2930                return newType; 
2931        }
2932
2933        /**
2934         * Adds a given new value for <b>securityLabel</b> ()
2935         *
2936         * <p>
2937         * <b>Definition:</b>
2938         * Denotes security labels for the identified object.
2939         * </p>
2940         * @param theValue The securityLabel to add (must not be <code>null</code>)
2941         */
2942        public ObjectElement addSecurityLabel(CodingDt theValue) {
2943                if (theValue == null) {
2944                        throw new NullPointerException("theValue must not be null");
2945                }
2946                getSecurityLabel().add(theValue);
2947                return this;
2948        }
2949
2950        /**
2951         * Gets the first repetition for <b>securityLabel</b> (),
2952         * creating it if it does not already exist.
2953         *
2954     * <p>
2955     * <b>Definition:</b>
2956     * Denotes security labels for the identified object.
2957     * </p> 
2958         */
2959        public CodingDt getSecurityLabelFirstRep() {
2960                if (getSecurityLabel().isEmpty()) {
2961                        return addSecurityLabel();
2962                }
2963                return getSecurityLabel().get(0); 
2964        }
2965  
2966        /**
2967         * Gets the value(s) for <b>name</b> ().
2968         * creating it if it does
2969         * not exist. Will not return <code>null</code>.
2970         *
2971     * <p>
2972     * <b>Definition:</b>
2973     * An instance-specific descriptor of the Participant Object ID audited, such as a person's name
2974     * </p> 
2975         */
2976        public StringDt getNameElement() {  
2977                if (myName == null) {
2978                        myName = new StringDt();
2979                }
2980                return myName;
2981        }
2982
2983        
2984        /**
2985         * Gets the value(s) for <b>name</b> ().
2986         * creating it if it does
2987         * not exist. This method may return <code>null</code>.
2988         *
2989     * <p>
2990     * <b>Definition:</b>
2991     * An instance-specific descriptor of the Participant Object ID audited, such as a person's name
2992     * </p> 
2993         */
2994        public String getName() {  
2995                return getNameElement().getValue();
2996        }
2997
2998        /**
2999         * Sets the value(s) for <b>name</b> ()
3000         *
3001     * <p>
3002     * <b>Definition:</b>
3003     * An instance-specific descriptor of the Participant Object ID audited, such as a person's name
3004     * </p> 
3005         */
3006        public ObjectElement setName(StringDt theValue) {
3007                myName = theValue;
3008                return this;
3009        }
3010        
3011        
3012
3013        /**
3014         * Sets the value for <b>name</b> ()
3015         *
3016     * <p>
3017     * <b>Definition:</b>
3018     * An instance-specific descriptor of the Participant Object ID audited, such as a person's name
3019     * </p> 
3020         */
3021        public ObjectElement setName( String theString) {
3022                myName = new StringDt(theString); 
3023                return this; 
3024        }
3025
3026 
3027        /**
3028         * Gets the value(s) for <b>description</b> ().
3029         * creating it if it does
3030         * not exist. Will not return <code>null</code>.
3031         *
3032     * <p>
3033     * <b>Definition:</b>
3034     * Text that describes the object in more detail
3035     * </p> 
3036         */
3037        public StringDt getDescriptionElement() {  
3038                if (myDescription == null) {
3039                        myDescription = new StringDt();
3040                }
3041                return myDescription;
3042        }
3043
3044        
3045        /**
3046         * Gets the value(s) for <b>description</b> ().
3047         * creating it if it does
3048         * not exist. This method may return <code>null</code>.
3049         *
3050     * <p>
3051     * <b>Definition:</b>
3052     * Text that describes the object in more detail
3053     * </p> 
3054         */
3055        public String getDescription() {  
3056                return getDescriptionElement().getValue();
3057        }
3058
3059        /**
3060         * Sets the value(s) for <b>description</b> ()
3061         *
3062     * <p>
3063     * <b>Definition:</b>
3064     * Text that describes the object in more detail
3065     * </p> 
3066         */
3067        public ObjectElement setDescription(StringDt theValue) {
3068                myDescription = theValue;
3069                return this;
3070        }
3071        
3072        
3073
3074        /**
3075         * Sets the value for <b>description</b> ()
3076         *
3077     * <p>
3078     * <b>Definition:</b>
3079     * Text that describes the object in more detail
3080     * </p> 
3081         */
3082        public ObjectElement setDescription( String theString) {
3083                myDescription = new StringDt(theString); 
3084                return this; 
3085        }
3086
3087 
3088        /**
3089         * Gets the value(s) for <b>query</b> ().
3090         * creating it if it does
3091         * not exist. Will not return <code>null</code>.
3092         *
3093     * <p>
3094     * <b>Definition:</b>
3095     * The actual query for a query-type participant object
3096     * </p> 
3097         */
3098        public Base64BinaryDt getQueryElement() {  
3099                if (myQuery == null) {
3100                        myQuery = new Base64BinaryDt();
3101                }
3102                return myQuery;
3103        }
3104
3105        
3106        /**
3107         * Gets the value(s) for <b>query</b> ().
3108         * creating it if it does
3109         * not exist. This method may return <code>null</code>.
3110         *
3111     * <p>
3112     * <b>Definition:</b>
3113     * The actual query for a query-type participant object
3114     * </p> 
3115         */
3116        public byte[] getQuery() {  
3117                return getQueryElement().getValue();
3118        }
3119
3120        /**
3121         * Sets the value(s) for <b>query</b> ()
3122         *
3123     * <p>
3124     * <b>Definition:</b>
3125     * The actual query for a query-type participant object
3126     * </p> 
3127         */
3128        public ObjectElement setQuery(Base64BinaryDt theValue) {
3129                myQuery = theValue;
3130                return this;
3131        }
3132        
3133        
3134
3135        /**
3136         * Sets the value for <b>query</b> ()
3137         *
3138     * <p>
3139     * <b>Definition:</b>
3140     * The actual query for a query-type participant object
3141     * </p> 
3142         */
3143        public ObjectElement setQuery( byte[] theBytes) {
3144                myQuery = new Base64BinaryDt(theBytes); 
3145                return this; 
3146        }
3147
3148 
3149        /**
3150         * Gets the value(s) for <b>detail</b> ().
3151         * creating it if it does
3152         * not exist. Will not return <code>null</code>.
3153         *
3154     * <p>
3155     * <b>Definition:</b>
3156     * 
3157     * </p> 
3158         */
3159        public java.util.List<ObjectDetail> getDetail() {  
3160                if (myDetail == null) {
3161                        myDetail = new java.util.ArrayList<ObjectDetail>();
3162                }
3163                return myDetail;
3164        }
3165
3166        /**
3167         * Sets the value(s) for <b>detail</b> ()
3168         *
3169     * <p>
3170     * <b>Definition:</b>
3171     * 
3172     * </p> 
3173         */
3174        public ObjectElement setDetail(java.util.List<ObjectDetail> theValue) {
3175                myDetail = theValue;
3176                return this;
3177        }
3178        
3179        
3180
3181        /**
3182         * Adds and returns a new value for <b>detail</b> ()
3183         *
3184     * <p>
3185     * <b>Definition:</b>
3186     * 
3187     * </p> 
3188         */
3189        public ObjectDetail addDetail() {
3190                ObjectDetail newType = new ObjectDetail();
3191                getDetail().add(newType);
3192                return newType; 
3193        }
3194
3195        /**
3196         * Adds a given new value for <b>detail</b> ()
3197         *
3198         * <p>
3199         * <b>Definition:</b>
3200         * 
3201         * </p>
3202         * @param theValue The detail to add (must not be <code>null</code>)
3203         */
3204        public ObjectElement addDetail(ObjectDetail theValue) {
3205                if (theValue == null) {
3206                        throw new NullPointerException("theValue must not be null");
3207                }
3208                getDetail().add(theValue);
3209                return this;
3210        }
3211
3212        /**
3213         * Gets the first repetition for <b>detail</b> (),
3214         * creating it if it does not already exist.
3215         *
3216     * <p>
3217     * <b>Definition:</b>
3218     * 
3219     * </p> 
3220         */
3221        public ObjectDetail getDetailFirstRep() {
3222                if (getDetail().isEmpty()) {
3223                        return addDetail();
3224                }
3225                return getDetail().get(0); 
3226        }
3227  
3228
3229
3230        }
3231
3232        /**
3233         * Block class for child element: <b>AuditEvent.object.detail</b> ()
3234         *
3235     * <p>
3236     * <b>Definition:</b>
3237     * 
3238     * </p> 
3239         */
3240        @Block()        
3241        public static class ObjectDetail 
3242            extends  BaseIdentifiableElement  
3243            implements IResourceBlock {
3244        
3245        @Child(name="type", type=StringDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
3246        @Description(
3247                shortDefinition="",
3248                formalDefinition=""
3249        )
3250        private StringDt myType;
3251        
3252        @Child(name="value", type=Base64BinaryDt.class, order=1, min=1, max=1, summary=false, modifier=false)   
3253        @Description(
3254                shortDefinition="",
3255                formalDefinition=""
3256        )
3257        private Base64BinaryDt myValue;
3258        
3259
3260        @Override
3261        public boolean isEmpty() {
3262                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myValue);
3263        }
3264        
3265        @Override
3266        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3267                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myValue);
3268        }
3269
3270        /**
3271         * Gets the value(s) for <b>type</b> ().
3272         * creating it if it does
3273         * not exist. Will not return <code>null</code>.
3274         *
3275     * <p>
3276     * <b>Definition:</b>
3277     * 
3278     * </p> 
3279         */
3280        public StringDt getTypeElement() {  
3281                if (myType == null) {
3282                        myType = new StringDt();
3283                }
3284                return myType;
3285        }
3286
3287        
3288        /**
3289         * Gets the value(s) for <b>type</b> ().
3290         * creating it if it does
3291         * not exist. This method may return <code>null</code>.
3292         *
3293     * <p>
3294     * <b>Definition:</b>
3295     * 
3296     * </p> 
3297         */
3298        public String getType() {  
3299                return getTypeElement().getValue();
3300        }
3301
3302        /**
3303         * Sets the value(s) for <b>type</b> ()
3304         *
3305     * <p>
3306     * <b>Definition:</b>
3307     * 
3308     * </p> 
3309         */
3310        public ObjectDetail setType(StringDt theValue) {
3311                myType = theValue;
3312                return this;
3313        }
3314        
3315        
3316
3317        /**
3318         * Sets the value for <b>type</b> ()
3319         *
3320     * <p>
3321     * <b>Definition:</b>
3322     * 
3323     * </p> 
3324         */
3325        public ObjectDetail setType( String theString) {
3326                myType = new StringDt(theString); 
3327                return this; 
3328        }
3329
3330 
3331        /**
3332         * Gets the value(s) for <b>value</b> ().
3333         * creating it if it does
3334         * not exist. Will not return <code>null</code>.
3335         *
3336     * <p>
3337     * <b>Definition:</b>
3338     * 
3339     * </p> 
3340         */
3341        public Base64BinaryDt getValueElement() {  
3342                if (myValue == null) {
3343                        myValue = new Base64BinaryDt();
3344                }
3345                return myValue;
3346        }
3347
3348        
3349        /**
3350         * Gets the value(s) for <b>value</b> ().
3351         * creating it if it does
3352         * not exist. This method may return <code>null</code>.
3353         *
3354     * <p>
3355     * <b>Definition:</b>
3356     * 
3357     * </p> 
3358         */
3359        public byte[] getValue() {  
3360                return getValueElement().getValue();
3361        }
3362
3363        /**
3364         * Sets the value(s) for <b>value</b> ()
3365         *
3366     * <p>
3367     * <b>Definition:</b>
3368     * 
3369     * </p> 
3370         */
3371        public ObjectDetail setValue(Base64BinaryDt theValue) {
3372                myValue = theValue;
3373                return this;
3374        }
3375        
3376        
3377
3378        /**
3379         * Sets the value for <b>value</b> ()
3380         *
3381     * <p>
3382     * <b>Definition:</b>
3383     * 
3384     * </p> 
3385         */
3386        public ObjectDetail setValue( byte[] theBytes) {
3387                myValue = new Base64BinaryDt(theBytes); 
3388                return this; 
3389        }
3390
3391 
3392
3393
3394        }
3395
3396
3397
3398
3399
3400    @Override
3401    public String getResourceName() {
3402        return "AuditEvent";
3403    }
3404    
3405    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
3406        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
3407    }
3408
3409
3410}