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>Person</b> Resource
282 * (administrative.entity)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Demographics and administrative information about a person independent of a specific health-related context.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * Need to track persons potentially across multiple roles
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Person">http://hl7.org/fhir/profiles/Person</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Person", profile="http://hl7.org/fhir/profiles/Person", id="person")
301public class Person extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>identifier</b>
307         * <p>
308         * Description: <b>A person Identifier</b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>Person.identifier</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" 
314 )
315        public static final String SP_IDENTIFIER = "identifier";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
319         * <p>
320         * Description: <b>A person Identifier</b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>Person.identifier</b><br>
323         * </p>
324         */
325        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
326
327        /**
328         * Search parameter constant for <b>name</b>
329         * <p>
330         * Description: <b>A portion of name in any name part</b><br>
331         * Type: <b>string</b><br>
332         * Path: <b>Person.name</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" 
336 )
337        public static final String SP_NAME = "name";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>name</b>
341         * <p>
342         * Description: <b>A portion of name in any name part</b><br>
343         * Type: <b>string</b><br>
344         * Path: <b>Person.name</b><br>
345         * </p>
346         */
347        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
348
349        /**
350         * Search parameter constant for <b>phonetic</b>
351         * <p>
352         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
353         * Type: <b>string</b><br>
354         * Path: <b>Person.name</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="phonetic", path="Person.name", description="A portion of name using some kind of phonetic matching algorithm", type="string" 
358 )
359        public static final String SP_PHONETIC = "phonetic";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
363         * <p>
364         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
365         * Type: <b>string</b><br>
366         * Path: <b>Person.name</b><br>
367         * </p>
368         */
369        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
370
371        /**
372         * Search parameter constant for <b>telecom</b>
373         * <p>
374         * Description: <b>The value in any kind of contact</b><br>
375         * Type: <b>token</b><br>
376         * Path: <b>Person.telecom</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="token" 
380 )
381        public static final String SP_TELECOM = "telecom";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
385         * <p>
386         * Description: <b>The value in any kind of contact</b><br>
387         * Type: <b>token</b><br>
388         * Path: <b>Person.telecom</b><br>
389         * </p>
390         */
391        public static final TokenClientParam TELECOM = new TokenClientParam(SP_TELECOM);
392
393        /**
394         * Search parameter constant for <b>phone</b>
395         * <p>
396         * Description: <b>A value in a phone contact</b><br>
397         * Type: <b>token</b><br>
398         * Path: <b>Person.telecom(system=phone)</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="phone", path="Person.telecom(system=phone)", description="A value in a phone contact", type="token" 
402 )
403        public static final String SP_PHONE = "phone";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>phone</b>
407         * <p>
408         * Description: <b>A value in a phone contact</b><br>
409         * Type: <b>token</b><br>
410         * Path: <b>Person.telecom(system=phone)</b><br>
411         * </p>
412         */
413        public static final TokenClientParam PHONE = new TokenClientParam(SP_PHONE);
414
415        /**
416         * Search parameter constant for <b>email</b>
417         * <p>
418         * Description: <b>A value in an email contact</b><br>
419         * Type: <b>token</b><br>
420         * Path: <b>Person.telecom(system=email)</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="email", path="Person.telecom(system=email)", description="A value in an email contact", type="token" 
424 )
425        public static final String SP_EMAIL = "email";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>email</b>
429         * <p>
430         * Description: <b>A value in an email contact</b><br>
431         * Type: <b>token</b><br>
432         * Path: <b>Person.telecom(system=email)</b><br>
433         * </p>
434         */
435        public static final TokenClientParam EMAIL = new TokenClientParam(SP_EMAIL);
436
437        /**
438         * Search parameter constant for <b>address</b>
439         * <p>
440         * Description: <b>An address in any kind of address/part</b><br>
441         * Type: <b>string</b><br>
442         * Path: <b>Person.address</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="address", path="Person.address", description="An address in any kind of address/part", type="string" 
446 )
447        public static final String SP_ADDRESS = "address";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>address</b>
451         * <p>
452         * Description: <b>An address in any kind of address/part</b><br>
453         * Type: <b>string</b><br>
454         * Path: <b>Person.address</b><br>
455         * </p>
456         */
457        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
458
459        /**
460         * Search parameter constant for <b>address-city</b>
461         * <p>
462         * Description: <b>A city specified in an address</b><br>
463         * Type: <b>string</b><br>
464         * Path: <b>Person.address.city</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="address-city", path="Person.address.city", description="A city specified in an address", type="string" 
468 )
469        public static final String SP_ADDRESS_CITY = "address-city";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
473         * <p>
474         * Description: <b>A city specified in an address</b><br>
475         * Type: <b>string</b><br>
476         * Path: <b>Person.address.city</b><br>
477         * </p>
478         */
479        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
480
481        /**
482         * Search parameter constant for <b>address-state</b>
483         * <p>
484         * Description: <b>A state specified in an address</b><br>
485         * Type: <b>string</b><br>
486         * Path: <b>Person.address.state</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="address-state", path="Person.address.state", description="A state specified in an address", type="string" 
490 )
491        public static final String SP_ADDRESS_STATE = "address-state";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
495         * <p>
496         * Description: <b>A state specified in an address</b><br>
497         * Type: <b>string</b><br>
498         * Path: <b>Person.address.state</b><br>
499         * </p>
500         */
501        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
502
503        /**
504         * Search parameter constant for <b>address-postalcode</b>
505         * <p>
506         * Description: <b>A postal code specified in an address</b><br>
507         * Type: <b>string</b><br>
508         * Path: <b>Person.address.postalCode</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="address-postalcode", path="Person.address.postalCode", description="A postal code specified in an address", type="string" 
512 )
513        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
517         * <p>
518         * Description: <b>A postal code specified in an address</b><br>
519         * Type: <b>string</b><br>
520         * Path: <b>Person.address.postalCode</b><br>
521         * </p>
522         */
523        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
524
525        /**
526         * Search parameter constant for <b>address-country</b>
527         * <p>
528         * Description: <b>A country specified in an address</b><br>
529         * Type: <b>string</b><br>
530         * Path: <b>Person.address.country</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="address-country", path="Person.address.country", description="A country specified in an address", type="string" 
534 )
535        public static final String SP_ADDRESS_COUNTRY = "address-country";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
539         * <p>
540         * Description: <b>A country specified in an address</b><br>
541         * Type: <b>string</b><br>
542         * Path: <b>Person.address.country</b><br>
543         * </p>
544         */
545        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
546
547        /**
548         * Search parameter constant for <b>address-use</b>
549         * <p>
550         * Description: <b>A use code specified in an address</b><br>
551         * Type: <b>token</b><br>
552         * Path: <b>Person.address.use</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="address-use", path="Person.address.use", description="A use code specified in an address", type="token" 
556 )
557        public static final String SP_ADDRESS_USE = "address-use";
558
559        /**
560         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
561         * <p>
562         * Description: <b>A use code specified in an address</b><br>
563         * Type: <b>token</b><br>
564         * Path: <b>Person.address.use</b><br>
565         * </p>
566         */
567        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
568
569        /**
570         * Search parameter constant for <b>gender</b>
571         * <p>
572         * Description: <b>The gender of the person</b><br>
573         * Type: <b>token</b><br>
574         * Path: <b>Person.gender</b><br>
575         * </p>
576         */
577        @SearchParamDefinition(name="gender", path="Person.gender", description="The gender of the person", type="token" 
578 )
579        public static final String SP_GENDER = "gender";
580
581        /**
582         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
583         * <p>
584         * Description: <b>The gender of the person</b><br>
585         * Type: <b>token</b><br>
586         * Path: <b>Person.gender</b><br>
587         * </p>
588         */
589        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
590
591        /**
592         * Search parameter constant for <b>birthdate</b>
593         * <p>
594         * Description: <b>The person's date of birth</b><br>
595         * Type: <b>date</b><br>
596         * Path: <b>Person.birthDate</b><br>
597         * </p>
598         */
599        @SearchParamDefinition(name="birthdate", path="Person.birthDate", description="The person's date of birth", type="date" 
600 )
601        public static final String SP_BIRTHDATE = "birthdate";
602
603        /**
604         * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
605         * <p>
606         * Description: <b>The person's date of birth</b><br>
607         * Type: <b>date</b><br>
608         * Path: <b>Person.birthDate</b><br>
609         * </p>
610         */
611        public static final DateClientParam BIRTHDATE = new DateClientParam(SP_BIRTHDATE);
612
613        /**
614         * Search parameter constant for <b>organization</b>
615         * <p>
616         * Description: <b>The organization at which this person record is being managed</b><br>
617         * Type: <b>reference</b><br>
618         * Path: <b>Person.managingOrganization</b><br>
619         * </p>
620         */
621        @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" 
622 )
623        public static final String SP_ORGANIZATION = "organization";
624
625        /**
626         * <b>Fluent Client</b> search parameter constant for <b>organization</b>
627         * <p>
628         * Description: <b>The organization at which this person record is being managed</b><br>
629         * Type: <b>reference</b><br>
630         * Path: <b>Person.managingOrganization</b><br>
631         * </p>
632         */
633        public static final ReferenceClientParam ORGANIZATION = new ReferenceClientParam(SP_ORGANIZATION);
634
635        /**
636         * Search parameter constant for <b>link</b>
637         * <p>
638         * Description: <b>Any link has this Patient, Person, RelatedPerson or Practitioner reference</b><br>
639         * Type: <b>reference</b><br>
640         * Path: <b>Person.link.target</b><br>
641         * </p>
642         */
643        @SearchParamDefinition(name="link", path="Person.link.target", description="Any link has this Patient, Person, RelatedPerson or Practitioner reference", type="reference" 
644, providesMembershipIn={
645 @Compartment(name="Encounter")         }
646 )
647        public static final String SP_LINK = "link";
648
649        /**
650         * <b>Fluent Client</b> search parameter constant for <b>link</b>
651         * <p>
652         * Description: <b>Any link has this Patient, Person, RelatedPerson or Practitioner reference</b><br>
653         * Type: <b>reference</b><br>
654         * Path: <b>Person.link.target</b><br>
655         * </p>
656         */
657        public static final ReferenceClientParam LINK = new ReferenceClientParam(SP_LINK);
658
659        /**
660         * Search parameter constant for <b>patient</b>
661         * <p>
662         * Description: <b>The Person links to this Patient</b><br>
663         * Type: <b>reference</b><br>
664         * Path: <b>Person.link.target</b><br>
665         * </p>
666         */
667        @SearchParamDefinition(name="patient", path="Person.link.target", description="The Person links to this Patient", type="reference" 
668, providesMembershipIn={
669 @Compartment(name="Patient")   }
670, target={
671 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
672 )
673        public static final String SP_PATIENT = "patient";
674
675        /**
676         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
677         * <p>
678         * Description: <b>The Person links to this Patient</b><br>
679         * Type: <b>reference</b><br>
680         * Path: <b>Person.link.target</b><br>
681         * </p>
682         */
683        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
684
685        /**
686         * Search parameter constant for <b>practitioner</b>
687         * <p>
688         * Description: <b>The Person links to this Practitioner</b><br>
689         * Type: <b>reference</b><br>
690         * Path: <b>Person.link.target</b><br>
691         * </p>
692         */
693        @SearchParamDefinition(name="practitioner", path="Person.link.target", description="The Person links to this Practitioner", type="reference" 
694, providesMembershipIn={
695 @Compartment(name="RelatedPerson")     }
696, target={
697 ca.uhn.fhir.model.dstu2.resource.Practitioner.class    }
698 )
699        public static final String SP_PRACTITIONER = "practitioner";
700
701        /**
702         * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
703         * <p>
704         * Description: <b>The Person links to this Practitioner</b><br>
705         * Type: <b>reference</b><br>
706         * Path: <b>Person.link.target</b><br>
707         * </p>
708         */
709        public static final ReferenceClientParam PRACTITIONER = new ReferenceClientParam(SP_PRACTITIONER);
710
711        /**
712         * Search parameter constant for <b>relatedperson</b>
713         * <p>
714         * Description: <b>The Person links to this RelatedPerson</b><br>
715         * Type: <b>reference</b><br>
716         * Path: <b>Person.link.target</b><br>
717         * </p>
718         */
719        @SearchParamDefinition(name="relatedperson", path="Person.link.target", description="The Person links to this RelatedPerson", type="reference" 
720, target={
721 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class   }
722 )
723        public static final String SP_RELATEDPERSON = "relatedperson";
724
725        /**
726         * <b>Fluent Client</b> search parameter constant for <b>relatedperson</b>
727         * <p>
728         * Description: <b>The Person links to this RelatedPerson</b><br>
729         * Type: <b>reference</b><br>
730         * Path: <b>Person.link.target</b><br>
731         * </p>
732         */
733        public static final ReferenceClientParam RELATEDPERSON = new ReferenceClientParam(SP_RELATEDPERSON);
734
735
736        /**
737         * Constant for fluent queries to be used to add include statements. Specifies
738         * the path value of "<b>Person:link</b>".
739         */
740        public static final Include INCLUDE_LINK = new Include("Person:link");
741
742        /**
743         * Constant for fluent queries to be used to add include statements. Specifies
744         * the path value of "<b>Person:organization</b>".
745         */
746        public static final Include INCLUDE_ORGANIZATION = new Include("Person:organization");
747
748        /**
749         * Constant for fluent queries to be used to add include statements. Specifies
750         * the path value of "<b>Person:patient</b>".
751         */
752        public static final Include INCLUDE_PATIENT = new Include("Person:patient");
753
754        /**
755         * Constant for fluent queries to be used to add include statements. Specifies
756         * the path value of "<b>Person:practitioner</b>".
757         */
758        public static final Include INCLUDE_PRACTITIONER = new Include("Person:practitioner");
759
760        /**
761         * Constant for fluent queries to be used to add include statements. Specifies
762         * the path value of "<b>Person:relatedperson</b>".
763         */
764        public static final Include INCLUDE_RELATEDPERSON = new Include("Person:relatedperson");
765
766
767        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
768        @Description(
769                shortDefinition="id",
770                formalDefinition="Identifier for a person within a particular scope."
771        )
772        private java.util.List<IdentifierDt> myIdentifier;
773        
774        @Child(name="name", type=HumanNameDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)      
775        @Description(
776                shortDefinition="",
777                formalDefinition="A name associated with the person"
778        )
779        private java.util.List<HumanNameDt> myName;
780        
781        @Child(name="telecom", type=ContactPointDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
782        @Description(
783                shortDefinition="",
784                formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
785        )
786        private java.util.List<ContactPointDt> myTelecom;
787        
788        @Child(name="gender", type=CodeDt.class, order=3, min=0, max=1, summary=true, modifier=false)   
789        @Description(
790                shortDefinition="",
791                formalDefinition="Administrative Gender"
792        )
793        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/administrative-gender")
794        private BoundCodeDt<AdministrativeGenderEnum> myGender;
795        
796        @Child(name="birthDate", type=DateDt.class, order=4, min=0, max=1, summary=true, modifier=false)        
797        @Description(
798                shortDefinition="",
799                formalDefinition="The birth date for the person."
800        )
801        private DateDt myBirthDate;
802        
803        @Child(name="address", type=AddressDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
804        @Description(
805                shortDefinition="",
806                formalDefinition="One or more addresses for the person"
807        )
808        private java.util.List<AddressDt> myAddress;
809        
810        @Child(name="photo", type=AttachmentDt.class, order=6, min=0, max=1, summary=false, modifier=false)     
811        @Description(
812                shortDefinition="",
813                formalDefinition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual"
814        )
815        private AttachmentDt myPhoto;
816        
817        @Child(name="managingOrganization", order=7, min=0, max=1, summary=true, modifier=false, type={
818                ca.uhn.fhir.model.dstu2.resource.Organization.class
819        })
820        @Description(
821                shortDefinition="",
822                formalDefinition="The organization that is the custodian of the person record"
823        )
824        private ResourceReferenceDt myManagingOrganization;
825        
826        @Child(name="active", type=BooleanDt.class, order=8, min=0, max=1, summary=true, modifier=true) 
827        @Description(
828                shortDefinition="status",
829                formalDefinition="Whether this person's record is in active use"
830        )
831        private BooleanDt myActive;
832        
833        @Child(name="link", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
834        @Description(
835                shortDefinition="",
836                formalDefinition=""
837        )
838        private java.util.List<Link> myLink;
839        
840
841        @Override
842        public boolean isEmpty() {
843                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myName,  myTelecom,  myGender,  myBirthDate,  myAddress,  myPhoto,  myManagingOrganization,  myActive,  myLink);
844        }
845        
846        @Override
847        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
848                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myName, myTelecom, myGender, myBirthDate, myAddress, myPhoto, myManagingOrganization, myActive, myLink);
849        }
850
851        /**
852         * Gets the value(s) for <b>identifier</b> (id).
853         * creating it if it does
854         * not exist. Will not return <code>null</code>.
855         *
856     * <p>
857     * <b>Definition:</b>
858     * Identifier for a person within a particular scope.
859     * </p> 
860         */
861        public java.util.List<IdentifierDt> getIdentifier() {  
862                if (myIdentifier == null) {
863                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
864                }
865                return myIdentifier;
866        }
867
868        /**
869         * Sets the value(s) for <b>identifier</b> (id)
870         *
871     * <p>
872     * <b>Definition:</b>
873     * Identifier for a person within a particular scope.
874     * </p> 
875         */
876        public Person setIdentifier(java.util.List<IdentifierDt> theValue) {
877                myIdentifier = theValue;
878                return this;
879        }
880        
881        
882
883        /**
884         * Adds and returns a new value for <b>identifier</b> (id)
885         *
886     * <p>
887     * <b>Definition:</b>
888     * Identifier for a person within a particular scope.
889     * </p> 
890         */
891        public IdentifierDt addIdentifier() {
892                IdentifierDt newType = new IdentifierDt();
893                getIdentifier().add(newType);
894                return newType; 
895        }
896
897        /**
898         * Adds a given new value for <b>identifier</b> (id)
899         *
900         * <p>
901         * <b>Definition:</b>
902         * Identifier for a person within a particular scope.
903         * </p>
904         * @param theValue The identifier to add (must not be <code>null</code>)
905         */
906        public Person addIdentifier(IdentifierDt theValue) {
907                if (theValue == null) {
908                        throw new NullPointerException("theValue must not be null");
909                }
910                getIdentifier().add(theValue);
911                return this;
912        }
913
914        /**
915         * Gets the first repetition for <b>identifier</b> (id),
916         * creating it if it does not already exist.
917         *
918     * <p>
919     * <b>Definition:</b>
920     * Identifier for a person within a particular scope.
921     * </p> 
922         */
923        public IdentifierDt getIdentifierFirstRep() {
924                if (getIdentifier().isEmpty()) {
925                        return addIdentifier();
926                }
927                return getIdentifier().get(0); 
928        }
929  
930        /**
931         * Gets the value(s) for <b>name</b> ().
932         * creating it if it does
933         * not exist. Will not return <code>null</code>.
934         *
935     * <p>
936     * <b>Definition:</b>
937     * A name associated with the person
938     * </p> 
939         */
940        public java.util.List<HumanNameDt> getName() {  
941                if (myName == null) {
942                        myName = new java.util.ArrayList<HumanNameDt>();
943                }
944                return myName;
945        }
946
947        /**
948         * Sets the value(s) for <b>name</b> ()
949         *
950     * <p>
951     * <b>Definition:</b>
952     * A name associated with the person
953     * </p> 
954         */
955        public Person setName(java.util.List<HumanNameDt> theValue) {
956                myName = theValue;
957                return this;
958        }
959        
960        
961
962        /**
963         * Adds and returns a new value for <b>name</b> ()
964         *
965     * <p>
966     * <b>Definition:</b>
967     * A name associated with the person
968     * </p> 
969         */
970        public HumanNameDt addName() {
971                HumanNameDt newType = new HumanNameDt();
972                getName().add(newType);
973                return newType; 
974        }
975
976        /**
977         * Adds a given new value for <b>name</b> ()
978         *
979         * <p>
980         * <b>Definition:</b>
981         * A name associated with the person
982         * </p>
983         * @param theValue The name to add (must not be <code>null</code>)
984         */
985        public Person addName(HumanNameDt theValue) {
986                if (theValue == null) {
987                        throw new NullPointerException("theValue must not be null");
988                }
989                getName().add(theValue);
990                return this;
991        }
992
993        /**
994         * Gets the first repetition for <b>name</b> (),
995         * creating it if it does not already exist.
996         *
997     * <p>
998     * <b>Definition:</b>
999     * A name associated with the person
1000     * </p> 
1001         */
1002        public HumanNameDt getNameFirstRep() {
1003                if (getName().isEmpty()) {
1004                        return addName();
1005                }
1006                return getName().get(0); 
1007        }
1008  
1009        /**
1010         * Gets the value(s) for <b>telecom</b> ().
1011         * creating it if it does
1012         * not exist. Will not return <code>null</code>.
1013         *
1014     * <p>
1015     * <b>Definition:</b>
1016     * A contact detail for the person, e.g. a telephone number or an email address.
1017     * </p> 
1018         */
1019        public java.util.List<ContactPointDt> getTelecom() {  
1020                if (myTelecom == null) {
1021                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1022                }
1023                return myTelecom;
1024        }
1025
1026        /**
1027         * Sets the value(s) for <b>telecom</b> ()
1028         *
1029     * <p>
1030     * <b>Definition:</b>
1031     * A contact detail for the person, e.g. a telephone number or an email address.
1032     * </p> 
1033         */
1034        public Person setTelecom(java.util.List<ContactPointDt> theValue) {
1035                myTelecom = theValue;
1036                return this;
1037        }
1038        
1039        
1040
1041        /**
1042         * Adds and returns a new value for <b>telecom</b> ()
1043         *
1044     * <p>
1045     * <b>Definition:</b>
1046     * A contact detail for the person, e.g. a telephone number or an email address.
1047     * </p> 
1048         */
1049        public ContactPointDt addTelecom() {
1050                ContactPointDt newType = new ContactPointDt();
1051                getTelecom().add(newType);
1052                return newType; 
1053        }
1054
1055        /**
1056         * Adds a given new value for <b>telecom</b> ()
1057         *
1058         * <p>
1059         * <b>Definition:</b>
1060         * A contact detail for the person, e.g. a telephone number or an email address.
1061         * </p>
1062         * @param theValue The telecom to add (must not be <code>null</code>)
1063         */
1064        public Person addTelecom(ContactPointDt theValue) {
1065                if (theValue == null) {
1066                        throw new NullPointerException("theValue must not be null");
1067                }
1068                getTelecom().add(theValue);
1069                return this;
1070        }
1071
1072        /**
1073         * Gets the first repetition for <b>telecom</b> (),
1074         * creating it if it does not already exist.
1075         *
1076     * <p>
1077     * <b>Definition:</b>
1078     * A contact detail for the person, e.g. a telephone number or an email address.
1079     * </p> 
1080         */
1081        public ContactPointDt getTelecomFirstRep() {
1082                if (getTelecom().isEmpty()) {
1083                        return addTelecom();
1084                }
1085                return getTelecom().get(0); 
1086        }
1087  
1088        /**
1089         * Gets the value(s) for <b>gender</b> ().
1090         * creating it if it does
1091         * not exist. Will not return <code>null</code>.
1092         *
1093     * <p>
1094     * <b>Definition:</b>
1095     * Administrative Gender
1096     * </p> 
1097         */
1098        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
1099                if (myGender == null) {
1100                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
1101                }
1102                return myGender;
1103        }
1104
1105        
1106        /**
1107         * Gets the value(s) for <b>gender</b> ().
1108         * creating it if it does
1109         * not exist. This method may return <code>null</code>.
1110         *
1111     * <p>
1112     * <b>Definition:</b>
1113     * Administrative Gender
1114     * </p> 
1115         */
1116        public String getGender() {  
1117                return getGenderElement().getValue();
1118        }
1119
1120        /**
1121         * Sets the value(s) for <b>gender</b> ()
1122         *
1123     * <p>
1124     * <b>Definition:</b>
1125     * Administrative Gender
1126     * </p> 
1127         */
1128        public Person setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
1129                myGender = theValue;
1130                return this;
1131        }
1132        
1133        
1134
1135        /**
1136         * Sets the value(s) for <b>gender</b> ()
1137         *
1138     * <p>
1139     * <b>Definition:</b>
1140     * Administrative Gender
1141     * </p> 
1142         */
1143        public Person setGender(AdministrativeGenderEnum theValue) {
1144                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
1145                
1146/*
1147                getGenderElement().setValueAsEnum(theValue);
1148*/
1149                return this;
1150        }
1151
1152  
1153        /**
1154         * Gets the value(s) for <b>birthDate</b> ().
1155         * creating it if it does
1156         * not exist. Will not return <code>null</code>.
1157         *
1158     * <p>
1159     * <b>Definition:</b>
1160     * The birth date for the person.
1161     * </p> 
1162         */
1163        public DateDt getBirthDateElement() {  
1164                if (myBirthDate == null) {
1165                        myBirthDate = new DateDt();
1166                }
1167                return myBirthDate;
1168        }
1169
1170        
1171        /**
1172         * Gets the value(s) for <b>birthDate</b> ().
1173         * creating it if it does
1174         * not exist. This method may return <code>null</code>.
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * The birth date for the person.
1179     * </p> 
1180         */
1181        public Date getBirthDate() {  
1182                return getBirthDateElement().getValue();
1183        }
1184
1185        /**
1186         * Sets the value(s) for <b>birthDate</b> ()
1187         *
1188     * <p>
1189     * <b>Definition:</b>
1190     * The birth date for the person.
1191     * </p> 
1192         */
1193        public Person setBirthDate(DateDt theValue) {
1194                myBirthDate = theValue;
1195                return this;
1196        }
1197        
1198        
1199
1200        /**
1201         * Sets the value for <b>birthDate</b> ()
1202         *
1203     * <p>
1204     * <b>Definition:</b>
1205     * The birth date for the person.
1206     * </p> 
1207         */
1208        public Person setBirthDateWithDayPrecision( Date theDate) {
1209                myBirthDate = new DateDt(theDate); 
1210                return this; 
1211        }
1212
1213        /**
1214         * Sets the value for <b>birthDate</b> ()
1215         *
1216     * <p>
1217     * <b>Definition:</b>
1218     * The birth date for the person.
1219     * </p> 
1220         */
1221        public Person setBirthDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1222                myBirthDate = new DateDt(theDate, thePrecision); 
1223                return this; 
1224        }
1225
1226 
1227        /**
1228         * Gets the value(s) for <b>address</b> ().
1229         * creating it if it does
1230         * not exist. Will not return <code>null</code>.
1231         *
1232     * <p>
1233     * <b>Definition:</b>
1234     * One or more addresses for the person
1235     * </p> 
1236         */
1237        public java.util.List<AddressDt> getAddress() {  
1238                if (myAddress == null) {
1239                        myAddress = new java.util.ArrayList<AddressDt>();
1240                }
1241                return myAddress;
1242        }
1243
1244        /**
1245         * Sets the value(s) for <b>address</b> ()
1246         *
1247     * <p>
1248     * <b>Definition:</b>
1249     * One or more addresses for the person
1250     * </p> 
1251         */
1252        public Person setAddress(java.util.List<AddressDt> theValue) {
1253                myAddress = theValue;
1254                return this;
1255        }
1256        
1257        
1258
1259        /**
1260         * Adds and returns a new value for <b>address</b> ()
1261         *
1262     * <p>
1263     * <b>Definition:</b>
1264     * One or more addresses for the person
1265     * </p> 
1266         */
1267        public AddressDt addAddress() {
1268                AddressDt newType = new AddressDt();
1269                getAddress().add(newType);
1270                return newType; 
1271        }
1272
1273        /**
1274         * Adds a given new value for <b>address</b> ()
1275         *
1276         * <p>
1277         * <b>Definition:</b>
1278         * One or more addresses for the person
1279         * </p>
1280         * @param theValue The address to add (must not be <code>null</code>)
1281         */
1282        public Person addAddress(AddressDt theValue) {
1283                if (theValue == null) {
1284                        throw new NullPointerException("theValue must not be null");
1285                }
1286                getAddress().add(theValue);
1287                return this;
1288        }
1289
1290        /**
1291         * Gets the first repetition for <b>address</b> (),
1292         * creating it if it does not already exist.
1293         *
1294     * <p>
1295     * <b>Definition:</b>
1296     * One or more addresses for the person
1297     * </p> 
1298         */
1299        public AddressDt getAddressFirstRep() {
1300                if (getAddress().isEmpty()) {
1301                        return addAddress();
1302                }
1303                return getAddress().get(0); 
1304        }
1305  
1306        /**
1307         * Gets the value(s) for <b>photo</b> ().
1308         * creating it if it does
1309         * not exist. Will not return <code>null</code>.
1310         *
1311     * <p>
1312     * <b>Definition:</b>
1313     * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual
1314     * </p> 
1315         */
1316        public AttachmentDt getPhoto() {  
1317                if (myPhoto == null) {
1318                        myPhoto = new AttachmentDt();
1319                }
1320                return myPhoto;
1321        }
1322
1323        /**
1324         * Sets the value(s) for <b>photo</b> ()
1325         *
1326     * <p>
1327     * <b>Definition:</b>
1328     * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual
1329     * </p> 
1330         */
1331        public Person setPhoto(AttachmentDt theValue) {
1332                myPhoto = theValue;
1333                return this;
1334        }
1335        
1336        
1337
1338  
1339        /**
1340         * Gets the value(s) for <b>managingOrganization</b> ().
1341         * creating it if it does
1342         * not exist. Will not return <code>null</code>.
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * The organization that is the custodian of the person record
1347     * </p> 
1348         */
1349        public ResourceReferenceDt getManagingOrganization() {  
1350                if (myManagingOrganization == null) {
1351                        myManagingOrganization = new ResourceReferenceDt();
1352                }
1353                return myManagingOrganization;
1354        }
1355
1356        /**
1357         * Sets the value(s) for <b>managingOrganization</b> ()
1358         *
1359     * <p>
1360     * <b>Definition:</b>
1361     * The organization that is the custodian of the person record
1362     * </p> 
1363         */
1364        public Person setManagingOrganization(ResourceReferenceDt theValue) {
1365                myManagingOrganization = theValue;
1366                return this;
1367        }
1368        
1369        
1370
1371  
1372        /**
1373         * Gets the value(s) for <b>active</b> (status).
1374         * creating it if it does
1375         * not exist. Will not return <code>null</code>.
1376         *
1377     * <p>
1378     * <b>Definition:</b>
1379     * Whether this person's record is in active use
1380     * </p> 
1381         */
1382        public BooleanDt getActiveElement() {  
1383                if (myActive == null) {
1384                        myActive = new BooleanDt();
1385                }
1386                return myActive;
1387        }
1388
1389        
1390        /**
1391         * Gets the value(s) for <b>active</b> (status).
1392         * creating it if it does
1393         * not exist. This method may return <code>null</code>.
1394         *
1395     * <p>
1396     * <b>Definition:</b>
1397     * Whether this person's record is in active use
1398     * </p> 
1399         */
1400        public Boolean getActive() {  
1401                return getActiveElement().getValue();
1402        }
1403
1404        /**
1405         * Sets the value(s) for <b>active</b> (status)
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * Whether this person's record is in active use
1410     * </p> 
1411         */
1412        public Person setActive(BooleanDt theValue) {
1413                myActive = theValue;
1414                return this;
1415        }
1416        
1417        
1418
1419        /**
1420         * Sets the value for <b>active</b> (status)
1421         *
1422     * <p>
1423     * <b>Definition:</b>
1424     * Whether this person's record is in active use
1425     * </p> 
1426         */
1427        public Person setActive( boolean theBoolean) {
1428                myActive = new BooleanDt(theBoolean); 
1429                return this; 
1430        }
1431
1432 
1433        /**
1434         * Gets the value(s) for <b>link</b> ().
1435         * creating it if it does
1436         * not exist. Will not return <code>null</code>.
1437         *
1438     * <p>
1439     * <b>Definition:</b>
1440     * 
1441     * </p> 
1442         */
1443        public java.util.List<Link> getLink() {  
1444                if (myLink == null) {
1445                        myLink = new java.util.ArrayList<Link>();
1446                }
1447                return myLink;
1448        }
1449
1450        /**
1451         * Sets the value(s) for <b>link</b> ()
1452         *
1453     * <p>
1454     * <b>Definition:</b>
1455     * 
1456     * </p> 
1457         */
1458        public Person setLink(java.util.List<Link> theValue) {
1459                myLink = theValue;
1460                return this;
1461        }
1462        
1463        
1464
1465        /**
1466         * Adds and returns a new value for <b>link</b> ()
1467         *
1468     * <p>
1469     * <b>Definition:</b>
1470     * 
1471     * </p> 
1472         */
1473        public Link addLink() {
1474                Link newType = new Link();
1475                getLink().add(newType);
1476                return newType; 
1477        }
1478
1479        /**
1480         * Adds a given new value for <b>link</b> ()
1481         *
1482         * <p>
1483         * <b>Definition:</b>
1484         * 
1485         * </p>
1486         * @param theValue The link to add (must not be <code>null</code>)
1487         */
1488        public Person addLink(Link theValue) {
1489                if (theValue == null) {
1490                        throw new NullPointerException("theValue must not be null");
1491                }
1492                getLink().add(theValue);
1493                return this;
1494        }
1495
1496        /**
1497         * Gets the first repetition for <b>link</b> (),
1498         * creating it if it does not already exist.
1499         *
1500     * <p>
1501     * <b>Definition:</b>
1502     * 
1503     * </p> 
1504         */
1505        public Link getLinkFirstRep() {
1506                if (getLink().isEmpty()) {
1507                        return addLink();
1508                }
1509                return getLink().get(0); 
1510        }
1511  
1512        /**
1513         * Block class for child element: <b>Person.link</b> ()
1514         *
1515     * <p>
1516     * <b>Definition:</b>
1517     * 
1518     * </p> 
1519         */
1520        @Block()        
1521        public static class Link 
1522            extends  BaseIdentifiableElement  
1523            implements IResourceBlock {
1524        
1525        @Child(name="target", order=0, min=1, max=1, summary=false, modifier=false, type={
1526                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
1527                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
1528                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class, 
1529                ca.uhn.fhir.model.dstu2.resource.Person.class
1530        })
1531        @Description(
1532                shortDefinition="",
1533                formalDefinition=""
1534        )
1535        private ResourceReferenceDt myTarget;
1536        
1537        @Child(name="assurance", type=CodeDt.class, order=1, min=0, max=1, summary=false, modifier=false)       
1538        @Description(
1539                shortDefinition="",
1540                formalDefinition="Level of assurance that this link is actually associated with the target resource"
1541        )
1542        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/identity-assuranceLevel")
1543        private BoundCodeDt<IdentityAssuranceLevelEnum> myAssurance;
1544        
1545
1546        @Override
1547        public boolean isEmpty() {
1548                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myTarget,  myAssurance);
1549        }
1550        
1551        @Override
1552        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1553                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myTarget, myAssurance);
1554        }
1555
1556        /**
1557         * Gets the value(s) for <b>target</b> ().
1558         * creating it if it does
1559         * not exist. Will not return <code>null</code>.
1560         *
1561     * <p>
1562     * <b>Definition:</b>
1563     * 
1564     * </p> 
1565         */
1566        public ResourceReferenceDt getTarget() {  
1567                if (myTarget == null) {
1568                        myTarget = new ResourceReferenceDt();
1569                }
1570                return myTarget;
1571        }
1572
1573        /**
1574         * Sets the value(s) for <b>target</b> ()
1575         *
1576     * <p>
1577     * <b>Definition:</b>
1578     * 
1579     * </p> 
1580         */
1581        public Link setTarget(ResourceReferenceDt theValue) {
1582                myTarget = theValue;
1583                return this;
1584        }
1585        
1586        
1587
1588  
1589        /**
1590         * Gets the value(s) for <b>assurance</b> ().
1591         * creating it if it does
1592         * not exist. Will not return <code>null</code>.
1593         *
1594     * <p>
1595     * <b>Definition:</b>
1596     * Level of assurance that this link is actually associated with the target resource
1597     * </p> 
1598         */
1599        public BoundCodeDt<IdentityAssuranceLevelEnum> getAssuranceElement() {  
1600                if (myAssurance == null) {
1601                        myAssurance = new BoundCodeDt<IdentityAssuranceLevelEnum>(IdentityAssuranceLevelEnum.VALUESET_BINDER);
1602                }
1603                return myAssurance;
1604        }
1605
1606        
1607        /**
1608         * Gets the value(s) for <b>assurance</b> ().
1609         * creating it if it does
1610         * not exist. This method may return <code>null</code>.
1611         *
1612     * <p>
1613     * <b>Definition:</b>
1614     * Level of assurance that this link is actually associated with the target resource
1615     * </p> 
1616         */
1617        public String getAssurance() {  
1618                return getAssuranceElement().getValue();
1619        }
1620
1621        /**
1622         * Sets the value(s) for <b>assurance</b> ()
1623         *
1624     * <p>
1625     * <b>Definition:</b>
1626     * Level of assurance that this link is actually associated with the target resource
1627     * </p> 
1628         */
1629        public Link setAssurance(BoundCodeDt<IdentityAssuranceLevelEnum> theValue) {
1630                myAssurance = theValue;
1631                return this;
1632        }
1633        
1634        
1635
1636        /**
1637         * Sets the value(s) for <b>assurance</b> ()
1638         *
1639     * <p>
1640     * <b>Definition:</b>
1641     * Level of assurance that this link is actually associated with the target resource
1642     * </p> 
1643         */
1644        public Link setAssurance(IdentityAssuranceLevelEnum theValue) {
1645                setAssurance(new BoundCodeDt<IdentityAssuranceLevelEnum>(IdentityAssuranceLevelEnum.VALUESET_BINDER, theValue));
1646                
1647/*
1648                getAssuranceElement().setValueAsEnum(theValue);
1649*/
1650                return this;
1651        }
1652
1653  
1654
1655
1656        }
1657
1658
1659
1660
1661    @Override
1662    public String getResourceName() {
1663        return "Person";
1664    }
1665    
1666    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1667        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1668    }
1669
1670
1671}