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