001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>RelatedPerson</b> Resource
320 * (administrative.individual)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * 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.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * Need to track persons related to the patient or the healthcare process.
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/RelatedPerson">http://hl7.org/fhir/profiles/RelatedPerson</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="RelatedPerson", profile="http://hl7.org/fhir/profiles/RelatedPerson", id="relatedperson")
339public class RelatedPerson extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>identifier</b>
344         * <p>
345         * Description: <b>A patient Identifier</b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>RelatedPerson.identifier</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token"  )
351        public static final String SP_IDENTIFIER = "identifier";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
355         * <p>
356         * Description: <b>A patient Identifier</b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>RelatedPerson.identifier</b><br>
359         * </p>
360         */
361        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
362
363        /**
364         * Search parameter constant for <b>name</b>
365         * <p>
366         * Description: <b>A portion of name in any name part</b><br>
367         * Type: <b>string</b><br>
368         * Path: <b>RelatedPerson.name</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string"  )
372        public static final String SP_NAME = "name";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>name</b>
376         * <p>
377         * Description: <b>A portion of name in any name part</b><br>
378         * Type: <b>string</b><br>
379         * Path: <b>RelatedPerson.name</b><br>
380         * </p>
381         */
382        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
383
384        /**
385         * Search parameter constant for <b>phonetic</b>
386         * <p>
387         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
388         * Type: <b>string</b><br>
389         * Path: <b>RelatedPerson.name</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="phonetic", path="RelatedPerson.name", description="A portion of name using some kind of phonetic matching algorithm", type="string"  )
393        public static final String SP_PHONETIC = "phonetic";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
397         * <p>
398         * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
399         * Type: <b>string</b><br>
400         * Path: <b>RelatedPerson.name</b><br>
401         * </p>
402         */
403        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
404
405        /**
406         * Search parameter constant for <b>telecom</b>
407         * <p>
408         * Description: <b>The value in any kind of contact</b><br>
409         * Type: <b>token</b><br>
410         * Path: <b>RelatedPerson.telecom</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact", type="token"  )
414        public static final String SP_TELECOM = "telecom";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
418         * <p>
419         * Description: <b>The value in any kind of contact</b><br>
420         * Type: <b>token</b><br>
421         * Path: <b>RelatedPerson.telecom</b><br>
422         * </p>
423         */
424        public static final TokenClientParam TELECOM = new TokenClientParam(SP_TELECOM);
425
426        /**
427         * Search parameter constant for <b>phone</b>
428         * <p>
429         * Description: <b>A value in a phone contact</b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>RelatedPerson.telecom(system=phone)</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="phone", path="RelatedPerson.telecom(system=phone)", description="A value in a phone contact", type="token"  )
435        public static final String SP_PHONE = "phone";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>phone</b>
439         * <p>
440         * Description: <b>A value in a phone contact</b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>RelatedPerson.telecom(system=phone)</b><br>
443         * </p>
444         */
445        public static final TokenClientParam PHONE = new TokenClientParam(SP_PHONE);
446
447        /**
448         * Search parameter constant for <b>email</b>
449         * <p>
450         * Description: <b>A value in an email contact</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>RelatedPerson.telecom(system=email)</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="email", path="RelatedPerson.telecom(system=email)", description="A value in an email contact", type="token"  )
456        public static final String SP_EMAIL = "email";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>email</b>
460         * <p>
461         * Description: <b>A value in an email contact</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>RelatedPerson.telecom(system=email)</b><br>
464         * </p>
465         */
466        public static final TokenClientParam EMAIL = new TokenClientParam(SP_EMAIL);
467
468        /**
469         * Search parameter constant for <b>address</b>
470         * <p>
471         * Description: <b>An address in any kind of address/part</b><br>
472         * Type: <b>string</b><br>
473         * Path: <b>RelatedPerson.address</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string"  )
477        public static final String SP_ADDRESS = "address";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>address</b>
481         * <p>
482         * Description: <b>An address in any kind of address/part</b><br>
483         * Type: <b>string</b><br>
484         * Path: <b>RelatedPerson.address</b><br>
485         * </p>
486         */
487        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
488
489        /**
490         * Search parameter constant for <b>address-city</b>
491         * <p>
492         * Description: <b>A city specified in an address</b><br>
493         * Type: <b>string</b><br>
494         * Path: <b>RelatedPerson.address.city</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="address-city", path="RelatedPerson.address.city", description="A city specified in an address", type="string"  )
498        public static final String SP_ADDRESS_CITY = "address-city";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
502         * <p>
503         * Description: <b>A city specified in an address</b><br>
504         * Type: <b>string</b><br>
505         * Path: <b>RelatedPerson.address.city</b><br>
506         * </p>
507         */
508        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
509
510        /**
511         * Search parameter constant for <b>address-state</b>
512         * <p>
513         * Description: <b>A state specified in an address</b><br>
514         * Type: <b>string</b><br>
515         * Path: <b>RelatedPerson.address.state</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="address-state", path="RelatedPerson.address.state", description="A state specified in an address", type="string"  )
519        public static final String SP_ADDRESS_STATE = "address-state";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
523         * <p>
524         * Description: <b>A state specified in an address</b><br>
525         * Type: <b>string</b><br>
526         * Path: <b>RelatedPerson.address.state</b><br>
527         * </p>
528         */
529        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
530
531        /**
532         * Search parameter constant for <b>address-postalcode</b>
533         * <p>
534         * Description: <b>A postal code specified in an address</b><br>
535         * Type: <b>string</b><br>
536         * Path: <b>RelatedPerson.address.postalCode</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="address-postalcode", path="RelatedPerson.address.postalCode", description="A postal code specified in an address", type="string"  )
540        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
544         * <p>
545         * Description: <b>A postal code specified in an address</b><br>
546         * Type: <b>string</b><br>
547         * Path: <b>RelatedPerson.address.postalCode</b><br>
548         * </p>
549         */
550        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
551
552        /**
553         * Search parameter constant for <b>address-country</b>
554         * <p>
555         * Description: <b>A country specified in an address</b><br>
556         * Type: <b>string</b><br>
557         * Path: <b>RelatedPerson.address.country</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="address-country", path="RelatedPerson.address.country", description="A country specified in an address", type="string"  )
561        public static final String SP_ADDRESS_COUNTRY = "address-country";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
565         * <p>
566         * Description: <b>A country specified in an address</b><br>
567         * Type: <b>string</b><br>
568         * Path: <b>RelatedPerson.address.country</b><br>
569         * </p>
570         */
571        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
572
573        /**
574         * Search parameter constant for <b>address-use</b>
575         * <p>
576         * Description: <b>A use code specified in an address</b><br>
577         * Type: <b>token</b><br>
578         * Path: <b>RelatedPerson.address.use</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="address-use", path="RelatedPerson.address.use", description="A use code specified in an address", type="token"  )
582        public static final String SP_ADDRESS_USE = "address-use";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
586         * <p>
587         * Description: <b>A use code specified in an address</b><br>
588         * Type: <b>token</b><br>
589         * Path: <b>RelatedPerson.address.use</b><br>
590         * </p>
591         */
592        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
593
594        /**
595         * Search parameter constant for <b>birthdate</b>
596         * <p>
597         * Description: <b>The Related Person's date of birth</b><br>
598         * Type: <b>date</b><br>
599         * Path: <b>RelatedPerson.birthDate</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="birthdate", path="RelatedPerson.birthDate", description="The Related Person's date of birth", type="date"  )
603        public static final String SP_BIRTHDATE = "birthdate";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
607         * <p>
608         * Description: <b>The Related Person's date of birth</b><br>
609         * Type: <b>date</b><br>
610         * Path: <b>RelatedPerson.birthDate</b><br>
611         * </p>
612         */
613        public static final DateClientParam BIRTHDATE = new DateClientParam(SP_BIRTHDATE);
614
615        /**
616         * Search parameter constant for <b>gender</b>
617         * <p>
618         * Description: <b>Gender of the person</b><br>
619         * Type: <b>token</b><br>
620         * Path: <b>RelatedPerson.gender</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token"  )
624        public static final String SP_GENDER = "gender";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
628         * <p>
629         * Description: <b>Gender of the person</b><br>
630         * Type: <b>token</b><br>
631         * Path: <b>RelatedPerson.gender</b><br>
632         * </p>
633         */
634        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
635
636        /**
637         * Search parameter constant for <b>patient</b>
638         * <p>
639         * Description: <b>The patient this person is related to</b><br>
640         * Type: <b>reference</b><br>
641         * Path: <b>RelatedPerson.patient</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference"  )
645        public static final String SP_PATIENT = "patient";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
649         * <p>
650         * Description: <b>The patient this person is related to</b><br>
651         * Type: <b>reference</b><br>
652         * Path: <b>RelatedPerson.patient</b><br>
653         * </p>
654         */
655        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
656
657
658        /**
659         * Constant for fluent queries to be used to add include statements. Specifies
660         * the path value of "<b>RelatedPerson:patient</b>".
661         */
662        public static final Include INCLUDE_PATIENT = new Include("RelatedPerson:patient");
663
664
665        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
666        @Description(
667                shortDefinition="id",
668                formalDefinition="Identifier for a person within a particular scope."
669        )
670        private java.util.List<IdentifierDt> myIdentifier;
671        
672        @Child(name="patient", order=1, min=1, max=1, summary=true, modifier=false, type={
673                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
674        @Description(
675                shortDefinition="",
676                formalDefinition="The patient this person is related to"
677        )
678        private ResourceReferenceDt myPatient;
679        
680        @Child(name="relationship", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
681        @Description(
682                shortDefinition="class",
683                formalDefinition="The nature of the relationship between a patient and the related person"
684        )
685        private CodeableConceptDt myRelationship;
686        
687        @Child(name="name", type=HumanNameDt.class, order=3, min=0, max=1, summary=true, modifier=false)        
688        @Description(
689                shortDefinition="",
690                formalDefinition="A name associated with the person"
691        )
692        private HumanNameDt myName;
693        
694        @Child(name="telecom", type=ContactPointDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
695        @Description(
696                shortDefinition="",
697                formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
698        )
699        private java.util.List<ContactPointDt> myTelecom;
700        
701        @Child(name="gender", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=false)   
702        @Description(
703                shortDefinition="",
704                formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
705        )
706        private BoundCodeDt<AdministrativeGenderEnum> myGender;
707        
708        @Child(name="birthDate", type=DateDt.class, order=6, min=0, max=1, summary=true, modifier=false)        
709        @Description(
710                shortDefinition="",
711                formalDefinition=""
712        )
713        private DateDt myBirthDate;
714        
715        @Child(name="address", type=AddressDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
716        @Description(
717                shortDefinition="",
718                formalDefinition="Address where the related person can be contacted or visited"
719        )
720        private java.util.List<AddressDt> myAddress;
721        
722        @Child(name="photo", type=AttachmentDt.class, order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
723        @Description(
724                shortDefinition="",
725                formalDefinition="Image of the person"
726        )
727        private java.util.List<AttachmentDt> myPhoto;
728        
729        @Child(name="period", type=PeriodDt.class, order=9, min=0, max=1, summary=false, modifier=false)        
730        @Description(
731                shortDefinition="when.done",
732                formalDefinition="The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown."
733        )
734        private PeriodDt myPeriod;
735        
736
737        @Override
738        public boolean isEmpty() {
739                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myPatient,  myRelationship,  myName,  myTelecom,  myGender,  myBirthDate,  myAddress,  myPhoto,  myPeriod);
740        }
741        
742        @Override
743        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
744                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myBirthDate, myAddress, myPhoto, myPeriod);
745        }
746
747        /**
748         * Gets the value(s) for <b>identifier</b> (id).
749         * creating it if it does
750         * not exist. Will not return <code>null</code>.
751         *
752     * <p>
753     * <b>Definition:</b>
754     * Identifier for a person within a particular scope.
755     * </p> 
756         */
757        public java.util.List<IdentifierDt> getIdentifier() {  
758                if (myIdentifier == null) {
759                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
760                }
761                return myIdentifier;
762        }
763
764        /**
765         * Sets the value(s) for <b>identifier</b> (id)
766         *
767     * <p>
768     * <b>Definition:</b>
769     * Identifier for a person within a particular scope.
770     * </p> 
771         */
772        public RelatedPerson setIdentifier(java.util.List<IdentifierDt> theValue) {
773                myIdentifier = theValue;
774                return this;
775        }
776        
777        
778
779        /**
780         * Adds and returns a new value for <b>identifier</b> (id)
781         *
782     * <p>
783     * <b>Definition:</b>
784     * Identifier for a person within a particular scope.
785     * </p> 
786         */
787        public IdentifierDt addIdentifier() {
788                IdentifierDt newType = new IdentifierDt();
789                getIdentifier().add(newType);
790                return newType; 
791        }
792
793        /**
794         * Adds a given new value for <b>identifier</b> (id)
795         *
796         * <p>
797         * <b>Definition:</b>
798         * Identifier for a person within a particular scope.
799         * </p>
800         * @param theValue The identifier to add (must not be <code>null</code>)
801         */
802        public RelatedPerson addIdentifier(IdentifierDt theValue) {
803                if (theValue == null) {
804                        throw new NullPointerException("theValue must not be null");
805                }
806                getIdentifier().add(theValue);
807                return this;
808        }
809
810        /**
811         * Gets the first repetition for <b>identifier</b> (id),
812         * creating it if it does not already exist.
813         *
814     * <p>
815     * <b>Definition:</b>
816     * Identifier for a person within a particular scope.
817     * </p> 
818         */
819        public IdentifierDt getIdentifierFirstRep() {
820                if (getIdentifier().isEmpty()) {
821                        return addIdentifier();
822                }
823                return getIdentifier().get(0); 
824        }
825  
826        /**
827         * Gets the value(s) for <b>patient</b> ().
828         * creating it if it does
829         * not exist. Will not return <code>null</code>.
830         *
831     * <p>
832     * <b>Definition:</b>
833     * The patient this person is related to
834     * </p> 
835         */
836        public ResourceReferenceDt getPatient() {  
837                if (myPatient == null) {
838                        myPatient = new ResourceReferenceDt();
839                }
840                return myPatient;
841        }
842
843        /**
844         * Sets the value(s) for <b>patient</b> ()
845         *
846     * <p>
847     * <b>Definition:</b>
848     * The patient this person is related to
849     * </p> 
850         */
851        public RelatedPerson setPatient(ResourceReferenceDt theValue) {
852                myPatient = theValue;
853                return this;
854        }
855        
856        
857
858  
859        /**
860         * Gets the value(s) for <b>relationship</b> (class).
861         * creating it if it does
862         * not exist. Will not return <code>null</code>.
863         *
864     * <p>
865     * <b>Definition:</b>
866     * The nature of the relationship between a patient and the related person
867     * </p> 
868         */
869        public CodeableConceptDt getRelationship() {  
870                if (myRelationship == null) {
871                        myRelationship = new CodeableConceptDt();
872                }
873                return myRelationship;
874        }
875
876        /**
877         * Sets the value(s) for <b>relationship</b> (class)
878         *
879     * <p>
880     * <b>Definition:</b>
881     * The nature of the relationship between a patient and the related person
882     * </p> 
883         */
884        public RelatedPerson setRelationship(CodeableConceptDt theValue) {
885                myRelationship = theValue;
886                return this;
887        }
888        
889        
890
891  
892        /**
893         * Gets the value(s) for <b>name</b> ().
894         * creating it if it does
895         * not exist. Will not return <code>null</code>.
896         *
897     * <p>
898     * <b>Definition:</b>
899     * A name associated with the person
900     * </p> 
901         */
902        public HumanNameDt getName() {  
903                if (myName == null) {
904                        myName = new HumanNameDt();
905                }
906                return myName;
907        }
908
909        /**
910         * Sets the value(s) for <b>name</b> ()
911         *
912     * <p>
913     * <b>Definition:</b>
914     * A name associated with the person
915     * </p> 
916         */
917        public RelatedPerson setName(HumanNameDt theValue) {
918                myName = theValue;
919                return this;
920        }
921        
922        
923
924  
925        /**
926         * Gets the value(s) for <b>telecom</b> ().
927         * creating it if it does
928         * not exist. Will not return <code>null</code>.
929         *
930     * <p>
931     * <b>Definition:</b>
932     * A contact detail for the person, e.g. a telephone number or an email address.
933     * </p> 
934         */
935        public java.util.List<ContactPointDt> getTelecom() {  
936                if (myTelecom == null) {
937                        myTelecom = new java.util.ArrayList<ContactPointDt>();
938                }
939                return myTelecom;
940        }
941
942        /**
943         * Sets the value(s) for <b>telecom</b> ()
944         *
945     * <p>
946     * <b>Definition:</b>
947     * A contact detail for the person, e.g. a telephone number or an email address.
948     * </p> 
949         */
950        public RelatedPerson setTelecom(java.util.List<ContactPointDt> theValue) {
951                myTelecom = theValue;
952                return this;
953        }
954        
955        
956
957        /**
958         * Adds and returns a new value for <b>telecom</b> ()
959         *
960     * <p>
961     * <b>Definition:</b>
962     * A contact detail for the person, e.g. a telephone number or an email address.
963     * </p> 
964         */
965        public ContactPointDt addTelecom() {
966                ContactPointDt newType = new ContactPointDt();
967                getTelecom().add(newType);
968                return newType; 
969        }
970
971        /**
972         * Adds a given new value for <b>telecom</b> ()
973         *
974         * <p>
975         * <b>Definition:</b>
976         * A contact detail for the person, e.g. a telephone number or an email address.
977         * </p>
978         * @param theValue The telecom to add (must not be <code>null</code>)
979         */
980        public RelatedPerson addTelecom(ContactPointDt theValue) {
981                if (theValue == null) {
982                        throw new NullPointerException("theValue must not be null");
983                }
984                getTelecom().add(theValue);
985                return this;
986        }
987
988        /**
989         * Gets the first repetition for <b>telecom</b> (),
990         * creating it if it does not already exist.
991         *
992     * <p>
993     * <b>Definition:</b>
994     * A contact detail for the person, e.g. a telephone number or an email address.
995     * </p> 
996         */
997        public ContactPointDt getTelecomFirstRep() {
998                if (getTelecom().isEmpty()) {
999                        return addTelecom();
1000                }
1001                return getTelecom().get(0); 
1002        }
1003  
1004        /**
1005         * Gets the value(s) for <b>gender</b> ().
1006         * creating it if it does
1007         * not exist. Will not return <code>null</code>.
1008         *
1009     * <p>
1010     * <b>Definition:</b>
1011     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1012     * </p> 
1013         */
1014        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
1015                if (myGender == null) {
1016                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
1017                }
1018                return myGender;
1019        }
1020
1021        
1022        /**
1023         * Gets the value(s) for <b>gender</b> ().
1024         * creating it if it does
1025         * not exist. Will not return <code>null</code>.
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1030     * </p> 
1031         */
1032        public String getGender() {  
1033                return getGenderElement().getValue();
1034        }
1035
1036        /**
1037         * Sets the value(s) for <b>gender</b> ()
1038         *
1039     * <p>
1040     * <b>Definition:</b>
1041     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1042     * </p> 
1043         */
1044        public RelatedPerson setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
1045                myGender = theValue;
1046                return this;
1047        }
1048        
1049        
1050
1051        /**
1052         * Sets the value(s) for <b>gender</b> ()
1053         *
1054     * <p>
1055     * <b>Definition:</b>
1056     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1057     * </p> 
1058         */
1059        public RelatedPerson setGender(AdministrativeGenderEnum theValue) {
1060                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
1061                
1062/*
1063                getGenderElement().setValueAsEnum(theValue);
1064*/
1065                return this;
1066        }
1067
1068  
1069        /**
1070         * Gets the value(s) for <b>birthDate</b> ().
1071         * creating it if it does
1072         * not exist. Will not return <code>null</code>.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * 
1077     * </p> 
1078         */
1079        public DateDt getBirthDateElement() {  
1080                if (myBirthDate == null) {
1081                        myBirthDate = new DateDt();
1082                }
1083                return myBirthDate;
1084        }
1085
1086        
1087        /**
1088         * Gets the value(s) for <b>birthDate</b> ().
1089         * creating it if it does
1090         * not exist. Will not return <code>null</code>.
1091         *
1092     * <p>
1093     * <b>Definition:</b>
1094     * 
1095     * </p> 
1096         */
1097        public Date getBirthDate() {  
1098                return getBirthDateElement().getValue();
1099        }
1100
1101        /**
1102         * Sets the value(s) for <b>birthDate</b> ()
1103         *
1104     * <p>
1105     * <b>Definition:</b>
1106     * 
1107     * </p> 
1108         */
1109        public RelatedPerson setBirthDate(DateDt theValue) {
1110                myBirthDate = theValue;
1111                return this;
1112        }
1113        
1114        
1115
1116        /**
1117         * Sets the value for <b>birthDate</b> ()
1118         *
1119     * <p>
1120     * <b>Definition:</b>
1121     * 
1122     * </p> 
1123         */
1124        public RelatedPerson setBirthDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1125                myBirthDate = new DateDt(theDate, thePrecision); 
1126                return this; 
1127        }
1128
1129        /**
1130         * Sets the value for <b>birthDate</b> ()
1131         *
1132     * <p>
1133     * <b>Definition:</b>
1134     * 
1135     * </p> 
1136         */
1137        public RelatedPerson setBirthDateWithDayPrecision( Date theDate) {
1138                myBirthDate = new DateDt(theDate); 
1139                return this; 
1140        }
1141
1142 
1143        /**
1144         * Gets the value(s) for <b>address</b> ().
1145         * creating it if it does
1146         * not exist. Will not return <code>null</code>.
1147         *
1148     * <p>
1149     * <b>Definition:</b>
1150     * Address where the related person can be contacted or visited
1151     * </p> 
1152         */
1153        public java.util.List<AddressDt> getAddress() {  
1154                if (myAddress == null) {
1155                        myAddress = new java.util.ArrayList<AddressDt>();
1156                }
1157                return myAddress;
1158        }
1159
1160        /**
1161         * Sets the value(s) for <b>address</b> ()
1162         *
1163     * <p>
1164     * <b>Definition:</b>
1165     * Address where the related person can be contacted or visited
1166     * </p> 
1167         */
1168        public RelatedPerson setAddress(java.util.List<AddressDt> theValue) {
1169                myAddress = theValue;
1170                return this;
1171        }
1172        
1173        
1174
1175        /**
1176         * Adds and returns a new value for <b>address</b> ()
1177         *
1178     * <p>
1179     * <b>Definition:</b>
1180     * Address where the related person can be contacted or visited
1181     * </p> 
1182         */
1183        public AddressDt addAddress() {
1184                AddressDt newType = new AddressDt();
1185                getAddress().add(newType);
1186                return newType; 
1187        }
1188
1189        /**
1190         * Adds a given new value for <b>address</b> ()
1191         *
1192         * <p>
1193         * <b>Definition:</b>
1194         * Address where the related person can be contacted or visited
1195         * </p>
1196         * @param theValue The address to add (must not be <code>null</code>)
1197         */
1198        public RelatedPerson addAddress(AddressDt theValue) {
1199                if (theValue == null) {
1200                        throw new NullPointerException("theValue must not be null");
1201                }
1202                getAddress().add(theValue);
1203                return this;
1204        }
1205
1206        /**
1207         * Gets the first repetition for <b>address</b> (),
1208         * creating it if it does not already exist.
1209         *
1210     * <p>
1211     * <b>Definition:</b>
1212     * Address where the related person can be contacted or visited
1213     * </p> 
1214         */
1215        public AddressDt getAddressFirstRep() {
1216                if (getAddress().isEmpty()) {
1217                        return addAddress();
1218                }
1219                return getAddress().get(0); 
1220        }
1221  
1222        /**
1223         * Gets the value(s) for <b>photo</b> ().
1224         * creating it if it does
1225         * not exist. Will not return <code>null</code>.
1226         *
1227     * <p>
1228     * <b>Definition:</b>
1229     * Image of the person
1230     * </p> 
1231         */
1232        public java.util.List<AttachmentDt> getPhoto() {  
1233                if (myPhoto == null) {
1234                        myPhoto = new java.util.ArrayList<AttachmentDt>();
1235                }
1236                return myPhoto;
1237        }
1238
1239        /**
1240         * Sets the value(s) for <b>photo</b> ()
1241         *
1242     * <p>
1243     * <b>Definition:</b>
1244     * Image of the person
1245     * </p> 
1246         */
1247        public RelatedPerson setPhoto(java.util.List<AttachmentDt> theValue) {
1248                myPhoto = theValue;
1249                return this;
1250        }
1251        
1252        
1253
1254        /**
1255         * Adds and returns a new value for <b>photo</b> ()
1256         *
1257     * <p>
1258     * <b>Definition:</b>
1259     * Image of the person
1260     * </p> 
1261         */
1262        public AttachmentDt addPhoto() {
1263                AttachmentDt newType = new AttachmentDt();
1264                getPhoto().add(newType);
1265                return newType; 
1266        }
1267
1268        /**
1269         * Adds a given new value for <b>photo</b> ()
1270         *
1271         * <p>
1272         * <b>Definition:</b>
1273         * Image of the person
1274         * </p>
1275         * @param theValue The photo to add (must not be <code>null</code>)
1276         */
1277        public RelatedPerson addPhoto(AttachmentDt theValue) {
1278                if (theValue == null) {
1279                        throw new NullPointerException("theValue must not be null");
1280                }
1281                getPhoto().add(theValue);
1282                return this;
1283        }
1284
1285        /**
1286         * Gets the first repetition for <b>photo</b> (),
1287         * creating it if it does not already exist.
1288         *
1289     * <p>
1290     * <b>Definition:</b>
1291     * Image of the person
1292     * </p> 
1293         */
1294        public AttachmentDt getPhotoFirstRep() {
1295                if (getPhoto().isEmpty()) {
1296                        return addPhoto();
1297                }
1298                return getPhoto().get(0); 
1299        }
1300  
1301        /**
1302         * Gets the value(s) for <b>period</b> (when.done).
1303         * creating it if it does
1304         * not exist. Will not return <code>null</code>.
1305         *
1306     * <p>
1307     * <b>Definition:</b>
1308     * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.
1309     * </p> 
1310         */
1311        public PeriodDt getPeriod() {  
1312                if (myPeriod == null) {
1313                        myPeriod = new PeriodDt();
1314                }
1315                return myPeriod;
1316        }
1317
1318        /**
1319         * Sets the value(s) for <b>period</b> (when.done)
1320         *
1321     * <p>
1322     * <b>Definition:</b>
1323     * The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.
1324     * </p> 
1325         */
1326        public RelatedPerson setPeriod(PeriodDt theValue) {
1327                myPeriod = theValue;
1328                return this;
1329        }
1330        
1331        
1332
1333  
1334
1335
1336    @Override
1337    public String getResourceName() {
1338        return "RelatedPerson";
1339    }
1340    
1341    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1342        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1343    }
1344
1345
1346}