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>SearchParameter</b> Resource
320 * (conformance.behavior)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A search parameter that defines a named search item that can be used to search/filter on a resource.
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/SearchParameter">http://hl7.org/fhir/profiles/SearchParameter</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="SearchParameter", profile="http://hl7.org/fhir/profiles/SearchParameter", id="searchparameter")
339public class SearchParameter 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></b><br>
346         * Type: <b>uri</b><br>
347         * Path: <b>SearchParameter.url</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="url", path="SearchParameter.url", description="", 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></b><br>
357         * Type: <b>uri</b><br>
358         * Path: <b>SearchParameter.url</b><br>
359         * </p>
360         */
361        public static final UriClientParam URL = new UriClientParam(SP_URL);
362
363        /**
364         * Search parameter constant for <b>name</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>string</b><br>
368         * Path: <b>SearchParameter.name</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="name", path="SearchParameter.name", description="", type="string"  )
372        public static final String SP_NAME = "name";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>name</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>string</b><br>
379         * Path: <b>SearchParameter.name</b><br>
380         * </p>
381         */
382        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
383
384        /**
385         * Search parameter constant for <b>base</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>SearchParameter.base</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="base", path="SearchParameter.base", description="", type="token"  )
393        public static final String SP_BASE = "base";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>base</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>SearchParameter.base</b><br>
401         * </p>
402         */
403        public static final TokenClientParam BASE = new TokenClientParam(SP_BASE);
404
405        /**
406         * Search parameter constant for <b>type</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>token</b><br>
410         * Path: <b>SearchParameter.type</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="type", path="SearchParameter.type", description="", type="token"  )
414        public static final String SP_TYPE = "type";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>type</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>token</b><br>
421         * Path: <b>SearchParameter.type</b><br>
422         * </p>
423         */
424        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
425
426        /**
427         * Search parameter constant for <b>description</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>string</b><br>
431         * Path: <b>SearchParameter.description</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="description", path="SearchParameter.description", description="", type="string"  )
435        public static final String SP_DESCRIPTION = "description";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>description</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>string</b><br>
442         * Path: <b>SearchParameter.description</b><br>
443         * </p>
444         */
445        public static final StringClientParam DESCRIPTION = new StringClientParam(SP_DESCRIPTION);
446
447        /**
448         * Search parameter constant for <b>target</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>SearchParameter.target</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="target", path="SearchParameter.target", description="", type="token"  )
456        public static final String SP_TARGET = "target";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>target</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>SearchParameter.target</b><br>
464         * </p>
465         */
466        public static final TokenClientParam TARGET = new TokenClientParam(SP_TARGET);
467
468        /**
469         * Search parameter constant for <b>code</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>SearchParameter.code</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="code", path="SearchParameter.code", description="", type="token"  )
477        public static final String SP_CODE = "code";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>code</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>SearchParameter.code</b><br>
485         * </p>
486         */
487        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
488
489
490
491        @Child(name="url", type=UriDt.class, order=0, min=1, max=1, summary=true, modifier=false)       
492        @Description(
493                shortDefinition="id",
494                formalDefinition="An absolute URL that is used to identify this search parameter 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 search parameter is (or will be) published"
495        )
496        private UriDt myUrl;
497        
498        @Child(name="name", type=StringDt.class, order=1, min=1, max=1, summary=true, modifier=false)   
499        @Description(
500                shortDefinition="",
501                formalDefinition="A free text natural language name identifying the search parameter"
502        )
503        private StringDt myName;
504        
505        @Child(name="status", type=CodeDt.class, order=2, min=0, max=1, summary=true, modifier=false)   
506        @Description(
507                shortDefinition="status",
508                formalDefinition="The status of this search parameter definition"
509        )
510        private BoundCodeDt<ConformanceResourceStatusEnum> myStatus;
511        
512        @Child(name="experimental", type=BooleanDt.class, order=3, min=0, max=1, summary=true, modifier=false)  
513        @Description(
514                shortDefinition="class",
515                formalDefinition="A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
516        )
517        private BooleanDt myExperimental;
518        
519        @Child(name="publisher", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)      
520        @Description(
521                shortDefinition="who.witness",
522                formalDefinition="The name of the individual or organization that published the search parameter"
523        )
524        private StringDt myPublisher;
525        
526        @Child(name="contact", order=5, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
527        @Description(
528                shortDefinition="",
529                formalDefinition="Contacts to assist a user in finding and communicating with the publisher"
530        )
531        private java.util.List<Contact> myContact;
532        
533        @Child(name="date", type=DateTimeDt.class, order=6, min=0, max=1, summary=true, modifier=false) 
534        @Description(
535                shortDefinition="when.recorded",
536                formalDefinition="The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes"
537        )
538        private DateTimeDt myDate;
539        
540        @Child(name="requirements", type=StringDt.class, order=7, min=0, max=1, summary=false, modifier=false)  
541        @Description(
542                shortDefinition="why",
543                formalDefinition="The Scope and Usage that this search parameter was created to meet"
544        )
545        private StringDt myRequirements;
546        
547        @Child(name="code", type=CodeDt.class, order=8, min=1, max=1, summary=true, modifier=false)     
548        @Description(
549                shortDefinition="",
550                formalDefinition="The code used in the URL or the parameter name in a parameters resource for this search parameter"
551        )
552        private CodeDt myCode;
553        
554        @Child(name="base", type=CodeDt.class, order=9, min=1, max=1, summary=true, modifier=false)     
555        @Description(
556                shortDefinition="",
557                formalDefinition="The base resource type that this search parameter refers to"
558        )
559        private BoundCodeDt<ResourceTypeEnum> myBase;
560        
561        @Child(name="type", type=CodeDt.class, order=10, min=1, max=1, summary=true, modifier=false)    
562        @Description(
563                shortDefinition="",
564                formalDefinition="The type of value a search parameter refers to, and how the content is interpreted"
565        )
566        private BoundCodeDt<SearchParamTypeEnum> myType;
567        
568        @Child(name="description", type=StringDt.class, order=11, min=1, max=1, summary=true, modifier=false)   
569        @Description(
570                shortDefinition="",
571                formalDefinition="A description of the search parameters and how it used"
572        )
573        private StringDt myDescription;
574        
575        @Child(name="xpath", type=StringDt.class, order=12, min=0, max=1, summary=false, modifier=false)        
576        @Description(
577                shortDefinition="",
578                formalDefinition="An XPath expression that returns a set of elements for the search parameter"
579        )
580        private StringDt myXpath;
581        
582        @Child(name="xpathUsage", type=CodeDt.class, order=13, min=0, max=1, summary=false, modifier=false)     
583        @Description(
584                shortDefinition="",
585                formalDefinition="How the search parameter relates to the set of elements returned by evaluating the xpath query"
586        )
587        private BoundCodeDt<XPathUsageTypeEnum> myXpathUsage;
588        
589        @Child(name="target", type=CodeDt.class, order=14, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
590        @Description(
591                shortDefinition="",
592                formalDefinition="Types of resource (if a resource is referenced)"
593        )
594        private java.util.List<BoundCodeDt<ResourceTypeEnum>> myTarget;
595        
596
597        @Override
598        public boolean isEmpty() {
599                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myUrl,  myName,  myStatus,  myExperimental,  myPublisher,  myContact,  myDate,  myRequirements,  myCode,  myBase,  myType,  myDescription,  myXpath,  myXpathUsage,  myTarget);
600        }
601        
602        @Override
603        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
604                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUrl, myName, myStatus, myExperimental, myPublisher, myContact, myDate, myRequirements, myCode, myBase, myType, myDescription, myXpath, myXpathUsage, myTarget);
605        }
606
607        /**
608         * Gets the value(s) for <b>url</b> (id).
609         * creating it if it does
610         * not exist. Will not return <code>null</code>.
611         *
612     * <p>
613     * <b>Definition:</b>
614     * An absolute URL that is used to identify this search parameter 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 search parameter is (or will be) published
615     * </p> 
616         */
617        public UriDt getUrlElement() {  
618                if (myUrl == null) {
619                        myUrl = new UriDt();
620                }
621                return myUrl;
622        }
623
624        
625        /**
626         * Gets the value(s) for <b>url</b> (id).
627         * creating it if it does
628         * not exist. Will not return <code>null</code>.
629         *
630     * <p>
631     * <b>Definition:</b>
632     * An absolute URL that is used to identify this search parameter 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 search parameter is (or will be) published
633     * </p> 
634         */
635        public String getUrl() {  
636                return getUrlElement().getValue();
637        }
638
639        /**
640         * Sets the value(s) for <b>url</b> (id)
641         *
642     * <p>
643     * <b>Definition:</b>
644     * An absolute URL that is used to identify this search parameter 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 search parameter is (or will be) published
645     * </p> 
646         */
647        public SearchParameter setUrl(UriDt theValue) {
648                myUrl = theValue;
649                return this;
650        }
651        
652        
653
654        /**
655         * Sets the value for <b>url</b> (id)
656         *
657     * <p>
658     * <b>Definition:</b>
659     * An absolute URL that is used to identify this search parameter 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 search parameter is (or will be) published
660     * </p> 
661         */
662        public SearchParameter setUrl( String theUri) {
663                myUrl = new UriDt(theUri); 
664                return this; 
665        }
666
667 
668        /**
669         * Gets the value(s) for <b>name</b> ().
670         * creating it if it does
671         * not exist. Will not return <code>null</code>.
672         *
673     * <p>
674     * <b>Definition:</b>
675     * A free text natural language name identifying the search parameter
676     * </p> 
677         */
678        public StringDt getNameElement() {  
679                if (myName == null) {
680                        myName = new StringDt();
681                }
682                return myName;
683        }
684
685        
686        /**
687         * Gets the value(s) for <b>name</b> ().
688         * creating it if it does
689         * not exist. Will not return <code>null</code>.
690         *
691     * <p>
692     * <b>Definition:</b>
693     * A free text natural language name identifying the search parameter
694     * </p> 
695         */
696        public String getName() {  
697                return getNameElement().getValue();
698        }
699
700        /**
701         * Sets the value(s) for <b>name</b> ()
702         *
703     * <p>
704     * <b>Definition:</b>
705     * A free text natural language name identifying the search parameter
706     * </p> 
707         */
708        public SearchParameter setName(StringDt theValue) {
709                myName = theValue;
710                return this;
711        }
712        
713        
714
715        /**
716         * Sets the value for <b>name</b> ()
717         *
718     * <p>
719     * <b>Definition:</b>
720     * A free text natural language name identifying the search parameter
721     * </p> 
722         */
723        public SearchParameter setName( String theString) {
724                myName = new StringDt(theString); 
725                return this; 
726        }
727
728 
729        /**
730         * Gets the value(s) for <b>status</b> (status).
731         * creating it if it does
732         * not exist. Will not return <code>null</code>.
733         *
734     * <p>
735     * <b>Definition:</b>
736     * The status of this search parameter definition
737     * </p> 
738         */
739        public BoundCodeDt<ConformanceResourceStatusEnum> getStatusElement() {  
740                if (myStatus == null) {
741                        myStatus = new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER);
742                }
743                return myStatus;
744        }
745
746        
747        /**
748         * Gets the value(s) for <b>status</b> (status).
749         * creating it if it does
750         * not exist. Will not return <code>null</code>.
751         *
752     * <p>
753     * <b>Definition:</b>
754     * The status of this search parameter definition
755     * </p> 
756         */
757        public String getStatus() {  
758                return getStatusElement().getValue();
759        }
760
761        /**
762         * Sets the value(s) for <b>status</b> (status)
763         *
764     * <p>
765     * <b>Definition:</b>
766     * The status of this search parameter definition
767     * </p> 
768         */
769        public SearchParameter setStatus(BoundCodeDt<ConformanceResourceStatusEnum> theValue) {
770                myStatus = theValue;
771                return this;
772        }
773        
774        
775
776        /**
777         * Sets the value(s) for <b>status</b> (status)
778         *
779     * <p>
780     * <b>Definition:</b>
781     * The status of this search parameter definition
782     * </p> 
783         */
784        public SearchParameter setStatus(ConformanceResourceStatusEnum theValue) {
785                setStatus(new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER, theValue));
786                
787/*
788                getStatusElement().setValueAsEnum(theValue);
789*/
790                return this;
791        }
792
793  
794        /**
795         * Gets the value(s) for <b>experimental</b> (class).
796         * creating it if it does
797         * not exist. Will not return <code>null</code>.
798         *
799     * <p>
800     * <b>Definition:</b>
801     * A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
802     * </p> 
803         */
804        public BooleanDt getExperimentalElement() {  
805                if (myExperimental == null) {
806                        myExperimental = new BooleanDt();
807                }
808                return myExperimental;
809        }
810
811        
812        /**
813         * Gets the value(s) for <b>experimental</b> (class).
814         * creating it if it does
815         * not exist. Will not return <code>null</code>.
816         *
817     * <p>
818     * <b>Definition:</b>
819     * A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
820     * </p> 
821         */
822        public Boolean getExperimental() {  
823                return getExperimentalElement().getValue();
824        }
825
826        /**
827         * Sets the value(s) for <b>experimental</b> (class)
828         *
829     * <p>
830     * <b>Definition:</b>
831     * A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
832     * </p> 
833         */
834        public SearchParameter setExperimental(BooleanDt theValue) {
835                myExperimental = theValue;
836                return this;
837        }
838        
839        
840
841        /**
842         * Sets the value for <b>experimental</b> (class)
843         *
844     * <p>
845     * <b>Definition:</b>
846     * A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
847     * </p> 
848         */
849        public SearchParameter setExperimental( boolean theBoolean) {
850                myExperimental = new BooleanDt(theBoolean); 
851                return this; 
852        }
853
854 
855        /**
856         * Gets the value(s) for <b>publisher</b> (who.witness).
857         * creating it if it does
858         * not exist. Will not return <code>null</code>.
859         *
860     * <p>
861     * <b>Definition:</b>
862     * The name of the individual or organization that published the search parameter
863     * </p> 
864         */
865        public StringDt getPublisherElement() {  
866                if (myPublisher == null) {
867                        myPublisher = new StringDt();
868                }
869                return myPublisher;
870        }
871
872        
873        /**
874         * Gets the value(s) for <b>publisher</b> (who.witness).
875         * creating it if it does
876         * not exist. Will not return <code>null</code>.
877         *
878     * <p>
879     * <b>Definition:</b>
880     * The name of the individual or organization that published the search parameter
881     * </p> 
882         */
883        public String getPublisher() {  
884                return getPublisherElement().getValue();
885        }
886
887        /**
888         * Sets the value(s) for <b>publisher</b> (who.witness)
889         *
890     * <p>
891     * <b>Definition:</b>
892     * The name of the individual or organization that published the search parameter
893     * </p> 
894         */
895        public SearchParameter setPublisher(StringDt theValue) {
896                myPublisher = theValue;
897                return this;
898        }
899        
900        
901
902        /**
903         * Sets the value for <b>publisher</b> (who.witness)
904         *
905     * <p>
906     * <b>Definition:</b>
907     * The name of the individual or organization that published the search parameter
908     * </p> 
909         */
910        public SearchParameter setPublisher( String theString) {
911                myPublisher = new StringDt(theString); 
912                return this; 
913        }
914
915 
916        /**
917         * Gets the value(s) for <b>contact</b> ().
918         * creating it if it does
919         * not exist. Will not return <code>null</code>.
920         *
921     * <p>
922     * <b>Definition:</b>
923     * Contacts to assist a user in finding and communicating with the publisher
924     * </p> 
925         */
926        public java.util.List<Contact> getContact() {  
927                if (myContact == null) {
928                        myContact = new java.util.ArrayList<Contact>();
929                }
930                return myContact;
931        }
932
933        /**
934         * Sets the value(s) for <b>contact</b> ()
935         *
936     * <p>
937     * <b>Definition:</b>
938     * Contacts to assist a user in finding and communicating with the publisher
939     * </p> 
940         */
941        public SearchParameter setContact(java.util.List<Contact> theValue) {
942                myContact = theValue;
943                return this;
944        }
945        
946        
947
948        /**
949         * Adds and returns a new value for <b>contact</b> ()
950         *
951     * <p>
952     * <b>Definition:</b>
953     * Contacts to assist a user in finding and communicating with the publisher
954     * </p> 
955         */
956        public Contact addContact() {
957                Contact newType = new Contact();
958                getContact().add(newType);
959                return newType; 
960        }
961
962        /**
963         * Adds a given new value for <b>contact</b> ()
964         *
965         * <p>
966         * <b>Definition:</b>
967         * Contacts to assist a user in finding and communicating with the publisher
968         * </p>
969         * @param theValue The contact to add (must not be <code>null</code>)
970         */
971        public SearchParameter addContact(Contact theValue) {
972                if (theValue == null) {
973                        throw new NullPointerException("theValue must not be null");
974                }
975                getContact().add(theValue);
976                return this;
977        }
978
979        /**
980         * Gets the first repetition for <b>contact</b> (),
981         * creating it if it does not already exist.
982         *
983     * <p>
984     * <b>Definition:</b>
985     * Contacts to assist a user in finding and communicating with the publisher
986     * </p> 
987         */
988        public Contact getContactFirstRep() {
989                if (getContact().isEmpty()) {
990                        return addContact();
991                }
992                return getContact().get(0); 
993        }
994  
995        /**
996         * Gets the value(s) for <b>date</b> (when.recorded).
997         * creating it if it does
998         * not exist. Will not return <code>null</code>.
999         *
1000     * <p>
1001     * <b>Definition:</b>
1002     * The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes
1003     * </p> 
1004         */
1005        public DateTimeDt getDateElement() {  
1006                if (myDate == null) {
1007                        myDate = new DateTimeDt();
1008                }
1009                return myDate;
1010        }
1011
1012        
1013        /**
1014         * Gets the value(s) for <b>date</b> (when.recorded).
1015         * creating it if it does
1016         * not exist. Will not return <code>null</code>.
1017         *
1018     * <p>
1019     * <b>Definition:</b>
1020     * The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes
1021     * </p> 
1022         */
1023        public Date getDate() {  
1024                return getDateElement().getValue();
1025        }
1026
1027        /**
1028         * Sets the value(s) for <b>date</b> (when.recorded)
1029         *
1030     * <p>
1031     * <b>Definition:</b>
1032     * The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes
1033     * </p> 
1034         */
1035        public SearchParameter setDate(DateTimeDt theValue) {
1036                myDate = theValue;
1037                return this;
1038        }
1039        
1040        
1041
1042        /**
1043         * Sets the value for <b>date</b> (when.recorded)
1044         *
1045     * <p>
1046     * <b>Definition:</b>
1047     * The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes
1048     * </p> 
1049         */
1050        public SearchParameter setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1051                myDate = new DateTimeDt(theDate, thePrecision); 
1052                return this; 
1053        }
1054
1055        /**
1056         * Sets the value for <b>date</b> (when.recorded)
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * The date  (and optionally time) when the search parameter definition was published. 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 search parameter changes
1061     * </p> 
1062         */
1063        public SearchParameter setDateWithSecondsPrecision( Date theDate) {
1064                myDate = new DateTimeDt(theDate); 
1065                return this; 
1066        }
1067
1068 
1069        /**
1070         * Gets the value(s) for <b>requirements</b> (why).
1071         * creating it if it does
1072         * not exist. Will not return <code>null</code>.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * The Scope and Usage that this search parameter was created to meet
1077     * </p> 
1078         */
1079        public StringDt getRequirementsElement() {  
1080                if (myRequirements == null) {
1081                        myRequirements = new StringDt();
1082                }
1083                return myRequirements;
1084        }
1085
1086        
1087        /**
1088         * Gets the value(s) for <b>requirements</b> (why).
1089         * creating it if it does
1090         * not exist. Will not return <code>null</code>.
1091         *
1092     * <p>
1093     * <b>Definition:</b>
1094     * The Scope and Usage that this search parameter was created to meet
1095     * </p> 
1096         */
1097        public String getRequirements() {  
1098                return getRequirementsElement().getValue();
1099        }
1100
1101        /**
1102         * Sets the value(s) for <b>requirements</b> (why)
1103         *
1104     * <p>
1105     * <b>Definition:</b>
1106     * The Scope and Usage that this search parameter was created to meet
1107     * </p> 
1108         */
1109        public SearchParameter setRequirements(StringDt theValue) {
1110                myRequirements = theValue;
1111                return this;
1112        }
1113        
1114        
1115
1116        /**
1117         * Sets the value for <b>requirements</b> (why)
1118         *
1119     * <p>
1120     * <b>Definition:</b>
1121     * The Scope and Usage that this search parameter was created to meet
1122     * </p> 
1123         */
1124        public SearchParameter setRequirements( String theString) {
1125                myRequirements = new StringDt(theString); 
1126                return this; 
1127        }
1128
1129 
1130        /**
1131         * Gets the value(s) for <b>code</b> ().
1132         * creating it if it does
1133         * not exist. Will not return <code>null</code>.
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * The code used in the URL or the parameter name in a parameters resource for this search parameter
1138     * </p> 
1139         */
1140        public CodeDt getCodeElement() {  
1141                if (myCode == null) {
1142                        myCode = new CodeDt();
1143                }
1144                return myCode;
1145        }
1146
1147        
1148        /**
1149         * Gets the value(s) for <b>code</b> ().
1150         * creating it if it does
1151         * not exist. Will not return <code>null</code>.
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * The code used in the URL or the parameter name in a parameters resource for this search parameter
1156     * </p> 
1157         */
1158        public String getCode() {  
1159                return getCodeElement().getValue();
1160        }
1161
1162        /**
1163         * Sets the value(s) for <b>code</b> ()
1164         *
1165     * <p>
1166     * <b>Definition:</b>
1167     * The code used in the URL or the parameter name in a parameters resource for this search parameter
1168     * </p> 
1169         */
1170        public SearchParameter setCode(CodeDt theValue) {
1171                myCode = theValue;
1172                return this;
1173        }
1174        
1175        
1176
1177        /**
1178         * Sets the value for <b>code</b> ()
1179         *
1180     * <p>
1181     * <b>Definition:</b>
1182     * The code used in the URL or the parameter name in a parameters resource for this search parameter
1183     * </p> 
1184         */
1185        public SearchParameter setCode( String theCode) {
1186                myCode = new CodeDt(theCode); 
1187                return this; 
1188        }
1189
1190 
1191        /**
1192         * Gets the value(s) for <b>base</b> ().
1193         * creating it if it does
1194         * not exist. Will not return <code>null</code>.
1195         *
1196     * <p>
1197     * <b>Definition:</b>
1198     * The base resource type that this search parameter refers to
1199     * </p> 
1200         */
1201        public BoundCodeDt<ResourceTypeEnum> getBaseElement() {  
1202                if (myBase == null) {
1203                        myBase = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER);
1204                }
1205                return myBase;
1206        }
1207
1208        
1209        /**
1210         * Gets the value(s) for <b>base</b> ().
1211         * creating it if it does
1212         * not exist. Will not return <code>null</code>.
1213         *
1214     * <p>
1215     * <b>Definition:</b>
1216     * The base resource type that this search parameter refers to
1217     * </p> 
1218         */
1219        public String getBase() {  
1220                return getBaseElement().getValue();
1221        }
1222
1223        /**
1224         * Sets the value(s) for <b>base</b> ()
1225         *
1226     * <p>
1227     * <b>Definition:</b>
1228     * The base resource type that this search parameter refers to
1229     * </p> 
1230         */
1231        public SearchParameter setBase(BoundCodeDt<ResourceTypeEnum> theValue) {
1232                myBase = theValue;
1233                return this;
1234        }
1235        
1236        
1237
1238        /**
1239         * Sets the value(s) for <b>base</b> ()
1240         *
1241     * <p>
1242     * <b>Definition:</b>
1243     * The base resource type that this search parameter refers to
1244     * </p> 
1245         */
1246        public SearchParameter setBase(ResourceTypeEnum theValue) {
1247                setBase(new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER, theValue));
1248                
1249/*
1250                getBaseElement().setValueAsEnum(theValue);
1251*/
1252                return this;
1253        }
1254
1255  
1256        /**
1257         * Gets the value(s) for <b>type</b> ().
1258         * creating it if it does
1259         * not exist. Will not return <code>null</code>.
1260         *
1261     * <p>
1262     * <b>Definition:</b>
1263     * The type of value a search parameter refers to, and how the content is interpreted
1264     * </p> 
1265         */
1266        public BoundCodeDt<SearchParamTypeEnum> getTypeElement() {  
1267                if (myType == null) {
1268                        myType = new BoundCodeDt<SearchParamTypeEnum>(SearchParamTypeEnum.VALUESET_BINDER);
1269                }
1270                return myType;
1271        }
1272
1273        
1274        /**
1275         * Gets the value(s) for <b>type</b> ().
1276         * creating it if it does
1277         * not exist. Will not return <code>null</code>.
1278         *
1279     * <p>
1280     * <b>Definition:</b>
1281     * The type of value a search parameter refers to, and how the content is interpreted
1282     * </p> 
1283         */
1284        public String getType() {  
1285                return getTypeElement().getValue();
1286        }
1287
1288        /**
1289         * Sets the value(s) for <b>type</b> ()
1290         *
1291     * <p>
1292     * <b>Definition:</b>
1293     * The type of value a search parameter refers to, and how the content is interpreted
1294     * </p> 
1295         */
1296        public SearchParameter setType(BoundCodeDt<SearchParamTypeEnum> theValue) {
1297                myType = theValue;
1298                return this;
1299        }
1300        
1301        
1302
1303        /**
1304         * Sets the value(s) for <b>type</b> ()
1305         *
1306     * <p>
1307     * <b>Definition:</b>
1308     * The type of value a search parameter refers to, and how the content is interpreted
1309     * </p> 
1310         */
1311        public SearchParameter setType(SearchParamTypeEnum theValue) {
1312                setType(new BoundCodeDt<SearchParamTypeEnum>(SearchParamTypeEnum.VALUESET_BINDER, theValue));
1313                
1314/*
1315                getTypeElement().setValueAsEnum(theValue);
1316*/
1317                return this;
1318        }
1319
1320  
1321        /**
1322         * Gets the value(s) for <b>description</b> ().
1323         * creating it if it does
1324         * not exist. Will not return <code>null</code>.
1325         *
1326     * <p>
1327     * <b>Definition:</b>
1328     * A description of the search parameters and how it used
1329     * </p> 
1330         */
1331        public StringDt getDescriptionElement() {  
1332                if (myDescription == null) {
1333                        myDescription = new StringDt();
1334                }
1335                return myDescription;
1336        }
1337
1338        
1339        /**
1340         * Gets the value(s) for <b>description</b> ().
1341         * creating it if it does
1342         * not exist. Will not return <code>null</code>.
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * A description of the search parameters and how it used
1347     * </p> 
1348         */
1349        public String getDescription() {  
1350                return getDescriptionElement().getValue();
1351        }
1352
1353        /**
1354         * Sets the value(s) for <b>description</b> ()
1355         *
1356     * <p>
1357     * <b>Definition:</b>
1358     * A description of the search parameters and how it used
1359     * </p> 
1360         */
1361        public SearchParameter setDescription(StringDt theValue) {
1362                myDescription = theValue;
1363                return this;
1364        }
1365        
1366        
1367
1368        /**
1369         * Sets the value for <b>description</b> ()
1370         *
1371     * <p>
1372     * <b>Definition:</b>
1373     * A description of the search parameters and how it used
1374     * </p> 
1375         */
1376        public SearchParameter setDescription( String theString) {
1377                myDescription = new StringDt(theString); 
1378                return this; 
1379        }
1380
1381 
1382        /**
1383         * Gets the value(s) for <b>xpath</b> ().
1384         * creating it if it does
1385         * not exist. Will not return <code>null</code>.
1386         *
1387     * <p>
1388     * <b>Definition:</b>
1389     * An XPath expression that returns a set of elements for the search parameter
1390     * </p> 
1391         */
1392        public StringDt getXpathElement() {  
1393                if (myXpath == null) {
1394                        myXpath = new StringDt();
1395                }
1396                return myXpath;
1397        }
1398
1399        
1400        /**
1401         * Gets the value(s) for <b>xpath</b> ().
1402         * creating it if it does
1403         * not exist. Will not return <code>null</code>.
1404         *
1405     * <p>
1406     * <b>Definition:</b>
1407     * An XPath expression that returns a set of elements for the search parameter
1408     * </p> 
1409         */
1410        public String getXpath() {  
1411                return getXpathElement().getValue();
1412        }
1413
1414        /**
1415         * Sets the value(s) for <b>xpath</b> ()
1416         *
1417     * <p>
1418     * <b>Definition:</b>
1419     * An XPath expression that returns a set of elements for the search parameter
1420     * </p> 
1421         */
1422        public SearchParameter setXpath(StringDt theValue) {
1423                myXpath = theValue;
1424                return this;
1425        }
1426        
1427        
1428
1429        /**
1430         * Sets the value for <b>xpath</b> ()
1431         *
1432     * <p>
1433     * <b>Definition:</b>
1434     * An XPath expression that returns a set of elements for the search parameter
1435     * </p> 
1436         */
1437        public SearchParameter setXpath( String theString) {
1438                myXpath = new StringDt(theString); 
1439                return this; 
1440        }
1441
1442 
1443        /**
1444         * Gets the value(s) for <b>xpathUsage</b> ().
1445         * creating it if it does
1446         * not exist. Will not return <code>null</code>.
1447         *
1448     * <p>
1449     * <b>Definition:</b>
1450     * How the search parameter relates to the set of elements returned by evaluating the xpath query
1451     * </p> 
1452         */
1453        public BoundCodeDt<XPathUsageTypeEnum> getXpathUsageElement() {  
1454                if (myXpathUsage == null) {
1455                        myXpathUsage = new BoundCodeDt<XPathUsageTypeEnum>(XPathUsageTypeEnum.VALUESET_BINDER);
1456                }
1457                return myXpathUsage;
1458        }
1459
1460        
1461        /**
1462         * Gets the value(s) for <b>xpathUsage</b> ().
1463         * creating it if it does
1464         * not exist. Will not return <code>null</code>.
1465         *
1466     * <p>
1467     * <b>Definition:</b>
1468     * How the search parameter relates to the set of elements returned by evaluating the xpath query
1469     * </p> 
1470         */
1471        public String getXpathUsage() {  
1472                return getXpathUsageElement().getValue();
1473        }
1474
1475        /**
1476         * Sets the value(s) for <b>xpathUsage</b> ()
1477         *
1478     * <p>
1479     * <b>Definition:</b>
1480     * How the search parameter relates to the set of elements returned by evaluating the xpath query
1481     * </p> 
1482         */
1483        public SearchParameter setXpathUsage(BoundCodeDt<XPathUsageTypeEnum> theValue) {
1484                myXpathUsage = theValue;
1485                return this;
1486        }
1487        
1488        
1489
1490        /**
1491         * Sets the value(s) for <b>xpathUsage</b> ()
1492         *
1493     * <p>
1494     * <b>Definition:</b>
1495     * How the search parameter relates to the set of elements returned by evaluating the xpath query
1496     * </p> 
1497         */
1498        public SearchParameter setXpathUsage(XPathUsageTypeEnum theValue) {
1499                setXpathUsage(new BoundCodeDt<XPathUsageTypeEnum>(XPathUsageTypeEnum.VALUESET_BINDER, theValue));
1500                
1501/*
1502                getXpathUsageElement().setValueAsEnum(theValue);
1503*/
1504                return this;
1505        }
1506
1507  
1508        /**
1509         * Gets the value(s) for <b>target</b> ().
1510         * creating it if it does
1511         * not exist. Will not return <code>null</code>.
1512         *
1513     * <p>
1514     * <b>Definition:</b>
1515     * Types of resource (if a resource is referenced)
1516     * </p> 
1517         */
1518        public java.util.List<BoundCodeDt<ResourceTypeEnum>> getTarget() {  
1519                if (myTarget == null) {
1520                        myTarget = new java.util.ArrayList<BoundCodeDt<ResourceTypeEnum>>();
1521                }
1522                return myTarget;
1523        }
1524
1525        /**
1526         * Sets the value(s) for <b>target</b> ()
1527         *
1528     * <p>
1529     * <b>Definition:</b>
1530     * Types of resource (if a resource is referenced)
1531     * </p> 
1532         */
1533        public SearchParameter setTarget(java.util.List<BoundCodeDt<ResourceTypeEnum>> theValue) {
1534                myTarget = theValue;
1535                return this;
1536        }
1537        
1538        
1539
1540        /**
1541         * Add a value for <b>target</b> () using an enumerated type. This
1542         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1543         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1544         * you may also use the {@link #addTarget()} method.
1545         *
1546     * <p>
1547     * <b>Definition:</b>
1548     * Types of resource (if a resource is referenced)
1549     * </p> 
1550         */
1551        public BoundCodeDt<ResourceTypeEnum> addTarget(ResourceTypeEnum theValue) {
1552                BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER, theValue);
1553                getTarget().add(retVal);
1554                return retVal;
1555        }
1556
1557        /**
1558         * Gets the first repetition for <b>target</b> (),
1559         * creating it if it does not already exist.
1560         *
1561     * <p>
1562     * <b>Definition:</b>
1563     * Types of resource (if a resource is referenced)
1564     * </p> 
1565         */
1566        public BoundCodeDt<ResourceTypeEnum> getTargetFirstRep() {
1567                if (getTarget().size() == 0) {
1568                        addTarget();
1569                }
1570                return getTarget().get(0);
1571        }
1572
1573        /**
1574         * Add a value for <b>target</b> ()
1575         *
1576     * <p>
1577     * <b>Definition:</b>
1578     * Types of resource (if a resource is referenced)
1579     * </p> 
1580         */
1581        public BoundCodeDt<ResourceTypeEnum> addTarget() {
1582                BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER);
1583                getTarget().add(retVal);
1584                return retVal;
1585        }
1586
1587        /**
1588         * Sets the value(s), and clears any existing value(s) for <b>target</b> ()
1589         *
1590     * <p>
1591     * <b>Definition:</b>
1592     * Types of resource (if a resource is referenced)
1593     * </p> 
1594         */
1595        public SearchParameter setTarget(ResourceTypeEnum theValue) {
1596                getTarget().clear();
1597                addTarget(theValue);
1598                return this;
1599        }
1600
1601  
1602        /**
1603         * Block class for child element: <b>SearchParameter.contact</b> ()
1604         *
1605     * <p>
1606     * <b>Definition:</b>
1607     * Contacts to assist a user in finding and communicating with the publisher
1608     * </p> 
1609         */
1610        @Block()        
1611        public static class Contact 
1612            extends  BaseIdentifiableElement        implements IResourceBlock {
1613        
1614        @Child(name="name", type=StringDt.class, order=0, min=0, max=1, summary=true, modifier=false)   
1615        @Description(
1616                shortDefinition="",
1617                formalDefinition="The name of an individual to contact regarding the search parameter"
1618        )
1619        private StringDt myName;
1620        
1621        @Child(name="telecom", type=ContactPointDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1622        @Description(
1623                shortDefinition="",
1624                formalDefinition="Contact details for individual (if a name was provided) or the publisher"
1625        )
1626        private java.util.List<ContactPointDt> myTelecom;
1627        
1628
1629        @Override
1630        public boolean isEmpty() {
1631                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myTelecom);
1632        }
1633        
1634        @Override
1635        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1636                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myTelecom);
1637        }
1638
1639        /**
1640         * Gets the value(s) for <b>name</b> ().
1641         * creating it if it does
1642         * not exist. Will not return <code>null</code>.
1643         *
1644     * <p>
1645     * <b>Definition:</b>
1646     * The name of an individual to contact regarding the search parameter
1647     * </p> 
1648         */
1649        public StringDt getNameElement() {  
1650                if (myName == null) {
1651                        myName = new StringDt();
1652                }
1653                return myName;
1654        }
1655
1656        
1657        /**
1658         * Gets the value(s) for <b>name</b> ().
1659         * creating it if it does
1660         * not exist. Will not return <code>null</code>.
1661         *
1662     * <p>
1663     * <b>Definition:</b>
1664     * The name of an individual to contact regarding the search parameter
1665     * </p> 
1666         */
1667        public String getName() {  
1668                return getNameElement().getValue();
1669        }
1670
1671        /**
1672         * Sets the value(s) for <b>name</b> ()
1673         *
1674     * <p>
1675     * <b>Definition:</b>
1676     * The name of an individual to contact regarding the search parameter
1677     * </p> 
1678         */
1679        public Contact setName(StringDt theValue) {
1680                myName = theValue;
1681                return this;
1682        }
1683        
1684        
1685
1686        /**
1687         * Sets the value for <b>name</b> ()
1688         *
1689     * <p>
1690     * <b>Definition:</b>
1691     * The name of an individual to contact regarding the search parameter
1692     * </p> 
1693         */
1694        public Contact setName( String theString) {
1695                myName = new StringDt(theString); 
1696                return this; 
1697        }
1698
1699 
1700        /**
1701         * Gets the value(s) for <b>telecom</b> ().
1702         * creating it if it does
1703         * not exist. Will not return <code>null</code>.
1704         *
1705     * <p>
1706     * <b>Definition:</b>
1707     * Contact details for individual (if a name was provided) or the publisher
1708     * </p> 
1709         */
1710        public java.util.List<ContactPointDt> getTelecom() {  
1711                if (myTelecom == null) {
1712                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1713                }
1714                return myTelecom;
1715        }
1716
1717        /**
1718         * Sets the value(s) for <b>telecom</b> ()
1719         *
1720     * <p>
1721     * <b>Definition:</b>
1722     * Contact details for individual (if a name was provided) or the publisher
1723     * </p> 
1724         */
1725        public Contact setTelecom(java.util.List<ContactPointDt> theValue) {
1726                myTelecom = theValue;
1727                return this;
1728        }
1729        
1730        
1731
1732        /**
1733         * Adds and returns a new value for <b>telecom</b> ()
1734         *
1735     * <p>
1736     * <b>Definition:</b>
1737     * Contact details for individual (if a name was provided) or the publisher
1738     * </p> 
1739         */
1740        public ContactPointDt addTelecom() {
1741                ContactPointDt newType = new ContactPointDt();
1742                getTelecom().add(newType);
1743                return newType; 
1744        }
1745
1746        /**
1747         * Adds a given new value for <b>telecom</b> ()
1748         *
1749         * <p>
1750         * <b>Definition:</b>
1751         * Contact details for individual (if a name was provided) or the publisher
1752         * </p>
1753         * @param theValue The telecom to add (must not be <code>null</code>)
1754         */
1755        public Contact addTelecom(ContactPointDt theValue) {
1756                if (theValue == null) {
1757                        throw new NullPointerException("theValue must not be null");
1758                }
1759                getTelecom().add(theValue);
1760                return this;
1761        }
1762
1763        /**
1764         * Gets the first repetition for <b>telecom</b> (),
1765         * creating it if it does not already exist.
1766         *
1767     * <p>
1768     * <b>Definition:</b>
1769     * Contact details for individual (if a name was provided) or the publisher
1770     * </p> 
1771         */
1772        public ContactPointDt getTelecomFirstRep() {
1773                if (getTelecom().isEmpty()) {
1774                        return addTelecom();
1775                }
1776                return getTelecom().get(0); 
1777        }
1778  
1779
1780
1781        }
1782
1783
1784
1785
1786    @Override
1787    public String getResourceName() {
1788        return "SearchParameter";
1789    }
1790    
1791    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1792        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1793    }
1794
1795
1796}