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>Appointment</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * 
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/Appointment">http://hl7.org/fhir/profiles/Appointment</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Appointment", profile="http://hl7.org/fhir/profiles/Appointment", id="appointment")
301public class Appointment extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>date</b>
306         * <p>
307         * Description: <b>Appointment date/time.</b><br>
308         * Type: <b>date</b><br>
309         * Path: <b>Appointment.start</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date"  )
313        public static final String SP_DATE = "date";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>date</b>
317         * <p>
318         * Description: <b>Appointment date/time.</b><br>
319         * Type: <b>date</b><br>
320         * Path: <b>Appointment.start</b><br>
321         * </p>
322         */
323        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
324
325        /**
326         * Search parameter constant for <b>status</b>
327         * <p>
328         * Description: <b>The overall status of the appointment</b><br>
329         * Type: <b>token</b><br>
330         * Path: <b>Appointment.status</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token"  )
334        public static final String SP_STATUS = "status";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>status</b>
338         * <p>
339         * Description: <b>The overall status of the appointment</b><br>
340         * Type: <b>token</b><br>
341         * Path: <b>Appointment.status</b><br>
342         * </p>
343         */
344        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
345
346        /**
347         * Search parameter constant for <b>actor</b>
348         * <p>
349         * Description: <b>Any one of the individuals participating in the appointment</b><br>
350         * Type: <b>reference</b><br>
351         * Path: <b>Appointment.participant.actor</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" , providesMembershipIn={
355 @Compartment(name="Patient") ,  @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner")      }
356 )
357        public static final String SP_ACTOR = "actor";
358
359        /**
360         * <b>Fluent Client</b> search parameter constant for <b>actor</b>
361         * <p>
362         * Description: <b>Any one of the individuals participating in the appointment</b><br>
363         * Type: <b>reference</b><br>
364         * Path: <b>Appointment.participant.actor</b><br>
365         * </p>
366         */
367        public static final ReferenceClientParam ACTOR = new ReferenceClientParam(SP_ACTOR);
368
369        /**
370         * Search parameter constant for <b>part-status</b>
371         * <p>
372         * Description: <b>The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.</b><br>
373         * Type: <b>token</b><br>
374         * Path: <b>Appointment.participant.status</b><br>
375         * </p>
376         */
377        @SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token"  )
378        public static final String SP_PART_STATUS = "part-status";
379
380        /**
381         * <b>Fluent Client</b> search parameter constant for <b>part-status</b>
382         * <p>
383         * Description: <b>The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.</b><br>
384         * Type: <b>token</b><br>
385         * Path: <b>Appointment.participant.status</b><br>
386         * </p>
387         */
388        public static final TokenClientParam PART_STATUS = new TokenClientParam(SP_PART_STATUS);
389
390        /**
391         * Search parameter constant for <b>patient</b>
392         * <p>
393         * Description: <b>One of the individuals of the appointment is this patient</b><br>
394         * Type: <b>reference</b><br>
395         * Path: <b>Appointment.participant.actor</b><br>
396         * </p>
397         */
398        @SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" , target={
399 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
400 )
401        public static final String SP_PATIENT = "patient";
402
403        /**
404         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
405         * <p>
406         * Description: <b>One of the individuals of the appointment is this patient</b><br>
407         * Type: <b>reference</b><br>
408         * Path: <b>Appointment.participant.actor</b><br>
409         * </p>
410         */
411        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
412
413        /**
414         * Search parameter constant for <b>practitioner</b>
415         * <p>
416         * Description: <b>One of the individuals of the appointment is this practitioner</b><br>
417         * Type: <b>reference</b><br>
418         * Path: <b>Appointment.participant.actor</b><br>
419         * </p>
420         */
421        @SearchParamDefinition(name="practitioner", path="Appointment.participant.actor", description="One of the individuals of the appointment is this practitioner", type="reference" , target={
422 ca.uhn.fhir.model.dstu2.resource.Practitioner.class    }
423 )
424        public static final String SP_PRACTITIONER = "practitioner";
425
426        /**
427         * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
428         * <p>
429         * Description: <b>One of the individuals of the appointment is this practitioner</b><br>
430         * Type: <b>reference</b><br>
431         * Path: <b>Appointment.participant.actor</b><br>
432         * </p>
433         */
434        public static final ReferenceClientParam PRACTITIONER = new ReferenceClientParam(SP_PRACTITIONER);
435
436        /**
437         * Search parameter constant for <b>location</b>
438         * <p>
439         * Description: <b>This location is listed in the participants of the appointment</b><br>
440         * Type: <b>reference</b><br>
441         * Path: <b>Appointment.participant.actor</b><br>
442         * </p>
443         */
444        @SearchParamDefinition(name="location", path="Appointment.participant.actor", description="This location is listed in the participants of the appointment", type="reference" , target={
445 ca.uhn.fhir.model.dstu2.resource.Location.class        }
446 )
447        public static final String SP_LOCATION = "location";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>location</b>
451         * <p>
452         * Description: <b>This location is listed in the participants of the appointment</b><br>
453         * Type: <b>reference</b><br>
454         * Path: <b>Appointment.participant.actor</b><br>
455         * </p>
456         */
457        public static final ReferenceClientParam LOCATION = new ReferenceClientParam(SP_LOCATION);
458
459        /**
460         * Search parameter constant for <b>identifier</b>
461         * <p>
462         * Description: <b>An Identifier of the Appointment</b><br>
463         * Type: <b>token</b><br>
464         * Path: <b>Appointment.identifier</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token"  )
468        public static final String SP_IDENTIFIER = "identifier";
469
470        /**
471         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
472         * <p>
473         * Description: <b>An Identifier of the Appointment</b><br>
474         * Type: <b>token</b><br>
475         * Path: <b>Appointment.identifier</b><br>
476         * </p>
477         */
478        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
479
480
481        /**
482         * Constant for fluent queries to be used to add include statements. Specifies
483         * the path value of "<b>Appointment:actor</b>".
484         */
485        public static final Include INCLUDE_ACTOR = new Include("Appointment:actor");
486
487        /**
488         * Constant for fluent queries to be used to add include statements. Specifies
489         * the path value of "<b>Appointment:location</b>".
490         */
491        public static final Include INCLUDE_LOCATION = new Include("Appointment:location");
492
493        /**
494         * Constant for fluent queries to be used to add include statements. Specifies
495         * the path value of "<b>Appointment:patient</b>".
496         */
497        public static final Include INCLUDE_PATIENT = new Include("Appointment:patient");
498
499        /**
500         * Constant for fluent queries to be used to add include statements. Specifies
501         * the path value of "<b>Appointment:practitioner</b>".
502         */
503        public static final Include INCLUDE_PRACTITIONER = new Include("Appointment:practitioner");
504
505
506        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
507        @Description(
508                shortDefinition="",
509                formalDefinition="This records identifiers associated with this appointment concern 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)"
510        )
511        private java.util.List<IdentifierDt> myIdentifier;
512        
513        @Child(name="status", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=true)    
514        @Description(
515                shortDefinition="",
516                formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status"
517        )
518        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/appointmentstatus")
519        private BoundCodeDt<AppointmentStatusEnum> myStatus;
520        
521        @Child(name="type", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
522        @Description(
523                shortDefinition="",
524                formalDefinition="The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService)"
525        )
526        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/c80-practice-codes")
527        private CodeableConceptDt myType;
528        
529        @Child(name="reason", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=true, modifier=false)        
530        @Description(
531                shortDefinition="",
532                formalDefinition="The reason that this appointment is being scheduled. This is more clinical than administrative"
533        )
534        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/encounter-reason")
535        private CodeableConceptDt myReason;
536        
537        @Child(name="priority", type=UnsignedIntDt.class, order=4, min=0, max=1, summary=false, modifier=false) 
538        @Description(
539                shortDefinition="",
540                formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)"
541        )
542        private UnsignedIntDt myPriority;
543        
544        @Child(name="description", type=StringDt.class, order=5, min=0, max=1, summary=false, modifier=false)   
545        @Description(
546                shortDefinition="",
547                formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field"
548        )
549        private StringDt myDescription;
550        
551        @Child(name="start", type=InstantDt.class, order=6, min=0, max=1, summary=true, modifier=false) 
552        @Description(
553                shortDefinition="",
554                formalDefinition="Date/Time that the appointment is to take place"
555        )
556        private InstantDt myStart;
557        
558        @Child(name="end", type=InstantDt.class, order=7, min=0, max=1, summary=true, modifier=false)   
559        @Description(
560                shortDefinition="",
561                formalDefinition="Date/Time that the appointment is to conclude"
562        )
563        private InstantDt myEnd;
564        
565        @Child(name="minutesDuration", type=PositiveIntDt.class, order=8, min=0, max=1, summary=false, modifier=false)  
566        @Description(
567                shortDefinition="",
568                formalDefinition="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)"
569        )
570        private PositiveIntDt myMinutesDuration;
571        
572        @Child(name="slot", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
573                ca.uhn.fhir.model.dstu2.resource.Slot.class     })
574        @Description(
575                shortDefinition="",
576                formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot"
577        )
578        private java.util.List<ResourceReferenceDt> mySlot;
579        
580        @Child(name="comment", type=StringDt.class, order=10, min=0, max=1, summary=false, modifier=false)      
581        @Description(
582                shortDefinition="",
583                formalDefinition="Additional comments about the appointment"
584        )
585        private StringDt myComment;
586        
587        @Child(name="participant", order=11, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
588        @Description(
589                shortDefinition="",
590                formalDefinition="List of participants involved in the appointment"
591        )
592        private java.util.List<Participant> myParticipant;
593        
594
595        @Override
596        public boolean isEmpty() {
597                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myStatus,  myType,  myReason,  myPriority,  myDescription,  myStart,  myEnd,  myMinutesDuration,  mySlot,  myComment,  myParticipant);
598        }
599        
600        @Override
601        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
602                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myType, myReason, myPriority, myDescription, myStart, myEnd, myMinutesDuration, mySlot, myComment, myParticipant);
603        }
604
605        /**
606         * Gets the value(s) for <b>identifier</b> ().
607         * creating it if it does
608         * not exist. Will not return <code>null</code>.
609         *
610     * <p>
611     * <b>Definition:</b>
612     * This records identifiers associated with this appointment concern 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)
613     * </p> 
614         */
615        public java.util.List<IdentifierDt> getIdentifier() {  
616                if (myIdentifier == null) {
617                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
618                }
619                return myIdentifier;
620        }
621
622        /**
623         * Sets the value(s) for <b>identifier</b> ()
624         *
625     * <p>
626     * <b>Definition:</b>
627     * This records identifiers associated with this appointment concern 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)
628     * </p> 
629         */
630        public Appointment setIdentifier(java.util.List<IdentifierDt> theValue) {
631                myIdentifier = theValue;
632                return this;
633        }
634        
635        
636
637        /**
638         * Adds and returns a new value for <b>identifier</b> ()
639         *
640     * <p>
641     * <b>Definition:</b>
642     * This records identifiers associated with this appointment concern 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)
643     * </p> 
644         */
645        public IdentifierDt addIdentifier() {
646                IdentifierDt newType = new IdentifierDt();
647                getIdentifier().add(newType);
648                return newType; 
649        }
650
651        /**
652         * Adds a given new value for <b>identifier</b> ()
653         *
654         * <p>
655         * <b>Definition:</b>
656         * This records identifiers associated with this appointment concern 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         * @param theValue The identifier to add (must not be <code>null</code>)
659         */
660        public Appointment addIdentifier(IdentifierDt theValue) {
661                if (theValue == null) {
662                        throw new NullPointerException("theValue must not be null");
663                }
664                getIdentifier().add(theValue);
665                return this;
666        }
667
668        /**
669         * Gets the first repetition for <b>identifier</b> (),
670         * creating it if it does not already exist.
671         *
672     * <p>
673     * <b>Definition:</b>
674     * This records identifiers associated with this appointment concern 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)
675     * </p> 
676         */
677        public IdentifierDt getIdentifierFirstRep() {
678                if (getIdentifier().isEmpty()) {
679                        return addIdentifier();
680                }
681                return getIdentifier().get(0); 
682        }
683  
684        /**
685         * Gets the value(s) for <b>status</b> ().
686         * creating it if it does
687         * not exist. Will not return <code>null</code>.
688         *
689     * <p>
690     * <b>Definition:</b>
691     * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status
692     * </p> 
693         */
694        public BoundCodeDt<AppointmentStatusEnum> getStatusElement() {  
695                if (myStatus == null) {
696                        myStatus = new BoundCodeDt<AppointmentStatusEnum>(AppointmentStatusEnum.VALUESET_BINDER);
697                }
698                return myStatus;
699        }
700
701        
702        /**
703         * Gets the value(s) for <b>status</b> ().
704         * creating it if it does
705         * not exist. This method may return <code>null</code>.
706         *
707     * <p>
708     * <b>Definition:</b>
709     * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status
710     * </p> 
711         */
712        public String getStatus() {  
713                return getStatusElement().getValue();
714        }
715
716        /**
717         * Sets the value(s) for <b>status</b> ()
718         *
719     * <p>
720     * <b>Definition:</b>
721     * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status
722     * </p> 
723         */
724        public Appointment setStatus(BoundCodeDt<AppointmentStatusEnum> theValue) {
725                myStatus = theValue;
726                return this;
727        }
728        
729        
730
731        /**
732         * Sets the value(s) for <b>status</b> ()
733         *
734     * <p>
735     * <b>Definition:</b>
736     * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status
737     * </p> 
738         */
739        public Appointment setStatus(AppointmentStatusEnum theValue) {
740                setStatus(new BoundCodeDt<AppointmentStatusEnum>(AppointmentStatusEnum.VALUESET_BINDER, theValue));
741                
742/*
743                getStatusElement().setValueAsEnum(theValue);
744*/
745                return this;
746        }
747
748  
749        /**
750         * Gets the value(s) for <b>type</b> ().
751         * creating it if it does
752         * not exist. Will not return <code>null</code>.
753         *
754     * <p>
755     * <b>Definition:</b>
756     * The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService)
757     * </p> 
758         */
759        public CodeableConceptDt getType() {  
760                if (myType == null) {
761                        myType = new CodeableConceptDt();
762                }
763                return myType;
764        }
765
766        /**
767         * Sets the value(s) for <b>type</b> ()
768         *
769     * <p>
770     * <b>Definition:</b>
771     * The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService)
772     * </p> 
773         */
774        public Appointment setType(CodeableConceptDt theValue) {
775                myType = theValue;
776                return this;
777        }
778        
779        
780
781  
782        /**
783         * Gets the value(s) for <b>reason</b> ().
784         * creating it if it does
785         * not exist. Will not return <code>null</code>.
786         *
787     * <p>
788     * <b>Definition:</b>
789     * The reason that this appointment is being scheduled. This is more clinical than administrative
790     * </p> 
791         */
792        public CodeableConceptDt getReason() {  
793                if (myReason == null) {
794                        myReason = new CodeableConceptDt();
795                }
796                return myReason;
797        }
798
799        /**
800         * Sets the value(s) for <b>reason</b> ()
801         *
802     * <p>
803     * <b>Definition:</b>
804     * The reason that this appointment is being scheduled. This is more clinical than administrative
805     * </p> 
806         */
807        public Appointment setReason(CodeableConceptDt theValue) {
808                myReason = theValue;
809                return this;
810        }
811        
812        
813
814  
815        /**
816         * Gets the value(s) for <b>priority</b> ().
817         * creating it if it does
818         * not exist. Will not return <code>null</code>.
819         *
820     * <p>
821     * <b>Definition:</b>
822     * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)
823     * </p> 
824         */
825        public UnsignedIntDt getPriorityElement() {  
826                if (myPriority == null) {
827                        myPriority = new UnsignedIntDt();
828                }
829                return myPriority;
830        }
831
832        
833        /**
834         * Gets the value(s) for <b>priority</b> ().
835         * creating it if it does
836         * not exist. This method may return <code>null</code>.
837         *
838     * <p>
839     * <b>Definition:</b>
840     * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)
841     * </p> 
842         */
843        public Integer getPriority() {  
844                return getPriorityElement().getValue();
845        }
846
847        /**
848         * Sets the value(s) for <b>priority</b> ()
849         *
850     * <p>
851     * <b>Definition:</b>
852     * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)
853     * </p> 
854         */
855        public Appointment setPriority(UnsignedIntDt theValue) {
856                myPriority = theValue;
857                return this;
858        }
859        
860        
861
862        /**
863         * Sets the value for <b>priority</b> ()
864         *
865     * <p>
866     * <b>Definition:</b>
867     * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)
868     * </p> 
869         */
870        public Appointment setPriority( int theInteger) {
871                myPriority = new UnsignedIntDt(theInteger); 
872                return this; 
873        }
874
875 
876        /**
877         * Gets the value(s) for <b>description</b> ().
878         * creating it if it does
879         * not exist. Will not return <code>null</code>.
880         *
881     * <p>
882     * <b>Definition:</b>
883     * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field
884     * </p> 
885         */
886        public StringDt getDescriptionElement() {  
887                if (myDescription == null) {
888                        myDescription = new StringDt();
889                }
890                return myDescription;
891        }
892
893        
894        /**
895         * Gets the value(s) for <b>description</b> ().
896         * creating it if it does
897         * not exist. This method may return <code>null</code>.
898         *
899     * <p>
900     * <b>Definition:</b>
901     * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field
902     * </p> 
903         */
904        public String getDescription() {  
905                return getDescriptionElement().getValue();
906        }
907
908        /**
909         * Sets the value(s) for <b>description</b> ()
910         *
911     * <p>
912     * <b>Definition:</b>
913     * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field
914     * </p> 
915         */
916        public Appointment setDescription(StringDt theValue) {
917                myDescription = theValue;
918                return this;
919        }
920        
921        
922
923        /**
924         * Sets the value for <b>description</b> ()
925         *
926     * <p>
927     * <b>Definition:</b>
928     * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field
929     * </p> 
930         */
931        public Appointment setDescription( String theString) {
932                myDescription = new StringDt(theString); 
933                return this; 
934        }
935
936 
937        /**
938         * Gets the value(s) for <b>start</b> ().
939         * creating it if it does
940         * not exist. Will not return <code>null</code>.
941         *
942     * <p>
943     * <b>Definition:</b>
944     * Date/Time that the appointment is to take place
945     * </p> 
946         */
947        public InstantDt getStartElement() {  
948                if (myStart == null) {
949                        myStart = new InstantDt();
950                }
951                return myStart;
952        }
953
954        
955        /**
956         * Gets the value(s) for <b>start</b> ().
957         * creating it if it does
958         * not exist. This method may return <code>null</code>.
959         *
960     * <p>
961     * <b>Definition:</b>
962     * Date/Time that the appointment is to take place
963     * </p> 
964         */
965        public Date getStart() {  
966                return getStartElement().getValue();
967        }
968
969        /**
970         * Sets the value(s) for <b>start</b> ()
971         *
972     * <p>
973     * <b>Definition:</b>
974     * Date/Time that the appointment is to take place
975     * </p> 
976         */
977        public Appointment setStart(InstantDt theValue) {
978                myStart = theValue;
979                return this;
980        }
981        
982        
983
984        /**
985         * Sets the value for <b>start</b> ()
986         *
987     * <p>
988     * <b>Definition:</b>
989     * Date/Time that the appointment is to take place
990     * </p> 
991         */
992        public Appointment setStartWithMillisPrecision( Date theDate) {
993                myStart = new InstantDt(theDate); 
994                return this; 
995        }
996
997        /**
998         * Sets the value for <b>start</b> ()
999         *
1000     * <p>
1001     * <b>Definition:</b>
1002     * Date/Time that the appointment is to take place
1003     * </p> 
1004         */
1005        public Appointment setStart( Date theDate,  TemporalPrecisionEnum thePrecision) {
1006                myStart = new InstantDt(theDate, thePrecision); 
1007                return this; 
1008        }
1009
1010 
1011        /**
1012         * Gets the value(s) for <b>end</b> ().
1013         * creating it if it does
1014         * not exist. Will not return <code>null</code>.
1015         *
1016     * <p>
1017     * <b>Definition:</b>
1018     * Date/Time that the appointment is to conclude
1019     * </p> 
1020         */
1021        public InstantDt getEndElement() {  
1022                if (myEnd == null) {
1023                        myEnd = new InstantDt();
1024                }
1025                return myEnd;
1026        }
1027
1028        
1029        /**
1030         * Gets the value(s) for <b>end</b> ().
1031         * creating it if it does
1032         * not exist. This method may return <code>null</code>.
1033         *
1034     * <p>
1035     * <b>Definition:</b>
1036     * Date/Time that the appointment is to conclude
1037     * </p> 
1038         */
1039        public Date getEnd() {  
1040                return getEndElement().getValue();
1041        }
1042
1043        /**
1044         * Sets the value(s) for <b>end</b> ()
1045         *
1046     * <p>
1047     * <b>Definition:</b>
1048     * Date/Time that the appointment is to conclude
1049     * </p> 
1050         */
1051        public Appointment setEnd(InstantDt theValue) {
1052                myEnd = theValue;
1053                return this;
1054        }
1055        
1056        
1057
1058        /**
1059         * Sets the value for <b>end</b> ()
1060         *
1061     * <p>
1062     * <b>Definition:</b>
1063     * Date/Time that the appointment is to conclude
1064     * </p> 
1065         */
1066        public Appointment setEndWithMillisPrecision( Date theDate) {
1067                myEnd = new InstantDt(theDate); 
1068                return this; 
1069        }
1070
1071        /**
1072         * Sets the value for <b>end</b> ()
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * Date/Time that the appointment is to conclude
1077     * </p> 
1078         */
1079        public Appointment setEnd( Date theDate,  TemporalPrecisionEnum thePrecision) {
1080                myEnd = new InstantDt(theDate, thePrecision); 
1081                return this; 
1082        }
1083
1084 
1085        /**
1086         * Gets the value(s) for <b>minutesDuration</b> ().
1087         * creating it if it does
1088         * not exist. Will not return <code>null</code>.
1089         *
1090     * <p>
1091     * <b>Definition:</b>
1092     * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)
1093     * </p> 
1094         */
1095        public PositiveIntDt getMinutesDurationElement() {  
1096                if (myMinutesDuration == null) {
1097                        myMinutesDuration = new PositiveIntDt();
1098                }
1099                return myMinutesDuration;
1100        }
1101
1102        
1103        /**
1104         * Gets the value(s) for <b>minutesDuration</b> ().
1105         * creating it if it does
1106         * not exist. This method may return <code>null</code>.
1107         *
1108     * <p>
1109     * <b>Definition:</b>
1110     * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)
1111     * </p> 
1112         */
1113        public Integer getMinutesDuration() {  
1114                return getMinutesDurationElement().getValue();
1115        }
1116
1117        /**
1118         * Sets the value(s) for <b>minutesDuration</b> ()
1119         *
1120     * <p>
1121     * <b>Definition:</b>
1122     * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)
1123     * </p> 
1124         */
1125        public Appointment setMinutesDuration(PositiveIntDt theValue) {
1126                myMinutesDuration = theValue;
1127                return this;
1128        }
1129        
1130        
1131
1132        /**
1133         * Sets the value for <b>minutesDuration</b> ()
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)
1138     * </p> 
1139         */
1140        public Appointment setMinutesDuration( int theInteger) {
1141                myMinutesDuration = new PositiveIntDt(theInteger); 
1142                return this; 
1143        }
1144
1145 
1146        /**
1147         * Gets the value(s) for <b>slot</b> ().
1148         * creating it if it does
1149         * not exist. Will not return <code>null</code>.
1150         *
1151     * <p>
1152     * <b>Definition:</b>
1153     * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot
1154     * </p> 
1155         */
1156        public java.util.List<ResourceReferenceDt> getSlot() {  
1157                if (mySlot == null) {
1158                        mySlot = new java.util.ArrayList<ResourceReferenceDt>();
1159                }
1160                return mySlot;
1161        }
1162
1163        /**
1164         * Sets the value(s) for <b>slot</b> ()
1165         *
1166     * <p>
1167     * <b>Definition:</b>
1168     * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot
1169     * </p> 
1170         */
1171        public Appointment setSlot(java.util.List<ResourceReferenceDt> theValue) {
1172                mySlot = theValue;
1173                return this;
1174        }
1175        
1176        
1177
1178        /**
1179         * Adds and returns a new value for <b>slot</b> ()
1180         *
1181     * <p>
1182     * <b>Definition:</b>
1183     * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot
1184     * </p> 
1185         */
1186        public ResourceReferenceDt addSlot() {
1187                ResourceReferenceDt newType = new ResourceReferenceDt();
1188                getSlot().add(newType);
1189                return newType; 
1190        }
1191  
1192        /**
1193         * Gets the value(s) for <b>comment</b> ().
1194         * creating it if it does
1195         * not exist. Will not return <code>null</code>.
1196         *
1197     * <p>
1198     * <b>Definition:</b>
1199     * Additional comments about the appointment
1200     * </p> 
1201         */
1202        public StringDt getCommentElement() {  
1203                if (myComment == null) {
1204                        myComment = new StringDt();
1205                }
1206                return myComment;
1207        }
1208
1209        
1210        /**
1211         * Gets the value(s) for <b>comment</b> ().
1212         * creating it if it does
1213         * not exist. This method may return <code>null</code>.
1214         *
1215     * <p>
1216     * <b>Definition:</b>
1217     * Additional comments about the appointment
1218     * </p> 
1219         */
1220        public String getComment() {  
1221                return getCommentElement().getValue();
1222        }
1223
1224        /**
1225         * Sets the value(s) for <b>comment</b> ()
1226         *
1227     * <p>
1228     * <b>Definition:</b>
1229     * Additional comments about the appointment
1230     * </p> 
1231         */
1232        public Appointment setComment(StringDt theValue) {
1233                myComment = theValue;
1234                return this;
1235        }
1236        
1237        
1238
1239        /**
1240         * Sets the value for <b>comment</b> ()
1241         *
1242     * <p>
1243     * <b>Definition:</b>
1244     * Additional comments about the appointment
1245     * </p> 
1246         */
1247        public Appointment setComment( String theString) {
1248                myComment = new StringDt(theString); 
1249                return this; 
1250        }
1251
1252 
1253        /**
1254         * Gets the value(s) for <b>participant</b> ().
1255         * creating it if it does
1256         * not exist. Will not return <code>null</code>.
1257         *
1258     * <p>
1259     * <b>Definition:</b>
1260     * List of participants involved in the appointment
1261     * </p> 
1262         */
1263        public java.util.List<Participant> getParticipant() {  
1264                if (myParticipant == null) {
1265                        myParticipant = new java.util.ArrayList<Participant>();
1266                }
1267                return myParticipant;
1268        }
1269
1270        /**
1271         * Sets the value(s) for <b>participant</b> ()
1272         *
1273     * <p>
1274     * <b>Definition:</b>
1275     * List of participants involved in the appointment
1276     * </p> 
1277         */
1278        public Appointment setParticipant(java.util.List<Participant> theValue) {
1279                myParticipant = theValue;
1280                return this;
1281        }
1282        
1283        
1284
1285        /**
1286         * Adds and returns a new value for <b>participant</b> ()
1287         *
1288     * <p>
1289     * <b>Definition:</b>
1290     * List of participants involved in the appointment
1291     * </p> 
1292         */
1293        public Participant addParticipant() {
1294                Participant newType = new Participant();
1295                getParticipant().add(newType);
1296                return newType; 
1297        }
1298
1299        /**
1300         * Adds a given new value for <b>participant</b> ()
1301         *
1302         * <p>
1303         * <b>Definition:</b>
1304         * List of participants involved in the appointment
1305         * </p>
1306         * @param theValue The participant to add (must not be <code>null</code>)
1307         */
1308        public Appointment addParticipant(Participant theValue) {
1309                if (theValue == null) {
1310                        throw new NullPointerException("theValue must not be null");
1311                }
1312                getParticipant().add(theValue);
1313                return this;
1314        }
1315
1316        /**
1317         * Gets the first repetition for <b>participant</b> (),
1318         * creating it if it does not already exist.
1319         *
1320     * <p>
1321     * <b>Definition:</b>
1322     * List of participants involved in the appointment
1323     * </p> 
1324         */
1325        public Participant getParticipantFirstRep() {
1326                if (getParticipant().isEmpty()) {
1327                        return addParticipant();
1328                }
1329                return getParticipant().get(0); 
1330        }
1331  
1332        /**
1333         * Block class for child element: <b>Appointment.participant</b> ()
1334         *
1335     * <p>
1336     * <b>Definition:</b>
1337     * List of participants involved in the appointment
1338     * </p> 
1339         */
1340        @Block()        
1341        public static class Participant 
1342            extends  BaseIdentifiableElement        implements IResourceBlock {
1343        
1344        @Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1345        @Description(
1346                shortDefinition="",
1347                formalDefinition="Role of participant in the appointment"
1348        )
1349        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/encounter-participant-type")
1350        private java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> myType;
1351        
1352        @Child(name="actor", order=1, min=0, max=1, summary=true, modifier=false, type={
1353                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.HealthcareService.class,               ca.uhn.fhir.model.dstu2.resource.Location.class })
1354        @Description(
1355                shortDefinition="",
1356                formalDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment"
1357        )
1358        private ResourceReferenceDt myActor;
1359        
1360        @Child(name="required", type=CodeDt.class, order=2, min=0, max=1, summary=true, modifier=false) 
1361        @Description(
1362                shortDefinition="",
1363                formalDefinition="Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present."
1364        )
1365        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/participantrequired")
1366        private BoundCodeDt<ParticipantRequiredEnum> myRequired;
1367        
1368        @Child(name="status", type=CodeDt.class, order=3, min=1, max=1, summary=false, modifier=false)  
1369        @Description(
1370                shortDefinition="",
1371                formalDefinition="Participation status of the Patient"
1372        )
1373        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/participationstatus")
1374        private BoundCodeDt<ParticipationStatusEnum> myStatus;
1375        
1376
1377        @Override
1378        public boolean isEmpty() {
1379                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myActor,  myRequired,  myStatus);
1380        }
1381        
1382        @Override
1383        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1384                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myActor, myRequired, myStatus);
1385        }
1386
1387        /**
1388         * Gets the value(s) for <b>type</b> ().
1389         * creating it if it does
1390         * not exist. Will not return <code>null</code>.
1391         *
1392     * <p>
1393     * <b>Definition:</b>
1394     * Role of participant in the appointment
1395     * </p> 
1396         */
1397        public java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> getType() {  
1398                if (myType == null) {
1399                        myType = new java.util.ArrayList<BoundCodeableConceptDt<ParticipantTypeEnum>>();
1400                }
1401                return myType;
1402        }
1403
1404        /**
1405         * Sets the value(s) for <b>type</b> ()
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * Role of participant in the appointment
1410     * </p> 
1411         */
1412        public Participant setType(java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> theValue) {
1413                myType = theValue;
1414                return this;
1415        }
1416        
1417        
1418
1419        /**
1420         * Add a value for <b>type</b> () using an enumerated type. This
1421         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1422         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1423         * you may also use the {@link #addType()} method.
1424         *
1425     * <p>
1426     * <b>Definition:</b>
1427     * Role of participant in the appointment
1428     * </p> 
1429         */
1430        public BoundCodeableConceptDt<ParticipantTypeEnum> addType(ParticipantTypeEnum theValue) {
1431                BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue);
1432                getType().add(retVal);
1433                return retVal;
1434        }
1435
1436        /**
1437         * Gets the first repetition for <b>type</b> (),
1438         * creating it if it does not already exist.
1439         *
1440     * <p>
1441     * <b>Definition:</b>
1442     * Role of participant in the appointment
1443     * </p> 
1444         */
1445        public BoundCodeableConceptDt<ParticipantTypeEnum> getTypeFirstRep() {
1446                if (getType().size() == 0) {
1447                        addType();
1448                }
1449                return getType().get(0);
1450        }
1451
1452        /**
1453         * Add a value for <b>type</b> ()
1454         *
1455     * <p>
1456     * <b>Definition:</b>
1457     * Role of participant in the appointment
1458     * </p> 
1459         */
1460        public BoundCodeableConceptDt<ParticipantTypeEnum> addType() {
1461                BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER);
1462                getType().add(retVal);
1463                return retVal;
1464        }
1465
1466        /**
1467         * Sets the value(s), and clears any existing value(s) for <b>type</b> ()
1468         *
1469     * <p>
1470     * <b>Definition:</b>
1471     * Role of participant in the appointment
1472     * </p> 
1473         */
1474        public Participant setType(ParticipantTypeEnum theValue) {
1475                getType().clear();
1476                addType(theValue);
1477                return this;
1478        }
1479
1480  
1481        /**
1482         * Gets the value(s) for <b>actor</b> ().
1483         * creating it if it does
1484         * not exist. Will not return <code>null</code>.
1485         *
1486     * <p>
1487     * <b>Definition:</b>
1488     * A Person, Location/HealthcareService or Device that is participating in the appointment
1489     * </p> 
1490         */
1491        public ResourceReferenceDt getActor() {  
1492                if (myActor == null) {
1493                        myActor = new ResourceReferenceDt();
1494                }
1495                return myActor;
1496        }
1497
1498        /**
1499         * Sets the value(s) for <b>actor</b> ()
1500         *
1501     * <p>
1502     * <b>Definition:</b>
1503     * A Person, Location/HealthcareService or Device that is participating in the appointment
1504     * </p> 
1505         */
1506        public Participant setActor(ResourceReferenceDt theValue) {
1507                myActor = theValue;
1508                return this;
1509        }
1510        
1511        
1512
1513  
1514        /**
1515         * Gets the value(s) for <b>required</b> ().
1516         * creating it if it does
1517         * not exist. Will not return <code>null</code>.
1518         *
1519     * <p>
1520     * <b>Definition:</b>
1521     * Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.
1522     * </p> 
1523         */
1524        public BoundCodeDt<ParticipantRequiredEnum> getRequiredElement() {  
1525                if (myRequired == null) {
1526                        myRequired = new BoundCodeDt<ParticipantRequiredEnum>(ParticipantRequiredEnum.VALUESET_BINDER);
1527                }
1528                return myRequired;
1529        }
1530
1531        
1532        /**
1533         * Gets the value(s) for <b>required</b> ().
1534         * creating it if it does
1535         * not exist. This method may return <code>null</code>.
1536         *
1537     * <p>
1538     * <b>Definition:</b>
1539     * Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.
1540     * </p> 
1541         */
1542        public String getRequired() {  
1543                return getRequiredElement().getValue();
1544        }
1545
1546        /**
1547         * Sets the value(s) for <b>required</b> ()
1548         *
1549     * <p>
1550     * <b>Definition:</b>
1551     * Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.
1552     * </p> 
1553         */
1554        public Participant setRequired(BoundCodeDt<ParticipantRequiredEnum> theValue) {
1555                myRequired = theValue;
1556                return this;
1557        }
1558        
1559        
1560
1561        /**
1562         * Sets the value(s) for <b>required</b> ()
1563         *
1564     * <p>
1565     * <b>Definition:</b>
1566     * Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.
1567     * </p> 
1568         */
1569        public Participant setRequired(ParticipantRequiredEnum theValue) {
1570                setRequired(new BoundCodeDt<ParticipantRequiredEnum>(ParticipantRequiredEnum.VALUESET_BINDER, theValue));
1571                
1572/*
1573                getRequiredElement().setValueAsEnum(theValue);
1574*/
1575                return this;
1576        }
1577
1578  
1579        /**
1580         * Gets the value(s) for <b>status</b> ().
1581         * creating it if it does
1582         * not exist. Will not return <code>null</code>.
1583         *
1584     * <p>
1585     * <b>Definition:</b>
1586     * Participation status of the Patient
1587     * </p> 
1588         */
1589        public BoundCodeDt<ParticipationStatusEnum> getStatusElement() {  
1590                if (myStatus == null) {
1591                        myStatus = new BoundCodeDt<ParticipationStatusEnum>(ParticipationStatusEnum.VALUESET_BINDER);
1592                }
1593                return myStatus;
1594        }
1595
1596        
1597        /**
1598         * Gets the value(s) for <b>status</b> ().
1599         * creating it if it does
1600         * not exist. This method may return <code>null</code>.
1601         *
1602     * <p>
1603     * <b>Definition:</b>
1604     * Participation status of the Patient
1605     * </p> 
1606         */
1607        public String getStatus() {  
1608                return getStatusElement().getValue();
1609        }
1610
1611        /**
1612         * Sets the value(s) for <b>status</b> ()
1613         *
1614     * <p>
1615     * <b>Definition:</b>
1616     * Participation status of the Patient
1617     * </p> 
1618         */
1619        public Participant setStatus(BoundCodeDt<ParticipationStatusEnum> theValue) {
1620                myStatus = theValue;
1621                return this;
1622        }
1623        
1624        
1625
1626        /**
1627         * Sets the value(s) for <b>status</b> ()
1628         *
1629     * <p>
1630     * <b>Definition:</b>
1631     * Participation status of the Patient
1632     * </p> 
1633         */
1634        public Participant setStatus(ParticipationStatusEnum theValue) {
1635                setStatus(new BoundCodeDt<ParticipationStatusEnum>(ParticipationStatusEnum.VALUESET_BINDER, theValue));
1636                
1637/*
1638                getStatusElement().setValueAsEnum(theValue);
1639*/
1640                return this;
1641        }
1642
1643  
1644
1645
1646        }
1647
1648
1649
1650
1651    @Override
1652    public String getResourceName() {
1653        return "Appointment";
1654    }
1655    
1656    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1657        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1658    }
1659
1660
1661}