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>RelatedPerson</b> Resource
282 * (administrative.individual)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * Need to track persons related to the patient or the healthcare process.
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/RelatedPerson">http://hl7.org/fhir/profiles/RelatedPerson</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="RelatedPerson", profile="http://hl7.org/fhir/profiles/RelatedPerson", id="relatedperson")
301public class RelatedPerson extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>identifier</b>
306         * <p>
307         * Description: <b>A patient Identifier</b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>RelatedPerson.identifier</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token"  )
313        public static final String SP_IDENTIFIER = "identifier";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
317         * <p>
318         * Description: <b>A patient Identifier</b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>RelatedPerson.identifier</b><br>
321         * </p>
322         */
323        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
324
325        /**
326         * Search parameter constant for <b>name</b>
327         * <p>
328         * Description: <b>A portion of name in any name part</b><br>
329         * Type: <b>string</b><br>
330         * Path: <b>RelatedPerson.name</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string"  )
334        public static final String SP_NAME = "name";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>name</b>
338         * <p>
339         * Description: <b>A portion of name in any name part</b><br>
340         * Type: <b>string</b><br>
341         * Path: <b>RelatedPerson.name</b><br>
342         * </p>
343         */
344        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
345
346        /**
347         * Search parameter constant for <b>phonetic</b>
348         * <p>
349         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
350         * Type: <b>string</b><br>
351         * Path: <b>RelatedPerson.name</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="phonetic", path="RelatedPerson.name", description="A portion of name using some kind of phonetic matching algorithm", type="string"  )
355        public static final String SP_PHONETIC = "phonetic";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
359         * <p>
360         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
361         * Type: <b>string</b><br>
362         * Path: <b>RelatedPerson.name</b><br>
363         * </p>
364         */
365        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
366
367        /**
368         * Search parameter constant for <b>telecom</b>
369         * <p>
370         * Description: <b>The value in any kind of contact</b><br>
371         * Type: <b>token</b><br>
372         * Path: <b>RelatedPerson.telecom</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact", type="token"  )
376        public static final String SP_TELECOM = "telecom";
377
378        /**
379         * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
380         * <p>
381         * Description: <b>The value in any kind of contact</b><br>
382         * Type: <b>token</b><br>
383         * Path: <b>RelatedPerson.telecom</b><br>
384         * </p>
385         */
386        public static final TokenClientParam TELECOM = new TokenClientParam(SP_TELECOM);
387
388        /**
389         * Search parameter constant for <b>phone</b>
390         * <p>
391         * Description: <b>A value in a phone contact</b><br>
392         * Type: <b>token</b><br>
393         * Path: <b>RelatedPerson.telecom(system=phone)</b><br>
394         * </p>
395         */
396        @SearchParamDefinition(name="phone", path="RelatedPerson.telecom(system=phone)", description="A value in a phone contact", type="token"  )
397        public static final String SP_PHONE = "phone";
398
399        /**
400         * <b>Fluent Client</b> search parameter constant for <b>phone</b>
401         * <p>
402         * Description: <b>A value in a phone contact</b><br>
403         * Type: <b>token</b><br>
404         * Path: <b>RelatedPerson.telecom(system=phone)</b><br>
405         * </p>
406         */
407        public static final TokenClientParam PHONE = new TokenClientParam(SP_PHONE);
408
409        /**
410         * Search parameter constant for <b>email</b>
411         * <p>
412         * Description: <b>A value in an email contact</b><br>
413         * Type: <b>token</b><br>
414         * Path: <b>RelatedPerson.telecom(system=email)</b><br>
415         * </p>
416         */
417        @SearchParamDefinition(name="email", path="RelatedPerson.telecom(system=email)", description="A value in an email contact", type="token"  )
418        public static final String SP_EMAIL = "email";
419
420        /**
421         * <b>Fluent Client</b> search parameter constant for <b>email</b>
422         * <p>
423         * Description: <b>A value in an email contact</b><br>
424         * Type: <b>token</b><br>
425         * Path: <b>RelatedPerson.telecom(system=email)</b><br>
426         * </p>
427         */
428        public static final TokenClientParam EMAIL = new TokenClientParam(SP_EMAIL);
429
430        /**
431         * Search parameter constant for <b>address</b>
432         * <p>
433         * Description: <b>An address in any kind of address/part</b><br>
434         * Type: <b>string</b><br>
435         * Path: <b>RelatedPerson.address</b><br>
436         * </p>
437         */
438        @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string"  )
439        public static final String SP_ADDRESS = "address";
440
441        /**
442         * <b>Fluent Client</b> search parameter constant for <b>address</b>
443         * <p>
444         * Description: <b>An address in any kind of address/part</b><br>
445         * Type: <b>string</b><br>
446         * Path: <b>RelatedPerson.address</b><br>
447         * </p>
448         */
449        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
450
451        /**
452         * Search parameter constant for <b>address-city</b>
453         * <p>
454         * Description: <b>A city specified in an address</b><br>
455         * Type: <b>string</b><br>
456         * Path: <b>RelatedPerson.address.city</b><br>
457         * </p>
458         */
459        @SearchParamDefinition(name="address-city", path="RelatedPerson.address.city", description="A city specified in an address", type="string"  )
460        public static final String SP_ADDRESS_CITY = "address-city";
461
462        /**
463         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
464         * <p>
465         * Description: <b>A city specified in an address</b><br>
466         * Type: <b>string</b><br>
467         * Path: <b>RelatedPerson.address.city</b><br>
468         * </p>
469         */
470        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
471
472        /**
473         * Search parameter constant for <b>address-state</b>
474         * <p>
475         * Description: <b>A state specified in an address</b><br>
476         * Type: <b>string</b><br>
477         * Path: <b>RelatedPerson.address.state</b><br>
478         * </p>
479         */
480        @SearchParamDefinition(name="address-state", path="RelatedPerson.address.state", description="A state specified in an address", type="string"  )
481        public static final String SP_ADDRESS_STATE = "address-state";
482
483        /**
484         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
485         * <p>
486         * Description: <b>A state specified in an address</b><br>
487         * Type: <b>string</b><br>
488         * Path: <b>RelatedPerson.address.state</b><br>
489         * </p>
490         */
491        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
492
493        /**
494         * Search parameter constant for <b>address-postalcode</b>
495         * <p>
496         * Description: <b>A postal code specified in an address</b><br>
497         * Type: <b>string</b><br>
498         * Path: <b>RelatedPerson.address.postalCode</b><br>
499         * </p>
500         */
501        @SearchParamDefinition(name="address-postalcode", path="RelatedPerson.address.postalCode", description="A postal code specified in an address", type="string"  )
502        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
503
504        /**
505         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
506         * <p>
507         * Description: <b>A postal code specified in an address</b><br>
508         * Type: <b>string</b><br>
509         * Path: <b>RelatedPerson.address.postalCode</b><br>
510         * </p>
511         */
512        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
513
514        /**
515         * Search parameter constant for <b>address-country</b>
516         * <p>
517         * Description: <b>A country specified in an address</b><br>
518         * Type: <b>string</b><br>
519         * Path: <b>RelatedPerson.address.country</b><br>
520         * </p>
521         */
522        @SearchParamDefinition(name="address-country", path="RelatedPerson.address.country", description="A country specified in an address", type="string"  )
523        public static final String SP_ADDRESS_COUNTRY = "address-country";
524
525        /**
526         * <b>Fluent Client</b> 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>RelatedPerson.address.country</b><br>
531         * </p>
532         */
533        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
534
535        /**
536         * Search parameter constant for <b>address-use</b>
537         * <p>
538         * Description: <b>A use code specified in an address</b><br>
539         * Type: <b>token</b><br>
540         * Path: <b>RelatedPerson.address.use</b><br>
541         * </p>
542         */
543        @SearchParamDefinition(name="address-use", path="RelatedPerson.address.use", description="A use code specified in an address", type="token"  )
544        public static final String SP_ADDRESS_USE = "address-use";
545
546        /**
547         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
548         * <p>
549         * Description: <b>A use code specified in an address</b><br>
550         * Type: <b>token</b><br>
551         * Path: <b>RelatedPerson.address.use</b><br>
552         * </p>
553         */
554        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
555
556        /**
557         * Search parameter constant for <b>birthdate</b>
558         * <p>
559         * Description: <b>The Related Person's date of birth</b><br>
560         * Type: <b>date</b><br>
561         * Path: <b>RelatedPerson.birthDate</b><br>
562         * </p>
563         */
564        @SearchParamDefinition(name="birthdate", path="RelatedPerson.birthDate", description="The Related Person's date of birth", type="date"  )
565        public static final String SP_BIRTHDATE = "birthdate";
566
567        /**
568         * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
569         * <p>
570         * Description: <b>The Related Person's date of birth</b><br>
571         * Type: <b>date</b><br>
572         * Path: <b>RelatedPerson.birthDate</b><br>
573         * </p>
574         */
575        public static final DateClientParam BIRTHDATE = new DateClientParam(SP_BIRTHDATE);
576
577        /**
578         * Search parameter constant for <b>gender</b>
579         * <p>
580         * Description: <b>Gender of the person</b><br>
581         * Type: <b>token</b><br>
582         * Path: <b>RelatedPerson.gender</b><br>
583         * </p>
584         */
585        @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token"  )
586        public static final String SP_GENDER = "gender";
587
588        /**
589         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
590         * <p>
591         * Description: <b>Gender of the person</b><br>
592         * Type: <b>token</b><br>
593         * Path: <b>RelatedPerson.gender</b><br>
594         * </p>
595         */
596        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
597
598        /**
599         * Search parameter constant for <b>patient</b>
600         * <p>
601         * Description: <b>The patient this person is related to</b><br>
602         * Type: <b>reference</b><br>
603         * Path: <b>RelatedPerson.patient</b><br>
604         * </p>
605         */
606        @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" , providesMembershipIn={
607 @Compartment(name="Patient")   }
608 )
609        public static final String SP_PATIENT = "patient";
610
611        /**
612         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
613         * <p>
614         * Description: <b>The patient this person is related to</b><br>
615         * Type: <b>reference</b><br>
616         * Path: <b>RelatedPerson.patient</b><br>
617         * </p>
618         */
619        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
620
621
622        /**
623         * Constant for fluent queries to be used to add include statements. Specifies
624         * the path value of "<b>RelatedPerson:patient</b>".
625         */
626        public static final Include INCLUDE_PATIENT = new Include("RelatedPerson:patient");
627
628
629        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
630        @Description(
631                shortDefinition="id",
632                formalDefinition="Identifier for a person within a particular scope."
633        )
634        private java.util.List<IdentifierDt> myIdentifier;
635        
636        @Child(name="patient", order=1, min=1, max=1, summary=true, modifier=false, type={
637                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
638        @Description(
639                shortDefinition="",
640                formalDefinition="The patient this person is related to"
641        )
642        private ResourceReferenceDt myPatient;
643        
644        @Child(name="relationship", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
645        @Description(
646                shortDefinition="class",
647                formalDefinition="The nature of the relationship between a patient and the related person"
648        )
649        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-relatedperson-relationshiptype")
650        private CodeableConceptDt myRelationship;
651        
652        @Child(name="name", type=HumanNameDt.class, order=3, min=0, max=1, summary=true, modifier=false)        
653        @Description(
654                shortDefinition="",
655                formalDefinition="A name associated with the person"
656        )
657        private HumanNameDt myName;
658        
659        @Child(name="telecom", type=ContactPointDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
660        @Description(
661                shortDefinition="",
662                formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
663        )
664        private java.util.List<ContactPointDt> myTelecom;
665        
666        @Child(name="gender", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=false)   
667        @Description(
668                shortDefinition="",
669                formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
670        )
671        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/administrative-gender")
672        private BoundCodeDt<AdministrativeGenderEnum> myGender;
673        
674        @Child(name="birthDate", type=DateDt.class, order=6, min=0, max=1, summary=true, modifier=false)        
675        @Description(
676                shortDefinition="",
677                formalDefinition=""
678        )
679        private DateDt myBirthDate;
680        
681        @Child(name="address", type=AddressDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
682        @Description(
683                shortDefinition="",
684                formalDefinition="Address where the related person can be contacted or visited"
685        )
686        private java.util.List<AddressDt> myAddress;
687        
688        @Child(name="photo", type=AttachmentDt.class, order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
689        @Description(
690                shortDefinition="",
691                formalDefinition="Image of the person"
692        )
693        private java.util.List<AttachmentDt> myPhoto;
694        
695        @Child(name="period", type=PeriodDt.class, order=9, min=0, max=1, summary=false, modifier=false)        
696        @Description(
697                shortDefinition="when.done",
698                formalDefinition="The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown."
699        )
700        private PeriodDt myPeriod;
701        
702
703        @Override
704        public boolean isEmpty() {
705                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myPatient,  myRelationship,  myName,  myTelecom,  myGender,  myBirthDate,  myAddress,  myPhoto,  myPeriod);
706        }
707        
708        @Override
709        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
710                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myBirthDate, myAddress, myPhoto, myPeriod);
711        }
712
713        /**
714         * Gets the value(s) for <b>identifier</b> (id).
715         * creating it if it does
716         * not exist. Will not return <code>null</code>.
717         *
718     * <p>
719     * <b>Definition:</b>
720     * Identifier for a person within a particular scope.
721     * </p> 
722         */
723        public java.util.List<IdentifierDt> getIdentifier() {  
724                if (myIdentifier == null) {
725                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
726                }
727                return myIdentifier;
728        }
729
730        /**
731         * Sets the value(s) for <b>identifier</b> (id)
732         *
733     * <p>
734     * <b>Definition:</b>
735     * Identifier for a person within a particular scope.
736     * </p> 
737         */
738        public RelatedPerson setIdentifier(java.util.List<IdentifierDt> theValue) {
739                myIdentifier = theValue;
740                return this;
741        }
742        
743        
744
745        /**
746         * Adds and returns a new value for <b>identifier</b> (id)
747         *
748     * <p>
749     * <b>Definition:</b>
750     * Identifier for a person within a particular scope.
751     * </p> 
752         */
753        public IdentifierDt addIdentifier() {
754                IdentifierDt newType = new IdentifierDt();
755                getIdentifier().add(newType);
756                return newType; 
757        }
758
759        /**
760         * Adds a given new value for <b>identifier</b> (id)
761         *
762         * <p>
763         * <b>Definition:</b>
764         * Identifier for a person within a particular scope.
765         * </p>
766         * @param theValue The identifier to add (must not be <code>null</code>)
767         */
768        public RelatedPerson addIdentifier(IdentifierDt theValue) {
769                if (theValue == null) {
770                        throw new NullPointerException("theValue must not be null");
771                }
772                getIdentifier().add(theValue);
773                return this;
774        }
775
776        /**
777         * Gets the first repetition for <b>identifier</b> (id),
778         * creating it if it does not already exist.
779         *
780     * <p>
781     * <b>Definition:</b>
782     * Identifier for a person within a particular scope.
783     * </p> 
784         */
785        public IdentifierDt getIdentifierFirstRep() {
786                if (getIdentifier().isEmpty()) {
787                        return addIdentifier();
788                }
789                return getIdentifier().get(0); 
790        }
791  
792        /**
793         * Gets the value(s) for <b>patient</b> ().
794         * creating it if it does
795         * not exist. Will not return <code>null</code>.
796         *
797     * <p>
798     * <b>Definition:</b>
799     * The patient this person is related to
800     * </p> 
801         */
802        public ResourceReferenceDt getPatient() {  
803                if (myPatient == null) {
804                        myPatient = new ResourceReferenceDt();
805                }
806                return myPatient;
807        }
808
809        /**
810         * Sets the value(s) for <b>patient</b> ()
811         *
812     * <p>
813     * <b>Definition:</b>
814     * The patient this person is related to
815     * </p> 
816         */
817        public RelatedPerson setPatient(ResourceReferenceDt theValue) {
818                myPatient = theValue;
819                return this;
820        }
821        
822        
823
824  
825        /**
826         * Gets the value(s) for <b>relationship</b> (class).
827         * creating it if it does
828         * not exist. Will not return <code>null</code>.
829         *
830     * <p>
831     * <b>Definition:</b>
832     * The nature of the relationship between a patient and the related person
833     * </p> 
834         */
835        public CodeableConceptDt getRelationship() {  
836                if (myRelationship == null) {
837                        myRelationship = new CodeableConceptDt();
838                }
839                return myRelationship;
840        }
841
842        /**
843         * Sets the value(s) for <b>relationship</b> (class)
844         *
845     * <p>
846     * <b>Definition:</b>
847     * The nature of the relationship between a patient and the related person
848     * </p> 
849         */
850        public RelatedPerson setRelationship(CodeableConceptDt theValue) {
851                myRelationship = theValue;
852                return this;
853        }
854        
855        
856
857  
858        /**
859         * Gets the value(s) for <b>name</b> ().
860         * creating it if it does
861         * not exist. Will not return <code>null</code>.
862         *
863     * <p>
864     * <b>Definition:</b>
865     * A name associated with the person
866     * </p> 
867         */
868        public HumanNameDt getName() {  
869                if (myName == null) {
870                        myName = new HumanNameDt();
871                }
872                return myName;
873        }
874
875        /**
876         * Sets the value(s) for <b>name</b> ()
877         *
878     * <p>
879     * <b>Definition:</b>
880     * A name associated with the person
881     * </p> 
882         */
883        public RelatedPerson setName(HumanNameDt theValue) {
884                myName = theValue;
885                return this;
886        }
887        
888        
889
890  
891        /**
892         * Gets the value(s) for <b>telecom</b> ().
893         * creating it if it does
894         * not exist. Will not return <code>null</code>.
895         *
896     * <p>
897     * <b>Definition:</b>
898     * A contact detail for the person, e.g. a telephone number or an email address.
899     * </p> 
900         */
901        public java.util.List<ContactPointDt> getTelecom() {  
902                if (myTelecom == null) {
903                        myTelecom = new java.util.ArrayList<ContactPointDt>();
904                }
905                return myTelecom;
906        }
907
908        /**
909         * Sets the value(s) for <b>telecom</b> ()
910         *
911     * <p>
912     * <b>Definition:</b>
913     * A contact detail for the person, e.g. a telephone number or an email address.
914     * </p> 
915         */
916        public RelatedPerson setTelecom(java.util.List<ContactPointDt> theValue) {
917                myTelecom = theValue;
918                return this;
919        }
920        
921        
922
923        /**
924         * Adds and returns a new value for <b>telecom</b> ()
925         *
926     * <p>
927     * <b>Definition:</b>
928     * A contact detail for the person, e.g. a telephone number or an email address.
929     * </p> 
930         */
931        public ContactPointDt addTelecom() {
932                ContactPointDt newType = new ContactPointDt();
933                getTelecom().add(newType);
934                return newType; 
935        }
936
937        /**
938         * Adds a given new value for <b>telecom</b> ()
939         *
940         * <p>
941         * <b>Definition:</b>
942         * A contact detail for the person, e.g. a telephone number or an email address.
943         * </p>
944         * @param theValue The telecom to add (must not be <code>null</code>)
945         */
946        public RelatedPerson addTelecom(ContactPointDt theValue) {
947                if (theValue == null) {
948                        throw new NullPointerException("theValue must not be null");
949                }
950                getTelecom().add(theValue);
951                return this;
952        }
953
954        /**
955         * Gets the first repetition for <b>telecom</b> (),
956         * creating it if it does not already exist.
957         *
958     * <p>
959     * <b>Definition:</b>
960     * A contact detail for the person, e.g. a telephone number or an email address.
961     * </p> 
962         */
963        public ContactPointDt getTelecomFirstRep() {
964                if (getTelecom().isEmpty()) {
965                        return addTelecom();
966                }
967                return getTelecom().get(0); 
968        }
969  
970        /**
971         * Gets the value(s) for <b>gender</b> ().
972         * creating it if it does
973         * not exist. Will not return <code>null</code>.
974         *
975     * <p>
976     * <b>Definition:</b>
977     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
978     * </p> 
979         */
980        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
981                if (myGender == null) {
982                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
983                }
984                return myGender;
985        }
986
987        
988        /**
989         * Gets the value(s) for <b>gender</b> ().
990         * creating it if it does
991         * not exist. This method may return <code>null</code>.
992         *
993     * <p>
994     * <b>Definition:</b>
995     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
996     * </p> 
997         */
998        public String getGender() {  
999                return getGenderElement().getValue();
1000        }
1001
1002        /**
1003         * Sets the value(s) for <b>gender</b> ()
1004         *
1005     * <p>
1006     * <b>Definition:</b>
1007     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1008     * </p> 
1009         */
1010        public RelatedPerson setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
1011                myGender = theValue;
1012                return this;
1013        }
1014        
1015        
1016
1017        /**
1018         * Sets the value(s) for <b>gender</b> ()
1019         *
1020     * <p>
1021     * <b>Definition:</b>
1022     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1023     * </p> 
1024         */
1025        public RelatedPerson setGender(AdministrativeGenderEnum theValue) {
1026                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
1027                
1028/*
1029                getGenderElement().setValueAsEnum(theValue);
1030*/
1031                return this;
1032        }
1033
1034  
1035        /**
1036         * Gets the value(s) for <b>birthDate</b> ().
1037         * creating it if it does
1038         * not exist. Will not return <code>null</code>.
1039         *
1040     * <p>
1041     * <b>Definition:</b>
1042     * 
1043     * </p> 
1044         */
1045        public DateDt getBirthDateElement() {  
1046                if (myBirthDate == null) {
1047                        myBirthDate = new DateDt();
1048                }
1049                return myBirthDate;
1050        }
1051
1052        
1053        /**
1054         * Gets the value(s) for <b>birthDate</b> ().
1055         * creating it if it does
1056         * not exist. This method may return <code>null</code>.
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * 
1061     * </p> 
1062         */
1063        public Date getBirthDate() {  
1064                return getBirthDateElement().getValue();
1065        }
1066
1067        /**
1068         * Sets the value(s) for <b>birthDate</b> ()
1069         *
1070     * <p>
1071     * <b>Definition:</b>
1072     * 
1073     * </p> 
1074         */
1075        public RelatedPerson setBirthDate(DateDt theValue) {
1076                myBirthDate = theValue;
1077                return this;
1078        }
1079        
1080        
1081
1082        /**
1083         * Sets the value for <b>birthDate</b> ()
1084         *
1085     * <p>
1086     * <b>Definition:</b>
1087     * 
1088     * </p> 
1089         */
1090        public RelatedPerson setBirthDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1091                myBirthDate = new DateDt(theDate, thePrecision); 
1092                return this; 
1093        }
1094
1095        /**
1096         * Sets the value for <b>birthDate</b> ()
1097         *
1098     * <p>
1099     * <b>Definition:</b>
1100     * 
1101     * </p> 
1102         */
1103        public RelatedPerson setBirthDateWithDayPrecision( Date theDate) {
1104                myBirthDate = new DateDt(theDate); 
1105                return this; 
1106        }
1107
1108 
1109        /**
1110         * Gets the value(s) for <b>address</b> ().
1111         * creating it if it does
1112         * not exist. Will not return <code>null</code>.
1113         *
1114     * <p>
1115     * <b>Definition:</b>
1116     * Address where the related person can be contacted or visited
1117     * </p> 
1118         */
1119        public java.util.List<AddressDt> getAddress() {  
1120                if (myAddress == null) {
1121                        myAddress = new java.util.ArrayList<AddressDt>();
1122                }
1123                return myAddress;
1124        }
1125
1126        /**
1127         * Sets the value(s) for <b>address</b> ()
1128         *
1129     * <p>
1130     * <b>Definition:</b>
1131     * Address where the related person can be contacted or visited
1132     * </p> 
1133         */
1134        public RelatedPerson setAddress(java.util.List<AddressDt> theValue) {
1135                myAddress = theValue;
1136                return this;
1137        }
1138        
1139        
1140
1141        /**
1142         * Adds and returns a new value for <b>address</b> ()
1143         *
1144     * <p>
1145     * <b>Definition:</b>
1146     * Address where the related person can be contacted or visited
1147     * </p> 
1148         */
1149        public AddressDt addAddress() {
1150                AddressDt newType = new AddressDt();
1151                getAddress().add(newType);
1152                return newType; 
1153        }
1154
1155        /**
1156         * Adds a given new value for <b>address</b> ()
1157         *
1158         * <p>
1159         * <b>Definition:</b>
1160         * Address where the related person can be contacted or visited
1161         * </p>
1162         * @param theValue The address to add (must not be <code>null</code>)
1163         */
1164        public RelatedPerson addAddress(AddressDt theValue) {
1165                if (theValue == null) {
1166                        throw new NullPointerException("theValue must not be null");
1167                }
1168                getAddress().add(theValue);
1169                return this;
1170        }
1171
1172        /**
1173         * Gets the first repetition for <b>address</b> (),
1174         * creating it if it does not already exist.
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * Address where the related person can be contacted or visited
1179     * </p> 
1180         */
1181        public AddressDt getAddressFirstRep() {
1182                if (getAddress().isEmpty()) {
1183                        return addAddress();
1184                }
1185                return getAddress().get(0); 
1186        }
1187  
1188        /**
1189         * Gets the value(s) for <b>photo</b> ().
1190         * creating it if it does
1191         * not exist. Will not return <code>null</code>.
1192         *
1193     * <p>
1194     * <b>Definition:</b>
1195     * Image of the person
1196     * </p> 
1197         */
1198        public java.util.List<AttachmentDt> getPhoto() {  
1199                if (myPhoto == null) {
1200                        myPhoto = new java.util.ArrayList<AttachmentDt>();
1201                }
1202                return myPhoto;
1203        }
1204
1205        /**
1206         * Sets the value(s) for <b>photo</b> ()
1207         *
1208     * <p>
1209     * <b>Definition:</b>
1210     * Image of the person
1211     * </p> 
1212         */
1213        public RelatedPerson setPhoto(java.util.List<AttachmentDt> theValue) {
1214                myPhoto = theValue;
1215                return this;
1216        }
1217        
1218        
1219
1220        /**
1221         * Adds and returns a new value for <b>photo</b> ()
1222         *
1223     * <p>
1224     * <b>Definition:</b>
1225     * Image of the person
1226     * </p> 
1227         */
1228        public AttachmentDt addPhoto() {
1229                AttachmentDt newType = new AttachmentDt();
1230                getPhoto().add(newType);
1231                return newType; 
1232        }
1233
1234        /**
1235         * Adds a given new value for <b>photo</b> ()
1236         *
1237         * <p>
1238         * <b>Definition:</b>
1239         * Image of the person
1240         * </p>
1241         * @param theValue The photo to add (must not be <code>null</code>)
1242         */
1243        public RelatedPerson addPhoto(AttachmentDt theValue) {
1244                if (theValue == null) {
1245                        throw new NullPointerException("theValue must not be null");
1246                }
1247                getPhoto().add(theValue);
1248                return this;
1249        }
1250
1251        /**
1252         * Gets the first repetition for <b>photo</b> (),
1253         * creating it if it does not already exist.
1254         *
1255     * <p>
1256     * <b>Definition:</b>
1257     * Image of the person
1258     * </p> 
1259         */
1260        public AttachmentDt getPhotoFirstRep() {
1261                if (getPhoto().isEmpty()) {
1262                        return addPhoto();
1263                }
1264                return getPhoto().get(0); 
1265        }
1266  
1267        /**
1268         * Gets the value(s) for <b>period</b> (when.done).
1269         * creating it if it does
1270         * not exist. Will not return <code>null</code>.
1271         *
1272     * <p>
1273     * <b>Definition:</b>
1274     * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.
1275     * </p> 
1276         */
1277        public PeriodDt getPeriod() {  
1278                if (myPeriod == null) {
1279                        myPeriod = new PeriodDt();
1280                }
1281                return myPeriod;
1282        }
1283
1284        /**
1285         * Sets the value(s) for <b>period</b> (when.done)
1286         *
1287     * <p>
1288     * <b>Definition:</b>
1289     * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.
1290     * </p> 
1291         */
1292        public RelatedPerson setPeriod(PeriodDt theValue) {
1293                myPeriod = theValue;
1294                return this;
1295        }
1296        
1297        
1298
1299  
1300
1301
1302    @Override
1303    public String getResourceName() {
1304        return "RelatedPerson";
1305    }
1306    
1307    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1308        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1309    }
1310
1311
1312}