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>Patient</b> Resource
282 * (administrative.individual)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * Tracking patient is the center of the healthcare process
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Patient">http://hl7.org/fhir/profiles/Patient</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Patient", profile="http://hl7.org/fhir/profiles/Patient", id="patient")
301public class Patient extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>identifier</b>
307         * <p>
308         * Description: <b>A patient identifier</b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>Patient.identifier</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" 
314 )
315        public static final String SP_IDENTIFIER = "identifier";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
319         * <p>
320         * Description: <b>A patient identifier</b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>Patient.identifier</b><br>
323         * </p>
324         */
325        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
326
327        /**
328         * Search parameter constant for <b>name</b>
329         * <p>
330         * Description: <b>A portion of either family or given name of the patient</b><br>
331         * Type: <b>string</b><br>
332         * Path: <b>Patient.name</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="name", path="Patient.name", description="A portion of either family or given name of the patient", type="string" 
336 )
337        public static final String SP_NAME = "name";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>name</b>
341         * <p>
342         * Description: <b>A portion of either family or given name of the patient</b><br>
343         * Type: <b>string</b><br>
344         * Path: <b>Patient.name</b><br>
345         * </p>
346         */
347        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
348
349        /**
350         * Search parameter constant for <b>family</b>
351         * <p>
352         * Description: <b>A portion of the family name of the patient</b><br>
353         * Type: <b>string</b><br>
354         * Path: <b>Patient.name.family</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient", type="string" 
358 )
359        public static final String SP_FAMILY = "family";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>family</b>
363         * <p>
364         * Description: <b>A portion of the family name of the patient</b><br>
365         * Type: <b>string</b><br>
366         * Path: <b>Patient.name.family</b><br>
367         * </p>
368         */
369        public static final StringClientParam FAMILY = new StringClientParam(SP_FAMILY);
370
371        /**
372         * Search parameter constant for <b>given</b>
373         * <p>
374         * Description: <b>A portion of the given name of the patient</b><br>
375         * Type: <b>string</b><br>
376         * Path: <b>Patient.name.given</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="given", path="Patient.name.given", description="A portion of the given name of the patient", type="string" 
380 )
381        public static final String SP_GIVEN = "given";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>given</b>
385         * <p>
386         * Description: <b>A portion of the given name of the patient</b><br>
387         * Type: <b>string</b><br>
388         * Path: <b>Patient.name.given</b><br>
389         * </p>
390         */
391        public static final StringClientParam GIVEN = new StringClientParam(SP_GIVEN);
392
393        /**
394         * Search parameter constant for <b>phonetic</b>
395         * <p>
396         * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
397         * Type: <b>string</b><br>
398         * Path: <b>Patient.name</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="phonetic", path="Patient.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" 
402 )
403        public static final String SP_PHONETIC = "phonetic";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
407         * <p>
408         * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
409         * Type: <b>string</b><br>
410         * Path: <b>Patient.name</b><br>
411         * </p>
412         */
413        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
414
415        /**
416         * Search parameter constant for <b>telecom</b>
417         * <p>
418         * Description: <b>The value in any kind of telecom details of the patient</b><br>
419         * Type: <b>token</b><br>
420         * Path: <b>Patient.telecom</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="telecom", path="Patient.telecom", description="The value in any kind of telecom details of the patient", type="token" 
424 )
425        public static final String SP_TELECOM = "telecom";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
429         * <p>
430         * Description: <b>The value in any kind of telecom details of the patient</b><br>
431         * Type: <b>token</b><br>
432         * Path: <b>Patient.telecom</b><br>
433         * </p>
434         */
435        public static final TokenClientParam TELECOM = new TokenClientParam(SP_TELECOM);
436
437        /**
438         * 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>Patient.telecom(system=phone)</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="phone", path="Patient.telecom(system=phone)", description="A value in a phone contact", type="token" 
446 )
447        public static final String SP_PHONE = "phone";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>phone</b>
451         * <p>
452         * Description: <b>A value in a phone contact</b><br>
453         * Type: <b>token</b><br>
454         * Path: <b>Patient.telecom(system=phone)</b><br>
455         * </p>
456         */
457        public static final TokenClientParam PHONE = new TokenClientParam(SP_PHONE);
458
459        /**
460         * Search parameter constant for <b>email</b>
461         * <p>
462         * Description: <b>A value in an email contact</b><br>
463         * Type: <b>token</b><br>
464         * Path: <b>Patient.telecom(system=email)</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="email", path="Patient.telecom(system=email)", description="A value in an email contact", type="token" 
468 )
469        public static final String SP_EMAIL = "email";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>email</b>
473         * <p>
474         * Description: <b>A value in an email contact</b><br>
475         * Type: <b>token</b><br>
476         * Path: <b>Patient.telecom(system=email)</b><br>
477         * </p>
478         */
479        public static final TokenClientParam EMAIL = new TokenClientParam(SP_EMAIL);
480
481        /**
482         * Search parameter constant for <b>address</b>
483         * <p>
484         * Description: <b>An address in any kind of address/part of the patient</b><br>
485         * Type: <b>string</b><br>
486         * Path: <b>Patient.address</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="address", path="Patient.address", description="An address in any kind of address/part of the patient", type="string" 
490 )
491        public static final String SP_ADDRESS = "address";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>address</b>
495         * <p>
496         * Description: <b>An address in any kind of address/part of the patient</b><br>
497         * Type: <b>string</b><br>
498         * Path: <b>Patient.address</b><br>
499         * </p>
500         */
501        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
502
503        /**
504         * Search parameter constant for <b>address-city</b>
505         * <p>
506         * Description: <b>A city specified in an address</b><br>
507         * Type: <b>string</b><br>
508         * Path: <b>Patient.address.city</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="address-city", path="Patient.address.city", description="A city specified in an address", type="string" 
512 )
513        public static final String SP_ADDRESS_CITY = "address-city";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
517         * <p>
518         * Description: <b>A city specified in an address</b><br>
519         * Type: <b>string</b><br>
520         * Path: <b>Patient.address.city</b><br>
521         * </p>
522         */
523        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
524
525        /**
526         * Search parameter constant for <b>address-state</b>
527         * <p>
528         * Description: <b>A state specified in an address</b><br>
529         * Type: <b>string</b><br>
530         * Path: <b>Patient.address.state</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="address-state", path="Patient.address.state", description="A state specified in an address", type="string" 
534 )
535        public static final String SP_ADDRESS_STATE = "address-state";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
539         * <p>
540         * Description: <b>A state specified in an address</b><br>
541         * Type: <b>string</b><br>
542         * Path: <b>Patient.address.state</b><br>
543         * </p>
544         */
545        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
546
547        /**
548         * Search parameter constant for <b>address-postalcode</b>
549         * <p>
550         * Description: <b>A postalCode specified in an address</b><br>
551         * Type: <b>string</b><br>
552         * Path: <b>Patient.address.postalCode</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="address-postalcode", path="Patient.address.postalCode", description="A postalCode specified in an address", type="string" 
556 )
557        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
558
559        /**
560         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
561         * <p>
562         * Description: <b>A postalCode specified in an address</b><br>
563         * Type: <b>string</b><br>
564         * Path: <b>Patient.address.postalCode</b><br>
565         * </p>
566         */
567        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
568
569        /**
570         * Search parameter constant for <b>address-country</b>
571         * <p>
572         * Description: <b>A country specified in an address</b><br>
573         * Type: <b>string</b><br>
574         * Path: <b>Patient.address.country</b><br>
575         * </p>
576         */
577        @SearchParamDefinition(name="address-country", path="Patient.address.country", description="A country specified in an address", type="string" 
578 )
579        public static final String SP_ADDRESS_COUNTRY = "address-country";
580
581        /**
582         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
583         * <p>
584         * Description: <b>A country specified in an address</b><br>
585         * Type: <b>string</b><br>
586         * Path: <b>Patient.address.country</b><br>
587         * </p>
588         */
589        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
590
591        /**
592         * Search parameter constant for <b>address-use</b>
593         * <p>
594         * Description: <b>A use code specified in an address</b><br>
595         * Type: <b>token</b><br>
596         * Path: <b>Patient.address.use</b><br>
597         * </p>
598         */
599        @SearchParamDefinition(name="address-use", path="Patient.address.use", description="A use code specified in an address", type="token" 
600 )
601        public static final String SP_ADDRESS_USE = "address-use";
602
603        /**
604         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
605         * <p>
606         * Description: <b>A use code specified in an address</b><br>
607         * Type: <b>token</b><br>
608         * Path: <b>Patient.address.use</b><br>
609         * </p>
610         */
611        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
612
613        /**
614         * Search parameter constant for <b>gender</b>
615         * <p>
616         * Description: <b>Gender of the patient</b><br>
617         * Type: <b>token</b><br>
618         * Path: <b>Patient.gender</b><br>
619         * </p>
620         */
621        @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient", type="token" 
622 )
623        public static final String SP_GENDER = "gender";
624
625        /**
626         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
627         * <p>
628         * Description: <b>Gender of the patient</b><br>
629         * Type: <b>token</b><br>
630         * Path: <b>Patient.gender</b><br>
631         * </p>
632         */
633        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
634
635        /**
636         * Search parameter constant for <b>language</b>
637         * <p>
638         * Description: <b>Language code (irrespective of use value)</b><br>
639         * Type: <b>token</b><br>
640         * Path: <b>Patient.communication.language</b><br>
641         * </p>
642         */
643        @SearchParamDefinition(name="language", path="Patient.communication.language", description="Language code (irrespective of use value)", type="token" 
644 )
645        public static final String SP_LANGUAGE = "language";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>language</b>
649         * <p>
650         * Description: <b>Language code (irrespective of use value)</b><br>
651         * Type: <b>token</b><br>
652         * Path: <b>Patient.communication.language</b><br>
653         * </p>
654         */
655        public static final TokenClientParam LANGUAGE = new TokenClientParam(SP_LANGUAGE);
656
657        /**
658         * Search parameter constant for <b>birthdate</b>
659         * <p>
660         * Description: <b>The patient's date of birth</b><br>
661         * Type: <b>date</b><br>
662         * Path: <b>Patient.birthDate</b><br>
663         * </p>
664         */
665        @SearchParamDefinition(name="birthdate", path="Patient.birthDate", description="The patient's date of birth", type="date" 
666 )
667        public static final String SP_BIRTHDATE = "birthdate";
668
669        /**
670         * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
671         * <p>
672         * Description: <b>The patient's date of birth</b><br>
673         * Type: <b>date</b><br>
674         * Path: <b>Patient.birthDate</b><br>
675         * </p>
676         */
677        public static final DateClientParam BIRTHDATE = new DateClientParam(SP_BIRTHDATE);
678
679        /**
680         * Search parameter constant for <b>organization</b>
681         * <p>
682         * Description: <b>The organization at which this person is a patient</b><br>
683         * Type: <b>reference</b><br>
684         * Path: <b>Patient.managingOrganization</b><br>
685         * </p>
686         */
687        @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization at which this person is a patient", type="reference" 
688 )
689        public static final String SP_ORGANIZATION = "organization";
690
691        /**
692         * <b>Fluent Client</b> search parameter constant for <b>organization</b>
693         * <p>
694         * Description: <b>The organization at which this person is a patient</b><br>
695         * Type: <b>reference</b><br>
696         * Path: <b>Patient.managingOrganization</b><br>
697         * </p>
698         */
699        public static final ReferenceClientParam ORGANIZATION = new ReferenceClientParam(SP_ORGANIZATION);
700
701        /**
702         * Search parameter constant for <b>careprovider</b>
703         * <p>
704         * Description: <b>Patient's nominated care provider, could be a care manager, not the organization that manages the record</b><br>
705         * Type: <b>reference</b><br>
706         * Path: <b>Patient.careProvider</b><br>
707         * </p>
708         */
709        @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" 
710, providesMembershipIn={
711 @Compartment(name="Encounter")         }
712 )
713        public static final String SP_CAREPROVIDER = "careprovider";
714
715        /**
716         * <b>Fluent Client</b> search parameter constant for <b>careprovider</b>
717         * <p>
718         * Description: <b>Patient's nominated care provider, could be a care manager, not the organization that manages the record</b><br>
719         * Type: <b>reference</b><br>
720         * Path: <b>Patient.careProvider</b><br>
721         * </p>
722         */
723        public static final ReferenceClientParam CAREPROVIDER = new ReferenceClientParam(SP_CAREPROVIDER);
724
725        /**
726         * Search parameter constant for <b>active</b>
727         * <p>
728         * Description: <b>Whether the patient record is active</b><br>
729         * Type: <b>token</b><br>
730         * Path: <b>Patient.active</b><br>
731         * </p>
732         */
733        @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" 
734 )
735        public static final String SP_ACTIVE = "active";
736
737        /**
738         * <b>Fluent Client</b> search parameter constant for <b>active</b>
739         * <p>
740         * Description: <b>Whether the patient record is active</b><br>
741         * Type: <b>token</b><br>
742         * Path: <b>Patient.active</b><br>
743         * </p>
744         */
745        public static final TokenClientParam ACTIVE = new TokenClientParam(SP_ACTIVE);
746
747        /**
748         * Search parameter constant for <b>animal-species</b>
749         * <p>
750         * Description: <b>The species for animal patients</b><br>
751         * Type: <b>token</b><br>
752         * Path: <b>Patient.animal.species</b><br>
753         * </p>
754         */
755        @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients", type="token" 
756 )
757        public static final String SP_ANIMAL_SPECIES = "animal-species";
758
759        /**
760         * <b>Fluent Client</b> search parameter constant for <b>animal-species</b>
761         * <p>
762         * Description: <b>The species for animal patients</b><br>
763         * Type: <b>token</b><br>
764         * Path: <b>Patient.animal.species</b><br>
765         * </p>
766         */
767        public static final TokenClientParam ANIMAL_SPECIES = new TokenClientParam(SP_ANIMAL_SPECIES);
768
769        /**
770         * Search parameter constant for <b>animal-breed</b>
771         * <p>
772         * Description: <b>The breed for animal patients</b><br>
773         * Type: <b>token</b><br>
774         * Path: <b>Patient.animal.breed</b><br>
775         * </p>
776         */
777        @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients", type="token" 
778 )
779        public static final String SP_ANIMAL_BREED = "animal-breed";
780
781        /**
782         * <b>Fluent Client</b> search parameter constant for <b>animal-breed</b>
783         * <p>
784         * Description: <b>The breed for animal patients</b><br>
785         * Type: <b>token</b><br>
786         * Path: <b>Patient.animal.breed</b><br>
787         * </p>
788         */
789        public static final TokenClientParam ANIMAL_BREED = new TokenClientParam(SP_ANIMAL_BREED);
790
791        /**
792         * Search parameter constant for <b>link</b>
793         * <p>
794         * Description: <b>All patients linked to the given patient</b><br>
795         * Type: <b>reference</b><br>
796         * Path: <b>Patient.link.other</b><br>
797         * </p>
798         */
799        @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" 
800, providesMembershipIn={
801 @Compartment(name="Patient")   }
802 )
803        public static final String SP_LINK = "link";
804
805        /**
806         * <b>Fluent Client</b> search parameter constant for <b>link</b>
807         * <p>
808         * Description: <b>All patients linked to the given patient</b><br>
809         * Type: <b>reference</b><br>
810         * Path: <b>Patient.link.other</b><br>
811         * </p>
812         */
813        public static final ReferenceClientParam LINK = new ReferenceClientParam(SP_LINK);
814
815        /**
816         * Search parameter constant for <b>deceased</b>
817         * <p>
818         * Description: <b>This patient has been marked as deceased, or as a death date entered</b><br>
819         * Type: <b>token</b><br>
820         * Path: <b>Patient.deceased[x]</b><br>
821         * </p>
822         */
823        @SearchParamDefinition(name="deceased", path="Patient.deceased[x]", description="This patient has been marked as deceased, or as a death date entered", type="token" 
824 )
825        public static final String SP_DECEASED = "deceased";
826
827        /**
828         * <b>Fluent Client</b> search parameter constant for <b>deceased</b>
829         * <p>
830         * Description: <b>This patient has been marked as deceased, or as a death date entered</b><br>
831         * Type: <b>token</b><br>
832         * Path: <b>Patient.deceased[x]</b><br>
833         * </p>
834         */
835        public static final TokenClientParam DECEASED = new TokenClientParam(SP_DECEASED);
836
837        /**
838         * Search parameter constant for <b>deathdate</b>
839         * <p>
840         * Description: <b>The date of death has been provided and satisfies this search value</b><br>
841         * Type: <b>date</b><br>
842         * Path: <b>Patient.deceasedDateTime</b><br>
843         * </p>
844         */
845        @SearchParamDefinition(name="deathdate", path="Patient.deceasedDateTime", description="The date of death has been provided and satisfies this search value", type="date" 
846 )
847        public static final String SP_DEATHDATE = "deathdate";
848
849        /**
850         * <b>Fluent Client</b> search parameter constant for <b>deathdate</b>
851         * <p>
852         * Description: <b>The date of death has been provided and satisfies this search value</b><br>
853         * Type: <b>date</b><br>
854         * Path: <b>Patient.deceasedDateTime</b><br>
855         * </p>
856         */
857        public static final DateClientParam DEATHDATE = new DateClientParam(SP_DEATHDATE);
858
859
860        /**
861         * Constant for fluent queries to be used to add include statements. Specifies
862         * the path value of "<b>Patient:careprovider</b>".
863         */
864        public static final Include INCLUDE_CAREPROVIDER = new Include("Patient:careprovider");
865
866        /**
867         * Constant for fluent queries to be used to add include statements. Specifies
868         * the path value of "<b>Patient:link</b>".
869         */
870        public static final Include INCLUDE_LINK = new Include("Patient:link");
871
872        /**
873         * Constant for fluent queries to be used to add include statements. Specifies
874         * the path value of "<b>Patient:organization</b>".
875         */
876        public static final Include INCLUDE_ORGANIZATION = new Include("Patient:organization");
877
878
879        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
880        @Description(
881                shortDefinition="id",
882                formalDefinition="An identifier for this patient"
883        )
884        private java.util.List<IdentifierDt> myIdentifier;
885        
886        @Child(name="active", type=BooleanDt.class, order=1, min=0, max=1, summary=true, modifier=true) 
887        @Description(
888                shortDefinition="status",
889                formalDefinition="Whether this patient record is in active use"
890        )
891        private BooleanDt myActive;
892        
893        @Child(name="name", type=HumanNameDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)      
894        @Description(
895                shortDefinition="",
896                formalDefinition="A name associated with the individual."
897        )
898        private java.util.List<HumanNameDt> myName;
899        
900        @Child(name="telecom", type=ContactPointDt.class, order=3, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
901        @Description(
902                shortDefinition="",
903                formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted."
904        )
905        private java.util.List<ContactPointDt> myTelecom;
906        
907        @Child(name="gender", type=CodeDt.class, order=4, min=0, max=1, summary=true, modifier=false)   
908        @Description(
909                shortDefinition="",
910                formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes."
911        )
912        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/administrative-gender")
913        private BoundCodeDt<AdministrativeGenderEnum> myGender;
914        
915        @Child(name="birthDate", type=DateDt.class, order=5, min=0, max=1, summary=true, modifier=false)        
916        @Description(
917                shortDefinition="",
918                formalDefinition="The date of birth for the individual"
919        )
920        private DateDt myBirthDate;
921        
922        @Child(name="deceased", order=6, min=0, max=1, summary=true, modifier=true, type={
923                BooleanDt.class, 
924                DateTimeDt.class
925        })
926        @Description(
927                shortDefinition="",
928                formalDefinition="Indicates if the individual is deceased or not"
929        )
930        private IDatatype myDeceased;
931        
932        @Child(name="address", type=AddressDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
933        @Description(
934                shortDefinition="",
935                formalDefinition="Addresses for the individual"
936        )
937        private java.util.List<AddressDt> myAddress;
938        
939        @Child(name="maritalStatus", type=CodeableConceptDt.class, order=8, min=0, max=1, summary=false, modifier=false)        
940        @Description(
941                shortDefinition="",
942                formalDefinition="This field contains a patient's most recent marital (civil) status."
943        )
944        private BoundCodeableConceptDt<MaritalStatusCodesEnum> myMaritalStatus;
945        
946        @Child(name="multipleBirth", order=9, min=0, max=1, summary=false, modifier=false, type={
947                BooleanDt.class, 
948                IntegerDt.class
949        })
950        @Description(
951                shortDefinition="",
952                formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order."
953        )
954        private IDatatype myMultipleBirth;
955        
956        @Child(name="photo", type=AttachmentDt.class, order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
957        @Description(
958                shortDefinition="",
959                formalDefinition="Image of the patient"
960        )
961        private java.util.List<AttachmentDt> myPhoto;
962        
963        @Child(name="contact", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
964        @Description(
965                shortDefinition="",
966                formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient"
967        )
968        private java.util.List<Contact> myContact;
969        
970        @Child(name="animal", order=12, min=0, max=1, summary=true, modifier=true)      
971        @Description(
972                shortDefinition="",
973                formalDefinition="This patient is known to be an animal"
974        )
975        private Animal myAnimal;
976        
977        @Child(name="communication", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
978        @Description(
979                shortDefinition="",
980                formalDefinition="Languages which may be used to communicate with the patient about his or her health"
981        )
982        private java.util.List<Communication> myCommunication;
983        
984        @Child(name="careProvider", order=14, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
985                ca.uhn.fhir.model.dstu2.resource.Organization.class, 
986                ca.uhn.fhir.model.dstu2.resource.Practitioner.class
987        })
988        @Description(
989                shortDefinition="",
990                formalDefinition="Patient's nominated care provider"
991        )
992        private java.util.List<ResourceReferenceDt> myCareProvider;
993        
994        @Child(name="managingOrganization", order=15, min=0, max=1, summary=true, modifier=false, type={
995                ca.uhn.fhir.model.dstu2.resource.Organization.class
996        })
997        @Description(
998                shortDefinition="",
999                formalDefinition="Organization that is the custodian of the patient record"
1000        )
1001        private ResourceReferenceDt myManagingOrganization;
1002        
1003        @Child(name="link", order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=true)     
1004        @Description(
1005                shortDefinition="",
1006                formalDefinition="Link to another patient resource that concerns the same actual patient"
1007        )
1008        private java.util.List<Link> myLink;
1009        
1010
1011        @Override
1012        public boolean isEmpty() {
1013                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myActive,  myName,  myTelecom,  myGender,  myBirthDate,  myDeceased,  myAddress,  myMaritalStatus,  myMultipleBirth,  myPhoto,  myContact,  myAnimal,  myCommunication,  myCareProvider,  myManagingOrganization,  myLink);
1014        }
1015        
1016        @Override
1017        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1018                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myActive, myName, myTelecom, myGender, myBirthDate, myDeceased, myAddress, myMaritalStatus, myMultipleBirth, myPhoto, myContact, myAnimal, myCommunication, myCareProvider, myManagingOrganization, myLink);
1019        }
1020
1021        /**
1022         * Gets the value(s) for <b>identifier</b> (id).
1023         * creating it if it does
1024         * not exist. Will not return <code>null</code>.
1025         *
1026     * <p>
1027     * <b>Definition:</b>
1028     * An identifier for this patient
1029     * </p> 
1030         */
1031        public java.util.List<IdentifierDt> getIdentifier() {  
1032                if (myIdentifier == null) {
1033                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
1034                }
1035                return myIdentifier;
1036        }
1037
1038        /**
1039         * Sets the value(s) for <b>identifier</b> (id)
1040         *
1041     * <p>
1042     * <b>Definition:</b>
1043     * An identifier for this patient
1044     * </p> 
1045         */
1046        public Patient setIdentifier(java.util.List<IdentifierDt> theValue) {
1047                myIdentifier = theValue;
1048                return this;
1049        }
1050        
1051        
1052
1053        /**
1054         * Adds and returns a new value for <b>identifier</b> (id)
1055         *
1056     * <p>
1057     * <b>Definition:</b>
1058     * An identifier for this patient
1059     * </p> 
1060         */
1061        public IdentifierDt addIdentifier() {
1062                IdentifierDt newType = new IdentifierDt();
1063                getIdentifier().add(newType);
1064                return newType; 
1065        }
1066
1067        /**
1068         * Adds a given new value for <b>identifier</b> (id)
1069         *
1070         * <p>
1071         * <b>Definition:</b>
1072         * An identifier for this patient
1073         * </p>
1074         * @param theValue The identifier to add (must not be <code>null</code>)
1075         */
1076        public Patient addIdentifier(IdentifierDt theValue) {
1077                if (theValue == null) {
1078                        throw new NullPointerException("theValue must not be null");
1079                }
1080                getIdentifier().add(theValue);
1081                return this;
1082        }
1083
1084        /**
1085         * Gets the first repetition for <b>identifier</b> (id),
1086         * creating it if it does not already exist.
1087         *
1088     * <p>
1089     * <b>Definition:</b>
1090     * An identifier for this patient
1091     * </p> 
1092         */
1093        public IdentifierDt getIdentifierFirstRep() {
1094                if (getIdentifier().isEmpty()) {
1095                        return addIdentifier();
1096                }
1097                return getIdentifier().get(0); 
1098        }
1099  
1100        /**
1101         * Gets the value(s) for <b>active</b> (status).
1102         * creating it if it does
1103         * not exist. Will not return <code>null</code>.
1104         *
1105     * <p>
1106     * <b>Definition:</b>
1107     * Whether this patient record is in active use
1108     * </p> 
1109         */
1110        public BooleanDt getActiveElement() {  
1111                if (myActive == null) {
1112                        myActive = new BooleanDt();
1113                }
1114                return myActive;
1115        }
1116
1117        
1118        /**
1119         * Gets the value(s) for <b>active</b> (status).
1120         * creating it if it does
1121         * not exist. This method may return <code>null</code>.
1122         *
1123     * <p>
1124     * <b>Definition:</b>
1125     * Whether this patient record is in active use
1126     * </p> 
1127         */
1128        public Boolean getActive() {  
1129                return getActiveElement().getValue();
1130        }
1131
1132        /**
1133         * Sets the value(s) for <b>active</b> (status)
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * Whether this patient record is in active use
1138     * </p> 
1139         */
1140        public Patient setActive(BooleanDt theValue) {
1141                myActive = theValue;
1142                return this;
1143        }
1144        
1145        
1146
1147        /**
1148         * Sets the value for <b>active</b> (status)
1149         *
1150     * <p>
1151     * <b>Definition:</b>
1152     * Whether this patient record is in active use
1153     * </p> 
1154         */
1155        public Patient setActive( boolean theBoolean) {
1156                myActive = new BooleanDt(theBoolean); 
1157                return this; 
1158        }
1159
1160 
1161        /**
1162         * Gets the value(s) for <b>name</b> ().
1163         * creating it if it does
1164         * not exist. Will not return <code>null</code>.
1165         *
1166     * <p>
1167     * <b>Definition:</b>
1168     * A name associated with the individual.
1169     * </p> 
1170         */
1171        public java.util.List<HumanNameDt> getName() {  
1172                if (myName == null) {
1173                        myName = new java.util.ArrayList<HumanNameDt>();
1174                }
1175                return myName;
1176        }
1177
1178        /**
1179         * Sets the value(s) for <b>name</b> ()
1180         *
1181     * <p>
1182     * <b>Definition:</b>
1183     * A name associated with the individual.
1184     * </p> 
1185         */
1186        public Patient setName(java.util.List<HumanNameDt> theValue) {
1187                myName = theValue;
1188                return this;
1189        }
1190        
1191        
1192
1193        /**
1194         * Adds and returns a new value for <b>name</b> ()
1195         *
1196     * <p>
1197     * <b>Definition:</b>
1198     * A name associated with the individual.
1199     * </p> 
1200         */
1201        public HumanNameDt addName() {
1202                HumanNameDt newType = new HumanNameDt();
1203                getName().add(newType);
1204                return newType; 
1205        }
1206
1207        /**
1208         * Adds a given new value for <b>name</b> ()
1209         *
1210         * <p>
1211         * <b>Definition:</b>
1212         * A name associated with the individual.
1213         * </p>
1214         * @param theValue The name to add (must not be <code>null</code>)
1215         */
1216        public Patient addName(HumanNameDt theValue) {
1217                if (theValue == null) {
1218                        throw new NullPointerException("theValue must not be null");
1219                }
1220                getName().add(theValue);
1221                return this;
1222        }
1223
1224        /**
1225         * Gets the first repetition for <b>name</b> (),
1226         * creating it if it does not already exist.
1227         *
1228     * <p>
1229     * <b>Definition:</b>
1230     * A name associated with the individual.
1231     * </p> 
1232         */
1233        public HumanNameDt getNameFirstRep() {
1234                if (getName().isEmpty()) {
1235                        return addName();
1236                }
1237                return getName().get(0); 
1238        }
1239  
1240        /**
1241         * Gets the value(s) for <b>telecom</b> ().
1242         * creating it if it does
1243         * not exist. Will not return <code>null</code>.
1244         *
1245     * <p>
1246     * <b>Definition:</b>
1247     * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1248     * </p> 
1249         */
1250        public java.util.List<ContactPointDt> getTelecom() {  
1251                if (myTelecom == null) {
1252                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1253                }
1254                return myTelecom;
1255        }
1256
1257        /**
1258         * Sets the value(s) for <b>telecom</b> ()
1259         *
1260     * <p>
1261     * <b>Definition:</b>
1262     * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1263     * </p> 
1264         */
1265        public Patient setTelecom(java.util.List<ContactPointDt> theValue) {
1266                myTelecom = theValue;
1267                return this;
1268        }
1269        
1270        
1271
1272        /**
1273         * Adds and returns a new value for <b>telecom</b> ()
1274         *
1275     * <p>
1276     * <b>Definition:</b>
1277     * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1278     * </p> 
1279         */
1280        public ContactPointDt addTelecom() {
1281                ContactPointDt newType = new ContactPointDt();
1282                getTelecom().add(newType);
1283                return newType; 
1284        }
1285
1286        /**
1287         * Adds a given new value for <b>telecom</b> ()
1288         *
1289         * <p>
1290         * <b>Definition:</b>
1291         * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1292         * </p>
1293         * @param theValue The telecom to add (must not be <code>null</code>)
1294         */
1295        public Patient addTelecom(ContactPointDt theValue) {
1296                if (theValue == null) {
1297                        throw new NullPointerException("theValue must not be null");
1298                }
1299                getTelecom().add(theValue);
1300                return this;
1301        }
1302
1303        /**
1304         * Gets the first repetition for <b>telecom</b> (),
1305         * creating it if it does not already exist.
1306         *
1307     * <p>
1308     * <b>Definition:</b>
1309     * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1310     * </p> 
1311         */
1312        public ContactPointDt getTelecomFirstRep() {
1313                if (getTelecom().isEmpty()) {
1314                        return addTelecom();
1315                }
1316                return getTelecom().get(0); 
1317        }
1318  
1319        /**
1320         * Gets the value(s) for <b>gender</b> ().
1321         * creating it if it does
1322         * not exist. Will not return <code>null</code>.
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1327     * </p> 
1328         */
1329        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
1330                if (myGender == null) {
1331                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
1332                }
1333                return myGender;
1334        }
1335
1336        
1337        /**
1338         * Gets the value(s) for <b>gender</b> ().
1339         * creating it if it does
1340         * not exist. This method may return <code>null</code>.
1341         *
1342     * <p>
1343     * <b>Definition:</b>
1344     * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1345     * </p> 
1346         */
1347        public String getGender() {  
1348                return getGenderElement().getValue();
1349        }
1350
1351        /**
1352         * Sets the value(s) for <b>gender</b> ()
1353         *
1354     * <p>
1355     * <b>Definition:</b>
1356     * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1357     * </p> 
1358         */
1359        public Patient setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
1360                myGender = theValue;
1361                return this;
1362        }
1363        
1364        
1365
1366        /**
1367         * Sets the value(s) for <b>gender</b> ()
1368         *
1369     * <p>
1370     * <b>Definition:</b>
1371     * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1372     * </p> 
1373         */
1374        public Patient setGender(AdministrativeGenderEnum theValue) {
1375                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
1376                
1377/*
1378                getGenderElement().setValueAsEnum(theValue);
1379*/
1380                return this;
1381        }
1382
1383  
1384        /**
1385         * Gets the value(s) for <b>birthDate</b> ().
1386         * creating it if it does
1387         * not exist. Will not return <code>null</code>.
1388         *
1389     * <p>
1390     * <b>Definition:</b>
1391     * The date of birth for the individual
1392     * </p> 
1393         */
1394        public DateDt getBirthDateElement() {  
1395                if (myBirthDate == null) {
1396                        myBirthDate = new DateDt();
1397                }
1398                return myBirthDate;
1399        }
1400
1401        
1402        /**
1403         * Gets the value(s) for <b>birthDate</b> ().
1404         * creating it if it does
1405         * not exist. This method may return <code>null</code>.
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * The date of birth for the individual
1410     * </p> 
1411         */
1412        public Date getBirthDate() {  
1413                return getBirthDateElement().getValue();
1414        }
1415
1416        /**
1417         * Sets the value(s) for <b>birthDate</b> ()
1418         *
1419     * <p>
1420     * <b>Definition:</b>
1421     * The date of birth for the individual
1422     * </p> 
1423         */
1424        public Patient setBirthDate(DateDt theValue) {
1425                myBirthDate = theValue;
1426                return this;
1427        }
1428        
1429        
1430
1431        /**
1432         * Sets the value for <b>birthDate</b> ()
1433         *
1434     * <p>
1435     * <b>Definition:</b>
1436     * The date of birth for the individual
1437     * </p> 
1438         */
1439        public Patient setBirthDateWithDayPrecision( Date theDate) {
1440                myBirthDate = new DateDt(theDate); 
1441                return this; 
1442        }
1443
1444        /**
1445         * Sets the value for <b>birthDate</b> ()
1446         *
1447     * <p>
1448     * <b>Definition:</b>
1449     * The date of birth for the individual
1450     * </p> 
1451         */
1452        public Patient setBirthDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1453                myBirthDate = new DateDt(theDate, thePrecision); 
1454                return this; 
1455        }
1456
1457 
1458        /**
1459         * Gets the value(s) for <b>deceased[x]</b> ().
1460         * creating it if it does
1461         * not exist. Will not return <code>null</code>.
1462         *
1463     * <p>
1464     * <b>Definition:</b>
1465     * Indicates if the individual is deceased or not
1466     * </p> 
1467         */
1468        public IDatatype getDeceased() {  
1469                return myDeceased;
1470        }
1471
1472        /**
1473         * Sets the value(s) for <b>deceased[x]</b> ()
1474         *
1475     * <p>
1476     * <b>Definition:</b>
1477     * Indicates if the individual is deceased or not
1478     * </p> 
1479         */
1480        public Patient setDeceased(IDatatype theValue) {
1481                myDeceased = theValue;
1482                return this;
1483        }
1484        
1485        
1486
1487  
1488        /**
1489         * Gets the value(s) for <b>address</b> ().
1490         * creating it if it does
1491         * not exist. Will not return <code>null</code>.
1492         *
1493     * <p>
1494     * <b>Definition:</b>
1495     * Addresses for the individual
1496     * </p> 
1497         */
1498        public java.util.List<AddressDt> getAddress() {  
1499                if (myAddress == null) {
1500                        myAddress = new java.util.ArrayList<AddressDt>();
1501                }
1502                return myAddress;
1503        }
1504
1505        /**
1506         * Sets the value(s) for <b>address</b> ()
1507         *
1508     * <p>
1509     * <b>Definition:</b>
1510     * Addresses for the individual
1511     * </p> 
1512         */
1513        public Patient setAddress(java.util.List<AddressDt> theValue) {
1514                myAddress = theValue;
1515                return this;
1516        }
1517        
1518        
1519
1520        /**
1521         * Adds and returns a new value for <b>address</b> ()
1522         *
1523     * <p>
1524     * <b>Definition:</b>
1525     * Addresses for the individual
1526     * </p> 
1527         */
1528        public AddressDt addAddress() {
1529                AddressDt newType = new AddressDt();
1530                getAddress().add(newType);
1531                return newType; 
1532        }
1533
1534        /**
1535         * Adds a given new value for <b>address</b> ()
1536         *
1537         * <p>
1538         * <b>Definition:</b>
1539         * Addresses for the individual
1540         * </p>
1541         * @param theValue The address to add (must not be <code>null</code>)
1542         */
1543        public Patient addAddress(AddressDt theValue) {
1544                if (theValue == null) {
1545                        throw new NullPointerException("theValue must not be null");
1546                }
1547                getAddress().add(theValue);
1548                return this;
1549        }
1550
1551        /**
1552         * Gets the first repetition for <b>address</b> (),
1553         * creating it if it does not already exist.
1554         *
1555     * <p>
1556     * <b>Definition:</b>
1557     * Addresses for the individual
1558     * </p> 
1559         */
1560        public AddressDt getAddressFirstRep() {
1561                if (getAddress().isEmpty()) {
1562                        return addAddress();
1563                }
1564                return getAddress().get(0); 
1565        }
1566  
1567        /**
1568         * Gets the value(s) for <b>maritalStatus</b> ().
1569         * creating it if it does
1570         * not exist. Will not return <code>null</code>.
1571         *
1572     * <p>
1573     * <b>Definition:</b>
1574     * This field contains a patient's most recent marital (civil) status.
1575     * </p> 
1576         */
1577        public BoundCodeableConceptDt<MaritalStatusCodesEnum> getMaritalStatus() {  
1578                if (myMaritalStatus == null) {
1579                        myMaritalStatus = new BoundCodeableConceptDt<MaritalStatusCodesEnum>(MaritalStatusCodesEnum.VALUESET_BINDER);
1580                }
1581                return myMaritalStatus;
1582        }
1583
1584        /**
1585         * Sets the value(s) for <b>maritalStatus</b> ()
1586         *
1587     * <p>
1588     * <b>Definition:</b>
1589     * This field contains a patient's most recent marital (civil) status.
1590     * </p> 
1591         */
1592        public Patient setMaritalStatus(BoundCodeableConceptDt<MaritalStatusCodesEnum> theValue) {
1593                myMaritalStatus = theValue;
1594                return this;
1595        }
1596        
1597        
1598
1599        /**
1600         * Sets the value(s) for <b>maritalStatus</b> ()
1601         *
1602     * <p>
1603     * <b>Definition:</b>
1604     * This field contains a patient's most recent marital (civil) status.
1605     * </p> 
1606         */
1607        public Patient setMaritalStatus(MaritalStatusCodesEnum theValue) {
1608                setMaritalStatus(new BoundCodeableConceptDt<MaritalStatusCodesEnum>(MaritalStatusCodesEnum.VALUESET_BINDER, theValue));
1609                
1610/*
1611                getMaritalStatus().setValueAsEnum(theValue);
1612*/
1613                return this;
1614        }
1615
1616  
1617        /**
1618         * Gets the value(s) for <b>multipleBirth[x]</b> ().
1619         * creating it if it does
1620         * not exist. Will not return <code>null</code>.
1621         *
1622     * <p>
1623     * <b>Definition:</b>
1624     * Indicates whether the patient is part of a multiple or indicates the actual birth order.
1625     * </p> 
1626         */
1627        public IDatatype getMultipleBirth() {  
1628                return myMultipleBirth;
1629        }
1630
1631        /**
1632         * Sets the value(s) for <b>multipleBirth[x]</b> ()
1633         *
1634     * <p>
1635     * <b>Definition:</b>
1636     * Indicates whether the patient is part of a multiple or indicates the actual birth order.
1637     * </p> 
1638         */
1639        public Patient setMultipleBirth(IDatatype theValue) {
1640                myMultipleBirth = theValue;
1641                return this;
1642        }
1643        
1644        
1645
1646  
1647        /**
1648         * Gets the value(s) for <b>photo</b> ().
1649         * creating it if it does
1650         * not exist. Will not return <code>null</code>.
1651         *
1652     * <p>
1653     * <b>Definition:</b>
1654     * Image of the patient
1655     * </p> 
1656         */
1657        public java.util.List<AttachmentDt> getPhoto() {  
1658                if (myPhoto == null) {
1659                        myPhoto = new java.util.ArrayList<AttachmentDt>();
1660                }
1661                return myPhoto;
1662        }
1663
1664        /**
1665         * Sets the value(s) for <b>photo</b> ()
1666         *
1667     * <p>
1668     * <b>Definition:</b>
1669     * Image of the patient
1670     * </p> 
1671         */
1672        public Patient setPhoto(java.util.List<AttachmentDt> theValue) {
1673                myPhoto = theValue;
1674                return this;
1675        }
1676        
1677        
1678
1679        /**
1680         * Adds and returns a new value for <b>photo</b> ()
1681         *
1682     * <p>
1683     * <b>Definition:</b>
1684     * Image of the patient
1685     * </p> 
1686         */
1687        public AttachmentDt addPhoto() {
1688                AttachmentDt newType = new AttachmentDt();
1689                getPhoto().add(newType);
1690                return newType; 
1691        }
1692
1693        /**
1694         * Adds a given new value for <b>photo</b> ()
1695         *
1696         * <p>
1697         * <b>Definition:</b>
1698         * Image of the patient
1699         * </p>
1700         * @param theValue The photo to add (must not be <code>null</code>)
1701         */
1702        public Patient addPhoto(AttachmentDt theValue) {
1703                if (theValue == null) {
1704                        throw new NullPointerException("theValue must not be null");
1705                }
1706                getPhoto().add(theValue);
1707                return this;
1708        }
1709
1710        /**
1711         * Gets the first repetition for <b>photo</b> (),
1712         * creating it if it does not already exist.
1713         *
1714     * <p>
1715     * <b>Definition:</b>
1716     * Image of the patient
1717     * </p> 
1718         */
1719        public AttachmentDt getPhotoFirstRep() {
1720                if (getPhoto().isEmpty()) {
1721                        return addPhoto();
1722                }
1723                return getPhoto().get(0); 
1724        }
1725  
1726        /**
1727         * Gets the value(s) for <b>contact</b> ().
1728         * creating it if it does
1729         * not exist. Will not return <code>null</code>.
1730         *
1731     * <p>
1732     * <b>Definition:</b>
1733     * A contact party (e.g. guardian, partner, friend) for the patient
1734     * </p> 
1735         */
1736        public java.util.List<Contact> getContact() {  
1737                if (myContact == null) {
1738                        myContact = new java.util.ArrayList<Contact>();
1739                }
1740                return myContact;
1741        }
1742
1743        /**
1744         * Sets the value(s) for <b>contact</b> ()
1745         *
1746     * <p>
1747     * <b>Definition:</b>
1748     * A contact party (e.g. guardian, partner, friend) for the patient
1749     * </p> 
1750         */
1751        public Patient setContact(java.util.List<Contact> theValue) {
1752                myContact = theValue;
1753                return this;
1754        }
1755        
1756        
1757
1758        /**
1759         * Adds and returns a new value for <b>contact</b> ()
1760         *
1761     * <p>
1762     * <b>Definition:</b>
1763     * A contact party (e.g. guardian, partner, friend) for the patient
1764     * </p> 
1765         */
1766        public Contact addContact() {
1767                Contact newType = new Contact();
1768                getContact().add(newType);
1769                return newType; 
1770        }
1771
1772        /**
1773         * Adds a given new value for <b>contact</b> ()
1774         *
1775         * <p>
1776         * <b>Definition:</b>
1777         * A contact party (e.g. guardian, partner, friend) for the patient
1778         * </p>
1779         * @param theValue The contact to add (must not be <code>null</code>)
1780         */
1781        public Patient addContact(Contact theValue) {
1782                if (theValue == null) {
1783                        throw new NullPointerException("theValue must not be null");
1784                }
1785                getContact().add(theValue);
1786                return this;
1787        }
1788
1789        /**
1790         * Gets the first repetition for <b>contact</b> (),
1791         * creating it if it does not already exist.
1792         *
1793     * <p>
1794     * <b>Definition:</b>
1795     * A contact party (e.g. guardian, partner, friend) for the patient
1796     * </p> 
1797         */
1798        public Contact getContactFirstRep() {
1799                if (getContact().isEmpty()) {
1800                        return addContact();
1801                }
1802                return getContact().get(0); 
1803        }
1804  
1805        /**
1806         * Gets the value(s) for <b>animal</b> ().
1807         * creating it if it does
1808         * not exist. Will not return <code>null</code>.
1809         *
1810     * <p>
1811     * <b>Definition:</b>
1812     * This patient is known to be an animal
1813     * </p> 
1814         */
1815        public Animal getAnimal() {  
1816                if (myAnimal == null) {
1817                        myAnimal = new Animal();
1818                }
1819                return myAnimal;
1820        }
1821
1822        /**
1823         * Sets the value(s) for <b>animal</b> ()
1824         *
1825     * <p>
1826     * <b>Definition:</b>
1827     * This patient is known to be an animal
1828     * </p> 
1829         */
1830        public Patient setAnimal(Animal theValue) {
1831                myAnimal = theValue;
1832                return this;
1833        }
1834        
1835        
1836
1837  
1838        /**
1839         * Gets the value(s) for <b>communication</b> ().
1840         * creating it if it does
1841         * not exist. Will not return <code>null</code>.
1842         *
1843     * <p>
1844     * <b>Definition:</b>
1845     * Languages which may be used to communicate with the patient about his or her health
1846     * </p> 
1847         */
1848        public java.util.List<Communication> getCommunication() {  
1849                if (myCommunication == null) {
1850                        myCommunication = new java.util.ArrayList<Communication>();
1851                }
1852                return myCommunication;
1853        }
1854
1855        /**
1856         * Sets the value(s) for <b>communication</b> ()
1857         *
1858     * <p>
1859     * <b>Definition:</b>
1860     * Languages which may be used to communicate with the patient about his or her health
1861     * </p> 
1862         */
1863        public Patient setCommunication(java.util.List<Communication> theValue) {
1864                myCommunication = theValue;
1865                return this;
1866        }
1867        
1868        
1869
1870        /**
1871         * Adds and returns a new value for <b>communication</b> ()
1872         *
1873     * <p>
1874     * <b>Definition:</b>
1875     * Languages which may be used to communicate with the patient about his or her health
1876     * </p> 
1877         */
1878        public Communication addCommunication() {
1879                Communication newType = new Communication();
1880                getCommunication().add(newType);
1881                return newType; 
1882        }
1883
1884        /**
1885         * Adds a given new value for <b>communication</b> ()
1886         *
1887         * <p>
1888         * <b>Definition:</b>
1889         * Languages which may be used to communicate with the patient about his or her health
1890         * </p>
1891         * @param theValue The communication to add (must not be <code>null</code>)
1892         */
1893        public Patient addCommunication(Communication theValue) {
1894                if (theValue == null) {
1895                        throw new NullPointerException("theValue must not be null");
1896                }
1897                getCommunication().add(theValue);
1898                return this;
1899        }
1900
1901        /**
1902         * Gets the first repetition for <b>communication</b> (),
1903         * creating it if it does not already exist.
1904         *
1905     * <p>
1906     * <b>Definition:</b>
1907     * Languages which may be used to communicate with the patient about his or her health
1908     * </p> 
1909         */
1910        public Communication getCommunicationFirstRep() {
1911                if (getCommunication().isEmpty()) {
1912                        return addCommunication();
1913                }
1914                return getCommunication().get(0); 
1915        }
1916  
1917        /**
1918         * Gets the value(s) for <b>careProvider</b> ().
1919         * creating it if it does
1920         * not exist. Will not return <code>null</code>.
1921         *
1922     * <p>
1923     * <b>Definition:</b>
1924     * Patient's nominated care provider
1925     * </p> 
1926         */
1927        public java.util.List<ResourceReferenceDt> getCareProvider() {  
1928                if (myCareProvider == null) {
1929                        myCareProvider = new java.util.ArrayList<ResourceReferenceDt>();
1930                }
1931                return myCareProvider;
1932        }
1933
1934        /**
1935         * Sets the value(s) for <b>careProvider</b> ()
1936         *
1937     * <p>
1938     * <b>Definition:</b>
1939     * Patient's nominated care provider
1940     * </p> 
1941         */
1942        public Patient setCareProvider(java.util.List<ResourceReferenceDt> theValue) {
1943                myCareProvider = theValue;
1944                return this;
1945        }
1946        
1947        
1948
1949        /**
1950         * Adds and returns a new value for <b>careProvider</b> ()
1951         *
1952     * <p>
1953     * <b>Definition:</b>
1954     * Patient's nominated care provider
1955     * </p> 
1956         */
1957        public ResourceReferenceDt addCareProvider() {
1958                ResourceReferenceDt newType = new ResourceReferenceDt();
1959                getCareProvider().add(newType);
1960                return newType; 
1961        }
1962  
1963        /**
1964         * Gets the value(s) for <b>managingOrganization</b> ().
1965         * creating it if it does
1966         * not exist. Will not return <code>null</code>.
1967         *
1968     * <p>
1969     * <b>Definition:</b>
1970     * Organization that is the custodian of the patient record
1971     * </p> 
1972         */
1973        public ResourceReferenceDt getManagingOrganization() {  
1974                if (myManagingOrganization == null) {
1975                        myManagingOrganization = new ResourceReferenceDt();
1976                }
1977                return myManagingOrganization;
1978        }
1979
1980        /**
1981         * Sets the value(s) for <b>managingOrganization</b> ()
1982         *
1983     * <p>
1984     * <b>Definition:</b>
1985     * Organization that is the custodian of the patient record
1986     * </p> 
1987         */
1988        public Patient setManagingOrganization(ResourceReferenceDt theValue) {
1989                myManagingOrganization = theValue;
1990                return this;
1991        }
1992        
1993        
1994
1995  
1996        /**
1997         * Gets the value(s) for <b>link</b> ().
1998         * creating it if it does
1999         * not exist. Will not return <code>null</code>.
2000         *
2001     * <p>
2002     * <b>Definition:</b>
2003     * Link to another patient resource that concerns the same actual patient
2004     * </p> 
2005         */
2006        public java.util.List<Link> getLink() {  
2007                if (myLink == null) {
2008                        myLink = new java.util.ArrayList<Link>();
2009                }
2010                return myLink;
2011        }
2012
2013        /**
2014         * Sets the value(s) for <b>link</b> ()
2015         *
2016     * <p>
2017     * <b>Definition:</b>
2018     * Link to another patient resource that concerns the same actual patient
2019     * </p> 
2020         */
2021        public Patient setLink(java.util.List<Link> theValue) {
2022                myLink = theValue;
2023                return this;
2024        }
2025        
2026        
2027
2028        /**
2029         * Adds and returns a new value for <b>link</b> ()
2030         *
2031     * <p>
2032     * <b>Definition:</b>
2033     * Link to another patient resource that concerns the same actual patient
2034     * </p> 
2035         */
2036        public Link addLink() {
2037                Link newType = new Link();
2038                getLink().add(newType);
2039                return newType; 
2040        }
2041
2042        /**
2043         * Adds a given new value for <b>link</b> ()
2044         *
2045         * <p>
2046         * <b>Definition:</b>
2047         * Link to another patient resource that concerns the same actual patient
2048         * </p>
2049         * @param theValue The link to add (must not be <code>null</code>)
2050         */
2051        public Patient addLink(Link theValue) {
2052                if (theValue == null) {
2053                        throw new NullPointerException("theValue must not be null");
2054                }
2055                getLink().add(theValue);
2056                return this;
2057        }
2058
2059        /**
2060         * Gets the first repetition for <b>link</b> (),
2061         * creating it if it does not already exist.
2062         *
2063     * <p>
2064     * <b>Definition:</b>
2065     * Link to another patient resource that concerns the same actual patient
2066     * </p> 
2067         */
2068        public Link getLinkFirstRep() {
2069                if (getLink().isEmpty()) {
2070                        return addLink();
2071                }
2072                return getLink().get(0); 
2073        }
2074  
2075        /**
2076         * Block class for child element: <b>Patient.contact</b> ()
2077         *
2078     * <p>
2079     * <b>Definition:</b>
2080     * A contact party (e.g. guardian, partner, friend) for the patient
2081     * </p> 
2082         */
2083        @Block()        
2084        public static class Contact 
2085            extends  BaseIdentifiableElement  
2086            implements IResourceBlock {
2087        
2088        @Child(name="relationship", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
2089        @Description(
2090                shortDefinition="",
2091                formalDefinition="The nature of the relationship between the patient and the contact person"
2092        )
2093        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-patient-contact-relationship")
2094        private java.util.List<CodeableConceptDt> myRelationship;
2095        
2096        @Child(name="name", type=HumanNameDt.class, order=1, min=0, max=1, summary=false, modifier=false)       
2097        @Description(
2098                shortDefinition="",
2099                formalDefinition="A name associated with the contact person"
2100        )
2101        private HumanNameDt myName;
2102        
2103        @Child(name="telecom", type=ContactPointDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
2104        @Description(
2105                shortDefinition="",
2106                formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
2107        )
2108        private java.util.List<ContactPointDt> myTelecom;
2109        
2110        @Child(name="address", type=AddressDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
2111        @Description(
2112                shortDefinition="",
2113                formalDefinition="Address for the contact person"
2114        )
2115        private AddressDt myAddress;
2116        
2117        @Child(name="gender", type=CodeDt.class, order=4, min=0, max=1, summary=false, modifier=false)  
2118        @Description(
2119                shortDefinition="",
2120                formalDefinition="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes."
2121        )
2122        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/administrative-gender")
2123        private BoundCodeDt<AdministrativeGenderEnum> myGender;
2124        
2125        @Child(name="organization", order=5, min=0, max=1, summary=false, modifier=false, type={
2126                ca.uhn.fhir.model.dstu2.resource.Organization.class
2127        })
2128        @Description(
2129                shortDefinition="",
2130                formalDefinition="Organization on behalf of which the contact is acting or for which the contact is working."
2131        )
2132        private ResourceReferenceDt myOrganization;
2133        
2134        @Child(name="period", type=PeriodDt.class, order=6, min=0, max=1, summary=false, modifier=false)        
2135        @Description(
2136                shortDefinition="",
2137                formalDefinition="The period during which this contact person or organization is valid to be contacted relating to this patient"
2138        )
2139        private PeriodDt myPeriod;
2140        
2141
2142        @Override
2143        public boolean isEmpty() {
2144                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myRelationship,  myName,  myTelecom,  myAddress,  myGender,  myOrganization,  myPeriod);
2145        }
2146        
2147        @Override
2148        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2149                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myRelationship, myName, myTelecom, myAddress, myGender, myOrganization, myPeriod);
2150        }
2151
2152        /**
2153         * Gets the value(s) for <b>relationship</b> ().
2154         * creating it if it does
2155         * not exist. Will not return <code>null</code>.
2156         *
2157     * <p>
2158     * <b>Definition:</b>
2159     * The nature of the relationship between the patient and the contact person
2160     * </p> 
2161         */
2162        public java.util.List<CodeableConceptDt> getRelationship() {  
2163                if (myRelationship == null) {
2164                        myRelationship = new java.util.ArrayList<CodeableConceptDt>();
2165                }
2166                return myRelationship;
2167        }
2168
2169        /**
2170         * Sets the value(s) for <b>relationship</b> ()
2171         *
2172     * <p>
2173     * <b>Definition:</b>
2174     * The nature of the relationship between the patient and the contact person
2175     * </p> 
2176         */
2177        public Contact setRelationship(java.util.List<CodeableConceptDt> theValue) {
2178                myRelationship = theValue;
2179                return this;
2180        }
2181        
2182        
2183
2184        /**
2185         * Adds and returns a new value for <b>relationship</b> ()
2186         *
2187     * <p>
2188     * <b>Definition:</b>
2189     * The nature of the relationship between the patient and the contact person
2190     * </p> 
2191         */
2192        public CodeableConceptDt addRelationship() {
2193                CodeableConceptDt newType = new CodeableConceptDt();
2194                getRelationship().add(newType);
2195                return newType; 
2196        }
2197
2198        /**
2199         * Adds a given new value for <b>relationship</b> ()
2200         *
2201         * <p>
2202         * <b>Definition:</b>
2203         * The nature of the relationship between the patient and the contact person
2204         * </p>
2205         * @param theValue The relationship to add (must not be <code>null</code>)
2206         */
2207        public Contact addRelationship(CodeableConceptDt theValue) {
2208                if (theValue == null) {
2209                        throw new NullPointerException("theValue must not be null");
2210                }
2211                getRelationship().add(theValue);
2212                return this;
2213        }
2214
2215        /**
2216         * Gets the first repetition for <b>relationship</b> (),
2217         * creating it if it does not already exist.
2218         *
2219     * <p>
2220     * <b>Definition:</b>
2221     * The nature of the relationship between the patient and the contact person
2222     * </p> 
2223         */
2224        public CodeableConceptDt getRelationshipFirstRep() {
2225                if (getRelationship().isEmpty()) {
2226                        return addRelationship();
2227                }
2228                return getRelationship().get(0); 
2229        }
2230  
2231        /**
2232         * Gets the value(s) for <b>name</b> ().
2233         * creating it if it does
2234         * not exist. Will not return <code>null</code>.
2235         *
2236     * <p>
2237     * <b>Definition:</b>
2238     * A name associated with the contact person
2239     * </p> 
2240         */
2241        public HumanNameDt getName() {  
2242                if (myName == null) {
2243                        myName = new HumanNameDt();
2244                }
2245                return myName;
2246        }
2247
2248        /**
2249         * Sets the value(s) for <b>name</b> ()
2250         *
2251     * <p>
2252     * <b>Definition:</b>
2253     * A name associated with the contact person
2254     * </p> 
2255         */
2256        public Contact setName(HumanNameDt theValue) {
2257                myName = theValue;
2258                return this;
2259        }
2260        
2261        
2262
2263  
2264        /**
2265         * Gets the value(s) for <b>telecom</b> ().
2266         * creating it if it does
2267         * not exist. Will not return <code>null</code>.
2268         *
2269     * <p>
2270     * <b>Definition:</b>
2271     * A contact detail for the person, e.g. a telephone number or an email address.
2272     * </p> 
2273         */
2274        public java.util.List<ContactPointDt> getTelecom() {  
2275                if (myTelecom == null) {
2276                        myTelecom = new java.util.ArrayList<ContactPointDt>();
2277                }
2278                return myTelecom;
2279        }
2280
2281        /**
2282         * Sets the value(s) for <b>telecom</b> ()
2283         *
2284     * <p>
2285     * <b>Definition:</b>
2286     * A contact detail for the person, e.g. a telephone number or an email address.
2287     * </p> 
2288         */
2289        public Contact setTelecom(java.util.List<ContactPointDt> theValue) {
2290                myTelecom = theValue;
2291                return this;
2292        }
2293        
2294        
2295
2296        /**
2297         * Adds and returns a new value for <b>telecom</b> ()
2298         *
2299     * <p>
2300     * <b>Definition:</b>
2301     * A contact detail for the person, e.g. a telephone number or an email address.
2302     * </p> 
2303         */
2304        public ContactPointDt addTelecom() {
2305                ContactPointDt newType = new ContactPointDt();
2306                getTelecom().add(newType);
2307                return newType; 
2308        }
2309
2310        /**
2311         * Adds a given new value for <b>telecom</b> ()
2312         *
2313         * <p>
2314         * <b>Definition:</b>
2315         * A contact detail for the person, e.g. a telephone number or an email address.
2316         * </p>
2317         * @param theValue The telecom to add (must not be <code>null</code>)
2318         */
2319        public Contact addTelecom(ContactPointDt theValue) {
2320                if (theValue == null) {
2321                        throw new NullPointerException("theValue must not be null");
2322                }
2323                getTelecom().add(theValue);
2324                return this;
2325        }
2326
2327        /**
2328         * Gets the first repetition for <b>telecom</b> (),
2329         * creating it if it does not already exist.
2330         *
2331     * <p>
2332     * <b>Definition:</b>
2333     * A contact detail for the person, e.g. a telephone number or an email address.
2334     * </p> 
2335         */
2336        public ContactPointDt getTelecomFirstRep() {
2337                if (getTelecom().isEmpty()) {
2338                        return addTelecom();
2339                }
2340                return getTelecom().get(0); 
2341        }
2342  
2343        /**
2344         * Gets the value(s) for <b>address</b> ().
2345         * creating it if it does
2346         * not exist. Will not return <code>null</code>.
2347         *
2348     * <p>
2349     * <b>Definition:</b>
2350     * Address for the contact person
2351     * </p> 
2352         */
2353        public AddressDt getAddress() {  
2354                if (myAddress == null) {
2355                        myAddress = new AddressDt();
2356                }
2357                return myAddress;
2358        }
2359
2360        /**
2361         * Sets the value(s) for <b>address</b> ()
2362         *
2363     * <p>
2364     * <b>Definition:</b>
2365     * Address for the contact person
2366     * </p> 
2367         */
2368        public Contact setAddress(AddressDt theValue) {
2369                myAddress = theValue;
2370                return this;
2371        }
2372        
2373        
2374
2375  
2376        /**
2377         * Gets the value(s) for <b>gender</b> ().
2378         * creating it if it does
2379         * not exist. Will not return <code>null</code>.
2380         *
2381     * <p>
2382     * <b>Definition:</b>
2383     * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
2384     * </p> 
2385         */
2386        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
2387                if (myGender == null) {
2388                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
2389                }
2390                return myGender;
2391        }
2392
2393        
2394        /**
2395         * Gets the value(s) for <b>gender</b> ().
2396         * creating it if it does
2397         * not exist. This method may return <code>null</code>.
2398         *
2399     * <p>
2400     * <b>Definition:</b>
2401     * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
2402     * </p> 
2403         */
2404        public String getGender() {  
2405                return getGenderElement().getValue();
2406        }
2407
2408        /**
2409         * Sets the value(s) for <b>gender</b> ()
2410         *
2411     * <p>
2412     * <b>Definition:</b>
2413     * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
2414     * </p> 
2415         */
2416        public Contact setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
2417                myGender = theValue;
2418                return this;
2419        }
2420        
2421        
2422
2423        /**
2424         * Sets the value(s) for <b>gender</b> ()
2425         *
2426     * <p>
2427     * <b>Definition:</b>
2428     * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
2429     * </p> 
2430         */
2431        public Contact setGender(AdministrativeGenderEnum theValue) {
2432                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
2433                
2434/*
2435                getGenderElement().setValueAsEnum(theValue);
2436*/
2437                return this;
2438        }
2439
2440  
2441        /**
2442         * Gets the value(s) for <b>organization</b> ().
2443         * creating it if it does
2444         * not exist. Will not return <code>null</code>.
2445         *
2446     * <p>
2447     * <b>Definition:</b>
2448     * Organization on behalf of which the contact is acting or for which the contact is working.
2449     * </p> 
2450         */
2451        public ResourceReferenceDt getOrganization() {  
2452                if (myOrganization == null) {
2453                        myOrganization = new ResourceReferenceDt();
2454                }
2455                return myOrganization;
2456        }
2457
2458        /**
2459         * Sets the value(s) for <b>organization</b> ()
2460         *
2461     * <p>
2462     * <b>Definition:</b>
2463     * Organization on behalf of which the contact is acting or for which the contact is working.
2464     * </p> 
2465         */
2466        public Contact setOrganization(ResourceReferenceDt theValue) {
2467                myOrganization = theValue;
2468                return this;
2469        }
2470        
2471        
2472
2473  
2474        /**
2475         * Gets the value(s) for <b>period</b> ().
2476         * creating it if it does
2477         * not exist. Will not return <code>null</code>.
2478         *
2479     * <p>
2480     * <b>Definition:</b>
2481     * The period during which this contact person or organization is valid to be contacted relating to this patient
2482     * </p> 
2483         */
2484        public PeriodDt getPeriod() {  
2485                if (myPeriod == null) {
2486                        myPeriod = new PeriodDt();
2487                }
2488                return myPeriod;
2489        }
2490
2491        /**
2492         * Sets the value(s) for <b>period</b> ()
2493         *
2494     * <p>
2495     * <b>Definition:</b>
2496     * The period during which this contact person or organization is valid to be contacted relating to this patient
2497     * </p> 
2498         */
2499        public Contact setPeriod(PeriodDt theValue) {
2500                myPeriod = theValue;
2501                return this;
2502        }
2503        
2504        
2505
2506  
2507
2508
2509        }
2510
2511
2512        /**
2513         * Block class for child element: <b>Patient.animal</b> ()
2514         *
2515     * <p>
2516     * <b>Definition:</b>
2517     * This patient is known to be an animal
2518     * </p> 
2519         */
2520        @Block()        
2521        public static class Animal 
2522            extends  BaseIdentifiableElement  
2523            implements IResourceBlock {
2524        
2525        @Child(name="species", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=true, modifier=false)       
2526        @Description(
2527                shortDefinition="",
2528                formalDefinition="Identifies the high level taxonomic categorization of the kind of animal"
2529        )
2530        private CodeableConceptDt mySpecies;
2531        
2532        @Child(name="breed", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
2533        @Description(
2534                shortDefinition="",
2535                formalDefinition="Identifies the detailed categorization of the kind of animal."
2536        )
2537        private CodeableConceptDt myBreed;
2538        
2539        @Child(name="genderStatus", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
2540        @Description(
2541                shortDefinition="",
2542                formalDefinition="Indicates the current state of the animal's reproductive organs"
2543        )
2544        private CodeableConceptDt myGenderStatus;
2545        
2546
2547        @Override
2548        public boolean isEmpty() {
2549                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySpecies,  myBreed,  myGenderStatus);
2550        }
2551        
2552        @Override
2553        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2554                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySpecies, myBreed, myGenderStatus);
2555        }
2556
2557        /**
2558         * Gets the value(s) for <b>species</b> ().
2559         * creating it if it does
2560         * not exist. Will not return <code>null</code>.
2561         *
2562     * <p>
2563     * <b>Definition:</b>
2564     * Identifies the high level taxonomic categorization of the kind of animal
2565     * </p> 
2566         */
2567        public CodeableConceptDt getSpecies() {  
2568                if (mySpecies == null) {
2569                        mySpecies = new CodeableConceptDt();
2570                }
2571                return mySpecies;
2572        }
2573
2574        /**
2575         * Sets the value(s) for <b>species</b> ()
2576         *
2577     * <p>
2578     * <b>Definition:</b>
2579     * Identifies the high level taxonomic categorization of the kind of animal
2580     * </p> 
2581         */
2582        public Animal setSpecies(CodeableConceptDt theValue) {
2583                mySpecies = theValue;
2584                return this;
2585        }
2586        
2587        
2588
2589  
2590        /**
2591         * Gets the value(s) for <b>breed</b> ().
2592         * creating it if it does
2593         * not exist. Will not return <code>null</code>.
2594         *
2595     * <p>
2596     * <b>Definition:</b>
2597     * Identifies the detailed categorization of the kind of animal.
2598     * </p> 
2599         */
2600        public CodeableConceptDt getBreed() {  
2601                if (myBreed == null) {
2602                        myBreed = new CodeableConceptDt();
2603                }
2604                return myBreed;
2605        }
2606
2607        /**
2608         * Sets the value(s) for <b>breed</b> ()
2609         *
2610     * <p>
2611     * <b>Definition:</b>
2612     * Identifies the detailed categorization of the kind of animal.
2613     * </p> 
2614         */
2615        public Animal setBreed(CodeableConceptDt theValue) {
2616                myBreed = theValue;
2617                return this;
2618        }
2619        
2620        
2621
2622  
2623        /**
2624         * Gets the value(s) for <b>genderStatus</b> ().
2625         * creating it if it does
2626         * not exist. Will not return <code>null</code>.
2627         *
2628     * <p>
2629     * <b>Definition:</b>
2630     * Indicates the current state of the animal's reproductive organs
2631     * </p> 
2632         */
2633        public CodeableConceptDt getGenderStatus() {  
2634                if (myGenderStatus == null) {
2635                        myGenderStatus = new CodeableConceptDt();
2636                }
2637                return myGenderStatus;
2638        }
2639
2640        /**
2641         * Sets the value(s) for <b>genderStatus</b> ()
2642         *
2643     * <p>
2644     * <b>Definition:</b>
2645     * Indicates the current state of the animal's reproductive organs
2646     * </p> 
2647         */
2648        public Animal setGenderStatus(CodeableConceptDt theValue) {
2649                myGenderStatus = theValue;
2650                return this;
2651        }
2652        
2653        
2654
2655  
2656
2657
2658        }
2659
2660
2661        /**
2662         * Block class for child element: <b>Patient.communication</b> ()
2663         *
2664     * <p>
2665     * <b>Definition:</b>
2666     * Languages which may be used to communicate with the patient about his or her health
2667     * </p> 
2668         */
2669        @Block()        
2670        public static class Communication 
2671            extends  BaseIdentifiableElement  
2672            implements IResourceBlock {
2673        
2674        @Child(name="language", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=false, modifier=false)     
2675        @Description(
2676                shortDefinition="",
2677                formalDefinition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English"
2678        )
2679        private CodeableConceptDt myLanguage;
2680        
2681        @Child(name="preferred", type=BooleanDt.class, order=1, min=0, max=1, summary=false, modifier=false)    
2682        @Description(
2683                shortDefinition="",
2684                formalDefinition="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)"
2685        )
2686        private BooleanDt myPreferred;
2687        
2688
2689        @Override
2690        public boolean isEmpty() {
2691                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLanguage,  myPreferred);
2692        }
2693        
2694        @Override
2695        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2696                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLanguage, myPreferred);
2697        }
2698
2699        /**
2700         * Gets the value(s) for <b>language</b> ().
2701         * creating it if it does
2702         * not exist. Will not return <code>null</code>.
2703         *
2704     * <p>
2705     * <b>Definition:</b>
2706     * The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \&quot;en\&quot; for English, or \&quot;en-US\&quot; for American English versus \&quot;en-EN\&quot; for England English
2707     * </p> 
2708         */
2709        public CodeableConceptDt getLanguage() {  
2710                if (myLanguage == null) {
2711                        myLanguage = new CodeableConceptDt();
2712                }
2713                return myLanguage;
2714        }
2715
2716        /**
2717         * Sets the value(s) for <b>language</b> ()
2718         *
2719     * <p>
2720     * <b>Definition:</b>
2721     * The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \&quot;en\&quot; for English, or \&quot;en-US\&quot; for American English versus \&quot;en-EN\&quot; for England English
2722     * </p> 
2723         */
2724        public Communication setLanguage(CodeableConceptDt theValue) {
2725                myLanguage = theValue;
2726                return this;
2727        }
2728        
2729        
2730
2731  
2732        /**
2733         * Gets the value(s) for <b>preferred</b> ().
2734         * creating it if it does
2735         * not exist. Will not return <code>null</code>.
2736         *
2737     * <p>
2738     * <b>Definition:</b>
2739     * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)
2740     * </p> 
2741         */
2742        public BooleanDt getPreferredElement() {  
2743                if (myPreferred == null) {
2744                        myPreferred = new BooleanDt();
2745                }
2746                return myPreferred;
2747        }
2748
2749        
2750        /**
2751         * Gets the value(s) for <b>preferred</b> ().
2752         * creating it if it does
2753         * not exist. This method may return <code>null</code>.
2754         *
2755     * <p>
2756     * <b>Definition:</b>
2757     * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)
2758     * </p> 
2759         */
2760        public Boolean getPreferred() {  
2761                return getPreferredElement().getValue();
2762        }
2763
2764        /**
2765         * Sets the value(s) for <b>preferred</b> ()
2766         *
2767     * <p>
2768     * <b>Definition:</b>
2769     * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)
2770     * </p> 
2771         */
2772        public Communication setPreferred(BooleanDt theValue) {
2773                myPreferred = theValue;
2774                return this;
2775        }
2776        
2777        
2778
2779        /**
2780         * Sets the value for <b>preferred</b> ()
2781         *
2782     * <p>
2783     * <b>Definition:</b>
2784     * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)
2785     * </p> 
2786         */
2787        public Communication setPreferred( boolean theBoolean) {
2788                myPreferred = new BooleanDt(theBoolean); 
2789                return this; 
2790        }
2791
2792 
2793
2794
2795        }
2796
2797
2798        /**
2799         * Block class for child element: <b>Patient.link</b> ()
2800         *
2801     * <p>
2802     * <b>Definition:</b>
2803     * Link to another patient resource that concerns the same actual patient
2804     * </p> 
2805         */
2806        @Block()        
2807        public static class Link 
2808            extends  BaseIdentifiableElement  
2809            implements IResourceBlock {
2810        
2811        @Child(name="other", order=0, min=1, max=1, summary=false, modifier=true, type={
2812                ca.uhn.fhir.model.dstu2.resource.Patient.class
2813        })
2814        @Description(
2815                shortDefinition="",
2816                formalDefinition="The other patient resource that the link refers to"
2817        )
2818        private ResourceReferenceDt myOther;
2819        
2820        @Child(name="type", type=CodeDt.class, order=1, min=1, max=1, summary=false, modifier=true)     
2821        @Description(
2822                shortDefinition="",
2823                formalDefinition="The type of link between this patient resource and another patient resource."
2824        )
2825        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/link-type")
2826        private BoundCodeDt<LinkTypeEnum> myType;
2827        
2828
2829        @Override
2830        public boolean isEmpty() {
2831                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myOther,  myType);
2832        }
2833        
2834        @Override
2835        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2836                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myOther, myType);
2837        }
2838
2839        /**
2840         * Gets the value(s) for <b>other</b> ().
2841         * creating it if it does
2842         * not exist. Will not return <code>null</code>.
2843         *
2844     * <p>
2845     * <b>Definition:</b>
2846     * The other patient resource that the link refers to
2847     * </p> 
2848         */
2849        public ResourceReferenceDt getOther() {  
2850                if (myOther == null) {
2851                        myOther = new ResourceReferenceDt();
2852                }
2853                return myOther;
2854        }
2855
2856        /**
2857         * Sets the value(s) for <b>other</b> ()
2858         *
2859     * <p>
2860     * <b>Definition:</b>
2861     * The other patient resource that the link refers to
2862     * </p> 
2863         */
2864        public Link setOther(ResourceReferenceDt theValue) {
2865                myOther = theValue;
2866                return this;
2867        }
2868        
2869        
2870
2871  
2872        /**
2873         * Gets the value(s) for <b>type</b> ().
2874         * creating it if it does
2875         * not exist. Will not return <code>null</code>.
2876         *
2877     * <p>
2878     * <b>Definition:</b>
2879     * The type of link between this patient resource and another patient resource.
2880     * </p> 
2881         */
2882        public BoundCodeDt<LinkTypeEnum> getTypeElement() {  
2883                if (myType == null) {
2884                        myType = new BoundCodeDt<LinkTypeEnum>(LinkTypeEnum.VALUESET_BINDER);
2885                }
2886                return myType;
2887        }
2888
2889        
2890        /**
2891         * Gets the value(s) for <b>type</b> ().
2892         * creating it if it does
2893         * not exist. This method may return <code>null</code>.
2894         *
2895     * <p>
2896     * <b>Definition:</b>
2897     * The type of link between this patient resource and another patient resource.
2898     * </p> 
2899         */
2900        public String getType() {  
2901                return getTypeElement().getValue();
2902        }
2903
2904        /**
2905         * Sets the value(s) for <b>type</b> ()
2906         *
2907     * <p>
2908     * <b>Definition:</b>
2909     * The type of link between this patient resource and another patient resource.
2910     * </p> 
2911         */
2912        public Link setType(BoundCodeDt<LinkTypeEnum> theValue) {
2913                myType = theValue;
2914                return this;
2915        }
2916        
2917        
2918
2919        /**
2920         * Sets the value(s) for <b>type</b> ()
2921         *
2922     * <p>
2923     * <b>Definition:</b>
2924     * The type of link between this patient resource and another patient resource.
2925     * </p> 
2926         */
2927        public Link setType(LinkTypeEnum theValue) {
2928                setType(new BoundCodeDt<LinkTypeEnum>(LinkTypeEnum.VALUESET_BINDER, theValue));
2929                
2930/*
2931                getTypeElement().setValueAsEnum(theValue);
2932*/
2933                return this;
2934        }
2935
2936  
2937
2938
2939        }
2940
2941
2942
2943
2944    @Override
2945    public String getResourceName() {
2946        return "Patient";
2947    }
2948    
2949    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2950        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2951    }
2952
2953
2954}