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>Group</b> Resource
282 * (administrative.group)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
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/Group">http://hl7.org/fhir/profiles/Group</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Group", profile="http://hl7.org/fhir/profiles/Group", id="group")
301public class Group extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>type</b>
307         * <p>
308         * Description: <b>The type of resources the group contains</b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>Group.type</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" 
314 )
315        public static final String SP_TYPE = "type";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>type</b>
319         * <p>
320         * Description: <b>The type of resources the group contains</b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>Group.type</b><br>
323         * </p>
324         */
325        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
326
327        /**
328         * Search parameter constant for <b>code</b>
329         * <p>
330         * Description: <b>The kind of resources contained</b><br>
331         * Type: <b>token</b><br>
332         * Path: <b>Group.code</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" 
336 )
337        public static final String SP_CODE = "code";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>code</b>
341         * <p>
342         * Description: <b>The kind of resources contained</b><br>
343         * Type: <b>token</b><br>
344         * Path: <b>Group.code</b><br>
345         * </p>
346         */
347        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
348
349        /**
350         * Search parameter constant for <b>actual</b>
351         * <p>
352         * Description: <b></b><br>
353         * Type: <b>token</b><br>
354         * Path: <b>Group.actual</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="actual", path="Group.actual", description="", type="token" 
358 )
359        public static final String SP_ACTUAL = "actual";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>actual</b>
363         * <p>
364         * Description: <b></b><br>
365         * Type: <b>token</b><br>
366         * Path: <b>Group.actual</b><br>
367         * </p>
368         */
369        public static final TokenClientParam ACTUAL = new TokenClientParam(SP_ACTUAL);
370
371        /**
372         * Search parameter constant for <b>identifier</b>
373         * <p>
374         * Description: <b></b><br>
375         * Type: <b>token</b><br>
376         * Path: <b>Group.identifier</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="identifier", path="Group.identifier", description="", type="token" 
380 )
381        public static final String SP_IDENTIFIER = "identifier";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
385         * <p>
386         * Description: <b></b><br>
387         * Type: <b>token</b><br>
388         * Path: <b>Group.identifier</b><br>
389         * </p>
390         */
391        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
392
393        /**
394         * Search parameter constant for <b>member</b>
395         * <p>
396         * Description: <b></b><br>
397         * Type: <b>reference</b><br>
398         * Path: <b>Group.member.entity</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="member", path="Group.member.entity", description="", type="reference" 
402, providesMembershipIn={
403 @Compartment(name="Patient") ,  @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson")   }
404 )
405        public static final String SP_MEMBER = "member";
406
407        /**
408         * <b>Fluent Client</b> search parameter constant for <b>member</b>
409         * <p>
410         * Description: <b></b><br>
411         * Type: <b>reference</b><br>
412         * Path: <b>Group.member.entity</b><br>
413         * </p>
414         */
415        public static final ReferenceClientParam MEMBER = new ReferenceClientParam(SP_MEMBER);
416
417        /**
418         * Search parameter constant for <b>characteristic</b>
419         * <p>
420         * Description: <b></b><br>
421         * Type: <b>token</b><br>
422         * Path: <b>Group.characteristic.code</b><br>
423         * </p>
424         */
425        @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="", type="token" 
426 )
427        public static final String SP_CHARACTERISTIC = "characteristic";
428
429        /**
430         * <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
431         * <p>
432         * Description: <b></b><br>
433         * Type: <b>token</b><br>
434         * Path: <b>Group.characteristic.code</b><br>
435         * </p>
436         */
437        public static final TokenClientParam CHARACTERISTIC = new TokenClientParam(SP_CHARACTERISTIC);
438
439        /**
440         * Search parameter constant for <b>value</b>
441         * <p>
442         * Description: <b></b><br>
443         * Type: <b>token</b><br>
444         * Path: <b>Group.characteristic.value[x]</b><br>
445         * </p>
446         */
447        @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="", type="token" 
448 )
449        public static final String SP_VALUE = "value";
450
451        /**
452         * <b>Fluent Client</b> search parameter constant for <b>value</b>
453         * <p>
454         * Description: <b></b><br>
455         * Type: <b>token</b><br>
456         * Path: <b>Group.characteristic.value[x]</b><br>
457         * </p>
458         */
459        public static final TokenClientParam VALUE = new TokenClientParam(SP_VALUE);
460
461        /**
462         * Search parameter constant for <b>exclude</b>
463         * <p>
464         * Description: <b></b><br>
465         * Type: <b>token</b><br>
466         * Path: <b>Group.characteristic.exclude</b><br>
467         * </p>
468         */
469        @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="", type="token" 
470 )
471        public static final String SP_EXCLUDE = "exclude";
472
473        /**
474         * <b>Fluent Client</b> search parameter constant for <b>exclude</b>
475         * <p>
476         * Description: <b></b><br>
477         * Type: <b>token</b><br>
478         * Path: <b>Group.characteristic.exclude</b><br>
479         * </p>
480         */
481        public static final TokenClientParam EXCLUDE = new TokenClientParam(SP_EXCLUDE);
482
483        /**
484         * Search parameter constant for <b>characteristic-value</b>
485         * <p>
486         * Description: <b>A composite of both characteristic and value</b><br>
487         * Type: <b>composite</b><br>
488         * Path: <b>characteristic &amp; value</b><br>
489         * </p>
490         */
491        @SearchParamDefinition(name="characteristic-value", path="characteristic & value", description="A composite of both characteristic and value", type="composite"  , compositeOf={  "characteristic",  "value" } 
492 )
493        public static final String SP_CHARACTERISTIC_VALUE = "characteristic-value";
494
495        /**
496         * <b>Fluent Client</b> search parameter constant for <b>characteristic-value</b>
497         * <p>
498         * Description: <b>A composite of both characteristic and value</b><br>
499         * Type: <b>composite</b><br>
500         * Path: <b>characteristic &amp; value</b><br>
501         * </p>
502         */
503        public static final CompositeClientParam<TokenClientParam, TokenClientParam> CHARACTERISTIC_VALUE = new CompositeClientParam<TokenClientParam, TokenClientParam>(SP_CHARACTERISTIC_VALUE);
504
505
506        /**
507         * Constant for fluent queries to be used to add include statements. Specifies
508         * the path value of "<b>Group:member</b>".
509         */
510        public static final Include INCLUDE_MEMBER = new Include("Group:member");
511
512
513        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
514        @Description(
515                shortDefinition="id",
516                formalDefinition="A unique business identifier for this group"
517        )
518        private java.util.List<IdentifierDt> myIdentifier;
519        
520        @Child(name="type", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=false)     
521        @Description(
522                shortDefinition="class",
523                formalDefinition="Identifies the broad classification of the kind of resources the group includes"
524        )
525        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/group-type")
526        private BoundCodeDt<GroupTypeEnum> myType;
527        
528        @Child(name="actual", type=BooleanDt.class, order=2, min=1, max=1, summary=true, modifier=false)        
529        @Description(
530                shortDefinition="",
531                formalDefinition="If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals"
532        )
533        private BooleanDt myActual;
534        
535        @Child(name="code", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=true, modifier=false)  
536        @Description(
537                shortDefinition="",
538                formalDefinition="Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc."
539        )
540        private CodeableConceptDt myCode;
541        
542        @Child(name="name", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)   
543        @Description(
544                shortDefinition="",
545                formalDefinition="A label assigned to the group for human identification and communication"
546        )
547        private StringDt myName;
548        
549        @Child(name="quantity", type=UnsignedIntDt.class, order=5, min=0, max=1, summary=true, modifier=false)  
550        @Description(
551                shortDefinition="",
552                formalDefinition="A count of the number of resource instances that are part of the group"
553        )
554        private UnsignedIntDt myQuantity;
555        
556        @Child(name="characteristic", order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
557        @Description(
558                shortDefinition="",
559                formalDefinition="Identifies the traits shared by members of the group"
560        )
561        private java.util.List<Characteristic> myCharacteristic;
562        
563        @Child(name="member", order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
564        @Description(
565                shortDefinition="",
566                formalDefinition="Identifies the resource instances that are members of the group."
567        )
568        private java.util.List<Member> myMember;
569        
570
571        @Override
572        public boolean isEmpty() {
573                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myType,  myActual,  myCode,  myName,  myQuantity,  myCharacteristic,  myMember);
574        }
575        
576        @Override
577        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
578                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember);
579        }
580
581        /**
582         * Gets the value(s) for <b>identifier</b> (id).
583         * creating it if it does
584         * not exist. Will not return <code>null</code>.
585         *
586     * <p>
587     * <b>Definition:</b>
588     * A unique business identifier for this group
589     * </p> 
590         */
591        public java.util.List<IdentifierDt> getIdentifier() {  
592                if (myIdentifier == null) {
593                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
594                }
595                return myIdentifier;
596        }
597
598        /**
599         * Sets the value(s) for <b>identifier</b> (id)
600         *
601     * <p>
602     * <b>Definition:</b>
603     * A unique business identifier for this group
604     * </p> 
605         */
606        public Group setIdentifier(java.util.List<IdentifierDt> theValue) {
607                myIdentifier = theValue;
608                return this;
609        }
610        
611        
612
613        /**
614         * Adds and returns a new value for <b>identifier</b> (id)
615         *
616     * <p>
617     * <b>Definition:</b>
618     * A unique business identifier for this group
619     * </p> 
620         */
621        public IdentifierDt addIdentifier() {
622                IdentifierDt newType = new IdentifierDt();
623                getIdentifier().add(newType);
624                return newType; 
625        }
626
627        /**
628         * Adds a given new value for <b>identifier</b> (id)
629         *
630         * <p>
631         * <b>Definition:</b>
632         * A unique business identifier for this group
633         * </p>
634         * @param theValue The identifier to add (must not be <code>null</code>)
635         */
636        public Group addIdentifier(IdentifierDt theValue) {
637                if (theValue == null) {
638                        throw new NullPointerException("theValue must not be null");
639                }
640                getIdentifier().add(theValue);
641                return this;
642        }
643
644        /**
645         * Gets the first repetition for <b>identifier</b> (id),
646         * creating it if it does not already exist.
647         *
648     * <p>
649     * <b>Definition:</b>
650     * A unique business identifier for this group
651     * </p> 
652         */
653        public IdentifierDt getIdentifierFirstRep() {
654                if (getIdentifier().isEmpty()) {
655                        return addIdentifier();
656                }
657                return getIdentifier().get(0); 
658        }
659  
660        /**
661         * Gets the value(s) for <b>type</b> (class).
662         * creating it if it does
663         * not exist. Will not return <code>null</code>.
664         *
665     * <p>
666     * <b>Definition:</b>
667     * Identifies the broad classification of the kind of resources the group includes
668     * </p> 
669         */
670        public BoundCodeDt<GroupTypeEnum> getTypeElement() {  
671                if (myType == null) {
672                        myType = new BoundCodeDt<GroupTypeEnum>(GroupTypeEnum.VALUESET_BINDER);
673                }
674                return myType;
675        }
676
677        
678        /**
679         * Gets the value(s) for <b>type</b> (class).
680         * creating it if it does
681         * not exist. This method may return <code>null</code>.
682         *
683     * <p>
684     * <b>Definition:</b>
685     * Identifies the broad classification of the kind of resources the group includes
686     * </p> 
687         */
688        public String getType() {  
689                return getTypeElement().getValue();
690        }
691
692        /**
693         * Sets the value(s) for <b>type</b> (class)
694         *
695     * <p>
696     * <b>Definition:</b>
697     * Identifies the broad classification of the kind of resources the group includes
698     * </p> 
699         */
700        public Group setType(BoundCodeDt<GroupTypeEnum> theValue) {
701                myType = theValue;
702                return this;
703        }
704        
705        
706
707        /**
708         * Sets the value(s) for <b>type</b> (class)
709         *
710     * <p>
711     * <b>Definition:</b>
712     * Identifies the broad classification of the kind of resources the group includes
713     * </p> 
714         */
715        public Group setType(GroupTypeEnum theValue) {
716                setType(new BoundCodeDt<GroupTypeEnum>(GroupTypeEnum.VALUESET_BINDER, theValue));
717                
718/*
719                getTypeElement().setValueAsEnum(theValue);
720*/
721                return this;
722        }
723
724  
725        /**
726         * Gets the value(s) for <b>actual</b> ().
727         * creating it if it does
728         * not exist. Will not return <code>null</code>.
729         *
730     * <p>
731     * <b>Definition:</b>
732     * If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals
733     * </p> 
734         */
735        public BooleanDt getActualElement() {  
736                if (myActual == null) {
737                        myActual = new BooleanDt();
738                }
739                return myActual;
740        }
741
742        
743        /**
744         * Gets the value(s) for <b>actual</b> ().
745         * creating it if it does
746         * not exist. This method may return <code>null</code>.
747         *
748     * <p>
749     * <b>Definition:</b>
750     * If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals
751     * </p> 
752         */
753        public Boolean getActual() {  
754                return getActualElement().getValue();
755        }
756
757        /**
758         * Sets the value(s) for <b>actual</b> ()
759         *
760     * <p>
761     * <b>Definition:</b>
762     * If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals
763     * </p> 
764         */
765        public Group setActual(BooleanDt theValue) {
766                myActual = theValue;
767                return this;
768        }
769        
770        
771
772        /**
773         * Sets the value for <b>actual</b> ()
774         *
775     * <p>
776     * <b>Definition:</b>
777     * If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals
778     * </p> 
779         */
780        public Group setActual( boolean theBoolean) {
781                myActual = new BooleanDt(theBoolean); 
782                return this; 
783        }
784
785 
786        /**
787         * Gets the value(s) for <b>code</b> ().
788         * creating it if it does
789         * not exist. Will not return <code>null</code>.
790         *
791     * <p>
792     * <b>Definition:</b>
793     * Provides a specific type of resource the group includes; e.g. \&quot;cow\&quot;, \&quot;syringe\&quot;, etc.
794     * </p> 
795         */
796        public CodeableConceptDt getCode() {  
797                if (myCode == null) {
798                        myCode = new CodeableConceptDt();
799                }
800                return myCode;
801        }
802
803        /**
804         * Sets the value(s) for <b>code</b> ()
805         *
806     * <p>
807     * <b>Definition:</b>
808     * Provides a specific type of resource the group includes; e.g. \&quot;cow\&quot;, \&quot;syringe\&quot;, etc.
809     * </p> 
810         */
811        public Group setCode(CodeableConceptDt theValue) {
812                myCode = theValue;
813                return this;
814        }
815        
816        
817
818  
819        /**
820         * Gets the value(s) for <b>name</b> ().
821         * creating it if it does
822         * not exist. Will not return <code>null</code>.
823         *
824     * <p>
825     * <b>Definition:</b>
826     * A label assigned to the group for human identification and communication
827     * </p> 
828         */
829        public StringDt getNameElement() {  
830                if (myName == null) {
831                        myName = new StringDt();
832                }
833                return myName;
834        }
835
836        
837        /**
838         * Gets the value(s) for <b>name</b> ().
839         * creating it if it does
840         * not exist. This method may return <code>null</code>.
841         *
842     * <p>
843     * <b>Definition:</b>
844     * A label assigned to the group for human identification and communication
845     * </p> 
846         */
847        public String getName() {  
848                return getNameElement().getValue();
849        }
850
851        /**
852         * Sets the value(s) for <b>name</b> ()
853         *
854     * <p>
855     * <b>Definition:</b>
856     * A label assigned to the group for human identification and communication
857     * </p> 
858         */
859        public Group setName(StringDt theValue) {
860                myName = theValue;
861                return this;
862        }
863        
864        
865
866        /**
867         * Sets the value for <b>name</b> ()
868         *
869     * <p>
870     * <b>Definition:</b>
871     * A label assigned to the group for human identification and communication
872     * </p> 
873         */
874        public Group setName( String theString) {
875                myName = new StringDt(theString); 
876                return this; 
877        }
878
879 
880        /**
881         * Gets the value(s) for <b>quantity</b> ().
882         * creating it if it does
883         * not exist. Will not return <code>null</code>.
884         *
885     * <p>
886     * <b>Definition:</b>
887     * A count of the number of resource instances that are part of the group
888     * </p> 
889         */
890        public UnsignedIntDt getQuantityElement() {  
891                if (myQuantity == null) {
892                        myQuantity = new UnsignedIntDt();
893                }
894                return myQuantity;
895        }
896
897        
898        /**
899         * Gets the value(s) for <b>quantity</b> ().
900         * creating it if it does
901         * not exist. This method may return <code>null</code>.
902         *
903     * <p>
904     * <b>Definition:</b>
905     * A count of the number of resource instances that are part of the group
906     * </p> 
907         */
908        public Integer getQuantity() {  
909                return getQuantityElement().getValue();
910        }
911
912        /**
913         * Sets the value(s) for <b>quantity</b> ()
914         *
915     * <p>
916     * <b>Definition:</b>
917     * A count of the number of resource instances that are part of the group
918     * </p> 
919         */
920        public Group setQuantity(UnsignedIntDt theValue) {
921                myQuantity = theValue;
922                return this;
923        }
924        
925        
926
927        /**
928         * Sets the value for <b>quantity</b> ()
929         *
930     * <p>
931     * <b>Definition:</b>
932     * A count of the number of resource instances that are part of the group
933     * </p> 
934         */
935        public Group setQuantity( int theInteger) {
936                myQuantity = new UnsignedIntDt(theInteger); 
937                return this; 
938        }
939
940 
941        /**
942         * Gets the value(s) for <b>characteristic</b> ().
943         * creating it if it does
944         * not exist. Will not return <code>null</code>.
945         *
946     * <p>
947     * <b>Definition:</b>
948     * Identifies the traits shared by members of the group
949     * </p> 
950         */
951        public java.util.List<Characteristic> getCharacteristic() {  
952                if (myCharacteristic == null) {
953                        myCharacteristic = new java.util.ArrayList<Characteristic>();
954                }
955                return myCharacteristic;
956        }
957
958        /**
959         * Sets the value(s) for <b>characteristic</b> ()
960         *
961     * <p>
962     * <b>Definition:</b>
963     * Identifies the traits shared by members of the group
964     * </p> 
965         */
966        public Group setCharacteristic(java.util.List<Characteristic> theValue) {
967                myCharacteristic = theValue;
968                return this;
969        }
970        
971        
972
973        /**
974         * Adds and returns a new value for <b>characteristic</b> ()
975         *
976     * <p>
977     * <b>Definition:</b>
978     * Identifies the traits shared by members of the group
979     * </p> 
980         */
981        public Characteristic addCharacteristic() {
982                Characteristic newType = new Characteristic();
983                getCharacteristic().add(newType);
984                return newType; 
985        }
986
987        /**
988         * Adds a given new value for <b>characteristic</b> ()
989         *
990         * <p>
991         * <b>Definition:</b>
992         * Identifies the traits shared by members of the group
993         * </p>
994         * @param theValue The characteristic to add (must not be <code>null</code>)
995         */
996        public Group addCharacteristic(Characteristic theValue) {
997                if (theValue == null) {
998                        throw new NullPointerException("theValue must not be null");
999                }
1000                getCharacteristic().add(theValue);
1001                return this;
1002        }
1003
1004        /**
1005         * Gets the first repetition for <b>characteristic</b> (),
1006         * creating it if it does not already exist.
1007         *
1008     * <p>
1009     * <b>Definition:</b>
1010     * Identifies the traits shared by members of the group
1011     * </p> 
1012         */
1013        public Characteristic getCharacteristicFirstRep() {
1014                if (getCharacteristic().isEmpty()) {
1015                        return addCharacteristic();
1016                }
1017                return getCharacteristic().get(0); 
1018        }
1019  
1020        /**
1021         * Gets the value(s) for <b>member</b> ().
1022         * creating it if it does
1023         * not exist. Will not return <code>null</code>.
1024         *
1025     * <p>
1026     * <b>Definition:</b>
1027     * Identifies the resource instances that are members of the group.
1028     * </p> 
1029         */
1030        public java.util.List<Member> getMember() {  
1031                if (myMember == null) {
1032                        myMember = new java.util.ArrayList<Member>();
1033                }
1034                return myMember;
1035        }
1036
1037        /**
1038         * Sets the value(s) for <b>member</b> ()
1039         *
1040     * <p>
1041     * <b>Definition:</b>
1042     * Identifies the resource instances that are members of the group.
1043     * </p> 
1044         */
1045        public Group setMember(java.util.List<Member> theValue) {
1046                myMember = theValue;
1047                return this;
1048        }
1049        
1050        
1051
1052        /**
1053         * Adds and returns a new value for <b>member</b> ()
1054         *
1055     * <p>
1056     * <b>Definition:</b>
1057     * Identifies the resource instances that are members of the group.
1058     * </p> 
1059         */
1060        public Member addMember() {
1061                Member newType = new Member();
1062                getMember().add(newType);
1063                return newType; 
1064        }
1065
1066        /**
1067         * Adds a given new value for <b>member</b> ()
1068         *
1069         * <p>
1070         * <b>Definition:</b>
1071         * Identifies the resource instances that are members of the group.
1072         * </p>
1073         * @param theValue The member to add (must not be <code>null</code>)
1074         */
1075        public Group addMember(Member theValue) {
1076                if (theValue == null) {
1077                        throw new NullPointerException("theValue must not be null");
1078                }
1079                getMember().add(theValue);
1080                return this;
1081        }
1082
1083        /**
1084         * Gets the first repetition for <b>member</b> (),
1085         * creating it if it does not already exist.
1086         *
1087     * <p>
1088     * <b>Definition:</b>
1089     * Identifies the resource instances that are members of the group.
1090     * </p> 
1091         */
1092        public Member getMemberFirstRep() {
1093                if (getMember().isEmpty()) {
1094                        return addMember();
1095                }
1096                return getMember().get(0); 
1097        }
1098  
1099        /**
1100         * Block class for child element: <b>Group.characteristic</b> ()
1101         *
1102     * <p>
1103     * <b>Definition:</b>
1104     * Identifies the traits shared by members of the group
1105     * </p> 
1106         */
1107        @Block()        
1108        public static class Characteristic 
1109            extends  BaseIdentifiableElement  
1110            implements IResourceBlock {
1111        
1112        @Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=false, modifier=false) 
1113        @Description(
1114                shortDefinition="",
1115                formalDefinition="A code that identifies the kind of trait being asserted"
1116        )
1117        private CodeableConceptDt myCode;
1118        
1119        @Child(name="value", order=1, min=1, max=1, summary=false, modifier=false, type={
1120                CodeableConceptDt.class, 
1121                BooleanDt.class, 
1122                QuantityDt.class, 
1123                RangeDt.class
1124        })
1125        @Description(
1126                shortDefinition="",
1127                formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group"
1128        )
1129        private IDatatype myValue;
1130        
1131        @Child(name="exclude", type=BooleanDt.class, order=2, min=1, max=1, summary=false, modifier=true)       
1132        @Description(
1133                shortDefinition="",
1134                formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group"
1135        )
1136        private BooleanDt myExclude;
1137        
1138        @Child(name="period", type=PeriodDt.class, order=3, min=0, max=1, summary=false, modifier=false)        
1139        @Description(
1140                shortDefinition="",
1141                formalDefinition="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June"
1142        )
1143        private PeriodDt myPeriod;
1144        
1145
1146        @Override
1147        public boolean isEmpty() {
1148                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myValue,  myExclude,  myPeriod);
1149        }
1150        
1151        @Override
1152        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1153                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myValue, myExclude, myPeriod);
1154        }
1155
1156        /**
1157         * Gets the value(s) for <b>code</b> ().
1158         * creating it if it does
1159         * not exist. Will not return <code>null</code>.
1160         *
1161     * <p>
1162     * <b>Definition:</b>
1163     * A code that identifies the kind of trait being asserted
1164     * </p> 
1165         */
1166        public CodeableConceptDt getCode() {  
1167                if (myCode == null) {
1168                        myCode = new CodeableConceptDt();
1169                }
1170                return myCode;
1171        }
1172
1173        /**
1174         * Sets the value(s) for <b>code</b> ()
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * A code that identifies the kind of trait being asserted
1179     * </p> 
1180         */
1181        public Characteristic setCode(CodeableConceptDt theValue) {
1182                myCode = theValue;
1183                return this;
1184        }
1185        
1186        
1187
1188  
1189        /**
1190         * Gets the value(s) for <b>value[x]</b> ().
1191         * creating it if it does
1192         * not exist. Will not return <code>null</code>.
1193         *
1194     * <p>
1195     * <b>Definition:</b>
1196     * The value of the trait that holds (or does not hold - see 'exclude') for members of the group
1197     * </p> 
1198         */
1199        public IDatatype getValue() {  
1200                return myValue;
1201        }
1202
1203        /**
1204         * Sets the value(s) for <b>value[x]</b> ()
1205         *
1206     * <p>
1207     * <b>Definition:</b>
1208     * The value of the trait that holds (or does not hold - see 'exclude') for members of the group
1209     * </p> 
1210         */
1211        public Characteristic setValue(IDatatype theValue) {
1212                myValue = theValue;
1213                return this;
1214        }
1215        
1216        
1217
1218  
1219        /**
1220         * Gets the value(s) for <b>exclude</b> ().
1221         * creating it if it does
1222         * not exist. Will not return <code>null</code>.
1223         *
1224     * <p>
1225     * <b>Definition:</b>
1226     * If true, indicates the characteristic is one that is NOT held by members of the group
1227     * </p> 
1228         */
1229        public BooleanDt getExcludeElement() {  
1230                if (myExclude == null) {
1231                        myExclude = new BooleanDt();
1232                }
1233                return myExclude;
1234        }
1235
1236        
1237        /**
1238         * Gets the value(s) for <b>exclude</b> ().
1239         * creating it if it does
1240         * not exist. This method may return <code>null</code>.
1241         *
1242     * <p>
1243     * <b>Definition:</b>
1244     * If true, indicates the characteristic is one that is NOT held by members of the group
1245     * </p> 
1246         */
1247        public Boolean getExclude() {  
1248                return getExcludeElement().getValue();
1249        }
1250
1251        /**
1252         * Sets the value(s) for <b>exclude</b> ()
1253         *
1254     * <p>
1255     * <b>Definition:</b>
1256     * If true, indicates the characteristic is one that is NOT held by members of the group
1257     * </p> 
1258         */
1259        public Characteristic setExclude(BooleanDt theValue) {
1260                myExclude = theValue;
1261                return this;
1262        }
1263        
1264        
1265
1266        /**
1267         * Sets the value for <b>exclude</b> ()
1268         *
1269     * <p>
1270     * <b>Definition:</b>
1271     * If true, indicates the characteristic is one that is NOT held by members of the group
1272     * </p> 
1273         */
1274        public Characteristic setExclude( boolean theBoolean) {
1275                myExclude = new BooleanDt(theBoolean); 
1276                return this; 
1277        }
1278
1279 
1280        /**
1281         * Gets the value(s) for <b>period</b> ().
1282         * creating it if it does
1283         * not exist. Will not return <code>null</code>.
1284         *
1285     * <p>
1286     * <b>Definition:</b>
1287     * The period over which the characteristic is tested; e.g. the patient had an operation during the month of June
1288     * </p> 
1289         */
1290        public PeriodDt getPeriod() {  
1291                if (myPeriod == null) {
1292                        myPeriod = new PeriodDt();
1293                }
1294                return myPeriod;
1295        }
1296
1297        /**
1298         * Sets the value(s) for <b>period</b> ()
1299         *
1300     * <p>
1301     * <b>Definition:</b>
1302     * The period over which the characteristic is tested; e.g. the patient had an operation during the month of June
1303     * </p> 
1304         */
1305        public Characteristic setPeriod(PeriodDt theValue) {
1306                myPeriod = theValue;
1307                return this;
1308        }
1309        
1310        
1311
1312  
1313
1314
1315        }
1316
1317
1318        /**
1319         * Block class for child element: <b>Group.member</b> ()
1320         *
1321     * <p>
1322     * <b>Definition:</b>
1323     * Identifies the resource instances that are members of the group.
1324     * </p> 
1325         */
1326        @Block()        
1327        public static class Member 
1328            extends  BaseIdentifiableElement  
1329            implements IResourceBlock {
1330        
1331        @Child(name="entity", order=0, min=1, max=1, summary=false, modifier=false, type={
1332                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
1333                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
1334                ca.uhn.fhir.model.dstu2.resource.Device.class, 
1335                ca.uhn.fhir.model.dstu2.resource.Medication.class, 
1336                ca.uhn.fhir.model.dstu2.resource.Substance.class
1337        })
1338        @Description(
1339                shortDefinition="",
1340                formalDefinition="A reference to the entity that is a member of the group. Must be consistent with Group.type"
1341        )
1342        private ResourceReferenceDt myEntity;
1343        
1344        @Child(name="period", type=PeriodDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
1345        @Description(
1346                shortDefinition="",
1347                formalDefinition="The period that the member was in the group, if known"
1348        )
1349        private PeriodDt myPeriod;
1350        
1351        @Child(name="inactive", type=BooleanDt.class, order=2, min=0, max=1, summary=false, modifier=false)     
1352        @Description(
1353                shortDefinition="",
1354                formalDefinition="A flag to indicate that the member is no longer in the group, but previously may have been a member"
1355        )
1356        private BooleanDt myInactive;
1357        
1358
1359        @Override
1360        public boolean isEmpty() {
1361                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEntity,  myPeriod,  myInactive);
1362        }
1363        
1364        @Override
1365        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1366                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEntity, myPeriod, myInactive);
1367        }
1368
1369        /**
1370         * Gets the value(s) for <b>entity</b> ().
1371         * creating it if it does
1372         * not exist. Will not return <code>null</code>.
1373         *
1374     * <p>
1375     * <b>Definition:</b>
1376     * A reference to the entity that is a member of the group. Must be consistent with Group.type
1377     * </p> 
1378         */
1379        public ResourceReferenceDt getEntity() {  
1380                if (myEntity == null) {
1381                        myEntity = new ResourceReferenceDt();
1382                }
1383                return myEntity;
1384        }
1385
1386        /**
1387         * Sets the value(s) for <b>entity</b> ()
1388         *
1389     * <p>
1390     * <b>Definition:</b>
1391     * A reference to the entity that is a member of the group. Must be consistent with Group.type
1392     * </p> 
1393         */
1394        public Member setEntity(ResourceReferenceDt theValue) {
1395                myEntity = theValue;
1396                return this;
1397        }
1398        
1399        
1400
1401  
1402        /**
1403         * Gets the value(s) for <b>period</b> ().
1404         * creating it if it does
1405         * not exist. Will not return <code>null</code>.
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * The period that the member was in the group, if known
1410     * </p> 
1411         */
1412        public PeriodDt getPeriod() {  
1413                if (myPeriod == null) {
1414                        myPeriod = new PeriodDt();
1415                }
1416                return myPeriod;
1417        }
1418
1419        /**
1420         * Sets the value(s) for <b>period</b> ()
1421         *
1422     * <p>
1423     * <b>Definition:</b>
1424     * The period that the member was in the group, if known
1425     * </p> 
1426         */
1427        public Member setPeriod(PeriodDt theValue) {
1428                myPeriod = theValue;
1429                return this;
1430        }
1431        
1432        
1433
1434  
1435        /**
1436         * Gets the value(s) for <b>inactive</b> ().
1437         * creating it if it does
1438         * not exist. Will not return <code>null</code>.
1439         *
1440     * <p>
1441     * <b>Definition:</b>
1442     * A flag to indicate that the member is no longer in the group, but previously may have been a member
1443     * </p> 
1444         */
1445        public BooleanDt getInactiveElement() {  
1446                if (myInactive == null) {
1447                        myInactive = new BooleanDt();
1448                }
1449                return myInactive;
1450        }
1451
1452        
1453        /**
1454         * Gets the value(s) for <b>inactive</b> ().
1455         * creating it if it does
1456         * not exist. This method may return <code>null</code>.
1457         *
1458     * <p>
1459     * <b>Definition:</b>
1460     * A flag to indicate that the member is no longer in the group, but previously may have been a member
1461     * </p> 
1462         */
1463        public Boolean getInactive() {  
1464                return getInactiveElement().getValue();
1465        }
1466
1467        /**
1468         * Sets the value(s) for <b>inactive</b> ()
1469         *
1470     * <p>
1471     * <b>Definition:</b>
1472     * A flag to indicate that the member is no longer in the group, but previously may have been a member
1473     * </p> 
1474         */
1475        public Member setInactive(BooleanDt theValue) {
1476                myInactive = theValue;
1477                return this;
1478        }
1479        
1480        
1481
1482        /**
1483         * Sets the value for <b>inactive</b> ()
1484         *
1485     * <p>
1486     * <b>Definition:</b>
1487     * A flag to indicate that the member is no longer in the group, but previously may have been a member
1488     * </p> 
1489         */
1490        public Member setInactive( boolean theBoolean) {
1491                myInactive = new BooleanDt(theBoolean); 
1492                return this; 
1493        }
1494
1495 
1496
1497
1498        }
1499
1500
1501
1502
1503    @Override
1504    public String getResourceName() {
1505        return "Group";
1506    }
1507    
1508    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1509        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1510    }
1511
1512
1513}