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>Goal</b> Resource
282 * (clinical.careprovision)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
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/Goal">http://hl7.org/fhir/profiles/Goal</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Goal", profile="http://hl7.org/fhir/profiles/Goal", id="goal")
301public class Goal extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>patient</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>reference</b><br>
310         * Path: <b>Goal.subject</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="patient", path="Goal.subject", description="", type="reference" 
314, providesMembershipIn={
315 @Compartment(name="Patient")   }
316, target={
317 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
318 )
319        public static final String SP_PATIENT = "patient";
320
321        /**
322         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
323         * <p>
324         * Description: <b></b><br>
325         * Type: <b>reference</b><br>
326         * Path: <b>Goal.subject</b><br>
327         * </p>
328         */
329        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
330
331        /**
332         * Search parameter constant for <b>subject</b>
333         * <p>
334         * Description: <b></b><br>
335         * Type: <b>reference</b><br>
336         * Path: <b>Goal.subject</b><br>
337         * </p>
338         */
339        @SearchParamDefinition(name="subject", path="Goal.subject", description="", type="reference" 
340 )
341        public static final String SP_SUBJECT = "subject";
342
343        /**
344         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
345         * <p>
346         * Description: <b></b><br>
347         * Type: <b>reference</b><br>
348         * Path: <b>Goal.subject</b><br>
349         * </p>
350         */
351        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
352
353        /**
354         * Search parameter constant for <b>category</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>Goal.category</b><br>
359         * </p>
360         */
361        @SearchParamDefinition(name="category", path="Goal.category", description="", type="token" 
362 )
363        public static final String SP_CATEGORY = "category";
364
365        /**
366         * <b>Fluent Client</b> search parameter constant for <b>category</b>
367         * <p>
368         * Description: <b></b><br>
369         * Type: <b>token</b><br>
370         * Path: <b>Goal.category</b><br>
371         * </p>
372         */
373        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
374
375        /**
376         * Search parameter constant for <b>targetdate</b>
377         * <p>
378         * Description: <b></b><br>
379         * Type: <b>date</b><br>
380         * Path: <b>Goal.targetDate</b><br>
381         * </p>
382         */
383        @SearchParamDefinition(name="targetdate", path="Goal.targetDate", description="", type="date" 
384 )
385        public static final String SP_TARGETDATE = "targetdate";
386
387        /**
388         * <b>Fluent Client</b> search parameter constant for <b>targetdate</b>
389         * <p>
390         * Description: <b></b><br>
391         * Type: <b>date</b><br>
392         * Path: <b>Goal.targetDate</b><br>
393         * </p>
394         */
395        public static final DateClientParam TARGETDATE = new DateClientParam(SP_TARGETDATE);
396
397        /**
398         * Search parameter constant for <b>identifier</b>
399         * <p>
400         * Description: <b></b><br>
401         * Type: <b>token</b><br>
402         * Path: <b>Goal.identifier</b><br>
403         * </p>
404         */
405        @SearchParamDefinition(name="identifier", path="Goal.identifier", description="", type="token" 
406 )
407        public static final String SP_IDENTIFIER = "identifier";
408
409        /**
410         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
411         * <p>
412         * Description: <b></b><br>
413         * Type: <b>token</b><br>
414         * Path: <b>Goal.identifier</b><br>
415         * </p>
416         */
417        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
418
419        /**
420         * Search parameter constant for <b>status</b>
421         * <p>
422         * Description: <b></b><br>
423         * Type: <b>token</b><br>
424         * Path: <b>Goal.status</b><br>
425         * </p>
426         */
427        @SearchParamDefinition(name="status", path="Goal.status", description="", type="token" 
428 )
429        public static final String SP_STATUS = "status";
430
431        /**
432         * <b>Fluent Client</b> search parameter constant for <b>status</b>
433         * <p>
434         * Description: <b></b><br>
435         * Type: <b>token</b><br>
436         * Path: <b>Goal.status</b><br>
437         * </p>
438         */
439        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
440
441
442        /**
443         * Constant for fluent queries to be used to add include statements. Specifies
444         * the path value of "<b>Goal:patient</b>".
445         */
446        public static final Include INCLUDE_PATIENT = new Include("Goal:patient");
447
448        /**
449         * Constant for fluent queries to be used to add include statements. Specifies
450         * the path value of "<b>Goal:subject</b>".
451         */
452        public static final Include INCLUDE_SUBJECT = new Include("Goal:subject");
453
454
455        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
456        @Description(
457                shortDefinition="id",
458                formalDefinition="This records identifiers associated with this care plan 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)"
459        )
460        private java.util.List<IdentifierDt> myIdentifier;
461        
462        @Child(name="subject", order=1, min=0, max=1, summary=true, modifier=false, type={
463                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
464                ca.uhn.fhir.model.dstu2.resource.Group.class, 
465                ca.uhn.fhir.model.dstu2.resource.Organization.class
466        })
467        @Description(
468                shortDefinition="who.focus",
469                formalDefinition="Identifies the patient, group or organization for whom the goal is being established."
470        )
471        private ResourceReferenceDt mySubject;
472        
473        @Child(name="start", order=2, min=0, max=1, summary=true, modifier=false, type={
474                DateDt.class, 
475                CodeableConceptDt.class
476        })
477        @Description(
478                shortDefinition="",
479                formalDefinition="The date or event after which the goal should begin being pursued"
480        )
481        private IDatatype myStart;
482        
483        @Child(name="target", order=3, min=0, max=1, summary=true, modifier=false, type={
484                DateDt.class, 
485                DurationDt.class
486        })
487        @Description(
488                shortDefinition="",
489                formalDefinition="Indicates either the date or the duration after start by which the goal should be met"
490        )
491        private IDatatype myTarget;
492        
493        @Child(name="category", type=CodeableConceptDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
494        @Description(
495                shortDefinition="",
496                formalDefinition="Indicates a category the goal falls within"
497        )
498        private java.util.List<CodeableConceptDt> myCategory;
499        
500        @Child(name="description", type=StringDt.class, order=5, min=1, max=1, summary=true, modifier=false)    
501        @Description(
502                shortDefinition="",
503                formalDefinition="Human-readable description of a specific desired objective of care."
504        )
505        private StringDt myDescription;
506        
507        @Child(name="status", type=CodeDt.class, order=6, min=1, max=1, summary=true, modifier=true)    
508        @Description(
509                shortDefinition="status",
510                formalDefinition="Indicates whether the goal has been reached and is still considered relevant"
511        )
512        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/goal-status")
513        private BoundCodeDt<GoalStatusEnum> myStatus;
514        
515        @Child(name="statusDate", type=DateDt.class, order=7, min=0, max=1, summary=true, modifier=false)       
516        @Description(
517                shortDefinition="when.recorded",
518                formalDefinition="Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc."
519        )
520        private DateDt myStatusDate;
521        
522        @Child(name="statusReason", type=CodeableConceptDt.class, order=8, min=0, max=1, summary=false, modifier=false) 
523        @Description(
524                shortDefinition="",
525                formalDefinition="Captures the reason for the current status."
526        )
527        private CodeableConceptDt myStatusReason;
528        
529        @Child(name="author", order=9, min=0, max=1, summary=true, modifier=false, type={
530                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
531                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
532                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
533        })
534        @Description(
535                shortDefinition="who.actor",
536                formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc."
537        )
538        private ResourceReferenceDt myAuthor;
539        
540        @Child(name="priority", type=CodeableConceptDt.class, order=10, min=0, max=1, summary=true, modifier=false)     
541        @Description(
542                shortDefinition="",
543                formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal"
544        )
545        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-goal-priority")
546        private BoundCodeableConceptDt<GoalPriorityEnum> myPriority;
547        
548        @Child(name="addresses", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
549                ca.uhn.fhir.model.dstu2.resource.Condition.class, 
550                ca.uhn.fhir.model.dstu2.resource.Observation.class, 
551                ca.uhn.fhir.model.dstu2.resource.MedicationStatement.class, 
552                ca.uhn.fhir.model.dstu2.resource.NutritionOrder.class, 
553                ca.uhn.fhir.model.dstu2.resource.ProcedureRequest.class, 
554                ca.uhn.fhir.model.dstu2.resource.RiskAssessment.class
555        })
556        @Description(
557                shortDefinition="",
558                formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal"
559        )
560        private java.util.List<ResourceReferenceDt> myAddresses;
561        
562        @Child(name="note", type=AnnotationDt.class, order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
563        @Description(
564                shortDefinition="",
565                formalDefinition="Any comments related to the goal"
566        )
567        private java.util.List<AnnotationDt> myNote;
568        
569        @Child(name="outcome", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
570        @Description(
571                shortDefinition="",
572                formalDefinition="Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved."
573        )
574        private java.util.List<Outcome> myOutcome;
575        
576
577        @Override
578        public boolean isEmpty() {
579                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  mySubject,  myStart,  myTarget,  myCategory,  myDescription,  myStatus,  myStatusDate,  myStatusReason,  myAuthor,  myPriority,  myAddresses,  myNote,  myOutcome);
580        }
581        
582        @Override
583        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
584                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, mySubject, myStart, myTarget, myCategory, myDescription, myStatus, myStatusDate, myStatusReason, myAuthor, myPriority, myAddresses, myNote, myOutcome);
585        }
586
587        /**
588         * Gets the value(s) for <b>identifier</b> (id).
589         * creating it if it does
590         * not exist. Will not return <code>null</code>.
591         *
592     * <p>
593     * <b>Definition:</b>
594     * This records identifiers associated with this care plan 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)
595     * </p> 
596         */
597        public java.util.List<IdentifierDt> getIdentifier() {  
598                if (myIdentifier == null) {
599                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
600                }
601                return myIdentifier;
602        }
603
604        /**
605         * Sets the value(s) for <b>identifier</b> (id)
606         *
607     * <p>
608     * <b>Definition:</b>
609     * This records identifiers associated with this care plan 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)
610     * </p> 
611         */
612        public Goal setIdentifier(java.util.List<IdentifierDt> theValue) {
613                myIdentifier = theValue;
614                return this;
615        }
616        
617        
618
619        /**
620         * Adds and returns a new value for <b>identifier</b> (id)
621         *
622     * <p>
623     * <b>Definition:</b>
624     * This records identifiers associated with this care plan 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)
625     * </p> 
626         */
627        public IdentifierDt addIdentifier() {
628                IdentifierDt newType = new IdentifierDt();
629                getIdentifier().add(newType);
630                return newType; 
631        }
632
633        /**
634         * Adds a given new value for <b>identifier</b> (id)
635         *
636         * <p>
637         * <b>Definition:</b>
638         * This records identifiers associated with this care plan 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)
639         * </p>
640         * @param theValue The identifier to add (must not be <code>null</code>)
641         */
642        public Goal addIdentifier(IdentifierDt theValue) {
643                if (theValue == null) {
644                        throw new NullPointerException("theValue must not be null");
645                }
646                getIdentifier().add(theValue);
647                return this;
648        }
649
650        /**
651         * Gets the first repetition for <b>identifier</b> (id),
652         * creating it if it does not already exist.
653         *
654     * <p>
655     * <b>Definition:</b>
656     * This records identifiers associated with this care plan 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)
657     * </p> 
658         */
659        public IdentifierDt getIdentifierFirstRep() {
660                if (getIdentifier().isEmpty()) {
661                        return addIdentifier();
662                }
663                return getIdentifier().get(0); 
664        }
665  
666        /**
667         * Gets the value(s) for <b>subject</b> (who.focus).
668         * creating it if it does
669         * not exist. Will not return <code>null</code>.
670         *
671     * <p>
672     * <b>Definition:</b>
673     * Identifies the patient, group or organization for whom the goal is being established.
674     * </p> 
675         */
676        public ResourceReferenceDt getSubject() {  
677                if (mySubject == null) {
678                        mySubject = new ResourceReferenceDt();
679                }
680                return mySubject;
681        }
682
683        /**
684         * Sets the value(s) for <b>subject</b> (who.focus)
685         *
686     * <p>
687     * <b>Definition:</b>
688     * Identifies the patient, group or organization for whom the goal is being established.
689     * </p> 
690         */
691        public Goal setSubject(ResourceReferenceDt theValue) {
692                mySubject = theValue;
693                return this;
694        }
695        
696        
697
698  
699        /**
700         * Gets the value(s) for <b>start[x]</b> ().
701         * creating it if it does
702         * not exist. Will not return <code>null</code>.
703         *
704     * <p>
705     * <b>Definition:</b>
706     * The date or event after which the goal should begin being pursued
707     * </p> 
708         */
709        public IDatatype getStart() {  
710                return myStart;
711        }
712
713        /**
714         * Sets the value(s) for <b>start[x]</b> ()
715         *
716     * <p>
717     * <b>Definition:</b>
718     * The date or event after which the goal should begin being pursued
719     * </p> 
720         */
721        public Goal setStart(IDatatype theValue) {
722                myStart = theValue;
723                return this;
724        }
725        
726        
727
728  
729        /**
730         * Gets the value(s) for <b>target[x]</b> ().
731         * creating it if it does
732         * not exist. Will not return <code>null</code>.
733         *
734     * <p>
735     * <b>Definition:</b>
736     * Indicates either the date or the duration after start by which the goal should be met
737     * </p> 
738         */
739        public IDatatype getTarget() {  
740                return myTarget;
741        }
742
743        /**
744         * Sets the value(s) for <b>target[x]</b> ()
745         *
746     * <p>
747     * <b>Definition:</b>
748     * Indicates either the date or the duration after start by which the goal should be met
749     * </p> 
750         */
751        public Goal setTarget(IDatatype theValue) {
752                myTarget = theValue;
753                return this;
754        }
755        
756        
757
758  
759        /**
760         * Gets the value(s) for <b>category</b> ().
761         * creating it if it does
762         * not exist. Will not return <code>null</code>.
763         *
764     * <p>
765     * <b>Definition:</b>
766     * Indicates a category the goal falls within
767     * </p> 
768         */
769        public java.util.List<CodeableConceptDt> getCategory() {  
770                if (myCategory == null) {
771                        myCategory = new java.util.ArrayList<CodeableConceptDt>();
772                }
773                return myCategory;
774        }
775
776        /**
777         * Sets the value(s) for <b>category</b> ()
778         *
779     * <p>
780     * <b>Definition:</b>
781     * Indicates a category the goal falls within
782     * </p> 
783         */
784        public Goal setCategory(java.util.List<CodeableConceptDt> theValue) {
785                myCategory = theValue;
786                return this;
787        }
788        
789        
790
791        /**
792         * Adds and returns a new value for <b>category</b> ()
793         *
794     * <p>
795     * <b>Definition:</b>
796     * Indicates a category the goal falls within
797     * </p> 
798         */
799        public CodeableConceptDt addCategory() {
800                CodeableConceptDt newType = new CodeableConceptDt();
801                getCategory().add(newType);
802                return newType; 
803        }
804
805        /**
806         * Adds a given new value for <b>category</b> ()
807         *
808         * <p>
809         * <b>Definition:</b>
810         * Indicates a category the goal falls within
811         * </p>
812         * @param theValue The category to add (must not be <code>null</code>)
813         */
814        public Goal addCategory(CodeableConceptDt theValue) {
815                if (theValue == null) {
816                        throw new NullPointerException("theValue must not be null");
817                }
818                getCategory().add(theValue);
819                return this;
820        }
821
822        /**
823         * Gets the first repetition for <b>category</b> (),
824         * creating it if it does not already exist.
825         *
826     * <p>
827     * <b>Definition:</b>
828     * Indicates a category the goal falls within
829     * </p> 
830         */
831        public CodeableConceptDt getCategoryFirstRep() {
832                if (getCategory().isEmpty()) {
833                        return addCategory();
834                }
835                return getCategory().get(0); 
836        }
837  
838        /**
839         * Gets the value(s) for <b>description</b> ().
840         * creating it if it does
841         * not exist. Will not return <code>null</code>.
842         *
843     * <p>
844     * <b>Definition:</b>
845     * Human-readable description of a specific desired objective of care.
846     * </p> 
847         */
848        public StringDt getDescriptionElement() {  
849                if (myDescription == null) {
850                        myDescription = new StringDt();
851                }
852                return myDescription;
853        }
854
855        
856        /**
857         * Gets the value(s) for <b>description</b> ().
858         * creating it if it does
859         * not exist. This method may return <code>null</code>.
860         *
861     * <p>
862     * <b>Definition:</b>
863     * Human-readable description of a specific desired objective of care.
864     * </p> 
865         */
866        public String getDescription() {  
867                return getDescriptionElement().getValue();
868        }
869
870        /**
871         * Sets the value(s) for <b>description</b> ()
872         *
873     * <p>
874     * <b>Definition:</b>
875     * Human-readable description of a specific desired objective of care.
876     * </p> 
877         */
878        public Goal setDescription(StringDt theValue) {
879                myDescription = theValue;
880                return this;
881        }
882        
883        
884
885        /**
886         * Sets the value for <b>description</b> ()
887         *
888     * <p>
889     * <b>Definition:</b>
890     * Human-readable description of a specific desired objective of care.
891     * </p> 
892         */
893        public Goal setDescription( String theString) {
894                myDescription = new StringDt(theString); 
895                return this; 
896        }
897
898 
899        /**
900         * Gets the value(s) for <b>status</b> (status).
901         * creating it if it does
902         * not exist. Will not return <code>null</code>.
903         *
904     * <p>
905     * <b>Definition:</b>
906     * Indicates whether the goal has been reached and is still considered relevant
907     * </p> 
908         */
909        public BoundCodeDt<GoalStatusEnum> getStatusElement() {  
910                if (myStatus == null) {
911                        myStatus = new BoundCodeDt<GoalStatusEnum>(GoalStatusEnum.VALUESET_BINDER);
912                }
913                return myStatus;
914        }
915
916        
917        /**
918         * Gets the value(s) for <b>status</b> (status).
919         * creating it if it does
920         * not exist. This method may return <code>null</code>.
921         *
922     * <p>
923     * <b>Definition:</b>
924     * Indicates whether the goal has been reached and is still considered relevant
925     * </p> 
926         */
927        public String getStatus() {  
928                return getStatusElement().getValue();
929        }
930
931        /**
932         * Sets the value(s) for <b>status</b> (status)
933         *
934     * <p>
935     * <b>Definition:</b>
936     * Indicates whether the goal has been reached and is still considered relevant
937     * </p> 
938         */
939        public Goal setStatus(BoundCodeDt<GoalStatusEnum> theValue) {
940                myStatus = theValue;
941                return this;
942        }
943        
944        
945
946        /**
947         * Sets the value(s) for <b>status</b> (status)
948         *
949     * <p>
950     * <b>Definition:</b>
951     * Indicates whether the goal has been reached and is still considered relevant
952     * </p> 
953         */
954        public Goal setStatus(GoalStatusEnum theValue) {
955                setStatus(new BoundCodeDt<GoalStatusEnum>(GoalStatusEnum.VALUESET_BINDER, theValue));
956                
957/*
958                getStatusElement().setValueAsEnum(theValue);
959*/
960                return this;
961        }
962
963  
964        /**
965         * Gets the value(s) for <b>statusDate</b> (when.recorded).
966         * creating it if it does
967         * not exist. Will not return <code>null</code>.
968         *
969     * <p>
970     * <b>Definition:</b>
971     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
972     * </p> 
973         */
974        public DateDt getStatusDateElement() {  
975                if (myStatusDate == null) {
976                        myStatusDate = new DateDt();
977                }
978                return myStatusDate;
979        }
980
981        
982        /**
983         * Gets the value(s) for <b>statusDate</b> (when.recorded).
984         * creating it if it does
985         * not exist. This method may return <code>null</code>.
986         *
987     * <p>
988     * <b>Definition:</b>
989     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
990     * </p> 
991         */
992        public Date getStatusDate() {  
993                return getStatusDateElement().getValue();
994        }
995
996        /**
997         * Sets the value(s) for <b>statusDate</b> (when.recorded)
998         *
999     * <p>
1000     * <b>Definition:</b>
1001     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1002     * </p> 
1003         */
1004        public Goal setStatusDate(DateDt theValue) {
1005                myStatusDate = theValue;
1006                return this;
1007        }
1008        
1009        
1010
1011        /**
1012         * Sets the value for <b>statusDate</b> (when.recorded)
1013         *
1014     * <p>
1015     * <b>Definition:</b>
1016     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1017     * </p> 
1018         */
1019        public Goal setStatusDateWithDayPrecision( Date theDate) {
1020                myStatusDate = new DateDt(theDate); 
1021                return this; 
1022        }
1023
1024        /**
1025         * Sets the value for <b>statusDate</b> (when.recorded)
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1030     * </p> 
1031         */
1032        public Goal setStatusDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1033                myStatusDate = new DateDt(theDate, thePrecision); 
1034                return this; 
1035        }
1036
1037 
1038        /**
1039         * Gets the value(s) for <b>statusReason</b> ().
1040         * creating it if it does
1041         * not exist. Will not return <code>null</code>.
1042         *
1043     * <p>
1044     * <b>Definition:</b>
1045     * Captures the reason for the current status.
1046     * </p> 
1047         */
1048        public CodeableConceptDt getStatusReason() {  
1049                if (myStatusReason == null) {
1050                        myStatusReason = new CodeableConceptDt();
1051                }
1052                return myStatusReason;
1053        }
1054
1055        /**
1056         * Sets the value(s) for <b>statusReason</b> ()
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * Captures the reason for the current status.
1061     * </p> 
1062         */
1063        public Goal setStatusReason(CodeableConceptDt theValue) {
1064                myStatusReason = theValue;
1065                return this;
1066        }
1067        
1068        
1069
1070  
1071        /**
1072         * Gets the value(s) for <b>author</b> (who.actor).
1073         * creating it if it does
1074         * not exist. Will not return <code>null</code>.
1075         *
1076     * <p>
1077     * <b>Definition:</b>
1078     * Indicates whose goal this is - patient goal, practitioner goal, etc.
1079     * </p> 
1080         */
1081        public ResourceReferenceDt getAuthor() {  
1082                if (myAuthor == null) {
1083                        myAuthor = new ResourceReferenceDt();
1084                }
1085                return myAuthor;
1086        }
1087
1088        /**
1089         * Sets the value(s) for <b>author</b> (who.actor)
1090         *
1091     * <p>
1092     * <b>Definition:</b>
1093     * Indicates whose goal this is - patient goal, practitioner goal, etc.
1094     * </p> 
1095         */
1096        public Goal setAuthor(ResourceReferenceDt theValue) {
1097                myAuthor = theValue;
1098                return this;
1099        }
1100        
1101        
1102
1103  
1104        /**
1105         * Gets the value(s) for <b>priority</b> ().
1106         * creating it if it does
1107         * not exist. Will not return <code>null</code>.
1108         *
1109     * <p>
1110     * <b>Definition:</b>
1111     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal
1112     * </p> 
1113         */
1114        public BoundCodeableConceptDt<GoalPriorityEnum> getPriority() {  
1115                if (myPriority == null) {
1116                        myPriority = new BoundCodeableConceptDt<GoalPriorityEnum>(GoalPriorityEnum.VALUESET_BINDER);
1117                }
1118                return myPriority;
1119        }
1120
1121        /**
1122         * Sets the value(s) for <b>priority</b> ()
1123         *
1124     * <p>
1125     * <b>Definition:</b>
1126     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal
1127     * </p> 
1128         */
1129        public Goal setPriority(BoundCodeableConceptDt<GoalPriorityEnum> theValue) {
1130                myPriority = theValue;
1131                return this;
1132        }
1133        
1134        
1135
1136        /**
1137         * Sets the value(s) for <b>priority</b> ()
1138         *
1139     * <p>
1140     * <b>Definition:</b>
1141     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal
1142     * </p> 
1143         */
1144        public Goal setPriority(GoalPriorityEnum theValue) {
1145                setPriority(new BoundCodeableConceptDt<GoalPriorityEnum>(GoalPriorityEnum.VALUESET_BINDER, theValue));
1146                
1147/*
1148                getPriority().setValueAsEnum(theValue);
1149*/
1150                return this;
1151        }
1152
1153  
1154        /**
1155         * Gets the value(s) for <b>addresses</b> ().
1156         * creating it if it does
1157         * not exist. Will not return <code>null</code>.
1158         *
1159     * <p>
1160     * <b>Definition:</b>
1161     * The identified conditions and other health record elements that are intended to be addressed by the goal
1162     * </p> 
1163         */
1164        public java.util.List<ResourceReferenceDt> getAddresses() {  
1165                if (myAddresses == null) {
1166                        myAddresses = new java.util.ArrayList<ResourceReferenceDt>();
1167                }
1168                return myAddresses;
1169        }
1170
1171        /**
1172         * Sets the value(s) for <b>addresses</b> ()
1173         *
1174     * <p>
1175     * <b>Definition:</b>
1176     * The identified conditions and other health record elements that are intended to be addressed by the goal
1177     * </p> 
1178         */
1179        public Goal setAddresses(java.util.List<ResourceReferenceDt> theValue) {
1180                myAddresses = theValue;
1181                return this;
1182        }
1183        
1184        
1185
1186        /**
1187         * Adds and returns a new value for <b>addresses</b> ()
1188         *
1189     * <p>
1190     * <b>Definition:</b>
1191     * The identified conditions and other health record elements that are intended to be addressed by the goal
1192     * </p> 
1193         */
1194        public ResourceReferenceDt addAddresses() {
1195                ResourceReferenceDt newType = new ResourceReferenceDt();
1196                getAddresses().add(newType);
1197                return newType; 
1198        }
1199  
1200        /**
1201         * Gets the value(s) for <b>note</b> ().
1202         * creating it if it does
1203         * not exist. Will not return <code>null</code>.
1204         *
1205     * <p>
1206     * <b>Definition:</b>
1207     * Any comments related to the goal
1208     * </p> 
1209         */
1210        public java.util.List<AnnotationDt> getNote() {  
1211                if (myNote == null) {
1212                        myNote = new java.util.ArrayList<AnnotationDt>();
1213                }
1214                return myNote;
1215        }
1216
1217        /**
1218         * Sets the value(s) for <b>note</b> ()
1219         *
1220     * <p>
1221     * <b>Definition:</b>
1222     * Any comments related to the goal
1223     * </p> 
1224         */
1225        public Goal setNote(java.util.List<AnnotationDt> theValue) {
1226                myNote = theValue;
1227                return this;
1228        }
1229        
1230        
1231
1232        /**
1233         * Adds and returns a new value for <b>note</b> ()
1234         *
1235     * <p>
1236     * <b>Definition:</b>
1237     * Any comments related to the goal
1238     * </p> 
1239         */
1240        public AnnotationDt addNote() {
1241                AnnotationDt newType = new AnnotationDt();
1242                getNote().add(newType);
1243                return newType; 
1244        }
1245
1246        /**
1247         * Adds a given new value for <b>note</b> ()
1248         *
1249         * <p>
1250         * <b>Definition:</b>
1251         * Any comments related to the goal
1252         * </p>
1253         * @param theValue The note to add (must not be <code>null</code>)
1254         */
1255        public Goal addNote(AnnotationDt theValue) {
1256                if (theValue == null) {
1257                        throw new NullPointerException("theValue must not be null");
1258                }
1259                getNote().add(theValue);
1260                return this;
1261        }
1262
1263        /**
1264         * Gets the first repetition for <b>note</b> (),
1265         * creating it if it does not already exist.
1266         *
1267     * <p>
1268     * <b>Definition:</b>
1269     * Any comments related to the goal
1270     * </p> 
1271         */
1272        public AnnotationDt getNoteFirstRep() {
1273                if (getNote().isEmpty()) {
1274                        return addNote();
1275                }
1276                return getNote().get(0); 
1277        }
1278  
1279        /**
1280         * Gets the value(s) for <b>outcome</b> ().
1281         * creating it if it does
1282         * not exist. Will not return <code>null</code>.
1283         *
1284     * <p>
1285     * <b>Definition:</b>
1286     * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1287     * </p> 
1288         */
1289        public java.util.List<Outcome> getOutcome() {  
1290                if (myOutcome == null) {
1291                        myOutcome = new java.util.ArrayList<Outcome>();
1292                }
1293                return myOutcome;
1294        }
1295
1296        /**
1297         * Sets the value(s) for <b>outcome</b> ()
1298         *
1299     * <p>
1300     * <b>Definition:</b>
1301     * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1302     * </p> 
1303         */
1304        public Goal setOutcome(java.util.List<Outcome> theValue) {
1305                myOutcome = theValue;
1306                return this;
1307        }
1308        
1309        
1310
1311        /**
1312         * Adds and returns a new value for <b>outcome</b> ()
1313         *
1314     * <p>
1315     * <b>Definition:</b>
1316     * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1317     * </p> 
1318         */
1319        public Outcome addOutcome() {
1320                Outcome newType = new Outcome();
1321                getOutcome().add(newType);
1322                return newType; 
1323        }
1324
1325        /**
1326         * Adds a given new value for <b>outcome</b> ()
1327         *
1328         * <p>
1329         * <b>Definition:</b>
1330         * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1331         * </p>
1332         * @param theValue The outcome to add (must not be <code>null</code>)
1333         */
1334        public Goal addOutcome(Outcome theValue) {
1335                if (theValue == null) {
1336                        throw new NullPointerException("theValue must not be null");
1337                }
1338                getOutcome().add(theValue);
1339                return this;
1340        }
1341
1342        /**
1343         * Gets the first repetition for <b>outcome</b> (),
1344         * creating it if it does not already exist.
1345         *
1346     * <p>
1347     * <b>Definition:</b>
1348     * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1349     * </p> 
1350         */
1351        public Outcome getOutcomeFirstRep() {
1352                if (getOutcome().isEmpty()) {
1353                        return addOutcome();
1354                }
1355                return getOutcome().get(0); 
1356        }
1357  
1358        /**
1359         * Block class for child element: <b>Goal.outcome</b> ()
1360         *
1361     * <p>
1362     * <b>Definition:</b>
1363     * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
1364     * </p> 
1365         */
1366        @Block()        
1367        public static class Outcome 
1368            extends  BaseIdentifiableElement  
1369            implements IResourceBlock {
1370        
1371        @Child(name="result", order=0, min=0, max=1, summary=false, modifier=false, type={
1372                CodeableConceptDt.class, 
1373                Observation.class
1374        })
1375        @Description(
1376                shortDefinition="",
1377                formalDefinition="Details of what's changed (or not changed)"
1378        )
1379        private IDatatype myResult;
1380        
1381
1382        @Override
1383        public boolean isEmpty() {
1384                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myResult);
1385        }
1386        
1387        @Override
1388        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1389                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myResult);
1390        }
1391
1392        /**
1393         * Gets the value(s) for <b>result[x]</b> ().
1394         * creating it if it does
1395         * not exist. Will not return <code>null</code>.
1396         *
1397     * <p>
1398     * <b>Definition:</b>
1399     * Details of what's changed (or not changed)
1400     * </p> 
1401         */
1402        public IDatatype getResult() {  
1403                return myResult;
1404        }
1405
1406        /**
1407         * Sets the value(s) for <b>result[x]</b> ()
1408         *
1409     * <p>
1410     * <b>Definition:</b>
1411     * Details of what's changed (or not changed)
1412     * </p> 
1413         */
1414        public Outcome setResult(IDatatype theValue) {
1415                myResult = theValue;
1416                return this;
1417        }
1418        
1419        
1420
1421  
1422
1423
1424        }
1425
1426
1427
1428
1429    @Override
1430    public String getResourceName() {
1431        return "Goal";
1432    }
1433    
1434    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1435        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1436    }
1437
1438
1439}