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