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>FamilyMemberHistory</b> Resource
282 * (clinical.general)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/FamilyMemberHistory">http://hl7.org/fhir/profiles/FamilyMemberHistory</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/profiles/FamilyMemberHistory", id="familymemberhistory")
301public class FamilyMemberHistory extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>date</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>date</b><br>
310         * Path: <b>FamilyMemberHistory.date</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="date", path="FamilyMemberHistory.date", description="", type="date" 
314 )
315        public static final String SP_DATE = "date";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>date</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>date</b><br>
322         * Path: <b>FamilyMemberHistory.date</b><br>
323         * </p>
324         */
325        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
326
327        /**
328         * Search parameter constant for <b>patient</b>
329         * <p>
330         * Description: <b>The identity of a subject to list family member history items for</b><br>
331         * Type: <b>reference</b><br>
332         * Path: <b>FamilyMemberHistory.patient</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference" 
336, providesMembershipIn={
337 @Compartment(name="Patient")   }
338, target={
339 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
340 )
341        public static final String SP_PATIENT = "patient";
342
343        /**
344         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
345         * <p>
346         * Description: <b>The identity of a subject to list family member history items for</b><br>
347         * Type: <b>reference</b><br>
348         * Path: <b>FamilyMemberHistory.patient</b><br>
349         * </p>
350         */
351        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
352
353        /**
354         * Search parameter constant for <b>code</b>
355         * <p>
356         * Description: <b>A search by a condition code</b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>FamilyMemberHistory.condition.code</b><br>
359         * </p>
360         */
361        @SearchParamDefinition(name="code", path="FamilyMemberHistory.condition.code", description="A search by a condition code", type="token" 
362 )
363        public static final String SP_CODE = "code";
364
365        /**
366         * <b>Fluent Client</b> search parameter constant for <b>code</b>
367         * <p>
368         * Description: <b>A search by a condition code</b><br>
369         * Type: <b>token</b><br>
370         * Path: <b>FamilyMemberHistory.condition.code</b><br>
371         * </p>
372         */
373        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
374
375        /**
376         * Search parameter constant for <b>identifier</b>
377         * <p>
378         * Description: <b>A search by a record identifier</b><br>
379         * Type: <b>token</b><br>
380         * Path: <b>FamilyMemberHistory.identifier</b><br>
381         * </p>
382         */
383        @SearchParamDefinition(name="identifier", path="FamilyMemberHistory.identifier", description="A search by a record identifier", type="token" 
384 )
385        public static final String SP_IDENTIFIER = "identifier";
386
387        /**
388         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
389         * <p>
390         * Description: <b>A search by a record identifier</b><br>
391         * Type: <b>token</b><br>
392         * Path: <b>FamilyMemberHistory.identifier</b><br>
393         * </p>
394         */
395        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
396
397        /**
398         * Search parameter constant for <b>relationship</b>
399         * <p>
400         * Description: <b>A search by a relationship type</b><br>
401         * Type: <b>token</b><br>
402         * Path: <b>FamilyMemberHistory.relationship</b><br>
403         * </p>
404         */
405        @SearchParamDefinition(name="relationship", path="FamilyMemberHistory.relationship", description="A search by a relationship type", type="token" 
406 )
407        public static final String SP_RELATIONSHIP = "relationship";
408
409        /**
410         * <b>Fluent Client</b> search parameter constant for <b>relationship</b>
411         * <p>
412         * Description: <b>A search by a relationship type</b><br>
413         * Type: <b>token</b><br>
414         * Path: <b>FamilyMemberHistory.relationship</b><br>
415         * </p>
416         */
417        public static final TokenClientParam RELATIONSHIP = new TokenClientParam(SP_RELATIONSHIP);
418
419        /**
420         * Search parameter constant for <b>gender</b>
421         * <p>
422         * Description: <b>A search by a gender code of a family member</b><br>
423         * Type: <b>token</b><br>
424         * Path: <b>FamilyMemberHistory.gender</b><br>
425         * </p>
426         */
427        @SearchParamDefinition(name="gender", path="FamilyMemberHistory.gender", description="A search by a gender code of a family member", type="token" 
428 )
429        public static final String SP_GENDER = "gender";
430
431        /**
432         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
433         * <p>
434         * Description: <b>A search by a gender code of a family member</b><br>
435         * Type: <b>token</b><br>
436         * Path: <b>FamilyMemberHistory.gender</b><br>
437         * </p>
438         */
439        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
440
441
442        /**
443         * Constant for fluent queries to be used to add include statements. Specifies
444         * the path value of "<b>FamilyMemberHistory:patient</b>".
445         */
446        public static final Include INCLUDE_PATIENT = new Include("FamilyMemberHistory:patient");
447
448
449        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
450        @Description(
451                shortDefinition="id",
452                formalDefinition="This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
453        )
454        private java.util.List<IdentifierDt> myIdentifier;
455        
456        @Child(name="patient", order=1, min=1, max=1, summary=true, modifier=false, type={
457                ca.uhn.fhir.model.dstu2.resource.Patient.class
458        })
459        @Description(
460                shortDefinition="who.focus",
461                formalDefinition="The person who this history concerns"
462        )
463        private ResourceReferenceDt myPatient;
464        
465        @Child(name="date", type=DateTimeDt.class, order=2, min=0, max=1, summary=true, modifier=false) 
466        @Description(
467                shortDefinition="when.recorded",
468                formalDefinition="The date (and possibly time) when the family member history was taken"
469        )
470        private DateTimeDt myDate;
471        
472        @Child(name="status", type=CodeDt.class, order=3, min=1, max=1, summary=true, modifier=true)    
473        @Description(
474                shortDefinition="status",
475                formalDefinition="A code specifying a state of a Family Member History record."
476        )
477        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/history-status")
478        private BoundCodeDt<FamilyHistoryStatusEnum> myStatus;
479        
480        @Child(name="name", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)   
481        @Description(
482                shortDefinition="",
483                formalDefinition="This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\""
484        )
485        private StringDt myName;
486        
487        @Child(name="relationship", type=CodeableConceptDt.class, order=5, min=1, max=1, summary=true, modifier=false)  
488        @Description(
489                shortDefinition="",
490                formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)"
491        )
492        private CodeableConceptDt myRelationship;
493        
494        @Child(name="gender", type=CodeDt.class, order=6, min=0, max=1, summary=true, modifier=false)   
495        @Description(
496                shortDefinition="",
497                formalDefinition="Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes."
498        )
499        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/administrative-gender")
500        private BoundCodeDt<AdministrativeGenderEnum> myGender;
501        
502        @Child(name="born", order=7, min=0, max=1, summary=false, modifier=false, type={
503                PeriodDt.class, 
504                DateDt.class, 
505                StringDt.class
506        })
507        @Description(
508                shortDefinition="",
509                formalDefinition="The actual or approximate date of birth of the relative"
510        )
511        private IDatatype myBorn;
512        
513        @Child(name="age", order=8, min=0, max=1, summary=false, modifier=false, type={
514                AgeDt.class, 
515                RangeDt.class, 
516                StringDt.class
517        })
518        @Description(
519                shortDefinition="",
520                formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded"
521        )
522        private IDatatype myAge;
523        
524        @Child(name="deceased", order=9, min=0, max=1, summary=false, modifier=false, type={
525                BooleanDt.class, 
526                AgeDt.class, 
527                RangeDt.class, 
528                DateDt.class, 
529                StringDt.class
530        })
531        @Description(
532                shortDefinition="",
533                formalDefinition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record"
534        )
535        private IDatatype myDeceased;
536        
537        @Child(name="note", type=AnnotationDt.class, order=10, min=0, max=1, summary=false, modifier=false)     
538        @Description(
539                shortDefinition="",
540                formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible."
541        )
542        private AnnotationDt myNote;
543        
544        @Child(name="condition", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
545        @Description(
546                shortDefinition="",
547                formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition."
548        )
549        private java.util.List<Condition> myCondition;
550        
551
552        @Override
553        public boolean isEmpty() {
554                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myPatient,  myDate,  myStatus,  myName,  myRelationship,  myGender,  myBorn,  myAge,  myDeceased,  myNote,  myCondition);
555        }
556        
557        @Override
558        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
559                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myDate, myStatus, myName, myRelationship, myGender, myBorn, myAge, myDeceased, myNote, myCondition);
560        }
561
562        /**
563         * Gets the value(s) for <b>identifier</b> (id).
564         * creating it if it does
565         * not exist. Will not return <code>null</code>.
566         *
567     * <p>
568     * <b>Definition:</b>
569     * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
570     * </p> 
571         */
572        public java.util.List<IdentifierDt> getIdentifier() {  
573                if (myIdentifier == null) {
574                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
575                }
576                return myIdentifier;
577        }
578
579        /**
580         * Sets the value(s) for <b>identifier</b> (id)
581         *
582     * <p>
583     * <b>Definition:</b>
584     * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
585     * </p> 
586         */
587        public FamilyMemberHistory setIdentifier(java.util.List<IdentifierDt> theValue) {
588                myIdentifier = theValue;
589                return this;
590        }
591        
592        
593
594        /**
595         * Adds and returns a new value for <b>identifier</b> (id)
596         *
597     * <p>
598     * <b>Definition:</b>
599     * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
600     * </p> 
601         */
602        public IdentifierDt addIdentifier() {
603                IdentifierDt newType = new IdentifierDt();
604                getIdentifier().add(newType);
605                return newType; 
606        }
607
608        /**
609         * Adds a given new value for <b>identifier</b> (id)
610         *
611         * <p>
612         * <b>Definition:</b>
613         * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
614         * </p>
615         * @param theValue The identifier to add (must not be <code>null</code>)
616         */
617        public FamilyMemberHistory addIdentifier(IdentifierDt theValue) {
618                if (theValue == null) {
619                        throw new NullPointerException("theValue must not be null");
620                }
621                getIdentifier().add(theValue);
622                return this;
623        }
624
625        /**
626         * Gets the first repetition for <b>identifier</b> (id),
627         * creating it if it does not already exist.
628         *
629     * <p>
630     * <b>Definition:</b>
631     * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
632     * </p> 
633         */
634        public IdentifierDt getIdentifierFirstRep() {
635                if (getIdentifier().isEmpty()) {
636                        return addIdentifier();
637                }
638                return getIdentifier().get(0); 
639        }
640  
641        /**
642         * Gets the value(s) for <b>patient</b> (who.focus).
643         * creating it if it does
644         * not exist. Will not return <code>null</code>.
645         *
646     * <p>
647     * <b>Definition:</b>
648     * The person who this history concerns
649     * </p> 
650         */
651        public ResourceReferenceDt getPatient() {  
652                if (myPatient == null) {
653                        myPatient = new ResourceReferenceDt();
654                }
655                return myPatient;
656        }
657
658        /**
659         * Sets the value(s) for <b>patient</b> (who.focus)
660         *
661     * <p>
662     * <b>Definition:</b>
663     * The person who this history concerns
664     * </p> 
665         */
666        public FamilyMemberHistory setPatient(ResourceReferenceDt theValue) {
667                myPatient = theValue;
668                return this;
669        }
670        
671        
672
673  
674        /**
675         * Gets the value(s) for <b>date</b> (when.recorded).
676         * creating it if it does
677         * not exist. Will not return <code>null</code>.
678         *
679     * <p>
680     * <b>Definition:</b>
681     * The date (and possibly time) when the family member history was taken
682     * </p> 
683         */
684        public DateTimeDt getDateElement() {  
685                if (myDate == null) {
686                        myDate = new DateTimeDt();
687                }
688                return myDate;
689        }
690
691        
692        /**
693         * Gets the value(s) for <b>date</b> (when.recorded).
694         * creating it if it does
695         * not exist. This method may return <code>null</code>.
696         *
697     * <p>
698     * <b>Definition:</b>
699     * The date (and possibly time) when the family member history was taken
700     * </p> 
701         */
702        public Date getDate() {  
703                return getDateElement().getValue();
704        }
705
706        /**
707         * Sets the value(s) for <b>date</b> (when.recorded)
708         *
709     * <p>
710     * <b>Definition:</b>
711     * The date (and possibly time) when the family member history was taken
712     * </p> 
713         */
714        public FamilyMemberHistory setDate(DateTimeDt theValue) {
715                myDate = theValue;
716                return this;
717        }
718        
719        
720
721        /**
722         * Sets the value for <b>date</b> (when.recorded)
723         *
724     * <p>
725     * <b>Definition:</b>
726     * The date (and possibly time) when the family member history was taken
727     * </p> 
728         */
729        public FamilyMemberHistory setDateWithSecondsPrecision( Date theDate) {
730                myDate = new DateTimeDt(theDate); 
731                return this; 
732        }
733
734        /**
735         * Sets the value for <b>date</b> (when.recorded)
736         *
737     * <p>
738     * <b>Definition:</b>
739     * The date (and possibly time) when the family member history was taken
740     * </p> 
741         */
742        public FamilyMemberHistory setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
743                myDate = new DateTimeDt(theDate, thePrecision); 
744                return this; 
745        }
746
747 
748        /**
749         * Gets the value(s) for <b>status</b> (status).
750         * creating it if it does
751         * not exist. Will not return <code>null</code>.
752         *
753     * <p>
754     * <b>Definition:</b>
755     * A code specifying a state of a Family Member History record.
756     * </p> 
757         */
758        public BoundCodeDt<FamilyHistoryStatusEnum> getStatusElement() {  
759                if (myStatus == null) {
760                        myStatus = new BoundCodeDt<FamilyHistoryStatusEnum>(FamilyHistoryStatusEnum.VALUESET_BINDER);
761                }
762                return myStatus;
763        }
764
765        
766        /**
767         * Gets the value(s) for <b>status</b> (status).
768         * creating it if it does
769         * not exist. This method may return <code>null</code>.
770         *
771     * <p>
772     * <b>Definition:</b>
773     * A code specifying a state of a Family Member History record.
774     * </p> 
775         */
776        public String getStatus() {  
777                return getStatusElement().getValue();
778        }
779
780        /**
781         * Sets the value(s) for <b>status</b> (status)
782         *
783     * <p>
784     * <b>Definition:</b>
785     * A code specifying a state of a Family Member History record.
786     * </p> 
787         */
788        public FamilyMemberHistory setStatus(BoundCodeDt<FamilyHistoryStatusEnum> theValue) {
789                myStatus = theValue;
790                return this;
791        }
792        
793        
794
795        /**
796         * Sets the value(s) for <b>status</b> (status)
797         *
798     * <p>
799     * <b>Definition:</b>
800     * A code specifying a state of a Family Member History record.
801     * </p> 
802         */
803        public FamilyMemberHistory setStatus(FamilyHistoryStatusEnum theValue) {
804                setStatus(new BoundCodeDt<FamilyHistoryStatusEnum>(FamilyHistoryStatusEnum.VALUESET_BINDER, theValue));
805                
806/*
807                getStatusElement().setValueAsEnum(theValue);
808*/
809                return this;
810        }
811
812  
813        /**
814         * Gets the value(s) for <b>name</b> ().
815         * creating it if it does
816         * not exist. Will not return <code>null</code>.
817         *
818     * <p>
819     * <b>Definition:</b>
820     * This will either be a name or a description; e.g. \&quot;Aunt Susan\&quot;, \&quot;my cousin with the red hair\&quot;
821     * </p> 
822         */
823        public StringDt getNameElement() {  
824                if (myName == null) {
825                        myName = new StringDt();
826                }
827                return myName;
828        }
829
830        
831        /**
832         * Gets the value(s) for <b>name</b> ().
833         * creating it if it does
834         * not exist. This method may return <code>null</code>.
835         *
836     * <p>
837     * <b>Definition:</b>
838     * This will either be a name or a description; e.g. \&quot;Aunt Susan\&quot;, \&quot;my cousin with the red hair\&quot;
839     * </p> 
840         */
841        public String getName() {  
842                return getNameElement().getValue();
843        }
844
845        /**
846         * Sets the value(s) for <b>name</b> ()
847         *
848     * <p>
849     * <b>Definition:</b>
850     * This will either be a name or a description; e.g. \&quot;Aunt Susan\&quot;, \&quot;my cousin with the red hair\&quot;
851     * </p> 
852         */
853        public FamilyMemberHistory setName(StringDt theValue) {
854                myName = theValue;
855                return this;
856        }
857        
858        
859
860        /**
861         * Sets the value for <b>name</b> ()
862         *
863     * <p>
864     * <b>Definition:</b>
865     * This will either be a name or a description; e.g. \&quot;Aunt Susan\&quot;, \&quot;my cousin with the red hair\&quot;
866     * </p> 
867         */
868        public FamilyMemberHistory setName( String theString) {
869                myName = new StringDt(theString); 
870                return this; 
871        }
872
873 
874        /**
875         * Gets the value(s) for <b>relationship</b> ().
876         * creating it if it does
877         * not exist. Will not return <code>null</code>.
878         *
879     * <p>
880     * <b>Definition:</b>
881     * The type of relationship this person has to the patient (father, mother, brother etc.)
882     * </p> 
883         */
884        public CodeableConceptDt getRelationship() {  
885                if (myRelationship == null) {
886                        myRelationship = new CodeableConceptDt();
887                }
888                return myRelationship;
889        }
890
891        /**
892         * Sets the value(s) for <b>relationship</b> ()
893         *
894     * <p>
895     * <b>Definition:</b>
896     * The type of relationship this person has to the patient (father, mother, brother etc.)
897     * </p> 
898         */
899        public FamilyMemberHistory setRelationship(CodeableConceptDt theValue) {
900                myRelationship = theValue;
901                return this;
902        }
903        
904        
905
906  
907        /**
908         * Gets the value(s) for <b>gender</b> ().
909         * creating it if it does
910         * not exist. Will not return <code>null</code>.
911         *
912     * <p>
913     * <b>Definition:</b>
914     * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.
915     * </p> 
916         */
917        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
918                if (myGender == null) {
919                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
920                }
921                return myGender;
922        }
923
924        
925        /**
926         * Gets the value(s) for <b>gender</b> ().
927         * creating it if it does
928         * not exist. This method may return <code>null</code>.
929         *
930     * <p>
931     * <b>Definition:</b>
932     * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.
933     * </p> 
934         */
935        public String getGender() {  
936                return getGenderElement().getValue();
937        }
938
939        /**
940         * Sets the value(s) for <b>gender</b> ()
941         *
942     * <p>
943     * <b>Definition:</b>
944     * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.
945     * </p> 
946         */
947        public FamilyMemberHistory setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
948                myGender = theValue;
949                return this;
950        }
951        
952        
953
954        /**
955         * Sets the value(s) for <b>gender</b> ()
956         *
957     * <p>
958     * <b>Definition:</b>
959     * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.
960     * </p> 
961         */
962        public FamilyMemberHistory setGender(AdministrativeGenderEnum theValue) {
963                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
964                
965/*
966                getGenderElement().setValueAsEnum(theValue);
967*/
968                return this;
969        }
970
971  
972        /**
973         * Gets the value(s) for <b>born[x]</b> ().
974         * creating it if it does
975         * not exist. Will not return <code>null</code>.
976         *
977     * <p>
978     * <b>Definition:</b>
979     * The actual or approximate date of birth of the relative
980     * </p> 
981         */
982        public IDatatype getBorn() {  
983                return myBorn;
984        }
985
986        /**
987         * Sets the value(s) for <b>born[x]</b> ()
988         *
989     * <p>
990     * <b>Definition:</b>
991     * The actual or approximate date of birth of the relative
992     * </p> 
993         */
994        public FamilyMemberHistory setBorn(IDatatype theValue) {
995                myBorn = theValue;
996                return this;
997        }
998        
999        
1000
1001  
1002        /**
1003         * Gets the value(s) for <b>age[x]</b> ().
1004         * creating it if it does
1005         * not exist. Will not return <code>null</code>.
1006         *
1007     * <p>
1008     * <b>Definition:</b>
1009     * The actual or approximate age of the relative at the time the family member history is recorded
1010     * </p> 
1011         */
1012        public IDatatype getAge() {  
1013                return myAge;
1014        }
1015
1016        /**
1017         * Sets the value(s) for <b>age[x]</b> ()
1018         *
1019     * <p>
1020     * <b>Definition:</b>
1021     * The actual or approximate age of the relative at the time the family member history is recorded
1022     * </p> 
1023         */
1024        public FamilyMemberHistory setAge(IDatatype theValue) {
1025                myAge = theValue;
1026                return this;
1027        }
1028        
1029        
1030
1031  
1032        /**
1033         * Gets the value(s) for <b>deceased[x]</b> ().
1034         * creating it if it does
1035         * not exist. Will not return <code>null</code>.
1036         *
1037     * <p>
1038     * <b>Definition:</b>
1039     * Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record
1040     * </p> 
1041         */
1042        public IDatatype getDeceased() {  
1043                return myDeceased;
1044        }
1045
1046        /**
1047         * Sets the value(s) for <b>deceased[x]</b> ()
1048         *
1049     * <p>
1050     * <b>Definition:</b>
1051     * Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record
1052     * </p> 
1053         */
1054        public FamilyMemberHistory setDeceased(IDatatype theValue) {
1055                myDeceased = theValue;
1056                return this;
1057        }
1058        
1059        
1060
1061  
1062        /**
1063         * Gets the value(s) for <b>note</b> ().
1064         * creating it if it does
1065         * not exist. Will not return <code>null</code>.
1066         *
1067     * <p>
1068     * <b>Definition:</b>
1069     * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
1070     * </p> 
1071         */
1072        public AnnotationDt getNote() {  
1073                if (myNote == null) {
1074                        myNote = new AnnotationDt();
1075                }
1076                return myNote;
1077        }
1078
1079        /**
1080         * Sets the value(s) for <b>note</b> ()
1081         *
1082     * <p>
1083     * <b>Definition:</b>
1084     * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
1085     * </p> 
1086         */
1087        public FamilyMemberHistory setNote(AnnotationDt theValue) {
1088                myNote = theValue;
1089                return this;
1090        }
1091        
1092        
1093
1094  
1095        /**
1096         * Gets the value(s) for <b>condition</b> ().
1097         * creating it if it does
1098         * not exist. Will not return <code>null</code>.
1099         *
1100     * <p>
1101     * <b>Definition:</b>
1102     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1103     * </p> 
1104         */
1105        public java.util.List<Condition> getCondition() {  
1106                if (myCondition == null) {
1107                        myCondition = new java.util.ArrayList<Condition>();
1108                }
1109                return myCondition;
1110        }
1111
1112        /**
1113         * Sets the value(s) for <b>condition</b> ()
1114         *
1115     * <p>
1116     * <b>Definition:</b>
1117     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1118     * </p> 
1119         */
1120        public FamilyMemberHistory setCondition(java.util.List<Condition> theValue) {
1121                myCondition = theValue;
1122                return this;
1123        }
1124        
1125        
1126
1127        /**
1128         * Adds and returns a new value for <b>condition</b> ()
1129         *
1130     * <p>
1131     * <b>Definition:</b>
1132     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1133     * </p> 
1134         */
1135        public Condition addCondition() {
1136                Condition newType = new Condition();
1137                getCondition().add(newType);
1138                return newType; 
1139        }
1140
1141        /**
1142         * Adds a given new value for <b>condition</b> ()
1143         *
1144         * <p>
1145         * <b>Definition:</b>
1146         * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1147         * </p>
1148         * @param theValue The condition to add (must not be <code>null</code>)
1149         */
1150        public FamilyMemberHistory addCondition(Condition theValue) {
1151                if (theValue == null) {
1152                        throw new NullPointerException("theValue must not be null");
1153                }
1154                getCondition().add(theValue);
1155                return this;
1156        }
1157
1158        /**
1159         * Gets the first repetition for <b>condition</b> (),
1160         * creating it if it does not already exist.
1161         *
1162     * <p>
1163     * <b>Definition:</b>
1164     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1165     * </p> 
1166         */
1167        public Condition getConditionFirstRep() {
1168                if (getCondition().isEmpty()) {
1169                        return addCondition();
1170                }
1171                return getCondition().get(0); 
1172        }
1173  
1174        /**
1175         * Block class for child element: <b>FamilyMemberHistory.condition</b> ()
1176         *
1177     * <p>
1178     * <b>Definition:</b>
1179     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1180     * </p> 
1181         */
1182        @Block()        
1183        public static class Condition 
1184            extends  BaseIdentifiableElement  
1185            implements IResourceBlock {
1186        
1187        @Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=false, modifier=false) 
1188        @Description(
1189                shortDefinition="",
1190                formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system"
1191        )
1192        private CodeableConceptDt myCode;
1193        
1194        @Child(name="outcome", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false)      
1195        @Description(
1196                shortDefinition="",
1197                formalDefinition="Indicates what happened as a result of this condition.  If the condition resulted in death, deceased date is captured on the relation."
1198        )
1199        private CodeableConceptDt myOutcome;
1200        
1201        @Child(name="onset", order=2, min=0, max=1, summary=false, modifier=false, type={
1202                AgeDt.class, 
1203                RangeDt.class, 
1204                PeriodDt.class, 
1205                StringDt.class
1206        })
1207        @Description(
1208                shortDefinition="",
1209                formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence."
1210        )
1211        private IDatatype myOnset;
1212        
1213        @Child(name="note", type=AnnotationDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
1214        @Description(
1215                shortDefinition="",
1216                formalDefinition="An area where general notes can be placed about this specific condition."
1217        )
1218        private AnnotationDt myNote;
1219        
1220
1221        @Override
1222        public boolean isEmpty() {
1223                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myOutcome,  myOnset,  myNote);
1224        }
1225        
1226        @Override
1227        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1228                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myOutcome, myOnset, myNote);
1229        }
1230
1231        /**
1232         * Gets the value(s) for <b>code</b> ().
1233         * creating it if it does
1234         * not exist. Will not return <code>null</code>.
1235         *
1236     * <p>
1237     * <b>Definition:</b>
1238     * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system
1239     * </p> 
1240         */
1241        public CodeableConceptDt getCode() {  
1242                if (myCode == null) {
1243                        myCode = new CodeableConceptDt();
1244                }
1245                return myCode;
1246        }
1247
1248        /**
1249         * Sets the value(s) for <b>code</b> ()
1250         *
1251     * <p>
1252     * <b>Definition:</b>
1253     * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system
1254     * </p> 
1255         */
1256        public Condition setCode(CodeableConceptDt theValue) {
1257                myCode = theValue;
1258                return this;
1259        }
1260        
1261        
1262
1263  
1264        /**
1265         * Gets the value(s) for <b>outcome</b> ().
1266         * creating it if it does
1267         * not exist. Will not return <code>null</code>.
1268         *
1269     * <p>
1270     * <b>Definition:</b>
1271     * Indicates what happened as a result of this condition.  If the condition resulted in death, deceased date is captured on the relation.
1272     * </p> 
1273         */
1274        public CodeableConceptDt getOutcome() {  
1275                if (myOutcome == null) {
1276                        myOutcome = new CodeableConceptDt();
1277                }
1278                return myOutcome;
1279        }
1280
1281        /**
1282         * Sets the value(s) for <b>outcome</b> ()
1283         *
1284     * <p>
1285     * <b>Definition:</b>
1286     * Indicates what happened as a result of this condition.  If the condition resulted in death, deceased date is captured on the relation.
1287     * </p> 
1288         */
1289        public Condition setOutcome(CodeableConceptDt theValue) {
1290                myOutcome = theValue;
1291                return this;
1292        }
1293        
1294        
1295
1296  
1297        /**
1298         * Gets the value(s) for <b>onset[x]</b> ().
1299         * creating it if it does
1300         * not exist. Will not return <code>null</code>.
1301         *
1302     * <p>
1303     * <b>Definition:</b>
1304     * Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.
1305     * </p> 
1306         */
1307        public IDatatype getOnset() {  
1308                return myOnset;
1309        }
1310
1311        /**
1312         * Sets the value(s) for <b>onset[x]</b> ()
1313         *
1314     * <p>
1315     * <b>Definition:</b>
1316     * Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.
1317     * </p> 
1318         */
1319        public Condition setOnset(IDatatype theValue) {
1320                myOnset = theValue;
1321                return this;
1322        }
1323        
1324        
1325
1326  
1327        /**
1328         * Gets the value(s) for <b>note</b> ().
1329         * creating it if it does
1330         * not exist. Will not return <code>null</code>.
1331         *
1332     * <p>
1333     * <b>Definition:</b>
1334     * An area where general notes can be placed about this specific condition.
1335     * </p> 
1336         */
1337        public AnnotationDt getNote() {  
1338                if (myNote == null) {
1339                        myNote = new AnnotationDt();
1340                }
1341                return myNote;
1342        }
1343
1344        /**
1345         * Sets the value(s) for <b>note</b> ()
1346         *
1347     * <p>
1348     * <b>Definition:</b>
1349     * An area where general notes can be placed about this specific condition.
1350     * </p> 
1351         */
1352        public Condition setNote(AnnotationDt theValue) {
1353                myNote = theValue;
1354                return this;
1355        }
1356        
1357        
1358
1359  
1360
1361
1362        }
1363
1364
1365
1366
1367    @Override
1368    public String getResourceName() {
1369        return "FamilyMemberHistory";
1370    }
1371    
1372    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1373        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1374    }
1375
1376
1377}