001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
043import ca.uhn.fhir.model.dstu2.resource.Appointment;
044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
057import ca.uhn.fhir.model.dstu2.resource.BodySite;
058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
059import ca.uhn.fhir.model.dstu2.resource.CarePlan;
060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
063import ca.uhn.fhir.model.dstu2.resource.Claim;
064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
069import ca.uhn.fhir.model.dstu2.composite.CodingDt;
070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
073import ca.uhn.fhir.model.dstu2.resource.Composition;
074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
077import ca.uhn.fhir.model.dstu2.resource.Condition;
078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
082import ca.uhn.fhir.model.dstu2.resource.Conformance;
083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
088import ca.uhn.fhir.model.dstu2.resource.Contract;
089import ca.uhn.fhir.model.dstu2.resource.Coverage;
090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
093import ca.uhn.fhir.model.dstu2.resource.Device;
094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
112import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
117import ca.uhn.fhir.model.dstu2.resource.Encounter;
118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
129import ca.uhn.fhir.model.dstu2.resource.Goal;
130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
132import ca.uhn.fhir.model.dstu2.resource.Group;
133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
138import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
145import ca.uhn.fhir.model.dstu2.resource.Immunization;
146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
154import ca.uhn.fhir.model.dstu2.resource.Location;
155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
160import ca.uhn.fhir.model.dstu2.resource.Media;
161import ca.uhn.fhir.model.dstu2.resource.Medication;
162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
171import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
177import ca.uhn.fhir.model.dstu2.resource.Observation;
178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
184import ca.uhn.fhir.model.dstu2.resource.Order;
185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.Organization;
187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
191import ca.uhn.fhir.model.dstu2.resource.Patient;
192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
193import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
194import ca.uhn.fhir.model.dstu2.resource.Person;
195import ca.uhn.fhir.model.dstu2.resource.Practitioner;
196import ca.uhn.fhir.model.dstu2.resource.Procedure;
197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
203import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
204import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
208import ca.uhn.fhir.model.dstu2.composite.RangeDt;
209import ca.uhn.fhir.model.dstu2.composite.RatioDt;
210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
223import ca.uhn.fhir.model.dstu2.resource.Schedule;
224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
228import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
229import ca.uhn.fhir.model.dstu2.resource.Slot;
230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.Specimen;
232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
237import ca.uhn.fhir.model.dstu2.resource.Substance;
238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
243import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
244import ca.uhn.fhir.model.dstu2.composite.TimingDt;
245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
249import ca.uhn.fhir.model.dstu2.resource.ValueSet;
250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
254import ca.uhn.fhir.model.api.IResource;
255import ca.uhn.fhir.model.dstu2.composite.AgeDt;
256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
257import ca.uhn.fhir.model.dstu2.composite.DurationDt;
258import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
262import ca.uhn.fhir.model.primitive.Base64BinaryDt;
263import ca.uhn.fhir.model.primitive.BooleanDt;
264import ca.uhn.fhir.model.primitive.BoundCodeDt;
265import ca.uhn.fhir.model.primitive.CodeDt;
266import ca.uhn.fhir.model.primitive.DateDt;
267import ca.uhn.fhir.model.primitive.DateTimeDt;
268import ca.uhn.fhir.model.primitive.DecimalDt;
269import ca.uhn.fhir.model.primitive.IdDt;
270import ca.uhn.fhir.model.primitive.InstantDt;
271import ca.uhn.fhir.model.primitive.IntegerDt;
272import ca.uhn.fhir.model.primitive.OidDt;
273import ca.uhn.fhir.model.primitive.PositiveIntDt;
274import ca.uhn.fhir.model.primitive.StringDt;
275import ca.uhn.fhir.model.primitive.TimeDt;
276import ca.uhn.fhir.model.primitive.UnsignedIntDt;
277import ca.uhn.fhir.model.primitive.UriDt;
278
279
280/**
281 * HAPI/FHIR <b>Basic</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * Need some way to safely (without breaking interoperability) allow implementers to exchange content not supported by the initial set of declared resources.
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Basic">http://hl7.org/fhir/profiles/Basic</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Basic", profile="http://hl7.org/fhir/profiles/Basic", id="basic")
301public class Basic extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>subject</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>reference</b><br>
310         * Path: <b>Basic.subject</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="subject", path="Basic.subject", description="", type="reference" 
314 )
315        public static final String SP_SUBJECT = "subject";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>reference</b><br>
322         * Path: <b>Basic.subject</b><br>
323         * </p>
324         */
325        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
326
327        /**
328         * Search parameter constant for <b>created</b>
329         * <p>
330         * Description: <b></b><br>
331         * Type: <b>date</b><br>
332         * Path: <b>Basic.created</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="created", path="Basic.created", description="", type="date" 
336 )
337        public static final String SP_CREATED = "created";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>created</b>
341         * <p>
342         * Description: <b></b><br>
343         * Type: <b>date</b><br>
344         * Path: <b>Basic.created</b><br>
345         * </p>
346         */
347        public static final DateClientParam CREATED = new DateClientParam(SP_CREATED);
348
349        /**
350         * Search parameter constant for <b>code</b>
351         * <p>
352         * Description: <b></b><br>
353         * Type: <b>token</b><br>
354         * Path: <b>Basic.code</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="code", path="Basic.code", description="", type="token" 
358 )
359        public static final String SP_CODE = "code";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>code</b>
363         * <p>
364         * Description: <b></b><br>
365         * Type: <b>token</b><br>
366         * Path: <b>Basic.code</b><br>
367         * </p>
368         */
369        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
370
371        /**
372         * Search parameter constant for <b>patient</b>
373         * <p>
374         * Description: <b></b><br>
375         * Type: <b>reference</b><br>
376         * Path: <b>Basic.subject</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="patient", path="Basic.subject", description="", type="reference" 
380, providesMembershipIn={
381 @Compartment(name="Patient")   }
382, target={
383 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
384 )
385        public static final String SP_PATIENT = "patient";
386
387        /**
388         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
389         * <p>
390         * Description: <b></b><br>
391         * Type: <b>reference</b><br>
392         * Path: <b>Basic.subject</b><br>
393         * </p>
394         */
395        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
396
397        /**
398         * Search parameter constant for <b>author</b>
399         * <p>
400         * Description: <b></b><br>
401         * Type: <b>reference</b><br>
402         * Path: <b>Basic.author</b><br>
403         * </p>
404         */
405        @SearchParamDefinition(name="author", path="Basic.author", description="", type="reference" 
406, providesMembershipIn={
407 @Compartment(name="Patient") ,  @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson")   }
408 )
409        public static final String SP_AUTHOR = "author";
410
411        /**
412         * <b>Fluent Client</b> search parameter constant for <b>author</b>
413         * <p>
414         * Description: <b></b><br>
415         * Type: <b>reference</b><br>
416         * Path: <b>Basic.author</b><br>
417         * </p>
418         */
419        public static final ReferenceClientParam AUTHOR = new ReferenceClientParam(SP_AUTHOR);
420
421        /**
422         * Search parameter constant for <b>identifier</b>
423         * <p>
424         * Description: <b></b><br>
425         * Type: <b>token</b><br>
426         * Path: <b>Basic.identifier</b><br>
427         * </p>
428         */
429        @SearchParamDefinition(name="identifier", path="Basic.identifier", description="", type="token" 
430 )
431        public static final String SP_IDENTIFIER = "identifier";
432
433        /**
434         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
435         * <p>
436         * Description: <b></b><br>
437         * Type: <b>token</b><br>
438         * Path: <b>Basic.identifier</b><br>
439         * </p>
440         */
441        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
442
443
444        /**
445         * Constant for fluent queries to be used to add include statements. Specifies
446         * the path value of "<b>Basic:author</b>".
447         */
448        public static final Include INCLUDE_AUTHOR = new Include("Basic:author");
449
450        /**
451         * Constant for fluent queries to be used to add include statements. Specifies
452         * the path value of "<b>Basic:patient</b>".
453         */
454        public static final Include INCLUDE_PATIENT = new Include("Basic:patient");
455
456        /**
457         * Constant for fluent queries to be used to add include statements. Specifies
458         * the path value of "<b>Basic:subject</b>".
459         */
460        public static final Include INCLUDE_SUBJECT = new Include("Basic:subject");
461
462
463        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
464        @Description(
465                shortDefinition="",
466                formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR"
467        )
468        private java.util.List<IdentifierDt> myIdentifier;
469        
470        @Child(name="code", type=CodeableConceptDt.class, order=1, min=1, max=1, summary=false, modifier=true)  
471        @Description(
472                shortDefinition="",
473                formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources."
474        )
475        private CodeableConceptDt myCode;
476        
477        @Child(name="subject", order=2, min=0, max=1, summary=false, modifier=false, type={
478                IResource.class
479        })
480        @Description(
481                shortDefinition="",
482                formalDefinition="Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resource."
483        )
484        private ResourceReferenceDt mySubject;
485        
486        @Child(name="author", order=3, min=0, max=1, summary=false, modifier=false, type={
487                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
488                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
489                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
490        })
491        @Description(
492                shortDefinition="",
493                formalDefinition="Indicates who was responsible for creating the resource instance"
494        )
495        private ResourceReferenceDt myAuthor;
496        
497        @Child(name="created", type=DateDt.class, order=4, min=0, max=1, summary=false, modifier=false) 
498        @Description(
499                shortDefinition="",
500                formalDefinition="Identifies when the resource was first created"
501        )
502        private DateDt myCreated;
503        
504
505        @Override
506        public boolean isEmpty() {
507                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myCode,  mySubject,  myAuthor,  myCreated);
508        }
509        
510        @Override
511        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
512                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCode, mySubject, myAuthor, myCreated);
513        }
514
515        /**
516         * Gets the value(s) for <b>identifier</b> ().
517         * creating it if it does
518         * not exist. Will not return <code>null</code>.
519         *
520     * <p>
521     * <b>Definition:</b>
522     * Identifier assigned to the resource for business purposes, outside the context of FHIR
523     * </p> 
524         */
525        public java.util.List<IdentifierDt> getIdentifier() {  
526                if (myIdentifier == null) {
527                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
528                }
529                return myIdentifier;
530        }
531
532        /**
533         * Sets the value(s) for <b>identifier</b> ()
534         *
535     * <p>
536     * <b>Definition:</b>
537     * Identifier assigned to the resource for business purposes, outside the context of FHIR
538     * </p> 
539         */
540        public Basic setIdentifier(java.util.List<IdentifierDt> theValue) {
541                myIdentifier = theValue;
542                return this;
543        }
544        
545        
546
547        /**
548         * Adds and returns a new value for <b>identifier</b> ()
549         *
550     * <p>
551     * <b>Definition:</b>
552     * Identifier assigned to the resource for business purposes, outside the context of FHIR
553     * </p> 
554         */
555        public IdentifierDt addIdentifier() {
556                IdentifierDt newType = new IdentifierDt();
557                getIdentifier().add(newType);
558                return newType; 
559        }
560
561        /**
562         * Adds a given new value for <b>identifier</b> ()
563         *
564         * <p>
565         * <b>Definition:</b>
566         * Identifier assigned to the resource for business purposes, outside the context of FHIR
567         * </p>
568         * @param theValue The identifier to add (must not be <code>null</code>)
569         */
570        public Basic addIdentifier(IdentifierDt theValue) {
571                if (theValue == null) {
572                        throw new NullPointerException("theValue must not be null");
573                }
574                getIdentifier().add(theValue);
575                return this;
576        }
577
578        /**
579         * Gets the first repetition for <b>identifier</b> (),
580         * creating it if it does not already exist.
581         *
582     * <p>
583     * <b>Definition:</b>
584     * Identifier assigned to the resource for business purposes, outside the context of FHIR
585     * </p> 
586         */
587        public IdentifierDt getIdentifierFirstRep() {
588                if (getIdentifier().isEmpty()) {
589                        return addIdentifier();
590                }
591                return getIdentifier().get(0); 
592        }
593  
594        /**
595         * Gets the value(s) for <b>code</b> ().
596         * creating it if it does
597         * not exist. Will not return <code>null</code>.
598         *
599     * <p>
600     * <b>Definition:</b>
601     * Identifies the 'type' of resource - equivalent to the resource name for other resources.
602     * </p> 
603         */
604        public CodeableConceptDt getCode() {  
605                if (myCode == null) {
606                        myCode = new CodeableConceptDt();
607                }
608                return myCode;
609        }
610
611        /**
612         * Sets the value(s) for <b>code</b> ()
613         *
614     * <p>
615     * <b>Definition:</b>
616     * Identifies the 'type' of resource - equivalent to the resource name for other resources.
617     * </p> 
618         */
619        public Basic setCode(CodeableConceptDt theValue) {
620                myCode = theValue;
621                return this;
622        }
623        
624        
625
626  
627        /**
628         * Gets the value(s) for <b>subject</b> ().
629         * creating it if it does
630         * not exist. Will not return <code>null</code>.
631         *
632     * <p>
633     * <b>Definition:</b>
634     * Identifies the patient, practitioner, device or any other resource that is the \&quot;focus\&quot; of this resource.
635     * </p> 
636         */
637        public ResourceReferenceDt getSubject() {  
638                if (mySubject == null) {
639                        mySubject = new ResourceReferenceDt();
640                }
641                return mySubject;
642        }
643
644        /**
645         * Sets the value(s) for <b>subject</b> ()
646         *
647     * <p>
648     * <b>Definition:</b>
649     * Identifies the patient, practitioner, device or any other resource that is the \&quot;focus\&quot; of this resource.
650     * </p> 
651         */
652        public Basic setSubject(ResourceReferenceDt theValue) {
653                mySubject = theValue;
654                return this;
655        }
656        
657        
658
659  
660        /**
661         * Gets the value(s) for <b>author</b> ().
662         * creating it if it does
663         * not exist. Will not return <code>null</code>.
664         *
665     * <p>
666     * <b>Definition:</b>
667     * Indicates who was responsible for creating the resource instance
668     * </p> 
669         */
670        public ResourceReferenceDt getAuthor() {  
671                if (myAuthor == null) {
672                        myAuthor = new ResourceReferenceDt();
673                }
674                return myAuthor;
675        }
676
677        /**
678         * Sets the value(s) for <b>author</b> ()
679         *
680     * <p>
681     * <b>Definition:</b>
682     * Indicates who was responsible for creating the resource instance
683     * </p> 
684         */
685        public Basic setAuthor(ResourceReferenceDt theValue) {
686                myAuthor = theValue;
687                return this;
688        }
689        
690        
691
692  
693        /**
694         * Gets the value(s) for <b>created</b> ().
695         * creating it if it does
696         * not exist. Will not return <code>null</code>.
697         *
698     * <p>
699     * <b>Definition:</b>
700     * Identifies when the resource was first created
701     * </p> 
702         */
703        public DateDt getCreatedElement() {  
704                if (myCreated == null) {
705                        myCreated = new DateDt();
706                }
707                return myCreated;
708        }
709
710        
711        /**
712         * Gets the value(s) for <b>created</b> ().
713         * creating it if it does
714         * not exist. This method may return <code>null</code>.
715         *
716     * <p>
717     * <b>Definition:</b>
718     * Identifies when the resource was first created
719     * </p> 
720         */
721        public Date getCreated() {  
722                return getCreatedElement().getValue();
723        }
724
725        /**
726         * Sets the value(s) for <b>created</b> ()
727         *
728     * <p>
729     * <b>Definition:</b>
730     * Identifies when the resource was first created
731     * </p> 
732         */
733        public Basic setCreated(DateDt theValue) {
734                myCreated = theValue;
735                return this;
736        }
737        
738        
739
740        /**
741         * Sets the value for <b>created</b> ()
742         *
743     * <p>
744     * <b>Definition:</b>
745     * Identifies when the resource was first created
746     * </p> 
747         */
748        public Basic setCreatedWithDayPrecision( Date theDate) {
749                myCreated = new DateDt(theDate); 
750                return this; 
751        }
752
753        /**
754         * Sets the value for <b>created</b> ()
755         *
756     * <p>
757     * <b>Definition:</b>
758     * Identifies when the resource was first created
759     * </p> 
760         */
761        public Basic setCreated( Date theDate,  TemporalPrecisionEnum thePrecision) {
762                myCreated = new DateDt(theDate, thePrecision); 
763                return this; 
764        }
765
766 
767
768
769    @Override
770    public String getResourceName() {
771        return "Basic";
772    }
773    
774    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
775        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
776    }
777
778
779}