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>ValueSet</b> Resource
282 * (conformance.terminology)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A value set specifies a set of codes drawn from one or more code systems.
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/ValueSet">http://hl7.org/fhir/profiles/ValueSet</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="ValueSet", profile="http://hl7.org/fhir/profiles/ValueSet", id="valueset")
301public class ValueSet extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>url</b>
307         * <p>
308         * Description: <b>The logical URL for the value set</b><br>
309         * Type: <b>uri</b><br>
310         * Path: <b>ValueSet.url</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="url", path="ValueSet.url", description="The logical URL for the value set", type="uri" 
314 )
315        public static final String SP_URL = "url";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>url</b>
319         * <p>
320         * Description: <b>The logical URL for the value set</b><br>
321         * Type: <b>uri</b><br>
322         * Path: <b>ValueSet.url</b><br>
323         * </p>
324         */
325        public static final UriClientParam URL = new UriClientParam(SP_URL);
326
327        /**
328         * Search parameter constant for <b>identifier</b>
329         * <p>
330         * Description: <b>The identifier for the value set</b><br>
331         * Type: <b>token</b><br>
332         * Path: <b>ValueSet.identifier</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier for the value set", type="token" 
336 )
337        public static final String SP_IDENTIFIER = "identifier";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
341         * <p>
342         * Description: <b>The identifier for the value set</b><br>
343         * Type: <b>token</b><br>
344         * Path: <b>ValueSet.identifier</b><br>
345         * </p>
346         */
347        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
348
349        /**
350         * Search parameter constant for <b>version</b>
351         * <p>
352         * Description: <b>The version identifier of the value set</b><br>
353         * Type: <b>token</b><br>
354         * Path: <b>ValueSet.version</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" 
358 )
359        public static final String SP_VERSION = "version";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>version</b>
363         * <p>
364         * Description: <b>The version identifier of the value set</b><br>
365         * Type: <b>token</b><br>
366         * Path: <b>ValueSet.version</b><br>
367         * </p>
368         */
369        public static final TokenClientParam VERSION = new TokenClientParam(SP_VERSION);
370
371        /**
372         * Search parameter constant for <b>name</b>
373         * <p>
374         * Description: <b>The name of the value set</b><br>
375         * Type: <b>string</b><br>
376         * Path: <b>ValueSet.name</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set", type="string" 
380 )
381        public static final String SP_NAME = "name";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>name</b>
385         * <p>
386         * Description: <b>The name of the value set</b><br>
387         * Type: <b>string</b><br>
388         * Path: <b>ValueSet.name</b><br>
389         * </p>
390         */
391        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
392
393        /**
394         * Search parameter constant for <b>publisher</b>
395         * <p>
396         * Description: <b>Name of the publisher of the value set</b><br>
397         * Type: <b>string</b><br>
398         * Path: <b>ValueSet.publisher</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" 
402 )
403        public static final String SP_PUBLISHER = "publisher";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
407         * <p>
408         * Description: <b>Name of the publisher of the value set</b><br>
409         * Type: <b>string</b><br>
410         * Path: <b>ValueSet.publisher</b><br>
411         * </p>
412         */
413        public static final StringClientParam PUBLISHER = new StringClientParam(SP_PUBLISHER);
414
415        /**
416         * Search parameter constant for <b>description</b>
417         * <p>
418         * Description: <b>Text search in the description of the value set</b><br>
419         * Type: <b>string</b><br>
420         * Path: <b>ValueSet.description</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" 
424 )
425        public static final String SP_DESCRIPTION = "description";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>description</b>
429         * <p>
430         * Description: <b>Text search in the description of the value set</b><br>
431         * Type: <b>string</b><br>
432         * Path: <b>ValueSet.description</b><br>
433         * </p>
434         */
435        public static final StringClientParam DESCRIPTION = new StringClientParam(SP_DESCRIPTION);
436
437        /**
438         * Search parameter constant for <b>status</b>
439         * <p>
440         * Description: <b>The status of the value set</b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>ValueSet.status</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set", type="token" 
446 )
447        public static final String SP_STATUS = "status";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>status</b>
451         * <p>
452         * Description: <b>The status of the value set</b><br>
453         * Type: <b>token</b><br>
454         * Path: <b>ValueSet.status</b><br>
455         * </p>
456         */
457        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
458
459        /**
460         * Search parameter constant for <b>date</b>
461         * <p>
462         * Description: <b>The value set publication date</b><br>
463         * Type: <b>date</b><br>
464         * Path: <b>ValueSet.date</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date", type="date" 
468 )
469        public static final String SP_DATE = "date";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>date</b>
473         * <p>
474         * Description: <b>The value set publication date</b><br>
475         * Type: <b>date</b><br>
476         * Path: <b>ValueSet.date</b><br>
477         * </p>
478         */
479        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
480
481        /**
482         * Search parameter constant for <b>system</b>
483         * <p>
484         * Description: <b>The system for any codes defined by this value set</b><br>
485         * Type: <b>uri</b><br>
486         * Path: <b>ValueSet.codeSystem.system</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="system", path="ValueSet.codeSystem.system", description="The system for any codes defined by this value set", type="uri" 
490 )
491        public static final String SP_SYSTEM = "system";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>system</b>
495         * <p>
496         * Description: <b>The system for any codes defined by this value set</b><br>
497         * Type: <b>uri</b><br>
498         * Path: <b>ValueSet.codeSystem.system</b><br>
499         * </p>
500         */
501        public static final UriClientParam SYSTEM = new UriClientParam(SP_SYSTEM);
502
503        /**
504         * Search parameter constant for <b>code</b>
505         * <p>
506         * Description: <b>A code defined in the value set</b><br>
507         * Type: <b>token</b><br>
508         * Path: <b>ValueSet.codeSystem.concept.code</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="code", path="ValueSet.codeSystem.concept.code", description="A code defined in the value set", type="token" 
512 )
513        public static final String SP_CODE = "code";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>code</b>
517         * <p>
518         * Description: <b>A code defined in the value set</b><br>
519         * Type: <b>token</b><br>
520         * Path: <b>ValueSet.codeSystem.concept.code</b><br>
521         * </p>
522         */
523        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
524
525        /**
526         * Search parameter constant for <b>reference</b>
527         * <p>
528         * Description: <b>A code system included or excluded in the value set or an imported value set</b><br>
529         * Type: <b>uri</b><br>
530         * Path: <b>ValueSet.compose.include.system</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="uri" 
534 )
535        public static final String SP_REFERENCE = "reference";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>reference</b>
539         * <p>
540         * Description: <b>A code system included or excluded in the value set or an imported value set</b><br>
541         * Type: <b>uri</b><br>
542         * Path: <b>ValueSet.compose.include.system</b><br>
543         * </p>
544         */
545        public static final UriClientParam REFERENCE = new UriClientParam(SP_REFERENCE);
546
547        /**
548         * Search parameter constant for <b>context</b>
549         * <p>
550         * Description: <b>A use context assigned to the value set</b><br>
551         * Type: <b>token</b><br>
552         * Path: <b>ValueSet.useContext</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="context", path="ValueSet.useContext", description="A use context assigned to the value set", type="token" 
556 )
557        public static final String SP_CONTEXT = "context";
558
559        /**
560         * <b>Fluent Client</b> search parameter constant for <b>context</b>
561         * <p>
562         * Description: <b>A use context assigned to the value set</b><br>
563         * Type: <b>token</b><br>
564         * Path: <b>ValueSet.useContext</b><br>
565         * </p>
566         */
567        public static final TokenClientParam CONTEXT = new TokenClientParam(SP_CONTEXT);
568
569        /**
570         * Search parameter constant for <b>expansion</b>
571         * <p>
572         * Description: <b></b><br>
573         * Type: <b>uri</b><br>
574         * Path: <b>ValueSet.expansion.identifier</b><br>
575         * </p>
576         */
577        @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="", type="uri" 
578 )
579        public static final String SP_EXPANSION = "expansion";
580
581        /**
582         * <b>Fluent Client</b> search parameter constant for <b>expansion</b>
583         * <p>
584         * Description: <b></b><br>
585         * Type: <b>uri</b><br>
586         * Path: <b>ValueSet.expansion.identifier</b><br>
587         * </p>
588         */
589        public static final UriClientParam EXPANSION = new UriClientParam(SP_EXPANSION);
590
591
592
593        @Child(name="url", type=UriDt.class, order=0, min=0, max=1, summary=true, modifier=false)       
594        @Description(
595                shortDefinition="id",
596                formalDefinition="An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published"
597        )
598        private UriDt myUrl;
599        
600        @Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
601        @Description(
602                shortDefinition="id",
603                formalDefinition="Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance."
604        )
605        private IdentifierDt myIdentifier;
606        
607        @Child(name="version", type=StringDt.class, order=2, min=0, max=1, summary=true, modifier=false)        
608        @Description(
609                shortDefinition="id.version",
610                formalDefinition="Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp"
611        )
612        private StringDt myVersion;
613        
614        @Child(name="name", type=StringDt.class, order=3, min=0, max=1, summary=true, modifier=false)   
615        @Description(
616                shortDefinition="",
617                formalDefinition="A free text natural language name describing the value set"
618        )
619        private StringDt myName;
620        
621        @Child(name="status", type=CodeDt.class, order=4, min=1, max=1, summary=true, modifier=false)   
622        @Description(
623                shortDefinition="status",
624                formalDefinition="The status of the value set"
625        )
626        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/conformance-resource-status")
627        private BoundCodeDt<ConformanceResourceStatusEnum> myStatus;
628        
629        @Child(name="experimental", type=BooleanDt.class, order=5, min=0, max=1, summary=true, modifier=false)  
630        @Description(
631                shortDefinition="class",
632                formalDefinition="This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
633        )
634        private BooleanDt myExperimental;
635        
636        @Child(name="publisher", type=StringDt.class, order=6, min=0, max=1, summary=true, modifier=false)      
637        @Description(
638                shortDefinition="who.witness",
639                formalDefinition="The name of the individual or organization that published the value set"
640        )
641        private StringDt myPublisher;
642        
643        @Child(name="contact", order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
644        @Description(
645                shortDefinition="",
646                formalDefinition="Contacts to assist a user in finding and communicating with the publisher"
647        )
648        private java.util.List<Contact> myContact;
649        
650        @Child(name="date", type=DateTimeDt.class, order=8, min=0, max=1, summary=true, modifier=false) 
651        @Description(
652                shortDefinition="when.recorded",
653                formalDefinition="The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')"
654        )
655        private DateTimeDt myDate;
656        
657        @Child(name="lockedDate", type=DateDt.class, order=9, min=0, max=1, summary=true, modifier=false)       
658        @Description(
659                shortDefinition="when.init",
660                formalDefinition="If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date"
661        )
662        private DateDt myLockedDate;
663        
664        @Child(name="description", type=StringDt.class, order=10, min=0, max=1, summary=true, modifier=false)   
665        @Description(
666                shortDefinition="",
667                formalDefinition="A free text natural language description of the use of the value set - reason for definition, \"the semantic space\" to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set."
668        )
669        private StringDt myDescription;
670        
671        @Child(name="useContext", type=CodeableConceptDt.class, order=11, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 
672        @Description(
673                shortDefinition="",
674                formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions."
675        )
676        private java.util.List<CodeableConceptDt> myUseContext;
677        
678        @Child(name="immutable", type=BooleanDt.class, order=12, min=0, max=1, summary=true, modifier=false)    
679        @Description(
680                shortDefinition="",
681                formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change"
682        )
683        private BooleanDt myImmutable;
684        
685        @Child(name="requirements", type=StringDt.class, order=13, min=0, max=1, summary=false, modifier=false) 
686        @Description(
687                shortDefinition="",
688                formalDefinition="Explains why this value set is needed and why it has been constrained as it has"
689        )
690        private StringDt myRequirements;
691        
692        @Child(name="copyright", type=StringDt.class, order=14, min=0, max=1, summary=false, modifier=false)    
693        @Description(
694                shortDefinition="",
695                formalDefinition="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set"
696        )
697        private StringDt myCopyright;
698        
699        @Child(name="extensible", type=BooleanDt.class, order=15, min=0, max=1, summary=true, modifier=false)   
700        @Description(
701                shortDefinition="",
702                formalDefinition="Whether this is intended to be used with an extensible binding or not"
703        )
704        private BooleanDt myExtensible;
705        
706        @Child(name="codeSystem", order=16, min=0, max=1, summary=true, modifier=false) 
707        @Description(
708                shortDefinition="",
709                formalDefinition="A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly"
710        )
711        private CodeSystem myCodeSystem;
712        
713        @Child(name="compose", order=17, min=0, max=1, summary=false, modifier=false)   
714        @Description(
715                shortDefinition="",
716                formalDefinition="A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set"
717        )
718        private Compose myCompose;
719        
720        @Child(name="expansion", order=18, min=0, max=1, summary=false, modifier=false) 
721        @Description(
722                shortDefinition="",
723                formalDefinition="A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed"
724        )
725        private Expansion myExpansion;
726        
727
728        @Override
729        public boolean isEmpty() {
730                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myUrl,  myIdentifier,  myVersion,  myName,  myStatus,  myExperimental,  myPublisher,  myContact,  myDate,  myLockedDate,  myDescription,  myUseContext,  myImmutable,  myRequirements,  myCopyright,  myExtensible,  myCodeSystem,  myCompose,  myExpansion);
731        }
732        
733        @Override
734        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
735                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUrl, myIdentifier, myVersion, myName, myStatus, myExperimental, myPublisher, myContact, myDate, myLockedDate, myDescription, myUseContext, myImmutable, myRequirements, myCopyright, myExtensible, myCodeSystem, myCompose, myExpansion);
736        }
737
738        /**
739         * Gets the value(s) for <b>url</b> (id).
740         * creating it if it does
741         * not exist. Will not return <code>null</code>.
742         *
743     * <p>
744     * <b>Definition:</b>
745     * An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published
746     * </p> 
747         */
748        public UriDt getUrlElement() {  
749                if (myUrl == null) {
750                        myUrl = new UriDt();
751                }
752                return myUrl;
753        }
754
755        
756        /**
757         * Gets the value(s) for <b>url</b> (id).
758         * creating it if it does
759         * not exist. This method may return <code>null</code>.
760         *
761     * <p>
762     * <b>Definition:</b>
763     * An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published
764     * </p> 
765         */
766        public String getUrl() {  
767                return getUrlElement().getValue();
768        }
769
770        /**
771         * Sets the value(s) for <b>url</b> (id)
772         *
773     * <p>
774     * <b>Definition:</b>
775     * An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published
776     * </p> 
777         */
778        public ValueSet setUrl(UriDt theValue) {
779                myUrl = theValue;
780                return this;
781        }
782        
783        
784
785        /**
786         * Sets the value for <b>url</b> (id)
787         *
788     * <p>
789     * <b>Definition:</b>
790     * An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published
791     * </p> 
792         */
793        public ValueSet setUrl( String theUri) {
794                myUrl = new UriDt(theUri); 
795                return this; 
796        }
797
798 
799        /**
800         * Gets the value(s) for <b>identifier</b> (id).
801         * creating it if it does
802         * not exist. Will not return <code>null</code>.
803         *
804     * <p>
805     * <b>Definition:</b>
806     * Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.
807     * </p> 
808         */
809        public IdentifierDt getIdentifier() {  
810                if (myIdentifier == null) {
811                        myIdentifier = new IdentifierDt();
812                }
813                return myIdentifier;
814        }
815
816        /**
817         * Sets the value(s) for <b>identifier</b> (id)
818         *
819     * <p>
820     * <b>Definition:</b>
821     * Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.
822     * </p> 
823         */
824        public ValueSet setIdentifier(IdentifierDt theValue) {
825                myIdentifier = theValue;
826                return this;
827        }
828        
829        
830
831  
832        /**
833         * Gets the value(s) for <b>version</b> (id.version).
834         * creating it if it does
835         * not exist. Will not return <code>null</code>.
836         *
837     * <p>
838     * <b>Definition:</b>
839     * Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
840     * </p> 
841         */
842        public StringDt getVersionElement() {  
843                if (myVersion == null) {
844                        myVersion = new StringDt();
845                }
846                return myVersion;
847        }
848
849        
850        /**
851         * Gets the value(s) for <b>version</b> (id.version).
852         * creating it if it does
853         * not exist. This method may return <code>null</code>.
854         *
855     * <p>
856     * <b>Definition:</b>
857     * Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
858     * </p> 
859         */
860        public String getVersion() {  
861                return getVersionElement().getValue();
862        }
863
864        /**
865         * Sets the value(s) for <b>version</b> (id.version)
866         *
867     * <p>
868     * <b>Definition:</b>
869     * Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
870     * </p> 
871         */
872        public ValueSet setVersion(StringDt theValue) {
873                myVersion = theValue;
874                return this;
875        }
876        
877        
878
879        /**
880         * Sets the value for <b>version</b> (id.version)
881         *
882     * <p>
883     * <b>Definition:</b>
884     * Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
885     * </p> 
886         */
887        public ValueSet setVersion( String theString) {
888                myVersion = new StringDt(theString); 
889                return this; 
890        }
891
892 
893        /**
894         * Gets the value(s) for <b>name</b> ().
895         * creating it if it does
896         * not exist. Will not return <code>null</code>.
897         *
898     * <p>
899     * <b>Definition:</b>
900     * A free text natural language name describing the value set
901     * </p> 
902         */
903        public StringDt getNameElement() {  
904                if (myName == null) {
905                        myName = new StringDt();
906                }
907                return myName;
908        }
909
910        
911        /**
912         * Gets the value(s) for <b>name</b> ().
913         * creating it if it does
914         * not exist. This method may return <code>null</code>.
915         *
916     * <p>
917     * <b>Definition:</b>
918     * A free text natural language name describing the value set
919     * </p> 
920         */
921        public String getName() {  
922                return getNameElement().getValue();
923        }
924
925        /**
926         * Sets the value(s) for <b>name</b> ()
927         *
928     * <p>
929     * <b>Definition:</b>
930     * A free text natural language name describing the value set
931     * </p> 
932         */
933        public ValueSet setName(StringDt theValue) {
934                myName = theValue;
935                return this;
936        }
937        
938        
939
940        /**
941         * Sets the value for <b>name</b> ()
942         *
943     * <p>
944     * <b>Definition:</b>
945     * A free text natural language name describing the value set
946     * </p> 
947         */
948        public ValueSet setName( String theString) {
949                myName = new StringDt(theString); 
950                return this; 
951        }
952
953 
954        /**
955         * Gets the value(s) for <b>status</b> (status).
956         * creating it if it does
957         * not exist. Will not return <code>null</code>.
958         *
959     * <p>
960     * <b>Definition:</b>
961     * The status of the value set
962     * </p> 
963         */
964        public BoundCodeDt<ConformanceResourceStatusEnum> getStatusElement() {  
965                if (myStatus == null) {
966                        myStatus = new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER);
967                }
968                return myStatus;
969        }
970
971        
972        /**
973         * Gets the value(s) for <b>status</b> (status).
974         * creating it if it does
975         * not exist. This method may return <code>null</code>.
976         *
977     * <p>
978     * <b>Definition:</b>
979     * The status of the value set
980     * </p> 
981         */
982        public String getStatus() {  
983                return getStatusElement().getValue();
984        }
985
986        /**
987         * Sets the value(s) for <b>status</b> (status)
988         *
989     * <p>
990     * <b>Definition:</b>
991     * The status of the value set
992     * </p> 
993         */
994        public ValueSet setStatus(BoundCodeDt<ConformanceResourceStatusEnum> theValue) {
995                myStatus = theValue;
996                return this;
997        }
998        
999        
1000
1001        /**
1002         * Sets the value(s) for <b>status</b> (status)
1003         *
1004     * <p>
1005     * <b>Definition:</b>
1006     * The status of the value set
1007     * </p> 
1008         */
1009        public ValueSet setStatus(ConformanceResourceStatusEnum theValue) {
1010                setStatus(new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER, theValue));
1011                
1012/*
1013                getStatusElement().setValueAsEnum(theValue);
1014*/
1015                return this;
1016        }
1017
1018  
1019        /**
1020         * Gets the value(s) for <b>experimental</b> (class).
1021         * creating it if it does
1022         * not exist. Will not return <code>null</code>.
1023         *
1024     * <p>
1025     * <b>Definition:</b>
1026     * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1027     * </p> 
1028         */
1029        public BooleanDt getExperimentalElement() {  
1030                if (myExperimental == null) {
1031                        myExperimental = new BooleanDt();
1032                }
1033                return myExperimental;
1034        }
1035
1036        
1037        /**
1038         * Gets the value(s) for <b>experimental</b> (class).
1039         * creating it if it does
1040         * not exist. This method may return <code>null</code>.
1041         *
1042     * <p>
1043     * <b>Definition:</b>
1044     * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1045     * </p> 
1046         */
1047        public Boolean getExperimental() {  
1048                return getExperimentalElement().getValue();
1049        }
1050
1051        /**
1052         * Sets the value(s) for <b>experimental</b> (class)
1053         *
1054     * <p>
1055     * <b>Definition:</b>
1056     * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1057     * </p> 
1058         */
1059        public ValueSet setExperimental(BooleanDt theValue) {
1060                myExperimental = theValue;
1061                return this;
1062        }
1063        
1064        
1065
1066        /**
1067         * Sets the value for <b>experimental</b> (class)
1068         *
1069     * <p>
1070     * <b>Definition:</b>
1071     * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1072     * </p> 
1073         */
1074        public ValueSet setExperimental( boolean theBoolean) {
1075                myExperimental = new BooleanDt(theBoolean); 
1076                return this; 
1077        }
1078
1079 
1080        /**
1081         * Gets the value(s) for <b>publisher</b> (who.witness).
1082         * creating it if it does
1083         * not exist. Will not return <code>null</code>.
1084         *
1085     * <p>
1086     * <b>Definition:</b>
1087     * The name of the individual or organization that published the value set
1088     * </p> 
1089         */
1090        public StringDt getPublisherElement() {  
1091                if (myPublisher == null) {
1092                        myPublisher = new StringDt();
1093                }
1094                return myPublisher;
1095        }
1096
1097        
1098        /**
1099         * Gets the value(s) for <b>publisher</b> (who.witness).
1100         * creating it if it does
1101         * not exist. This method may return <code>null</code>.
1102         *
1103     * <p>
1104     * <b>Definition:</b>
1105     * The name of the individual or organization that published the value set
1106     * </p> 
1107         */
1108        public String getPublisher() {  
1109                return getPublisherElement().getValue();
1110        }
1111
1112        /**
1113         * Sets the value(s) for <b>publisher</b> (who.witness)
1114         *
1115     * <p>
1116     * <b>Definition:</b>
1117     * The name of the individual or organization that published the value set
1118     * </p> 
1119         */
1120        public ValueSet setPublisher(StringDt theValue) {
1121                myPublisher = theValue;
1122                return this;
1123        }
1124        
1125        
1126
1127        /**
1128         * Sets the value for <b>publisher</b> (who.witness)
1129         *
1130     * <p>
1131     * <b>Definition:</b>
1132     * The name of the individual or organization that published the value set
1133     * </p> 
1134         */
1135        public ValueSet setPublisher( String theString) {
1136                myPublisher = new StringDt(theString); 
1137                return this; 
1138        }
1139
1140 
1141        /**
1142         * Gets the value(s) for <b>contact</b> ().
1143         * creating it if it does
1144         * not exist. Will not return <code>null</code>.
1145         *
1146     * <p>
1147     * <b>Definition:</b>
1148     * Contacts to assist a user in finding and communicating with the publisher
1149     * </p> 
1150         */
1151        public java.util.List<Contact> getContact() {  
1152                if (myContact == null) {
1153                        myContact = new java.util.ArrayList<Contact>();
1154                }
1155                return myContact;
1156        }
1157
1158        /**
1159         * Sets the value(s) for <b>contact</b> ()
1160         *
1161     * <p>
1162     * <b>Definition:</b>
1163     * Contacts to assist a user in finding and communicating with the publisher
1164     * </p> 
1165         */
1166        public ValueSet setContact(java.util.List<Contact> theValue) {
1167                myContact = theValue;
1168                return this;
1169        }
1170        
1171        
1172
1173        /**
1174         * Adds and returns a new value for <b>contact</b> ()
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * Contacts to assist a user in finding and communicating with the publisher
1179     * </p> 
1180         */
1181        public Contact addContact() {
1182                Contact newType = new Contact();
1183                getContact().add(newType);
1184                return newType; 
1185        }
1186
1187        /**
1188         * Adds a given new value for <b>contact</b> ()
1189         *
1190         * <p>
1191         * <b>Definition:</b>
1192         * Contacts to assist a user in finding and communicating with the publisher
1193         * </p>
1194         * @param theValue The contact to add (must not be <code>null</code>)
1195         */
1196        public ValueSet addContact(Contact theValue) {
1197                if (theValue == null) {
1198                        throw new NullPointerException("theValue must not be null");
1199                }
1200                getContact().add(theValue);
1201                return this;
1202        }
1203
1204        /**
1205         * Gets the first repetition for <b>contact</b> (),
1206         * creating it if it does not already exist.
1207         *
1208     * <p>
1209     * <b>Definition:</b>
1210     * Contacts to assist a user in finding and communicating with the publisher
1211     * </p> 
1212         */
1213        public Contact getContactFirstRep() {
1214                if (getContact().isEmpty()) {
1215                        return addContact();
1216                }
1217                return getContact().get(0); 
1218        }
1219  
1220        /**
1221         * Gets the value(s) for <b>date</b> (when.recorded).
1222         * creating it if it does
1223         * not exist. Will not return <code>null</code>.
1224         *
1225     * <p>
1226     * <b>Definition:</b>
1227     * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')
1228     * </p> 
1229         */
1230        public DateTimeDt getDateElement() {  
1231                if (myDate == null) {
1232                        myDate = new DateTimeDt();
1233                }
1234                return myDate;
1235        }
1236
1237        
1238        /**
1239         * Gets the value(s) for <b>date</b> (when.recorded).
1240         * creating it if it does
1241         * not exist. This method may return <code>null</code>.
1242         *
1243     * <p>
1244     * <b>Definition:</b>
1245     * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')
1246     * </p> 
1247         */
1248        public Date getDate() {  
1249                return getDateElement().getValue();
1250        }
1251
1252        /**
1253         * Sets the value(s) for <b>date</b> (when.recorded)
1254         *
1255     * <p>
1256     * <b>Definition:</b>
1257     * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')
1258     * </p> 
1259         */
1260        public ValueSet setDate(DateTimeDt theValue) {
1261                myDate = theValue;
1262                return this;
1263        }
1264        
1265        
1266
1267        /**
1268         * Sets the value for <b>date</b> (when.recorded)
1269         *
1270     * <p>
1271     * <b>Definition:</b>
1272     * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')
1273     * </p> 
1274         */
1275        public ValueSet setDateWithSecondsPrecision( Date theDate) {
1276                myDate = new DateTimeDt(theDate); 
1277                return this; 
1278        }
1279
1280        /**
1281         * Sets the value for <b>date</b> (when.recorded)
1282         *
1283     * <p>
1284     * <b>Definition:</b>
1285     * The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')
1286     * </p> 
1287         */
1288        public ValueSet setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1289                myDate = new DateTimeDt(theDate, thePrecision); 
1290                return this; 
1291        }
1292
1293 
1294        /**
1295         * Gets the value(s) for <b>lockedDate</b> (when.init).
1296         * creating it if it does
1297         * not exist. Will not return <code>null</code>.
1298         *
1299     * <p>
1300     * <b>Definition:</b>
1301     * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date
1302     * </p> 
1303         */
1304        public DateDt getLockedDateElement() {  
1305                if (myLockedDate == null) {
1306                        myLockedDate = new DateDt();
1307                }
1308                return myLockedDate;
1309        }
1310
1311        
1312        /**
1313         * Gets the value(s) for <b>lockedDate</b> (when.init).
1314         * creating it if it does
1315         * not exist. This method may return <code>null</code>.
1316         *
1317     * <p>
1318     * <b>Definition:</b>
1319     * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date
1320     * </p> 
1321         */
1322        public Date getLockedDate() {  
1323                return getLockedDateElement().getValue();
1324        }
1325
1326        /**
1327         * Sets the value(s) for <b>lockedDate</b> (when.init)
1328         *
1329     * <p>
1330     * <b>Definition:</b>
1331     * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date
1332     * </p> 
1333         */
1334        public ValueSet setLockedDate(DateDt theValue) {
1335                myLockedDate = theValue;
1336                return this;
1337        }
1338        
1339        
1340
1341        /**
1342         * Sets the value for <b>lockedDate</b> (when.init)
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date
1347     * </p> 
1348         */
1349        public ValueSet setLockedDateWithDayPrecision( Date theDate) {
1350                myLockedDate = new DateDt(theDate); 
1351                return this; 
1352        }
1353
1354        /**
1355         * Sets the value for <b>lockedDate</b> (when.init)
1356         *
1357     * <p>
1358     * <b>Definition:</b>
1359     * If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date
1360     * </p> 
1361         */
1362        public ValueSet setLockedDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1363                myLockedDate = new DateDt(theDate, thePrecision); 
1364                return this; 
1365        }
1366
1367 
1368        /**
1369         * Gets the value(s) for <b>description</b> ().
1370         * creating it if it does
1371         * not exist. Will not return <code>null</code>.
1372         *
1373     * <p>
1374     * <b>Definition:</b>
1375     * A free text natural language description of the use of the value set - reason for definition, \&quot;the semantic space\&quot; to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.
1376     * </p> 
1377         */
1378        public StringDt getDescriptionElement() {  
1379                if (myDescription == null) {
1380                        myDescription = new StringDt();
1381                }
1382                return myDescription;
1383        }
1384
1385        
1386        /**
1387         * Gets the value(s) for <b>description</b> ().
1388         * creating it if it does
1389         * not exist. This method may return <code>null</code>.
1390         *
1391     * <p>
1392     * <b>Definition:</b>
1393     * A free text natural language description of the use of the value set - reason for definition, \&quot;the semantic space\&quot; to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.
1394     * </p> 
1395         */
1396        public String getDescription() {  
1397                return getDescriptionElement().getValue();
1398        }
1399
1400        /**
1401         * Sets the value(s) for <b>description</b> ()
1402         *
1403     * <p>
1404     * <b>Definition:</b>
1405     * A free text natural language description of the use of the value set - reason for definition, \&quot;the semantic space\&quot; to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.
1406     * </p> 
1407         */
1408        public ValueSet setDescription(StringDt theValue) {
1409                myDescription = theValue;
1410                return this;
1411        }
1412        
1413        
1414
1415        /**
1416         * Sets the value for <b>description</b> ()
1417         *
1418     * <p>
1419     * <b>Definition:</b>
1420     * A free text natural language description of the use of the value set - reason for definition, \&quot;the semantic space\&quot; to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.
1421     * </p> 
1422         */
1423        public ValueSet setDescription( String theString) {
1424                myDescription = new StringDt(theString); 
1425                return this; 
1426        }
1427
1428 
1429        /**
1430         * Gets the value(s) for <b>useContext</b> ().
1431         * creating it if it does
1432         * not exist. Will not return <code>null</code>.
1433         *
1434     * <p>
1435     * <b>Definition:</b>
1436     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.
1437     * </p> 
1438         */
1439        public java.util.List<CodeableConceptDt> getUseContext() {  
1440                if (myUseContext == null) {
1441                        myUseContext = new java.util.ArrayList<CodeableConceptDt>();
1442                }
1443                return myUseContext;
1444        }
1445
1446        /**
1447         * Sets the value(s) for <b>useContext</b> ()
1448         *
1449     * <p>
1450     * <b>Definition:</b>
1451     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.
1452     * </p> 
1453         */
1454        public ValueSet setUseContext(java.util.List<CodeableConceptDt> theValue) {
1455                myUseContext = theValue;
1456                return this;
1457        }
1458        
1459        
1460
1461        /**
1462         * Adds and returns a new value for <b>useContext</b> ()
1463         *
1464     * <p>
1465     * <b>Definition:</b>
1466     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.
1467     * </p> 
1468         */
1469        public CodeableConceptDt addUseContext() {
1470                CodeableConceptDt newType = new CodeableConceptDt();
1471                getUseContext().add(newType);
1472                return newType; 
1473        }
1474
1475        /**
1476         * Adds a given new value for <b>useContext</b> ()
1477         *
1478         * <p>
1479         * <b>Definition:</b>
1480         * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.
1481         * </p>
1482         * @param theValue The useContext to add (must not be <code>null</code>)
1483         */
1484        public ValueSet addUseContext(CodeableConceptDt theValue) {
1485                if (theValue == null) {
1486                        throw new NullPointerException("theValue must not be null");
1487                }
1488                getUseContext().add(theValue);
1489                return this;
1490        }
1491
1492        /**
1493         * Gets the first repetition for <b>useContext</b> (),
1494         * creating it if it does not already exist.
1495         *
1496     * <p>
1497     * <b>Definition:</b>
1498     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.
1499     * </p> 
1500         */
1501        public CodeableConceptDt getUseContextFirstRep() {
1502                if (getUseContext().isEmpty()) {
1503                        return addUseContext();
1504                }
1505                return getUseContext().get(0); 
1506        }
1507  
1508        /**
1509         * Gets the value(s) for <b>immutable</b> ().
1510         * creating it if it does
1511         * not exist. Will not return <code>null</code>.
1512         *
1513     * <p>
1514     * <b>Definition:</b>
1515     * If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change
1516     * </p> 
1517         */
1518        public BooleanDt getImmutableElement() {  
1519                if (myImmutable == null) {
1520                        myImmutable = new BooleanDt();
1521                }
1522                return myImmutable;
1523        }
1524
1525        
1526        /**
1527         * Gets the value(s) for <b>immutable</b> ().
1528         * creating it if it does
1529         * not exist. This method may return <code>null</code>.
1530         *
1531     * <p>
1532     * <b>Definition:</b>
1533     * If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change
1534     * </p> 
1535         */
1536        public Boolean getImmutable() {  
1537                return getImmutableElement().getValue();
1538        }
1539
1540        /**
1541         * Sets the value(s) for <b>immutable</b> ()
1542         *
1543     * <p>
1544     * <b>Definition:</b>
1545     * If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change
1546     * </p> 
1547         */
1548        public ValueSet setImmutable(BooleanDt theValue) {
1549                myImmutable = theValue;
1550                return this;
1551        }
1552        
1553        
1554
1555        /**
1556         * Sets the value for <b>immutable</b> ()
1557         *
1558     * <p>
1559     * <b>Definition:</b>
1560     * If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change
1561     * </p> 
1562         */
1563        public ValueSet setImmutable( boolean theBoolean) {
1564                myImmutable = new BooleanDt(theBoolean); 
1565                return this; 
1566        }
1567
1568 
1569        /**
1570         * Gets the value(s) for <b>requirements</b> ().
1571         * creating it if it does
1572         * not exist. Will not return <code>null</code>.
1573         *
1574     * <p>
1575     * <b>Definition:</b>
1576     * Explains why this value set is needed and why it has been constrained as it has
1577     * </p> 
1578         */
1579        public StringDt getRequirementsElement() {  
1580                if (myRequirements == null) {
1581                        myRequirements = new StringDt();
1582                }
1583                return myRequirements;
1584        }
1585
1586        
1587        /**
1588         * Gets the value(s) for <b>requirements</b> ().
1589         * creating it if it does
1590         * not exist. This method may return <code>null</code>.
1591         *
1592     * <p>
1593     * <b>Definition:</b>
1594     * Explains why this value set is needed and why it has been constrained as it has
1595     * </p> 
1596         */
1597        public String getRequirements() {  
1598                return getRequirementsElement().getValue();
1599        }
1600
1601        /**
1602         * Sets the value(s) for <b>requirements</b> ()
1603         *
1604     * <p>
1605     * <b>Definition:</b>
1606     * Explains why this value set is needed and why it has been constrained as it has
1607     * </p> 
1608         */
1609        public ValueSet setRequirements(StringDt theValue) {
1610                myRequirements = theValue;
1611                return this;
1612        }
1613        
1614        
1615
1616        /**
1617         * Sets the value for <b>requirements</b> ()
1618         *
1619     * <p>
1620     * <b>Definition:</b>
1621     * Explains why this value set is needed and why it has been constrained as it has
1622     * </p> 
1623         */
1624        public ValueSet setRequirements( String theString) {
1625                myRequirements = new StringDt(theString); 
1626                return this; 
1627        }
1628
1629 
1630        /**
1631         * Gets the value(s) for <b>copyright</b> ().
1632         * creating it if it does
1633         * not exist. Will not return <code>null</code>.
1634         *
1635     * <p>
1636     * <b>Definition:</b>
1637     * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set
1638     * </p> 
1639         */
1640        public StringDt getCopyrightElement() {  
1641                if (myCopyright == null) {
1642                        myCopyright = new StringDt();
1643                }
1644                return myCopyright;
1645        }
1646
1647        
1648        /**
1649         * Gets the value(s) for <b>copyright</b> ().
1650         * creating it if it does
1651         * not exist. This method may return <code>null</code>.
1652         *
1653     * <p>
1654     * <b>Definition:</b>
1655     * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set
1656     * </p> 
1657         */
1658        public String getCopyright() {  
1659                return getCopyrightElement().getValue();
1660        }
1661
1662        /**
1663         * Sets the value(s) for <b>copyright</b> ()
1664         *
1665     * <p>
1666     * <b>Definition:</b>
1667     * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set
1668     * </p> 
1669         */
1670        public ValueSet setCopyright(StringDt theValue) {
1671                myCopyright = theValue;
1672                return this;
1673        }
1674        
1675        
1676
1677        /**
1678         * Sets the value for <b>copyright</b> ()
1679         *
1680     * <p>
1681     * <b>Definition:</b>
1682     * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set
1683     * </p> 
1684         */
1685        public ValueSet setCopyright( String theString) {
1686                myCopyright = new StringDt(theString); 
1687                return this; 
1688        }
1689
1690 
1691        /**
1692         * Gets the value(s) for <b>extensible</b> ().
1693         * creating it if it does
1694         * not exist. Will not return <code>null</code>.
1695         *
1696     * <p>
1697     * <b>Definition:</b>
1698     * Whether this is intended to be used with an extensible binding or not
1699     * </p> 
1700         */
1701        public BooleanDt getExtensibleElement() {  
1702                if (myExtensible == null) {
1703                        myExtensible = new BooleanDt();
1704                }
1705                return myExtensible;
1706        }
1707
1708        
1709        /**
1710         * Gets the value(s) for <b>extensible</b> ().
1711         * creating it if it does
1712         * not exist. This method may return <code>null</code>.
1713         *
1714     * <p>
1715     * <b>Definition:</b>
1716     * Whether this is intended to be used with an extensible binding or not
1717     * </p> 
1718         */
1719        public Boolean getExtensible() {  
1720                return getExtensibleElement().getValue();
1721        }
1722
1723        /**
1724         * Sets the value(s) for <b>extensible</b> ()
1725         *
1726     * <p>
1727     * <b>Definition:</b>
1728     * Whether this is intended to be used with an extensible binding or not
1729     * </p> 
1730         */
1731        public ValueSet setExtensible(BooleanDt theValue) {
1732                myExtensible = theValue;
1733                return this;
1734        }
1735        
1736        
1737
1738        /**
1739         * Sets the value for <b>extensible</b> ()
1740         *
1741     * <p>
1742     * <b>Definition:</b>
1743     * Whether this is intended to be used with an extensible binding or not
1744     * </p> 
1745         */
1746        public ValueSet setExtensible( boolean theBoolean) {
1747                myExtensible = new BooleanDt(theBoolean); 
1748                return this; 
1749        }
1750
1751 
1752        /**
1753         * Gets the value(s) for <b>codeSystem</b> ().
1754         * creating it if it does
1755         * not exist. Will not return <code>null</code>.
1756         *
1757     * <p>
1758     * <b>Definition:</b>
1759     * A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly
1760     * </p> 
1761         */
1762        public CodeSystem getCodeSystem() {  
1763                if (myCodeSystem == null) {
1764                        myCodeSystem = new CodeSystem();
1765                }
1766                return myCodeSystem;
1767        }
1768
1769        /**
1770         * Sets the value(s) for <b>codeSystem</b> ()
1771         *
1772     * <p>
1773     * <b>Definition:</b>
1774     * A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly
1775     * </p> 
1776         */
1777        public ValueSet setCodeSystem(CodeSystem theValue) {
1778                myCodeSystem = theValue;
1779                return this;
1780        }
1781        
1782        
1783
1784  
1785        /**
1786         * Gets the value(s) for <b>compose</b> ().
1787         * creating it if it does
1788         * not exist. Will not return <code>null</code>.
1789         *
1790     * <p>
1791     * <b>Definition:</b>
1792     * A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set
1793     * </p> 
1794         */
1795        public Compose getCompose() {  
1796                if (myCompose == null) {
1797                        myCompose = new Compose();
1798                }
1799                return myCompose;
1800        }
1801
1802        /**
1803         * Sets the value(s) for <b>compose</b> ()
1804         *
1805     * <p>
1806     * <b>Definition:</b>
1807     * A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set
1808     * </p> 
1809         */
1810        public ValueSet setCompose(Compose theValue) {
1811                myCompose = theValue;
1812                return this;
1813        }
1814        
1815        
1816
1817  
1818        /**
1819         * Gets the value(s) for <b>expansion</b> ().
1820         * creating it if it does
1821         * not exist. Will not return <code>null</code>.
1822         *
1823     * <p>
1824     * <b>Definition:</b>
1825     * A value set can also be \&quot;expanded\&quot;, where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed
1826     * </p> 
1827         */
1828        public Expansion getExpansion() {  
1829                if (myExpansion == null) {
1830                        myExpansion = new Expansion();
1831                }
1832                return myExpansion;
1833        }
1834
1835        /**
1836         * Sets the value(s) for <b>expansion</b> ()
1837         *
1838     * <p>
1839     * <b>Definition:</b>
1840     * A value set can also be \&quot;expanded\&quot;, where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed
1841     * </p> 
1842         */
1843        public ValueSet setExpansion(Expansion theValue) {
1844                myExpansion = theValue;
1845                return this;
1846        }
1847        
1848        
1849
1850  
1851        /**
1852         * Block class for child element: <b>ValueSet.contact</b> ()
1853         *
1854     * <p>
1855     * <b>Definition:</b>
1856     * Contacts to assist a user in finding and communicating with the publisher
1857     * </p> 
1858         */
1859        @Block()        
1860        public static class Contact 
1861            extends  BaseIdentifiableElement  
1862            implements IResourceBlock {
1863        
1864        @Child(name="name", type=StringDt.class, order=0, min=0, max=1, summary=true, modifier=false)   
1865        @Description(
1866                shortDefinition="",
1867                formalDefinition="The name of an individual to contact regarding the value set"
1868        )
1869        private StringDt myName;
1870        
1871        @Child(name="telecom", type=ContactPointDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1872        @Description(
1873                shortDefinition="",
1874                formalDefinition="Contact details for individual (if a name was provided) or the publisher"
1875        )
1876        private java.util.List<ContactPointDt> myTelecom;
1877        
1878
1879        @Override
1880        public boolean isEmpty() {
1881                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myTelecom);
1882        }
1883        
1884        @Override
1885        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1886                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myTelecom);
1887        }
1888
1889        /**
1890         * Gets the value(s) for <b>name</b> ().
1891         * creating it if it does
1892         * not exist. Will not return <code>null</code>.
1893         *
1894     * <p>
1895     * <b>Definition:</b>
1896     * The name of an individual to contact regarding the value set
1897     * </p> 
1898         */
1899        public StringDt getNameElement() {  
1900                if (myName == null) {
1901                        myName = new StringDt();
1902                }
1903                return myName;
1904        }
1905
1906        
1907        /**
1908         * Gets the value(s) for <b>name</b> ().
1909         * creating it if it does
1910         * not exist. This method may return <code>null</code>.
1911         *
1912     * <p>
1913     * <b>Definition:</b>
1914     * The name of an individual to contact regarding the value set
1915     * </p> 
1916         */
1917        public String getName() {  
1918                return getNameElement().getValue();
1919        }
1920
1921        /**
1922         * Sets the value(s) for <b>name</b> ()
1923         *
1924     * <p>
1925     * <b>Definition:</b>
1926     * The name of an individual to contact regarding the value set
1927     * </p> 
1928         */
1929        public Contact setName(StringDt theValue) {
1930                myName = theValue;
1931                return this;
1932        }
1933        
1934        
1935
1936        /**
1937         * Sets the value for <b>name</b> ()
1938         *
1939     * <p>
1940     * <b>Definition:</b>
1941     * The name of an individual to contact regarding the value set
1942     * </p> 
1943         */
1944        public Contact setName( String theString) {
1945                myName = new StringDt(theString); 
1946                return this; 
1947        }
1948
1949 
1950        /**
1951         * Gets the value(s) for <b>telecom</b> ().
1952         * creating it if it does
1953         * not exist. Will not return <code>null</code>.
1954         *
1955     * <p>
1956     * <b>Definition:</b>
1957     * Contact details for individual (if a name was provided) or the publisher
1958     * </p> 
1959         */
1960        public java.util.List<ContactPointDt> getTelecom() {  
1961                if (myTelecom == null) {
1962                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1963                }
1964                return myTelecom;
1965        }
1966
1967        /**
1968         * Sets the value(s) for <b>telecom</b> ()
1969         *
1970     * <p>
1971     * <b>Definition:</b>
1972     * Contact details for individual (if a name was provided) or the publisher
1973     * </p> 
1974         */
1975        public Contact setTelecom(java.util.List<ContactPointDt> theValue) {
1976                myTelecom = theValue;
1977                return this;
1978        }
1979        
1980        
1981
1982        /**
1983         * Adds and returns a new value for <b>telecom</b> ()
1984         *
1985     * <p>
1986     * <b>Definition:</b>
1987     * Contact details for individual (if a name was provided) or the publisher
1988     * </p> 
1989         */
1990        public ContactPointDt addTelecom() {
1991                ContactPointDt newType = new ContactPointDt();
1992                getTelecom().add(newType);
1993                return newType; 
1994        }
1995
1996        /**
1997         * Adds a given new value for <b>telecom</b> ()
1998         *
1999         * <p>
2000         * <b>Definition:</b>
2001         * Contact details for individual (if a name was provided) or the publisher
2002         * </p>
2003         * @param theValue The telecom to add (must not be <code>null</code>)
2004         */
2005        public Contact addTelecom(ContactPointDt theValue) {
2006                if (theValue == null) {
2007                        throw new NullPointerException("theValue must not be null");
2008                }
2009                getTelecom().add(theValue);
2010                return this;
2011        }
2012
2013        /**
2014         * Gets the first repetition for <b>telecom</b> (),
2015         * creating it if it does not already exist.
2016         *
2017     * <p>
2018     * <b>Definition:</b>
2019     * Contact details for individual (if a name was provided) or the publisher
2020     * </p> 
2021         */
2022        public ContactPointDt getTelecomFirstRep() {
2023                if (getTelecom().isEmpty()) {
2024                        return addTelecom();
2025                }
2026                return getTelecom().get(0); 
2027        }
2028  
2029
2030
2031        }
2032
2033
2034        /**
2035         * Block class for child element: <b>ValueSet.codeSystem</b> ()
2036         *
2037     * <p>
2038     * <b>Definition:</b>
2039     * A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly
2040     * </p> 
2041         */
2042        @Block()        
2043        public static class CodeSystem 
2044            extends  BaseIdentifiableElement  
2045            implements IResourceBlock {
2046        
2047        @Child(name="system", type=UriDt.class, order=0, min=1, max=1, summary=true, modifier=false)    
2048        @Description(
2049                shortDefinition="",
2050                formalDefinition="An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system"
2051        )
2052        private UriDt mySystem;
2053        
2054        @Child(name="version", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
2055        @Description(
2056                shortDefinition="",
2057                formalDefinition="The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked"
2058        )
2059        private StringDt myVersion;
2060        
2061        @Child(name="caseSensitive", type=BooleanDt.class, order=2, min=0, max=1, summary=true, modifier=false) 
2062        @Description(
2063                shortDefinition="",
2064                formalDefinition="If code comparison is case sensitive when codes within this system are compared to each other"
2065        )
2066        private BooleanDt myCaseSensitive;
2067        
2068        @Child(name="concept", order=3, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
2069        @Description(
2070                shortDefinition="",
2071                formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are"
2072        )
2073        private java.util.List<CodeSystemConcept> myConcept;
2074        
2075
2076        @Override
2077        public boolean isEmpty() {
2078                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySystem,  myVersion,  myCaseSensitive,  myConcept);
2079        }
2080        
2081        @Override
2082        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2083                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCaseSensitive, myConcept);
2084        }
2085
2086        /**
2087         * Gets the value(s) for <b>system</b> ().
2088         * creating it if it does
2089         * not exist. Will not return <code>null</code>.
2090         *
2091     * <p>
2092     * <b>Definition:</b>
2093     * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system
2094     * </p> 
2095         */
2096        public UriDt getSystemElement() {  
2097                if (mySystem == null) {
2098                        mySystem = new UriDt();
2099                }
2100                return mySystem;
2101        }
2102
2103        
2104        /**
2105         * Gets the value(s) for <b>system</b> ().
2106         * creating it if it does
2107         * not exist. This method may return <code>null</code>.
2108         *
2109     * <p>
2110     * <b>Definition:</b>
2111     * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system
2112     * </p> 
2113         */
2114        public String getSystem() {  
2115                return getSystemElement().getValue();
2116        }
2117
2118        /**
2119         * Sets the value(s) for <b>system</b> ()
2120         *
2121     * <p>
2122     * <b>Definition:</b>
2123     * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system
2124     * </p> 
2125         */
2126        public CodeSystem setSystem(UriDt theValue) {
2127                mySystem = theValue;
2128                return this;
2129        }
2130        
2131        
2132
2133        /**
2134         * Sets the value for <b>system</b> ()
2135         *
2136     * <p>
2137     * <b>Definition:</b>
2138     * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system
2139     * </p> 
2140         */
2141        public CodeSystem setSystem( String theUri) {
2142                mySystem = new UriDt(theUri); 
2143                return this; 
2144        }
2145
2146 
2147        /**
2148         * Gets the value(s) for <b>version</b> ().
2149         * creating it if it does
2150         * not exist. Will not return <code>null</code>.
2151         *
2152     * <p>
2153     * <b>Definition:</b>
2154     * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked
2155     * </p> 
2156         */
2157        public StringDt getVersionElement() {  
2158                if (myVersion == null) {
2159                        myVersion = new StringDt();
2160                }
2161                return myVersion;
2162        }
2163
2164        
2165        /**
2166         * Gets the value(s) for <b>version</b> ().
2167         * creating it if it does
2168         * not exist. This method may return <code>null</code>.
2169         *
2170     * <p>
2171     * <b>Definition:</b>
2172     * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked
2173     * </p> 
2174         */
2175        public String getVersion() {  
2176                return getVersionElement().getValue();
2177        }
2178
2179        /**
2180         * Sets the value(s) for <b>version</b> ()
2181         *
2182     * <p>
2183     * <b>Definition:</b>
2184     * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked
2185     * </p> 
2186         */
2187        public CodeSystem setVersion(StringDt theValue) {
2188                myVersion = theValue;
2189                return this;
2190        }
2191        
2192        
2193
2194        /**
2195         * Sets the value for <b>version</b> ()
2196         *
2197     * <p>
2198     * <b>Definition:</b>
2199     * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked
2200     * </p> 
2201         */
2202        public CodeSystem setVersion( String theString) {
2203                myVersion = new StringDt(theString); 
2204                return this; 
2205        }
2206
2207 
2208        /**
2209         * Gets the value(s) for <b>caseSensitive</b> ().
2210         * creating it if it does
2211         * not exist. Will not return <code>null</code>.
2212         *
2213     * <p>
2214     * <b>Definition:</b>
2215     * If code comparison is case sensitive when codes within this system are compared to each other
2216     * </p> 
2217         */
2218        public BooleanDt getCaseSensitiveElement() {  
2219                if (myCaseSensitive == null) {
2220                        myCaseSensitive = new BooleanDt();
2221                }
2222                return myCaseSensitive;
2223        }
2224
2225        
2226        /**
2227         * Gets the value(s) for <b>caseSensitive</b> ().
2228         * creating it if it does
2229         * not exist. This method may return <code>null</code>.
2230         *
2231     * <p>
2232     * <b>Definition:</b>
2233     * If code comparison is case sensitive when codes within this system are compared to each other
2234     * </p> 
2235         */
2236        public Boolean getCaseSensitive() {  
2237                return getCaseSensitiveElement().getValue();
2238        }
2239
2240        /**
2241         * Sets the value(s) for <b>caseSensitive</b> ()
2242         *
2243     * <p>
2244     * <b>Definition:</b>
2245     * If code comparison is case sensitive when codes within this system are compared to each other
2246     * </p> 
2247         */
2248        public CodeSystem setCaseSensitive(BooleanDt theValue) {
2249                myCaseSensitive = theValue;
2250                return this;
2251        }
2252        
2253        
2254
2255        /**
2256         * Sets the value for <b>caseSensitive</b> ()
2257         *
2258     * <p>
2259     * <b>Definition:</b>
2260     * If code comparison is case sensitive when codes within this system are compared to each other
2261     * </p> 
2262         */
2263        public CodeSystem setCaseSensitive( boolean theBoolean) {
2264                myCaseSensitive = new BooleanDt(theBoolean); 
2265                return this; 
2266        }
2267
2268 
2269        /**
2270         * Gets the value(s) for <b>concept</b> ().
2271         * creating it if it does
2272         * not exist. Will not return <code>null</code>.
2273         *
2274     * <p>
2275     * <b>Definition:</b>
2276     * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2277     * </p> 
2278         */
2279        public java.util.List<CodeSystemConcept> getConcept() {  
2280                if (myConcept == null) {
2281                        myConcept = new java.util.ArrayList<CodeSystemConcept>();
2282                }
2283                return myConcept;
2284        }
2285
2286        /**
2287         * Sets the value(s) for <b>concept</b> ()
2288         *
2289     * <p>
2290     * <b>Definition:</b>
2291     * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2292     * </p> 
2293         */
2294        public CodeSystem setConcept(java.util.List<CodeSystemConcept> theValue) {
2295                myConcept = theValue;
2296                return this;
2297        }
2298        
2299        
2300
2301        /**
2302         * Adds and returns a new value for <b>concept</b> ()
2303         *
2304     * <p>
2305     * <b>Definition:</b>
2306     * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2307     * </p> 
2308         */
2309        public CodeSystemConcept addConcept() {
2310                CodeSystemConcept newType = new CodeSystemConcept();
2311                getConcept().add(newType);
2312                return newType; 
2313        }
2314
2315        /**
2316         * Adds a given new value for <b>concept</b> ()
2317         *
2318         * <p>
2319         * <b>Definition:</b>
2320         * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2321         * </p>
2322         * @param theValue The concept to add (must not be <code>null</code>)
2323         */
2324        public CodeSystem addConcept(CodeSystemConcept theValue) {
2325                if (theValue == null) {
2326                        throw new NullPointerException("theValue must not be null");
2327                }
2328                getConcept().add(theValue);
2329                return this;
2330        }
2331
2332        /**
2333         * Gets the first repetition for <b>concept</b> (),
2334         * creating it if it does not already exist.
2335         *
2336     * <p>
2337     * <b>Definition:</b>
2338     * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2339     * </p> 
2340         */
2341        public CodeSystemConcept getConceptFirstRep() {
2342                if (getConcept().isEmpty()) {
2343                        return addConcept();
2344                }
2345                return getConcept().get(0); 
2346        }
2347  
2348
2349
2350        }
2351
2352        /**
2353         * Block class for child element: <b>ValueSet.codeSystem.concept</b> ()
2354         *
2355     * <p>
2356     * <b>Definition:</b>
2357     * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are
2358     * </p> 
2359         */
2360        @Block()        
2361        public static class CodeSystemConcept 
2362            extends  BaseIdentifiableElement  
2363            implements IResourceBlock {
2364        
2365        @Child(name="code", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=false)    
2366        @Description(
2367                shortDefinition="",
2368                formalDefinition="A code - a text symbol - that uniquely identifies the concept within the code system"
2369        )
2370        private CodeDt myCode;
2371        
2372        @Child(name="abstract", type=BooleanDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
2373        @Description(
2374                shortDefinition="",
2375                formalDefinition="If this code is not for use as a real concept"
2376        )
2377        private BooleanDt myAbstract;
2378        
2379        @Child(name="display", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
2380        @Description(
2381                shortDefinition="",
2382                formalDefinition="A human readable string that is the recommended default way to present this concept to a user"
2383        )
2384        private StringDt myDisplay;
2385        
2386        @Child(name="definition", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)    
2387        @Description(
2388                shortDefinition="",
2389                formalDefinition="The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept"
2390        )
2391        private StringDt myDefinition;
2392        
2393        @Child(name="designation", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
2394        @Description(
2395                shortDefinition="",
2396                formalDefinition="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc."
2397        )
2398        private java.util.List<CodeSystemConceptDesignation> myDesignation;
2399        
2400        @Child(name="concept", type=CodeSystemConcept.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
2401        @Description(
2402                shortDefinition="",
2403                formalDefinition="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts"
2404        )
2405        private java.util.List<CodeSystemConcept> myConcept;
2406        
2407
2408        @Override
2409        public boolean isEmpty() {
2410                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAbstract,  myDisplay,  myDefinition,  myDesignation,  myConcept);
2411        }
2412        
2413        @Override
2414        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2415                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAbstract, myDisplay, myDefinition, myDesignation, myConcept);
2416        }
2417
2418        /**
2419         * Gets the value(s) for <b>code</b> ().
2420         * creating it if it does
2421         * not exist. Will not return <code>null</code>.
2422         *
2423     * <p>
2424     * <b>Definition:</b>
2425     * A code - a text symbol - that uniquely identifies the concept within the code system
2426     * </p> 
2427         */
2428        public CodeDt getCodeElement() {  
2429                if (myCode == null) {
2430                        myCode = new CodeDt();
2431                }
2432                return myCode;
2433        }
2434
2435        
2436        /**
2437         * Gets the value(s) for <b>code</b> ().
2438         * creating it if it does
2439         * not exist. This method may return <code>null</code>.
2440         *
2441     * <p>
2442     * <b>Definition:</b>
2443     * A code - a text symbol - that uniquely identifies the concept within the code system
2444     * </p> 
2445         */
2446        public String getCode() {  
2447                return getCodeElement().getValue();
2448        }
2449
2450        /**
2451         * Sets the value(s) for <b>code</b> ()
2452         *
2453     * <p>
2454     * <b>Definition:</b>
2455     * A code - a text symbol - that uniquely identifies the concept within the code system
2456     * </p> 
2457         */
2458        public CodeSystemConcept setCode(CodeDt theValue) {
2459                myCode = theValue;
2460                return this;
2461        }
2462        
2463        
2464
2465        /**
2466         * Sets the value for <b>code</b> ()
2467         *
2468     * <p>
2469     * <b>Definition:</b>
2470     * A code - a text symbol - that uniquely identifies the concept within the code system
2471     * </p> 
2472         */
2473        public CodeSystemConcept setCode( String theCode) {
2474                myCode = new CodeDt(theCode); 
2475                return this; 
2476        }
2477
2478 
2479        /**
2480         * Gets the value(s) for <b>abstract</b> ().
2481         * creating it if it does
2482         * not exist. Will not return <code>null</code>.
2483         *
2484     * <p>
2485     * <b>Definition:</b>
2486     * If this code is not for use as a real concept
2487     * </p> 
2488         */
2489        public BooleanDt getAbstractElement() {  
2490                if (myAbstract == null) {
2491                        myAbstract = new BooleanDt();
2492                }
2493                return myAbstract;
2494        }
2495
2496        
2497        /**
2498         * Gets the value(s) for <b>abstract</b> ().
2499         * creating it if it does
2500         * not exist. This method may return <code>null</code>.
2501         *
2502     * <p>
2503     * <b>Definition:</b>
2504     * If this code is not for use as a real concept
2505     * </p> 
2506         */
2507        public Boolean getAbstract() {  
2508                return getAbstractElement().getValue();
2509        }
2510
2511        /**
2512         * Sets the value(s) for <b>abstract</b> ()
2513         *
2514     * <p>
2515     * <b>Definition:</b>
2516     * If this code is not for use as a real concept
2517     * </p> 
2518         */
2519        public CodeSystemConcept setAbstract(BooleanDt theValue) {
2520                myAbstract = theValue;
2521                return this;
2522        }
2523        
2524        
2525
2526        /**
2527         * Sets the value for <b>abstract</b> ()
2528         *
2529     * <p>
2530     * <b>Definition:</b>
2531     * If this code is not for use as a real concept
2532     * </p> 
2533         */
2534        public CodeSystemConcept setAbstract( boolean theBoolean) {
2535                myAbstract = new BooleanDt(theBoolean); 
2536                return this; 
2537        }
2538
2539 
2540        /**
2541         * Gets the value(s) for <b>display</b> ().
2542         * creating it if it does
2543         * not exist. Will not return <code>null</code>.
2544         *
2545     * <p>
2546     * <b>Definition:</b>
2547     * A human readable string that is the recommended default way to present this concept to a user
2548     * </p> 
2549         */
2550        public StringDt getDisplayElement() {  
2551                if (myDisplay == null) {
2552                        myDisplay = new StringDt();
2553                }
2554                return myDisplay;
2555        }
2556
2557        
2558        /**
2559         * Gets the value(s) for <b>display</b> ().
2560         * creating it if it does
2561         * not exist. This method may return <code>null</code>.
2562         *
2563     * <p>
2564     * <b>Definition:</b>
2565     * A human readable string that is the recommended default way to present this concept to a user
2566     * </p> 
2567         */
2568        public String getDisplay() {  
2569                return getDisplayElement().getValue();
2570        }
2571
2572        /**
2573         * Sets the value(s) for <b>display</b> ()
2574         *
2575     * <p>
2576     * <b>Definition:</b>
2577     * A human readable string that is the recommended default way to present this concept to a user
2578     * </p> 
2579         */
2580        public CodeSystemConcept setDisplay(StringDt theValue) {
2581                myDisplay = theValue;
2582                return this;
2583        }
2584        
2585        
2586
2587        /**
2588         * Sets the value for <b>display</b> ()
2589         *
2590     * <p>
2591     * <b>Definition:</b>
2592     * A human readable string that is the recommended default way to present this concept to a user
2593     * </p> 
2594         */
2595        public CodeSystemConcept setDisplay( String theString) {
2596                myDisplay = new StringDt(theString); 
2597                return this; 
2598        }
2599
2600 
2601        /**
2602         * Gets the value(s) for <b>definition</b> ().
2603         * creating it if it does
2604         * not exist. Will not return <code>null</code>.
2605         *
2606     * <p>
2607     * <b>Definition:</b>
2608     * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept
2609     * </p> 
2610         */
2611        public StringDt getDefinitionElement() {  
2612                if (myDefinition == null) {
2613                        myDefinition = new StringDt();
2614                }
2615                return myDefinition;
2616        }
2617
2618        
2619        /**
2620         * Gets the value(s) for <b>definition</b> ().
2621         * creating it if it does
2622         * not exist. This method may return <code>null</code>.
2623         *
2624     * <p>
2625     * <b>Definition:</b>
2626     * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept
2627     * </p> 
2628         */
2629        public String getDefinition() {  
2630                return getDefinitionElement().getValue();
2631        }
2632
2633        /**
2634         * Sets the value(s) for <b>definition</b> ()
2635         *
2636     * <p>
2637     * <b>Definition:</b>
2638     * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept
2639     * </p> 
2640         */
2641        public CodeSystemConcept setDefinition(StringDt theValue) {
2642                myDefinition = theValue;
2643                return this;
2644        }
2645        
2646        
2647
2648        /**
2649         * Sets the value for <b>definition</b> ()
2650         *
2651     * <p>
2652     * <b>Definition:</b>
2653     * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept
2654     * </p> 
2655         */
2656        public CodeSystemConcept setDefinition( String theString) {
2657                myDefinition = new StringDt(theString); 
2658                return this; 
2659        }
2660
2661 
2662        /**
2663         * Gets the value(s) for <b>designation</b> ().
2664         * creating it if it does
2665         * not exist. Will not return <code>null</code>.
2666         *
2667     * <p>
2668     * <b>Definition:</b>
2669     * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2670     * </p> 
2671         */
2672        public java.util.List<CodeSystemConceptDesignation> getDesignation() {  
2673                if (myDesignation == null) {
2674                        myDesignation = new java.util.ArrayList<CodeSystemConceptDesignation>();
2675                }
2676                return myDesignation;
2677        }
2678
2679        /**
2680         * Sets the value(s) for <b>designation</b> ()
2681         *
2682     * <p>
2683     * <b>Definition:</b>
2684     * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2685     * </p> 
2686         */
2687        public CodeSystemConcept setDesignation(java.util.List<CodeSystemConceptDesignation> theValue) {
2688                myDesignation = theValue;
2689                return this;
2690        }
2691        
2692        
2693
2694        /**
2695         * Adds and returns a new value for <b>designation</b> ()
2696         *
2697     * <p>
2698     * <b>Definition:</b>
2699     * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2700     * </p> 
2701         */
2702        public CodeSystemConceptDesignation addDesignation() {
2703                CodeSystemConceptDesignation newType = new CodeSystemConceptDesignation();
2704                getDesignation().add(newType);
2705                return newType; 
2706        }
2707
2708        /**
2709         * Adds a given new value for <b>designation</b> ()
2710         *
2711         * <p>
2712         * <b>Definition:</b>
2713         * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2714         * </p>
2715         * @param theValue The designation to add (must not be <code>null</code>)
2716         */
2717        public CodeSystemConcept addDesignation(CodeSystemConceptDesignation theValue) {
2718                if (theValue == null) {
2719                        throw new NullPointerException("theValue must not be null");
2720                }
2721                getDesignation().add(theValue);
2722                return this;
2723        }
2724
2725        /**
2726         * Gets the first repetition for <b>designation</b> (),
2727         * creating it if it does not already exist.
2728         *
2729     * <p>
2730     * <b>Definition:</b>
2731     * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2732     * </p> 
2733         */
2734        public CodeSystemConceptDesignation getDesignationFirstRep() {
2735                if (getDesignation().isEmpty()) {
2736                        return addDesignation();
2737                }
2738                return getDesignation().get(0); 
2739        }
2740  
2741        /**
2742         * Gets the value(s) for <b>concept</b> ().
2743         * creating it if it does
2744         * not exist. Will not return <code>null</code>.
2745         *
2746     * <p>
2747     * <b>Definition:</b>
2748     * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts
2749     * </p> 
2750         */
2751        public java.util.List<CodeSystemConcept> getConcept() {  
2752                if (myConcept == null) {
2753                        myConcept = new java.util.ArrayList<CodeSystemConcept>();
2754                }
2755                return myConcept;
2756        }
2757
2758        /**
2759         * Sets the value(s) for <b>concept</b> ()
2760         *
2761     * <p>
2762     * <b>Definition:</b>
2763     * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts
2764     * </p> 
2765         */
2766        public CodeSystemConcept setConcept(java.util.List<CodeSystemConcept> theValue) {
2767                myConcept = theValue;
2768                return this;
2769        }
2770        
2771        
2772
2773        /**
2774         * Adds and returns a new value for <b>concept</b> ()
2775         *
2776     * <p>
2777     * <b>Definition:</b>
2778     * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts
2779     * </p> 
2780         */
2781        public CodeSystemConcept addConcept() {
2782                CodeSystemConcept newType = new CodeSystemConcept();
2783                getConcept().add(newType);
2784                return newType; 
2785        }
2786
2787        /**
2788         * Adds a given new value for <b>concept</b> ()
2789         *
2790         * <p>
2791         * <b>Definition:</b>
2792         * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts
2793         * </p>
2794         * @param theValue The concept to add (must not be <code>null</code>)
2795         */
2796        public CodeSystemConcept addConcept(CodeSystemConcept theValue) {
2797                if (theValue == null) {
2798                        throw new NullPointerException("theValue must not be null");
2799                }
2800                getConcept().add(theValue);
2801                return this;
2802        }
2803
2804        /**
2805         * Gets the first repetition for <b>concept</b> (),
2806         * creating it if it does not already exist.
2807         *
2808     * <p>
2809     * <b>Definition:</b>
2810     * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts
2811     * </p> 
2812         */
2813        public CodeSystemConcept getConceptFirstRep() {
2814                if (getConcept().isEmpty()) {
2815                        return addConcept();
2816                }
2817                return getConcept().get(0); 
2818        }
2819  
2820
2821
2822        }
2823
2824        /**
2825         * Block class for child element: <b>ValueSet.codeSystem.concept.designation</b> ()
2826         *
2827     * <p>
2828     * <b>Definition:</b>
2829     * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.
2830     * </p> 
2831         */
2832        @Block()        
2833        public static class CodeSystemConceptDesignation 
2834            extends  BaseIdentifiableElement  
2835            implements IResourceBlock {
2836        
2837        @Child(name="language", type=CodeDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
2838        @Description(
2839                shortDefinition="",
2840                formalDefinition="The language this designation is defined for"
2841        )
2842        private CodeDt myLanguage;
2843        
2844        @Child(name="use", type=CodingDt.class, order=1, min=0, max=1, summary=false, modifier=false)   
2845        @Description(
2846                shortDefinition="",
2847                formalDefinition="A code that details how this designation would be used"
2848        )
2849        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-designation-use")
2850        private CodingDt myUse;
2851        
2852        @Child(name="value", type=StringDt.class, order=2, min=1, max=1, summary=false, modifier=false) 
2853        @Description(
2854                shortDefinition="",
2855                formalDefinition="The text value for this designation"
2856        )
2857        private StringDt myValue;
2858        
2859
2860        @Override
2861        public boolean isEmpty() {
2862                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLanguage,  myUse,  myValue);
2863        }
2864        
2865        @Override
2866        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2867                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLanguage, myUse, myValue);
2868        }
2869
2870        /**
2871         * Gets the value(s) for <b>language</b> ().
2872         * creating it if it does
2873         * not exist. Will not return <code>null</code>.
2874         *
2875     * <p>
2876     * <b>Definition:</b>
2877     * The language this designation is defined for
2878     * </p> 
2879         */
2880        public CodeDt getLanguageElement() {  
2881                if (myLanguage == null) {
2882                        myLanguage = new CodeDt();
2883                }
2884                return myLanguage;
2885        }
2886
2887        
2888        /**
2889         * Gets the value(s) for <b>language</b> ().
2890         * creating it if it does
2891         * not exist. This method may return <code>null</code>.
2892         *
2893     * <p>
2894     * <b>Definition:</b>
2895     * The language this designation is defined for
2896     * </p> 
2897         */
2898        public String getLanguage() {  
2899                return getLanguageElement().getValue();
2900        }
2901
2902        /**
2903         * Sets the value(s) for <b>language</b> ()
2904         *
2905     * <p>
2906     * <b>Definition:</b>
2907     * The language this designation is defined for
2908     * </p> 
2909         */
2910        public CodeSystemConceptDesignation setLanguage(CodeDt theValue) {
2911                myLanguage = theValue;
2912                return this;
2913        }
2914        
2915        
2916
2917        /**
2918         * Sets the value for <b>language</b> ()
2919         *
2920     * <p>
2921     * <b>Definition:</b>
2922     * The language this designation is defined for
2923     * </p> 
2924         */
2925        public CodeSystemConceptDesignation setLanguage( String theCode) {
2926                myLanguage = new CodeDt(theCode); 
2927                return this; 
2928        }
2929
2930 
2931        /**
2932         * Gets the value(s) for <b>use</b> ().
2933         * creating it if it does
2934         * not exist. Will not return <code>null</code>.
2935         *
2936     * <p>
2937     * <b>Definition:</b>
2938     * A code that details how this designation would be used
2939     * </p> 
2940         */
2941        public CodingDt getUse() {  
2942                if (myUse == null) {
2943                        myUse = new CodingDt();
2944                }
2945                return myUse;
2946        }
2947
2948        /**
2949         * Sets the value(s) for <b>use</b> ()
2950         *
2951     * <p>
2952     * <b>Definition:</b>
2953     * A code that details how this designation would be used
2954     * </p> 
2955         */
2956        public CodeSystemConceptDesignation setUse(CodingDt theValue) {
2957                myUse = theValue;
2958                return this;
2959        }
2960        
2961        
2962
2963  
2964        /**
2965         * Gets the value(s) for <b>value</b> ().
2966         * creating it if it does
2967         * not exist. Will not return <code>null</code>.
2968         *
2969     * <p>
2970     * <b>Definition:</b>
2971     * The text value for this designation
2972     * </p> 
2973         */
2974        public StringDt getValueElement() {  
2975                if (myValue == null) {
2976                        myValue = new StringDt();
2977                }
2978                return myValue;
2979        }
2980
2981        
2982        /**
2983         * Gets the value(s) for <b>value</b> ().
2984         * creating it if it does
2985         * not exist. This method may return <code>null</code>.
2986         *
2987     * <p>
2988     * <b>Definition:</b>
2989     * The text value for this designation
2990     * </p> 
2991         */
2992        public String getValue() {  
2993                return getValueElement().getValue();
2994        }
2995
2996        /**
2997         * Sets the value(s) for <b>value</b> ()
2998         *
2999     * <p>
3000     * <b>Definition:</b>
3001     * The text value for this designation
3002     * </p> 
3003         */
3004        public CodeSystemConceptDesignation setValue(StringDt theValue) {
3005                myValue = theValue;
3006                return this;
3007        }
3008        
3009        
3010
3011        /**
3012         * Sets the value for <b>value</b> ()
3013         *
3014     * <p>
3015     * <b>Definition:</b>
3016     * The text value for this designation
3017     * </p> 
3018         */
3019        public CodeSystemConceptDesignation setValue( String theString) {
3020                myValue = new StringDt(theString); 
3021                return this; 
3022        }
3023
3024 
3025
3026
3027        }
3028
3029
3030
3031
3032        /**
3033         * Block class for child element: <b>ValueSet.compose</b> ()
3034         *
3035     * <p>
3036     * <b>Definition:</b>
3037     * A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set
3038     * </p> 
3039         */
3040        @Block()        
3041        public static class Compose 
3042            extends  BaseIdentifiableElement  
3043            implements IResourceBlock {
3044        
3045        @Child(name="import", type=UriDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)  
3046        @Description(
3047                shortDefinition="",
3048                formalDefinition="Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri"
3049        )
3050        private java.util.List<UriDt> myImport;
3051        
3052        @Child(name="include", order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
3053        @Description(
3054                shortDefinition="",
3055                formalDefinition="Include one or more codes from a code system"
3056        )
3057        private java.util.List<ComposeInclude> myInclude;
3058        
3059        @Child(name="exclude", type=ComposeInclude.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
3060        @Description(
3061                shortDefinition="",
3062                formalDefinition="Exclude one or more codes from the value set"
3063        )
3064        private java.util.List<ComposeInclude> myExclude;
3065        
3066
3067        @Override
3068        public boolean isEmpty() {
3069                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myImport,  myInclude,  myExclude);
3070        }
3071        
3072        @Override
3073        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3074                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myImport, myInclude, myExclude);
3075        }
3076
3077        /**
3078         * Gets the value(s) for <b>import</b> ().
3079         * creating it if it does
3080         * not exist. Will not return <code>null</code>.
3081         *
3082     * <p>
3083     * <b>Definition:</b>
3084     * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3085     * </p> 
3086         */
3087        public java.util.List<UriDt> getImport() {  
3088                if (myImport == null) {
3089                        myImport = new java.util.ArrayList<UriDt>();
3090                }
3091                return myImport;
3092        }
3093
3094        /**
3095         * Sets the value(s) for <b>import</b> ()
3096         *
3097     * <p>
3098     * <b>Definition:</b>
3099     * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3100     * </p> 
3101         */
3102        public Compose setImport(java.util.List<UriDt> theValue) {
3103                myImport = theValue;
3104                return this;
3105        }
3106        
3107        
3108
3109        /**
3110         * Adds and returns a new value for <b>import</b> ()
3111         *
3112     * <p>
3113     * <b>Definition:</b>
3114     * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3115     * </p> 
3116         */
3117        public UriDt addImport() {
3118                UriDt newType = new UriDt();
3119                getImport().add(newType);
3120                return newType; 
3121        }
3122
3123        /**
3124         * Adds a given new value for <b>import</b> ()
3125         *
3126         * <p>
3127         * <b>Definition:</b>
3128         * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3129         * </p>
3130         * @param theValue The import to add (must not be <code>null</code>)
3131         */
3132        public Compose addImport(UriDt theValue) {
3133                if (theValue == null) {
3134                        throw new NullPointerException("theValue must not be null");
3135                }
3136                getImport().add(theValue);
3137                return this;
3138        }
3139
3140        /**
3141         * Gets the first repetition for <b>import</b> (),
3142         * creating it if it does not already exist.
3143         *
3144     * <p>
3145     * <b>Definition:</b>
3146     * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3147     * </p> 
3148         */
3149        public UriDt getImportFirstRep() {
3150                if (getImport().isEmpty()) {
3151                        return addImport();
3152                }
3153                return getImport().get(0); 
3154        }
3155        /**
3156         * Adds a new value for <b>import</b> ()
3157         *
3158     * <p>
3159     * <b>Definition:</b>
3160     * Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri
3161     * </p> 
3162     *
3163     * @return Returns a reference to this object, to allow for simple chaining.
3164         */
3165        public Compose addImport( String theUri) {
3166                if (myImport == null) {
3167                        myImport = new java.util.ArrayList<UriDt>();
3168                }
3169                myImport.add(new UriDt(theUri));
3170                return this; 
3171        }
3172
3173 
3174        /**
3175         * Gets the value(s) for <b>include</b> ().
3176         * creating it if it does
3177         * not exist. Will not return <code>null</code>.
3178         *
3179     * <p>
3180     * <b>Definition:</b>
3181     * Include one or more codes from a code system
3182     * </p> 
3183         */
3184        public java.util.List<ComposeInclude> getInclude() {  
3185                if (myInclude == null) {
3186                        myInclude = new java.util.ArrayList<ComposeInclude>();
3187                }
3188                return myInclude;
3189        }
3190
3191        /**
3192         * Sets the value(s) for <b>include</b> ()
3193         *
3194     * <p>
3195     * <b>Definition:</b>
3196     * Include one or more codes from a code system
3197     * </p> 
3198         */
3199        public Compose setInclude(java.util.List<ComposeInclude> theValue) {
3200                myInclude = theValue;
3201                return this;
3202        }
3203        
3204        
3205
3206        /**
3207         * Adds and returns a new value for <b>include</b> ()
3208         *
3209     * <p>
3210     * <b>Definition:</b>
3211     * Include one or more codes from a code system
3212     * </p> 
3213         */
3214        public ComposeInclude addInclude() {
3215                ComposeInclude newType = new ComposeInclude();
3216                getInclude().add(newType);
3217                return newType; 
3218        }
3219
3220        /**
3221         * Adds a given new value for <b>include</b> ()
3222         *
3223         * <p>
3224         * <b>Definition:</b>
3225         * Include one or more codes from a code system
3226         * </p>
3227         * @param theValue The include to add (must not be <code>null</code>)
3228         */
3229        public Compose addInclude(ComposeInclude theValue) {
3230                if (theValue == null) {
3231                        throw new NullPointerException("theValue must not be null");
3232                }
3233                getInclude().add(theValue);
3234                return this;
3235        }
3236
3237        /**
3238         * Gets the first repetition for <b>include</b> (),
3239         * creating it if it does not already exist.
3240         *
3241     * <p>
3242     * <b>Definition:</b>
3243     * Include one or more codes from a code system
3244     * </p> 
3245         */
3246        public ComposeInclude getIncludeFirstRep() {
3247                if (getInclude().isEmpty()) {
3248                        return addInclude();
3249                }
3250                return getInclude().get(0); 
3251        }
3252  
3253        /**
3254         * Gets the value(s) for <b>exclude</b> ().
3255         * creating it if it does
3256         * not exist. Will not return <code>null</code>.
3257         *
3258     * <p>
3259     * <b>Definition:</b>
3260     * Exclude one or more codes from the value set
3261     * </p> 
3262         */
3263        public java.util.List<ComposeInclude> getExclude() {  
3264                if (myExclude == null) {
3265                        myExclude = new java.util.ArrayList<ComposeInclude>();
3266                }
3267                return myExclude;
3268        }
3269
3270        /**
3271         * Sets the value(s) for <b>exclude</b> ()
3272         *
3273     * <p>
3274     * <b>Definition:</b>
3275     * Exclude one or more codes from the value set
3276     * </p> 
3277         */
3278        public Compose setExclude(java.util.List<ComposeInclude> theValue) {
3279                myExclude = theValue;
3280                return this;
3281        }
3282        
3283        
3284
3285        /**
3286         * Adds and returns a new value for <b>exclude</b> ()
3287         *
3288     * <p>
3289     * <b>Definition:</b>
3290     * Exclude one or more codes from the value set
3291     * </p> 
3292         */
3293        public ComposeInclude addExclude() {
3294                ComposeInclude newType = new ComposeInclude();
3295                getExclude().add(newType);
3296                return newType; 
3297        }
3298
3299        /**
3300         * Adds a given new value for <b>exclude</b> ()
3301         *
3302         * <p>
3303         * <b>Definition:</b>
3304         * Exclude one or more codes from the value set
3305         * </p>
3306         * @param theValue The exclude to add (must not be <code>null</code>)
3307         */
3308        public Compose addExclude(ComposeInclude theValue) {
3309                if (theValue == null) {
3310                        throw new NullPointerException("theValue must not be null");
3311                }
3312                getExclude().add(theValue);
3313                return this;
3314        }
3315
3316        /**
3317         * Gets the first repetition for <b>exclude</b> (),
3318         * creating it if it does not already exist.
3319         *
3320     * <p>
3321     * <b>Definition:</b>
3322     * Exclude one or more codes from the value set
3323     * </p> 
3324         */
3325        public ComposeInclude getExcludeFirstRep() {
3326                if (getExclude().isEmpty()) {
3327                        return addExclude();
3328                }
3329                return getExclude().get(0); 
3330        }
3331  
3332
3333
3334        }
3335
3336        /**
3337         * Block class for child element: <b>ValueSet.compose.include</b> ()
3338         *
3339     * <p>
3340     * <b>Definition:</b>
3341     * Include one or more codes from a code system
3342     * </p> 
3343         */
3344        @Block()        
3345        public static class ComposeInclude 
3346            extends  BaseIdentifiableElement  
3347            implements IResourceBlock {
3348        
3349        @Child(name="system", type=UriDt.class, order=0, min=1, max=1, summary=true, modifier=false)    
3350        @Description(
3351                shortDefinition="",
3352                formalDefinition="An absolute URI which is the code system from which the selected codes come from"
3353        )
3354        private UriDt mySystem;
3355        
3356        @Child(name="version", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
3357        @Description(
3358                shortDefinition="",
3359                formalDefinition="The version of the code system that the codes are selected from"
3360        )
3361        private StringDt myVersion;
3362        
3363        @Child(name="concept", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
3364        @Description(
3365                shortDefinition="",
3366                formalDefinition="Specifies a concept to be included or excluded."
3367        )
3368        private java.util.List<ComposeIncludeConcept> myConcept;
3369        
3370        @Child(name="filter", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
3371        @Description(
3372                shortDefinition="",
3373                formalDefinition="Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true."
3374        )
3375        private java.util.List<ComposeIncludeFilter> myFilter;
3376        
3377
3378        @Override
3379        public boolean isEmpty() {
3380                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySystem,  myVersion,  myConcept,  myFilter);
3381        }
3382        
3383        @Override
3384        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3385                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myConcept, myFilter);
3386        }
3387
3388        /**
3389         * Gets the value(s) for <b>system</b> ().
3390         * creating it if it does
3391         * not exist. Will not return <code>null</code>.
3392         *
3393     * <p>
3394     * <b>Definition:</b>
3395     * An absolute URI which is the code system from which the selected codes come from
3396     * </p> 
3397         */
3398        public UriDt getSystemElement() {  
3399                if (mySystem == null) {
3400                        mySystem = new UriDt();
3401                }
3402                return mySystem;
3403        }
3404
3405        
3406        /**
3407         * Gets the value(s) for <b>system</b> ().
3408         * creating it if it does
3409         * not exist. This method may return <code>null</code>.
3410         *
3411     * <p>
3412     * <b>Definition:</b>
3413     * An absolute URI which is the code system from which the selected codes come from
3414     * </p> 
3415         */
3416        public String getSystem() {  
3417                return getSystemElement().getValue();
3418        }
3419
3420        /**
3421         * Sets the value(s) for <b>system</b> ()
3422         *
3423     * <p>
3424     * <b>Definition:</b>
3425     * An absolute URI which is the code system from which the selected codes come from
3426     * </p> 
3427         */
3428        public ComposeInclude setSystem(UriDt theValue) {
3429                mySystem = theValue;
3430                return this;
3431        }
3432        
3433        
3434
3435        /**
3436         * Sets the value for <b>system</b> ()
3437         *
3438     * <p>
3439     * <b>Definition:</b>
3440     * An absolute URI which is the code system from which the selected codes come from
3441     * </p> 
3442         */
3443        public ComposeInclude setSystem( String theUri) {
3444                mySystem = new UriDt(theUri); 
3445                return this; 
3446        }
3447
3448 
3449        /**
3450         * Gets the value(s) for <b>version</b> ().
3451         * creating it if it does
3452         * not exist. Will not return <code>null</code>.
3453         *
3454     * <p>
3455     * <b>Definition:</b>
3456     * The version of the code system that the codes are selected from
3457     * </p> 
3458         */
3459        public StringDt getVersionElement() {  
3460                if (myVersion == null) {
3461                        myVersion = new StringDt();
3462                }
3463                return myVersion;
3464        }
3465
3466        
3467        /**
3468         * Gets the value(s) for <b>version</b> ().
3469         * creating it if it does
3470         * not exist. This method may return <code>null</code>.
3471         *
3472     * <p>
3473     * <b>Definition:</b>
3474     * The version of the code system that the codes are selected from
3475     * </p> 
3476         */
3477        public String getVersion() {  
3478                return getVersionElement().getValue();
3479        }
3480
3481        /**
3482         * Sets the value(s) for <b>version</b> ()
3483         *
3484     * <p>
3485     * <b>Definition:</b>
3486     * The version of the code system that the codes are selected from
3487     * </p> 
3488         */
3489        public ComposeInclude setVersion(StringDt theValue) {
3490                myVersion = theValue;
3491                return this;
3492        }
3493        
3494        
3495
3496        /**
3497         * Sets the value for <b>version</b> ()
3498         *
3499     * <p>
3500     * <b>Definition:</b>
3501     * The version of the code system that the codes are selected from
3502     * </p> 
3503         */
3504        public ComposeInclude setVersion( String theString) {
3505                myVersion = new StringDt(theString); 
3506                return this; 
3507        }
3508
3509 
3510        /**
3511         * Gets the value(s) for <b>concept</b> ().
3512         * creating it if it does
3513         * not exist. Will not return <code>null</code>.
3514         *
3515     * <p>
3516     * <b>Definition:</b>
3517     * Specifies a concept to be included or excluded.
3518     * </p> 
3519         */
3520        public java.util.List<ComposeIncludeConcept> getConcept() {  
3521                if (myConcept == null) {
3522                        myConcept = new java.util.ArrayList<ComposeIncludeConcept>();
3523                }
3524                return myConcept;
3525        }
3526
3527        /**
3528         * Sets the value(s) for <b>concept</b> ()
3529         *
3530     * <p>
3531     * <b>Definition:</b>
3532     * Specifies a concept to be included or excluded.
3533     * </p> 
3534         */
3535        public ComposeInclude setConcept(java.util.List<ComposeIncludeConcept> theValue) {
3536                myConcept = theValue;
3537                return this;
3538        }
3539        
3540        
3541
3542        /**
3543         * Adds and returns a new value for <b>concept</b> ()
3544         *
3545     * <p>
3546     * <b>Definition:</b>
3547     * Specifies a concept to be included or excluded.
3548     * </p> 
3549         */
3550        public ComposeIncludeConcept addConcept() {
3551                ComposeIncludeConcept newType = new ComposeIncludeConcept();
3552                getConcept().add(newType);
3553                return newType; 
3554        }
3555
3556        /**
3557         * Adds a given new value for <b>concept</b> ()
3558         *
3559         * <p>
3560         * <b>Definition:</b>
3561         * Specifies a concept to be included or excluded.
3562         * </p>
3563         * @param theValue The concept to add (must not be <code>null</code>)
3564         */
3565        public ComposeInclude addConcept(ComposeIncludeConcept theValue) {
3566                if (theValue == null) {
3567                        throw new NullPointerException("theValue must not be null");
3568                }
3569                getConcept().add(theValue);
3570                return this;
3571        }
3572
3573        /**
3574         * Gets the first repetition for <b>concept</b> (),
3575         * creating it if it does not already exist.
3576         *
3577     * <p>
3578     * <b>Definition:</b>
3579     * Specifies a concept to be included or excluded.
3580     * </p> 
3581         */
3582        public ComposeIncludeConcept getConceptFirstRep() {
3583                if (getConcept().isEmpty()) {
3584                        return addConcept();
3585                }
3586                return getConcept().get(0); 
3587        }
3588  
3589        /**
3590         * Gets the value(s) for <b>filter</b> ().
3591         * creating it if it does
3592         * not exist. Will not return <code>null</code>.
3593         *
3594     * <p>
3595     * <b>Definition:</b>
3596     * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3597     * </p> 
3598         */
3599        public java.util.List<ComposeIncludeFilter> getFilter() {  
3600                if (myFilter == null) {
3601                        myFilter = new java.util.ArrayList<ComposeIncludeFilter>();
3602                }
3603                return myFilter;
3604        }
3605
3606        /**
3607         * Sets the value(s) for <b>filter</b> ()
3608         *
3609     * <p>
3610     * <b>Definition:</b>
3611     * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3612     * </p> 
3613         */
3614        public ComposeInclude setFilter(java.util.List<ComposeIncludeFilter> theValue) {
3615                myFilter = theValue;
3616                return this;
3617        }
3618        
3619        
3620
3621        /**
3622         * Adds and returns a new value for <b>filter</b> ()
3623         *
3624     * <p>
3625     * <b>Definition:</b>
3626     * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3627     * </p> 
3628         */
3629        public ComposeIncludeFilter addFilter() {
3630                ComposeIncludeFilter newType = new ComposeIncludeFilter();
3631                getFilter().add(newType);
3632                return newType; 
3633        }
3634
3635        /**
3636         * Adds a given new value for <b>filter</b> ()
3637         *
3638         * <p>
3639         * <b>Definition:</b>
3640         * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3641         * </p>
3642         * @param theValue The filter to add (must not be <code>null</code>)
3643         */
3644        public ComposeInclude addFilter(ComposeIncludeFilter theValue) {
3645                if (theValue == null) {
3646                        throw new NullPointerException("theValue must not be null");
3647                }
3648                getFilter().add(theValue);
3649                return this;
3650        }
3651
3652        /**
3653         * Gets the first repetition for <b>filter</b> (),
3654         * creating it if it does not already exist.
3655         *
3656     * <p>
3657     * <b>Definition:</b>
3658     * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3659     * </p> 
3660         */
3661        public ComposeIncludeFilter getFilterFirstRep() {
3662                if (getFilter().isEmpty()) {
3663                        return addFilter();
3664                }
3665                return getFilter().get(0); 
3666        }
3667  
3668
3669
3670        }
3671
3672        /**
3673         * Block class for child element: <b>ValueSet.compose.include.concept</b> ()
3674         *
3675     * <p>
3676     * <b>Definition:</b>
3677     * Specifies a concept to be included or excluded.
3678     * </p> 
3679         */
3680        @Block()        
3681        public static class ComposeIncludeConcept 
3682            extends  BaseIdentifiableElement  
3683            implements IResourceBlock {
3684        
3685        @Child(name="code", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=false)    
3686        @Description(
3687                shortDefinition="",
3688                formalDefinition="Specifies a code for the concept to be included or excluded"
3689        )
3690        private CodeDt myCode;
3691        
3692        @Child(name="display", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false)       
3693        @Description(
3694                shortDefinition="",
3695                formalDefinition="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system"
3696        )
3697        private StringDt myDisplay;
3698        
3699        @Child(name="designation", type=CodeSystemConceptDesignation.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
3700        @Description(
3701                shortDefinition="",
3702                formalDefinition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc."
3703        )
3704        private java.util.List<CodeSystemConceptDesignation> myDesignation;
3705        
3706
3707        @Override
3708        public boolean isEmpty() {
3709                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myDisplay,  myDesignation);
3710        }
3711        
3712        @Override
3713        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3714                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myDisplay, myDesignation);
3715        }
3716
3717        /**
3718         * Gets the value(s) for <b>code</b> ().
3719         * creating it if it does
3720         * not exist. Will not return <code>null</code>.
3721         *
3722     * <p>
3723     * <b>Definition:</b>
3724     * Specifies a code for the concept to be included or excluded
3725     * </p> 
3726         */
3727        public CodeDt getCodeElement() {  
3728                if (myCode == null) {
3729                        myCode = new CodeDt();
3730                }
3731                return myCode;
3732        }
3733
3734        
3735        /**
3736         * Gets the value(s) for <b>code</b> ().
3737         * creating it if it does
3738         * not exist. This method may return <code>null</code>.
3739         *
3740     * <p>
3741     * <b>Definition:</b>
3742     * Specifies a code for the concept to be included or excluded
3743     * </p> 
3744         */
3745        public String getCode() {  
3746                return getCodeElement().getValue();
3747        }
3748
3749        /**
3750         * Sets the value(s) for <b>code</b> ()
3751         *
3752     * <p>
3753     * <b>Definition:</b>
3754     * Specifies a code for the concept to be included or excluded
3755     * </p> 
3756         */
3757        public ComposeIncludeConcept setCode(CodeDt theValue) {
3758                myCode = theValue;
3759                return this;
3760        }
3761        
3762        
3763
3764        /**
3765         * Sets the value for <b>code</b> ()
3766         *
3767     * <p>
3768     * <b>Definition:</b>
3769     * Specifies a code for the concept to be included or excluded
3770     * </p> 
3771         */
3772        public ComposeIncludeConcept setCode( String theCode) {
3773                myCode = new CodeDt(theCode); 
3774                return this; 
3775        }
3776
3777 
3778        /**
3779         * Gets the value(s) for <b>display</b> ().
3780         * creating it if it does
3781         * not exist. Will not return <code>null</code>.
3782         *
3783     * <p>
3784     * <b>Definition:</b>
3785     * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system
3786     * </p> 
3787         */
3788        public StringDt getDisplayElement() {  
3789                if (myDisplay == null) {
3790                        myDisplay = new StringDt();
3791                }
3792                return myDisplay;
3793        }
3794
3795        
3796        /**
3797         * Gets the value(s) for <b>display</b> ().
3798         * creating it if it does
3799         * not exist. This method may return <code>null</code>.
3800         *
3801     * <p>
3802     * <b>Definition:</b>
3803     * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system
3804     * </p> 
3805         */
3806        public String getDisplay() {  
3807                return getDisplayElement().getValue();
3808        }
3809
3810        /**
3811         * Sets the value(s) for <b>display</b> ()
3812         *
3813     * <p>
3814     * <b>Definition:</b>
3815     * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system
3816     * </p> 
3817         */
3818        public ComposeIncludeConcept setDisplay(StringDt theValue) {
3819                myDisplay = theValue;
3820                return this;
3821        }
3822        
3823        
3824
3825        /**
3826         * Sets the value for <b>display</b> ()
3827         *
3828     * <p>
3829     * <b>Definition:</b>
3830     * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system
3831     * </p> 
3832         */
3833        public ComposeIncludeConcept setDisplay( String theString) {
3834                myDisplay = new StringDt(theString); 
3835                return this; 
3836        }
3837
3838 
3839        /**
3840         * Gets the value(s) for <b>designation</b> ().
3841         * creating it if it does
3842         * not exist. Will not return <code>null</code>.
3843         *
3844     * <p>
3845     * <b>Definition:</b>
3846     * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
3847     * </p> 
3848         */
3849        public java.util.List<CodeSystemConceptDesignation> getDesignation() {  
3850                if (myDesignation == null) {
3851                        myDesignation = new java.util.ArrayList<CodeSystemConceptDesignation>();
3852                }
3853                return myDesignation;
3854        }
3855
3856        /**
3857         * Sets the value(s) for <b>designation</b> ()
3858         *
3859     * <p>
3860     * <b>Definition:</b>
3861     * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
3862     * </p> 
3863         */
3864        public ComposeIncludeConcept setDesignation(java.util.List<CodeSystemConceptDesignation> theValue) {
3865                myDesignation = theValue;
3866                return this;
3867        }
3868        
3869        
3870
3871        /**
3872         * Adds and returns a new value for <b>designation</b> ()
3873         *
3874     * <p>
3875     * <b>Definition:</b>
3876     * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
3877     * </p> 
3878         */
3879        public CodeSystemConceptDesignation addDesignation() {
3880                CodeSystemConceptDesignation newType = new CodeSystemConceptDesignation();
3881                getDesignation().add(newType);
3882                return newType; 
3883        }
3884
3885        /**
3886         * Adds a given new value for <b>designation</b> ()
3887         *
3888         * <p>
3889         * <b>Definition:</b>
3890         * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
3891         * </p>
3892         * @param theValue The designation to add (must not be <code>null</code>)
3893         */
3894        public ComposeIncludeConcept addDesignation(CodeSystemConceptDesignation theValue) {
3895                if (theValue == null) {
3896                        throw new NullPointerException("theValue must not be null");
3897                }
3898                getDesignation().add(theValue);
3899                return this;
3900        }
3901
3902        /**
3903         * Gets the first repetition for <b>designation</b> (),
3904         * creating it if it does not already exist.
3905         *
3906     * <p>
3907     * <b>Definition:</b>
3908     * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
3909     * </p> 
3910         */
3911        public CodeSystemConceptDesignation getDesignationFirstRep() {
3912                if (getDesignation().isEmpty()) {
3913                        return addDesignation();
3914                }
3915                return getDesignation().get(0); 
3916        }
3917  
3918
3919
3920        }
3921
3922
3923        /**
3924         * Block class for child element: <b>ValueSet.compose.include.filter</b> ()
3925         *
3926     * <p>
3927     * <b>Definition:</b>
3928     * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
3929     * </p> 
3930         */
3931        @Block()        
3932        public static class ComposeIncludeFilter 
3933            extends  BaseIdentifiableElement  
3934            implements IResourceBlock {
3935        
3936        @Child(name="property", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=false)        
3937        @Description(
3938                shortDefinition="",
3939                formalDefinition="A code that identifies a property defined in the code system"
3940        )
3941        private CodeDt myProperty;
3942        
3943        @Child(name="op", type=CodeDt.class, order=1, min=1, max=1, summary=false, modifier=false)      
3944        @Description(
3945                shortDefinition="",
3946                formalDefinition="The kind of operation to perform as a part of the filter criteria"
3947        )
3948        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/filter-operator")
3949        private BoundCodeDt<FilterOperatorEnum> myOp;
3950        
3951        @Child(name="value", type=CodeDt.class, order=2, min=1, max=1, summary=false, modifier=false)   
3952        @Description(
3953                shortDefinition="",
3954                formalDefinition="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value"
3955        )
3956        private CodeDt myValue;
3957        
3958
3959        @Override
3960        public boolean isEmpty() {
3961                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myProperty,  myOp,  myValue);
3962        }
3963        
3964        @Override
3965        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3966                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myProperty, myOp, myValue);
3967        }
3968
3969        /**
3970         * Gets the value(s) for <b>property</b> ().
3971         * creating it if it does
3972         * not exist. Will not return <code>null</code>.
3973         *
3974     * <p>
3975     * <b>Definition:</b>
3976     * A code that identifies a property defined in the code system
3977     * </p> 
3978         */
3979        public CodeDt getPropertyElement() {  
3980                if (myProperty == null) {
3981                        myProperty = new CodeDt();
3982                }
3983                return myProperty;
3984        }
3985
3986        
3987        /**
3988         * Gets the value(s) for <b>property</b> ().
3989         * creating it if it does
3990         * not exist. This method may return <code>null</code>.
3991         *
3992     * <p>
3993     * <b>Definition:</b>
3994     * A code that identifies a property defined in the code system
3995     * </p> 
3996         */
3997        public String getProperty() {  
3998                return getPropertyElement().getValue();
3999        }
4000
4001        /**
4002         * Sets the value(s) for <b>property</b> ()
4003         *
4004     * <p>
4005     * <b>Definition:</b>
4006     * A code that identifies a property defined in the code system
4007     * </p> 
4008         */
4009        public ComposeIncludeFilter setProperty(CodeDt theValue) {
4010                myProperty = theValue;
4011                return this;
4012        }
4013        
4014        
4015
4016        /**
4017         * Sets the value for <b>property</b> ()
4018         *
4019     * <p>
4020     * <b>Definition:</b>
4021     * A code that identifies a property defined in the code system
4022     * </p> 
4023         */
4024        public ComposeIncludeFilter setProperty( String theCode) {
4025                myProperty = new CodeDt(theCode); 
4026                return this; 
4027        }
4028
4029 
4030        /**
4031         * Gets the value(s) for <b>op</b> ().
4032         * creating it if it does
4033         * not exist. Will not return <code>null</code>.
4034         *
4035     * <p>
4036     * <b>Definition:</b>
4037     * The kind of operation to perform as a part of the filter criteria
4038     * </p> 
4039         */
4040        public BoundCodeDt<FilterOperatorEnum> getOpElement() {  
4041                if (myOp == null) {
4042                        myOp = new BoundCodeDt<FilterOperatorEnum>(FilterOperatorEnum.VALUESET_BINDER);
4043                }
4044                return myOp;
4045        }
4046
4047        
4048        /**
4049         * Gets the value(s) for <b>op</b> ().
4050         * creating it if it does
4051         * not exist. This method may return <code>null</code>.
4052         *
4053     * <p>
4054     * <b>Definition:</b>
4055     * The kind of operation to perform as a part of the filter criteria
4056     * </p> 
4057         */
4058        public String getOp() {  
4059                return getOpElement().getValue();
4060        }
4061
4062        /**
4063         * Sets the value(s) for <b>op</b> ()
4064         *
4065     * <p>
4066     * <b>Definition:</b>
4067     * The kind of operation to perform as a part of the filter criteria
4068     * </p> 
4069         */
4070        public ComposeIncludeFilter setOp(BoundCodeDt<FilterOperatorEnum> theValue) {
4071                myOp = theValue;
4072                return this;
4073        }
4074        
4075        
4076
4077        /**
4078         * Sets the value(s) for <b>op</b> ()
4079         *
4080     * <p>
4081     * <b>Definition:</b>
4082     * The kind of operation to perform as a part of the filter criteria
4083     * </p> 
4084         */
4085        public ComposeIncludeFilter setOp(FilterOperatorEnum theValue) {
4086                setOp(new BoundCodeDt<FilterOperatorEnum>(FilterOperatorEnum.VALUESET_BINDER, theValue));
4087                
4088/*
4089                getOpElement().setValueAsEnum(theValue);
4090*/
4091                return this;
4092        }
4093
4094  
4095        /**
4096         * Gets the value(s) for <b>value</b> ().
4097         * creating it if it does
4098         * not exist. Will not return <code>null</code>.
4099         *
4100     * <p>
4101     * <b>Definition:</b>
4102     * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value
4103     * </p> 
4104         */
4105        public CodeDt getValueElement() {  
4106                if (myValue == null) {
4107                        myValue = new CodeDt();
4108                }
4109                return myValue;
4110        }
4111
4112        
4113        /**
4114         * Gets the value(s) for <b>value</b> ().
4115         * creating it if it does
4116         * not exist. This method may return <code>null</code>.
4117         *
4118     * <p>
4119     * <b>Definition:</b>
4120     * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value
4121     * </p> 
4122         */
4123        public String getValue() {  
4124                return getValueElement().getValue();
4125        }
4126
4127        /**
4128         * Sets the value(s) for <b>value</b> ()
4129         *
4130     * <p>
4131     * <b>Definition:</b>
4132     * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value
4133     * </p> 
4134         */
4135        public ComposeIncludeFilter setValue(CodeDt theValue) {
4136                myValue = theValue;
4137                return this;
4138        }
4139        
4140        
4141
4142        /**
4143         * Sets the value for <b>value</b> ()
4144         *
4145     * <p>
4146     * <b>Definition:</b>
4147     * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value
4148     * </p> 
4149         */
4150        public ComposeIncludeFilter setValue( String theCode) {
4151                myValue = new CodeDt(theCode); 
4152                return this; 
4153        }
4154
4155 
4156
4157
4158        }
4159
4160
4161
4162
4163        /**
4164         * Block class for child element: <b>ValueSet.expansion</b> ()
4165         *
4166     * <p>
4167     * <b>Definition:</b>
4168     * A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed
4169     * </p> 
4170         */
4171        @Block()        
4172        public static class Expansion 
4173            extends  BaseIdentifiableElement  
4174            implements IResourceBlock {
4175        
4176        @Child(name="identifier", type=UriDt.class, order=0, min=1, max=1, summary=false, modifier=false)       
4177        @Description(
4178                shortDefinition="",
4179                formalDefinition="An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so"
4180        )
4181        private UriDt myIdentifier;
4182        
4183        @Child(name="timestamp", type=DateTimeDt.class, order=1, min=1, max=1, summary=false, modifier=false)   
4184        @Description(
4185                shortDefinition="",
4186                formalDefinition="The time at which the expansion was produced by the expanding system."
4187        )
4188        private DateTimeDt myTimestamp;
4189        
4190        @Child(name="total", type=IntegerDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
4191        @Description(
4192                shortDefinition="",
4193                formalDefinition="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter"
4194        )
4195        private IntegerDt myTotal;
4196        
4197        @Child(name="offset", type=IntegerDt.class, order=3, min=0, max=1, summary=false, modifier=false)       
4198        @Description(
4199                shortDefinition="",
4200                formalDefinition="If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present"
4201        )
4202        private IntegerDt myOffset;
4203        
4204        @Child(name="parameter", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
4205        @Description(
4206                shortDefinition="",
4207                formalDefinition="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion"
4208        )
4209        private java.util.List<ExpansionParameter> myParameter;
4210        
4211        @Child(name="contains", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
4212        @Description(
4213                shortDefinition="",
4214                formalDefinition="The codes that are contained in the value set expansion"
4215        )
4216        private java.util.List<ExpansionContains> myContains;
4217        
4218
4219        @Override
4220        public boolean isEmpty() {
4221                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myTimestamp,  myTotal,  myOffset,  myParameter,  myContains);
4222        }
4223        
4224        @Override
4225        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4226                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myTimestamp, myTotal, myOffset, myParameter, myContains);
4227        }
4228
4229        /**
4230         * Gets the value(s) for <b>identifier</b> ().
4231         * creating it if it does
4232         * not exist. Will not return <code>null</code>.
4233         *
4234     * <p>
4235     * <b>Definition:</b>
4236     * An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
4237     * </p> 
4238         */
4239        public UriDt getIdentifierElement() {  
4240                if (myIdentifier == null) {
4241                        myIdentifier = new UriDt();
4242                }
4243                return myIdentifier;
4244        }
4245
4246        
4247        /**
4248         * Gets the value(s) for <b>identifier</b> ().
4249         * creating it if it does
4250         * not exist. This method may return <code>null</code>.
4251         *
4252     * <p>
4253     * <b>Definition:</b>
4254     * An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
4255     * </p> 
4256         */
4257        public String getIdentifier() {  
4258                return getIdentifierElement().getValue();
4259        }
4260
4261        /**
4262         * Sets the value(s) for <b>identifier</b> ()
4263         *
4264     * <p>
4265     * <b>Definition:</b>
4266     * An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
4267     * </p> 
4268         */
4269        public Expansion setIdentifier(UriDt theValue) {
4270                myIdentifier = theValue;
4271                return this;
4272        }
4273        
4274        
4275
4276        /**
4277         * Sets the value for <b>identifier</b> ()
4278         *
4279     * <p>
4280     * <b>Definition:</b>
4281     * An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
4282     * </p> 
4283         */
4284        public Expansion setIdentifier( String theUri) {
4285                myIdentifier = new UriDt(theUri); 
4286                return this; 
4287        }
4288
4289 
4290        /**
4291         * Gets the value(s) for <b>timestamp</b> ().
4292         * creating it if it does
4293         * not exist. Will not return <code>null</code>.
4294         *
4295     * <p>
4296     * <b>Definition:</b>
4297     * The time at which the expansion was produced by the expanding system.
4298     * </p> 
4299         */
4300        public DateTimeDt getTimestampElement() {  
4301                if (myTimestamp == null) {
4302                        myTimestamp = new DateTimeDt();
4303                }
4304                return myTimestamp;
4305        }
4306
4307        
4308        /**
4309         * Gets the value(s) for <b>timestamp</b> ().
4310         * creating it if it does
4311         * not exist. This method may return <code>null</code>.
4312         *
4313     * <p>
4314     * <b>Definition:</b>
4315     * The time at which the expansion was produced by the expanding system.
4316     * </p> 
4317         */
4318        public Date getTimestamp() {  
4319                return getTimestampElement().getValue();
4320        }
4321
4322        /**
4323         * Sets the value(s) for <b>timestamp</b> ()
4324         *
4325     * <p>
4326     * <b>Definition:</b>
4327     * The time at which the expansion was produced by the expanding system.
4328     * </p> 
4329         */
4330        public Expansion setTimestamp(DateTimeDt theValue) {
4331                myTimestamp = theValue;
4332                return this;
4333        }
4334        
4335        
4336
4337        /**
4338         * Sets the value for <b>timestamp</b> ()
4339         *
4340     * <p>
4341     * <b>Definition:</b>
4342     * The time at which the expansion was produced by the expanding system.
4343     * </p> 
4344         */
4345        public Expansion setTimestampWithSecondsPrecision( Date theDate) {
4346                myTimestamp = new DateTimeDt(theDate); 
4347                return this; 
4348        }
4349
4350        /**
4351         * Sets the value for <b>timestamp</b> ()
4352         *
4353     * <p>
4354     * <b>Definition:</b>
4355     * The time at which the expansion was produced by the expanding system.
4356     * </p> 
4357         */
4358        public Expansion setTimestamp( Date theDate,  TemporalPrecisionEnum thePrecision) {
4359                myTimestamp = new DateTimeDt(theDate, thePrecision); 
4360                return this; 
4361        }
4362
4363 
4364        /**
4365         * Gets the value(s) for <b>total</b> ().
4366         * creating it if it does
4367         * not exist. Will not return <code>null</code>.
4368         *
4369     * <p>
4370     * <b>Definition:</b>
4371     * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter
4372     * </p> 
4373         */
4374        public IntegerDt getTotalElement() {  
4375                if (myTotal == null) {
4376                        myTotal = new IntegerDt();
4377                }
4378                return myTotal;
4379        }
4380
4381        
4382        /**
4383         * Gets the value(s) for <b>total</b> ().
4384         * creating it if it does
4385         * not exist. This method may return <code>null</code>.
4386         *
4387     * <p>
4388     * <b>Definition:</b>
4389     * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter
4390     * </p> 
4391         */
4392        public Integer getTotal() {  
4393                return getTotalElement().getValue();
4394        }
4395
4396        /**
4397         * Sets the value(s) for <b>total</b> ()
4398         *
4399     * <p>
4400     * <b>Definition:</b>
4401     * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter
4402     * </p> 
4403         */
4404        public Expansion setTotal(IntegerDt theValue) {
4405                myTotal = theValue;
4406                return this;
4407        }
4408        
4409        
4410
4411        /**
4412         * Sets the value for <b>total</b> ()
4413         *
4414     * <p>
4415     * <b>Definition:</b>
4416     * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter
4417     * </p> 
4418         */
4419        public Expansion setTotal( int theInteger) {
4420                myTotal = new IntegerDt(theInteger); 
4421                return this; 
4422        }
4423
4424 
4425        /**
4426         * Gets the value(s) for <b>offset</b> ().
4427         * creating it if it does
4428         * not exist. Will not return <code>null</code>.
4429         *
4430     * <p>
4431     * <b>Definition:</b>
4432     * If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present
4433     * </p> 
4434         */
4435        public IntegerDt getOffsetElement() {  
4436                if (myOffset == null) {
4437                        myOffset = new IntegerDt();
4438                }
4439                return myOffset;
4440        }
4441
4442        
4443        /**
4444         * Gets the value(s) for <b>offset</b> ().
4445         * creating it if it does
4446         * not exist. This method may return <code>null</code>.
4447         *
4448     * <p>
4449     * <b>Definition:</b>
4450     * If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present
4451     * </p> 
4452         */
4453        public Integer getOffset() {  
4454                return getOffsetElement().getValue();
4455        }
4456
4457        /**
4458         * Sets the value(s) for <b>offset</b> ()
4459         *
4460     * <p>
4461     * <b>Definition:</b>
4462     * If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present
4463     * </p> 
4464         */
4465        public Expansion setOffset(IntegerDt theValue) {
4466                myOffset = theValue;
4467                return this;
4468        }
4469        
4470        
4471
4472        /**
4473         * Sets the value for <b>offset</b> ()
4474         *
4475     * <p>
4476     * <b>Definition:</b>
4477     * If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present
4478     * </p> 
4479         */
4480        public Expansion setOffset( int theInteger) {
4481                myOffset = new IntegerDt(theInteger); 
4482                return this; 
4483        }
4484
4485 
4486        /**
4487         * Gets the value(s) for <b>parameter</b> ().
4488         * creating it if it does
4489         * not exist. Will not return <code>null</code>.
4490         *
4491     * <p>
4492     * <b>Definition:</b>
4493     * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4494     * </p> 
4495         */
4496        public java.util.List<ExpansionParameter> getParameter() {  
4497                if (myParameter == null) {
4498                        myParameter = new java.util.ArrayList<ExpansionParameter>();
4499                }
4500                return myParameter;
4501        }
4502
4503        /**
4504         * Sets the value(s) for <b>parameter</b> ()
4505         *
4506     * <p>
4507     * <b>Definition:</b>
4508     * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4509     * </p> 
4510         */
4511        public Expansion setParameter(java.util.List<ExpansionParameter> theValue) {
4512                myParameter = theValue;
4513                return this;
4514        }
4515        
4516        
4517
4518        /**
4519         * Adds and returns a new value for <b>parameter</b> ()
4520         *
4521     * <p>
4522     * <b>Definition:</b>
4523     * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4524     * </p> 
4525         */
4526        public ExpansionParameter addParameter() {
4527                ExpansionParameter newType = new ExpansionParameter();
4528                getParameter().add(newType);
4529                return newType; 
4530        }
4531
4532        /**
4533         * Adds a given new value for <b>parameter</b> ()
4534         *
4535         * <p>
4536         * <b>Definition:</b>
4537         * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4538         * </p>
4539         * @param theValue The parameter to add (must not be <code>null</code>)
4540         */
4541        public Expansion addParameter(ExpansionParameter theValue) {
4542                if (theValue == null) {
4543                        throw new NullPointerException("theValue must not be null");
4544                }
4545                getParameter().add(theValue);
4546                return this;
4547        }
4548
4549        /**
4550         * Gets the first repetition for <b>parameter</b> (),
4551         * creating it if it does not already exist.
4552         *
4553     * <p>
4554     * <b>Definition:</b>
4555     * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4556     * </p> 
4557         */
4558        public ExpansionParameter getParameterFirstRep() {
4559                if (getParameter().isEmpty()) {
4560                        return addParameter();
4561                }
4562                return getParameter().get(0); 
4563        }
4564  
4565        /**
4566         * Gets the value(s) for <b>contains</b> ().
4567         * creating it if it does
4568         * not exist. Will not return <code>null</code>.
4569         *
4570     * <p>
4571     * <b>Definition:</b>
4572     * The codes that are contained in the value set expansion
4573     * </p> 
4574         */
4575        public java.util.List<ExpansionContains> getContains() {  
4576                if (myContains == null) {
4577                        myContains = new java.util.ArrayList<ExpansionContains>();
4578                }
4579                return myContains;
4580        }
4581
4582        /**
4583         * Sets the value(s) for <b>contains</b> ()
4584         *
4585     * <p>
4586     * <b>Definition:</b>
4587     * The codes that are contained in the value set expansion
4588     * </p> 
4589         */
4590        public Expansion setContains(java.util.List<ExpansionContains> theValue) {
4591                myContains = theValue;
4592                return this;
4593        }
4594        
4595        
4596
4597        /**
4598         * Adds and returns a new value for <b>contains</b> ()
4599         *
4600     * <p>
4601     * <b>Definition:</b>
4602     * The codes that are contained in the value set expansion
4603     * </p> 
4604         */
4605        public ExpansionContains addContains() {
4606                ExpansionContains newType = new ExpansionContains();
4607                getContains().add(newType);
4608                return newType; 
4609        }
4610
4611        /**
4612         * Adds a given new value for <b>contains</b> ()
4613         *
4614         * <p>
4615         * <b>Definition:</b>
4616         * The codes that are contained in the value set expansion
4617         * </p>
4618         * @param theValue The contains to add (must not be <code>null</code>)
4619         */
4620        public Expansion addContains(ExpansionContains theValue) {
4621                if (theValue == null) {
4622                        throw new NullPointerException("theValue must not be null");
4623                }
4624                getContains().add(theValue);
4625                return this;
4626        }
4627
4628        /**
4629         * Gets the first repetition for <b>contains</b> (),
4630         * creating it if it does not already exist.
4631         *
4632     * <p>
4633     * <b>Definition:</b>
4634     * The codes that are contained in the value set expansion
4635     * </p> 
4636         */
4637        public ExpansionContains getContainsFirstRep() {
4638                if (getContains().isEmpty()) {
4639                        return addContains();
4640                }
4641                return getContains().get(0); 
4642        }
4643  
4644
4645
4646        }
4647
4648        /**
4649         * Block class for child element: <b>ValueSet.expansion.parameter</b> ()
4650         *
4651     * <p>
4652     * <b>Definition:</b>
4653     * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion
4654     * </p> 
4655         */
4656        @Block()        
4657        public static class ExpansionParameter 
4658            extends  BaseIdentifiableElement  
4659            implements IResourceBlock {
4660        
4661        @Child(name="name", type=StringDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
4662        @Description(
4663                shortDefinition="",
4664                formalDefinition="The name of the parameter"
4665        )
4666        private StringDt myName;
4667        
4668        @Child(name="value", order=1, min=0, max=1, summary=false, modifier=false, type={
4669                StringDt.class, 
4670                BooleanDt.class, 
4671                IntegerDt.class, 
4672                DecimalDt.class, 
4673                UriDt.class, 
4674                CodeDt.class
4675        })
4676        @Description(
4677                shortDefinition="",
4678                formalDefinition="The value of the parameter"
4679        )
4680        private IDatatype myValue;
4681        
4682
4683        @Override
4684        public boolean isEmpty() {
4685                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myValue);
4686        }
4687        
4688        @Override
4689        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4690                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myValue);
4691        }
4692
4693        /**
4694         * Gets the value(s) for <b>name</b> ().
4695         * creating it if it does
4696         * not exist. Will not return <code>null</code>.
4697         *
4698     * <p>
4699     * <b>Definition:</b>
4700     * The name of the parameter
4701     * </p> 
4702         */
4703        public StringDt getNameElement() {  
4704                if (myName == null) {
4705                        myName = new StringDt();
4706                }
4707                return myName;
4708        }
4709
4710        
4711        /**
4712         * Gets the value(s) for <b>name</b> ().
4713         * creating it if it does
4714         * not exist. This method may return <code>null</code>.
4715         *
4716     * <p>
4717     * <b>Definition:</b>
4718     * The name of the parameter
4719     * </p> 
4720         */
4721        public String getName() {  
4722                return getNameElement().getValue();
4723        }
4724
4725        /**
4726         * Sets the value(s) for <b>name</b> ()
4727         *
4728     * <p>
4729     * <b>Definition:</b>
4730     * The name of the parameter
4731     * </p> 
4732         */
4733        public ExpansionParameter setName(StringDt theValue) {
4734                myName = theValue;
4735                return this;
4736        }
4737        
4738        
4739
4740        /**
4741         * Sets the value for <b>name</b> ()
4742         *
4743     * <p>
4744     * <b>Definition:</b>
4745     * The name of the parameter
4746     * </p> 
4747         */
4748        public ExpansionParameter setName( String theString) {
4749                myName = new StringDt(theString); 
4750                return this; 
4751        }
4752
4753 
4754        /**
4755         * Gets the value(s) for <b>value[x]</b> ().
4756         * creating it if it does
4757         * not exist. Will not return <code>null</code>.
4758         *
4759     * <p>
4760     * <b>Definition:</b>
4761     * The value of the parameter
4762     * </p> 
4763         */
4764        public IDatatype getValue() {  
4765                return myValue;
4766        }
4767
4768        /**
4769         * Sets the value(s) for <b>value[x]</b> ()
4770         *
4771     * <p>
4772     * <b>Definition:</b>
4773     * The value of the parameter
4774     * </p> 
4775         */
4776        public ExpansionParameter setValue(IDatatype theValue) {
4777                myValue = theValue;
4778                return this;
4779        }
4780        
4781        
4782
4783  
4784
4785
4786        }
4787
4788
4789        /**
4790         * Block class for child element: <b>ValueSet.expansion.contains</b> ()
4791         *
4792     * <p>
4793     * <b>Definition:</b>
4794     * The codes that are contained in the value set expansion
4795     * </p> 
4796         */
4797        @Block()        
4798        public static class ExpansionContains 
4799            extends  BaseIdentifiableElement  
4800            implements IResourceBlock {
4801        
4802        @Child(name="system", type=UriDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
4803        @Description(
4804                shortDefinition="",
4805                formalDefinition="An absolute URI which is the code system in which the code for this item in the expansion is defined"
4806        )
4807        private UriDt mySystem;
4808        
4809        @Child(name="abstract", type=BooleanDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
4810        @Description(
4811                shortDefinition="",
4812                formalDefinition="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value"
4813        )
4814        private BooleanDt myAbstract;
4815        
4816        @Child(name="version", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
4817        @Description(
4818                shortDefinition="",
4819                formalDefinition="The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence"
4820        )
4821        private StringDt myVersion;
4822        
4823        @Child(name="code", type=CodeDt.class, order=3, min=0, max=1, summary=false, modifier=false)    
4824        @Description(
4825                shortDefinition="",
4826                formalDefinition="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set"
4827        )
4828        private CodeDt myCode;
4829        
4830        @Child(name="display", type=StringDt.class, order=4, min=0, max=1, summary=false, modifier=false)       
4831        @Description(
4832                shortDefinition="",
4833                formalDefinition="The recommended display for this item in the expansion"
4834        )
4835        private StringDt myDisplay;
4836        
4837        @Child(name="contains", type=ExpansionContains.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
4838        @Description(
4839                shortDefinition="",
4840                formalDefinition="Other codes and entries contained under this entry in the hierarchy"
4841        )
4842        private java.util.List<ExpansionContains> myContains;
4843        
4844
4845        @Override
4846        public boolean isEmpty() {
4847                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySystem,  myAbstract,  myVersion,  myCode,  myDisplay,  myContains);
4848        }
4849        
4850        @Override
4851        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4852                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myAbstract, myVersion, myCode, myDisplay, myContains);
4853        }
4854
4855        /**
4856         * Gets the value(s) for <b>system</b> ().
4857         * creating it if it does
4858         * not exist. Will not return <code>null</code>.
4859         *
4860     * <p>
4861     * <b>Definition:</b>
4862     * An absolute URI which is the code system in which the code for this item in the expansion is defined
4863     * </p> 
4864         */
4865        public UriDt getSystemElement() {  
4866                if (mySystem == null) {
4867                        mySystem = new UriDt();
4868                }
4869                return mySystem;
4870        }
4871
4872        
4873        /**
4874         * Gets the value(s) for <b>system</b> ().
4875         * creating it if it does
4876         * not exist. This method may return <code>null</code>.
4877         *
4878     * <p>
4879     * <b>Definition:</b>
4880     * An absolute URI which is the code system in which the code for this item in the expansion is defined
4881     * </p> 
4882         */
4883        public String getSystem() {  
4884                return getSystemElement().getValue();
4885        }
4886
4887        /**
4888         * Sets the value(s) for <b>system</b> ()
4889         *
4890     * <p>
4891     * <b>Definition:</b>
4892     * An absolute URI which is the code system in which the code for this item in the expansion is defined
4893     * </p> 
4894         */
4895        public ExpansionContains setSystem(UriDt theValue) {
4896                mySystem = theValue;
4897                return this;
4898        }
4899        
4900        
4901
4902        /**
4903         * Sets the value for <b>system</b> ()
4904         *
4905     * <p>
4906     * <b>Definition:</b>
4907     * An absolute URI which is the code system in which the code for this item in the expansion is defined
4908     * </p> 
4909         */
4910        public ExpansionContains setSystem( String theUri) {
4911                mySystem = new UriDt(theUri); 
4912                return this; 
4913        }
4914
4915 
4916        /**
4917         * Gets the value(s) for <b>abstract</b> ().
4918         * creating it if it does
4919         * not exist. Will not return <code>null</code>.
4920         *
4921     * <p>
4922     * <b>Definition:</b>
4923     * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value
4924     * </p> 
4925         */
4926        public BooleanDt getAbstractElement() {  
4927                if (myAbstract == null) {
4928                        myAbstract = new BooleanDt();
4929                }
4930                return myAbstract;
4931        }
4932
4933        
4934        /**
4935         * Gets the value(s) for <b>abstract</b> ().
4936         * creating it if it does
4937         * not exist. This method may return <code>null</code>.
4938         *
4939     * <p>
4940     * <b>Definition:</b>
4941     * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value
4942     * </p> 
4943         */
4944        public Boolean getAbstract() {  
4945                return getAbstractElement().getValue();
4946        }
4947
4948        /**
4949         * Sets the value(s) for <b>abstract</b> ()
4950         *
4951     * <p>
4952     * <b>Definition:</b>
4953     * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value
4954     * </p> 
4955         */
4956        public ExpansionContains setAbstract(BooleanDt theValue) {
4957                myAbstract = theValue;
4958                return this;
4959        }
4960        
4961        
4962
4963        /**
4964         * Sets the value for <b>abstract</b> ()
4965         *
4966     * <p>
4967     * <b>Definition:</b>
4968     * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value
4969     * </p> 
4970         */
4971        public ExpansionContains setAbstract( boolean theBoolean) {
4972                myAbstract = new BooleanDt(theBoolean); 
4973                return this; 
4974        }
4975
4976 
4977        /**
4978         * Gets the value(s) for <b>version</b> ().
4979         * creating it if it does
4980         * not exist. Will not return <code>null</code>.
4981         *
4982     * <p>
4983     * <b>Definition:</b>
4984     * The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence
4985     * </p> 
4986         */
4987        public StringDt getVersionElement() {  
4988                if (myVersion == null) {
4989                        myVersion = new StringDt();
4990                }
4991                return myVersion;
4992        }
4993
4994        
4995        /**
4996         * Gets the value(s) for <b>version</b> ().
4997         * creating it if it does
4998         * not exist. This method may return <code>null</code>.
4999         *
5000     * <p>
5001     * <b>Definition:</b>
5002     * The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence
5003     * </p> 
5004         */
5005        public String getVersion() {  
5006                return getVersionElement().getValue();
5007        }
5008
5009        /**
5010         * Sets the value(s) for <b>version</b> ()
5011         *
5012     * <p>
5013     * <b>Definition:</b>
5014     * The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence
5015     * </p> 
5016         */
5017        public ExpansionContains setVersion(StringDt theValue) {
5018                myVersion = theValue;
5019                return this;
5020        }
5021        
5022        
5023
5024        /**
5025         * Sets the value for <b>version</b> ()
5026         *
5027     * <p>
5028     * <b>Definition:</b>
5029     * The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence
5030     * </p> 
5031         */
5032        public ExpansionContains setVersion( String theString) {
5033                myVersion = new StringDt(theString); 
5034                return this; 
5035        }
5036
5037 
5038        /**
5039         * Gets the value(s) for <b>code</b> ().
5040         * creating it if it does
5041         * not exist. Will not return <code>null</code>.
5042         *
5043     * <p>
5044     * <b>Definition:</b>
5045     * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set
5046     * </p> 
5047         */
5048        public CodeDt getCodeElement() {  
5049                if (myCode == null) {
5050                        myCode = new CodeDt();
5051                }
5052                return myCode;
5053        }
5054
5055        
5056        /**
5057         * Gets the value(s) for <b>code</b> ().
5058         * creating it if it does
5059         * not exist. This method may return <code>null</code>.
5060         *
5061     * <p>
5062     * <b>Definition:</b>
5063     * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set
5064     * </p> 
5065         */
5066        public String getCode() {  
5067                return getCodeElement().getValue();
5068        }
5069
5070        /**
5071         * Sets the value(s) for <b>code</b> ()
5072         *
5073     * <p>
5074     * <b>Definition:</b>
5075     * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set
5076     * </p> 
5077         */
5078        public ExpansionContains setCode(CodeDt theValue) {
5079                myCode = theValue;
5080                return this;
5081        }
5082        
5083        
5084
5085        /**
5086         * Sets the value for <b>code</b> ()
5087         *
5088     * <p>
5089     * <b>Definition:</b>
5090     * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set
5091     * </p> 
5092         */
5093        public ExpansionContains setCode( String theCode) {
5094                myCode = new CodeDt(theCode); 
5095                return this; 
5096        }
5097
5098 
5099        /**
5100         * Gets the value(s) for <b>display</b> ().
5101         * creating it if it does
5102         * not exist. Will not return <code>null</code>.
5103         *
5104     * <p>
5105     * <b>Definition:</b>
5106     * The recommended display for this item in the expansion
5107     * </p> 
5108         */
5109        public StringDt getDisplayElement() {  
5110                if (myDisplay == null) {
5111                        myDisplay = new StringDt();
5112                }
5113                return myDisplay;
5114        }
5115
5116        
5117        /**
5118         * Gets the value(s) for <b>display</b> ().
5119         * creating it if it does
5120         * not exist. This method may return <code>null</code>.
5121         *
5122     * <p>
5123     * <b>Definition:</b>
5124     * The recommended display for this item in the expansion
5125     * </p> 
5126         */
5127        public String getDisplay() {  
5128                return getDisplayElement().getValue();
5129        }
5130
5131        /**
5132         * Sets the value(s) for <b>display</b> ()
5133         *
5134     * <p>
5135     * <b>Definition:</b>
5136     * The recommended display for this item in the expansion
5137     * </p> 
5138         */
5139        public ExpansionContains setDisplay(StringDt theValue) {
5140                myDisplay = theValue;
5141                return this;
5142        }
5143        
5144        
5145
5146        /**
5147         * Sets the value for <b>display</b> ()
5148         *
5149     * <p>
5150     * <b>Definition:</b>
5151     * The recommended display for this item in the expansion
5152     * </p> 
5153         */
5154        public ExpansionContains setDisplay( String theString) {
5155                myDisplay = new StringDt(theString); 
5156                return this; 
5157        }
5158
5159 
5160        /**
5161         * Gets the value(s) for <b>contains</b> ().
5162         * creating it if it does
5163         * not exist. Will not return <code>null</code>.
5164         *
5165     * <p>
5166     * <b>Definition:</b>
5167     * Other codes and entries contained under this entry in the hierarchy
5168     * </p> 
5169         */
5170        public java.util.List<ExpansionContains> getContains() {  
5171                if (myContains == null) {
5172                        myContains = new java.util.ArrayList<ExpansionContains>();
5173                }
5174                return myContains;
5175        }
5176
5177        /**
5178         * Sets the value(s) for <b>contains</b> ()
5179         *
5180     * <p>
5181     * <b>Definition:</b>
5182     * Other codes and entries contained under this entry in the hierarchy
5183     * </p> 
5184         */
5185        public ExpansionContains setContains(java.util.List<ExpansionContains> theValue) {
5186                myContains = theValue;
5187                return this;
5188        }
5189        
5190        
5191
5192        /**
5193         * Adds and returns a new value for <b>contains</b> ()
5194         *
5195     * <p>
5196     * <b>Definition:</b>
5197     * Other codes and entries contained under this entry in the hierarchy
5198     * </p> 
5199         */
5200        public ExpansionContains addContains() {
5201                ExpansionContains newType = new ExpansionContains();
5202                getContains().add(newType);
5203                return newType; 
5204        }
5205
5206        /**
5207         * Adds a given new value for <b>contains</b> ()
5208         *
5209         * <p>
5210         * <b>Definition:</b>
5211         * Other codes and entries contained under this entry in the hierarchy
5212         * </p>
5213         * @param theValue The contains to add (must not be <code>null</code>)
5214         */
5215        public ExpansionContains addContains(ExpansionContains theValue) {
5216                if (theValue == null) {
5217                        throw new NullPointerException("theValue must not be null");
5218                }
5219                getContains().add(theValue);
5220                return this;
5221        }
5222
5223        /**
5224         * Gets the first repetition for <b>contains</b> (),
5225         * creating it if it does not already exist.
5226         *
5227     * <p>
5228     * <b>Definition:</b>
5229     * Other codes and entries contained under this entry in the hierarchy
5230     * </p> 
5231         */
5232        public ExpansionContains getContainsFirstRep() {
5233                if (getContains().isEmpty()) {
5234                        return addContains();
5235                }
5236                return getContains().get(0); 
5237        }
5238  
5239
5240
5241        }
5242
5243
5244
5245
5246
5247    @Override
5248    public String getResourceName() {
5249        return "ValueSet";
5250    }
5251    
5252    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
5253        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
5254    }
5255
5256
5257}