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>Location</b> Resource
282 * (administrative.entity)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
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/Location">http://hl7.org/fhir/profiles/Location</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Location", profile="http://hl7.org/fhir/profiles/Location", id="location")
301public class Location extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>identifier</b>
306         * <p>
307         * Description: <b></b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>Location.identifier</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="identifier", path="Location.identifier", description="", type="token"  )
313        public static final String SP_IDENTIFIER = "identifier";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
317         * <p>
318         * Description: <b></b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>Location.identifier</b><br>
321         * </p>
322         */
323        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
324
325        /**
326         * Search parameter constant for <b>name</b>
327         * <p>
328         * Description: <b>A (portion of the) name of the location</b><br>
329         * Type: <b>string</b><br>
330         * Path: <b>Location.name</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string"  )
334        public static final String SP_NAME = "name";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>name</b>
338         * <p>
339         * Description: <b>A (portion of the) name of the location</b><br>
340         * Type: <b>string</b><br>
341         * Path: <b>Location.name</b><br>
342         * </p>
343         */
344        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
345
346        /**
347         * Search parameter constant for <b>type</b>
348         * <p>
349         * Description: <b>A code for the type of location</b><br>
350         * Type: <b>token</b><br>
351         * Path: <b>Location.type</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token"  )
355        public static final String SP_TYPE = "type";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>type</b>
359         * <p>
360         * Description: <b>A code for the type of location</b><br>
361         * Type: <b>token</b><br>
362         * Path: <b>Location.type</b><br>
363         * </p>
364         */
365        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
366
367        /**
368         * Search parameter constant for <b>address</b>
369         * <p>
370         * Description: <b>A (part of the) address of the location</b><br>
371         * Type: <b>string</b><br>
372         * Path: <b>Location.address</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string"  )
376        public static final String SP_ADDRESS = "address";
377
378        /**
379         * <b>Fluent Client</b> search parameter constant for <b>address</b>
380         * <p>
381         * Description: <b>A (part of the) address of the location</b><br>
382         * Type: <b>string</b><br>
383         * Path: <b>Location.address</b><br>
384         * </p>
385         */
386        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
387
388        /**
389         * Search parameter constant for <b>address-city</b>
390         * <p>
391         * Description: <b>A city specified in an address</b><br>
392         * Type: <b>string</b><br>
393         * Path: <b>Location.address.city</b><br>
394         * </p>
395         */
396        @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string"  )
397        public static final String SP_ADDRESS_CITY = "address-city";
398
399        /**
400         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
401         * <p>
402         * Description: <b>A city specified in an address</b><br>
403         * Type: <b>string</b><br>
404         * Path: <b>Location.address.city</b><br>
405         * </p>
406         */
407        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
408
409        /**
410         * Search parameter constant for <b>address-state</b>
411         * <p>
412         * Description: <b>A state specified in an address</b><br>
413         * Type: <b>string</b><br>
414         * Path: <b>Location.address.state</b><br>
415         * </p>
416         */
417        @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string"  )
418        public static final String SP_ADDRESS_STATE = "address-state";
419
420        /**
421         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
422         * <p>
423         * Description: <b>A state specified in an address</b><br>
424         * Type: <b>string</b><br>
425         * Path: <b>Location.address.state</b><br>
426         * </p>
427         */
428        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
429
430        /**
431         * Search parameter constant for <b>address-postalcode</b>
432         * <p>
433         * Description: <b>A postal code specified in an address</b><br>
434         * Type: <b>string</b><br>
435         * Path: <b>Location.address.postalCode</b><br>
436         * </p>
437         */
438        @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string"  )
439        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
440
441        /**
442         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
443         * <p>
444         * Description: <b>A postal code specified in an address</b><br>
445         * Type: <b>string</b><br>
446         * Path: <b>Location.address.postalCode</b><br>
447         * </p>
448         */
449        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
450
451        /**
452         * Search parameter constant for <b>address-country</b>
453         * <p>
454         * Description: <b>A country specified in an address</b><br>
455         * Type: <b>string</b><br>
456         * Path: <b>Location.address.country</b><br>
457         * </p>
458         */
459        @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string"  )
460        public static final String SP_ADDRESS_COUNTRY = "address-country";
461
462        /**
463         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
464         * <p>
465         * Description: <b>A country specified in an address</b><br>
466         * Type: <b>string</b><br>
467         * Path: <b>Location.address.country</b><br>
468         * </p>
469         */
470        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
471
472        /**
473         * Search parameter constant for <b>address-use</b>
474         * <p>
475         * Description: <b>A use code specified in an address</b><br>
476         * Type: <b>token</b><br>
477         * Path: <b>Location.address.use</b><br>
478         * </p>
479         */
480        @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token"  )
481        public static final String SP_ADDRESS_USE = "address-use";
482
483        /**
484         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
485         * <p>
486         * Description: <b>A use code specified in an address</b><br>
487         * Type: <b>token</b><br>
488         * Path: <b>Location.address.use</b><br>
489         * </p>
490         */
491        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
492
493        /**
494         * Search parameter constant for <b>status</b>
495         * <p>
496         * Description: <b>Searches for locations with a specific kind of status</b><br>
497         * Type: <b>token</b><br>
498         * Path: <b>Location.status</b><br>
499         * </p>
500         */
501        @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token"  )
502        public static final String SP_STATUS = "status";
503
504        /**
505         * <b>Fluent Client</b> search parameter constant for <b>status</b>
506         * <p>
507         * Description: <b>Searches for locations with a specific kind of status</b><br>
508         * Type: <b>token</b><br>
509         * Path: <b>Location.status</b><br>
510         * </p>
511         */
512        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
513
514        /**
515         * Search parameter constant for <b>partof</b>
516         * <p>
517         * Description: <b>The location of which this location is a part</b><br>
518         * Type: <b>reference</b><br>
519         * Path: <b>Location.partOf</b><br>
520         * </p>
521         */
522        @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference"  )
523        public static final String SP_PARTOF = "partof";
524
525        /**
526         * <b>Fluent Client</b> search parameter constant for <b>partof</b>
527         * <p>
528         * Description: <b>The location of which this location is a part</b><br>
529         * Type: <b>reference</b><br>
530         * Path: <b>Location.partOf</b><br>
531         * </p>
532         */
533        public static final ReferenceClientParam PARTOF = new ReferenceClientParam(SP_PARTOF);
534
535        /**
536         * Search parameter constant for <b>near</b>
537         * <p>
538         * Description: <b>The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)</b><br>
539         * Type: <b>token</b><br>
540         * Path: <b>Location.position</b><br>
541         * </p>
542         */
543        @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token"  )
544        public static final String SP_NEAR = "near";
545
546        /**
547         * <b>Fluent Client</b> search parameter constant for <b>near</b>
548         * <p>
549         * Description: <b>The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)</b><br>
550         * Type: <b>token</b><br>
551         * Path: <b>Location.position</b><br>
552         * </p>
553         */
554        public static final TokenClientParam NEAR = new TokenClientParam(SP_NEAR);
555
556        /**
557         * Search parameter constant for <b>near-distance</b>
558         * <p>
559         * Description: <b>A distance quantity to limit the near search to locations within a specific distance</b><br>
560         * Type: <b>token</b><br>
561         * Path: <b>Location.position</b><br>
562         * </p>
563         */
564        @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance", type="token"  )
565        public static final String SP_NEAR_DISTANCE = "near-distance";
566
567        /**
568         * <b>Fluent Client</b> search parameter constant for <b>near-distance</b>
569         * <p>
570         * Description: <b>A distance quantity to limit the near search to locations within a specific distance</b><br>
571         * Type: <b>token</b><br>
572         * Path: <b>Location.position</b><br>
573         * </p>
574         */
575        public static final TokenClientParam NEAR_DISTANCE = new TokenClientParam(SP_NEAR_DISTANCE);
576
577        /**
578         * Search parameter constant for <b>organization</b>
579         * <p>
580         * Description: <b>Searches for locations that are managed by the provided organization</b><br>
581         * Type: <b>reference</b><br>
582         * Path: <b>Location.managingOrganization</b><br>
583         * </p>
584         */
585        @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference"  )
586        public static final String SP_ORGANIZATION = "organization";
587
588        /**
589         * <b>Fluent Client</b> search parameter constant for <b>organization</b>
590         * <p>
591         * Description: <b>Searches for locations that are managed by the provided organization</b><br>
592         * Type: <b>reference</b><br>
593         * Path: <b>Location.managingOrganization</b><br>
594         * </p>
595         */
596        public static final ReferenceClientParam ORGANIZATION = new ReferenceClientParam(SP_ORGANIZATION);
597
598
599        /**
600         * Constant for fluent queries to be used to add include statements. Specifies
601         * the path value of "<b>Location:organization</b>".
602         */
603        public static final Include INCLUDE_ORGANIZATION = new Include("Location:organization");
604
605        /**
606         * Constant for fluent queries to be used to add include statements. Specifies
607         * the path value of "<b>Location:partof</b>".
608         */
609        public static final Include INCLUDE_PARTOF = new Include("Location:partof");
610
611
612        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
613        @Description(
614                shortDefinition="id",
615                formalDefinition="Unique code or number identifying the location to its users"
616        )
617        private java.util.List<IdentifierDt> myIdentifier;
618        
619        @Child(name="status", type=CodeDt.class, order=1, min=0, max=1, summary=true, modifier=true)    
620        @Description(
621                shortDefinition="status",
622                formalDefinition=""
623        )
624        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/location-status")
625        private BoundCodeDt<LocationStatusEnum> myStatus;
626        
627        @Child(name="name", type=StringDt.class, order=2, min=0, max=1, summary=true, modifier=false)   
628        @Description(
629                shortDefinition="",
630                formalDefinition="Name of the location as used by humans. Does not need to be unique."
631        )
632        private StringDt myName;
633        
634        @Child(name="description", type=StringDt.class, order=3, min=0, max=1, summary=true, modifier=false)    
635        @Description(
636                shortDefinition="",
637                formalDefinition="Description of the Location, which helps in finding or referencing the place"
638        )
639        private StringDt myDescription;
640        
641        @Child(name="mode", type=CodeDt.class, order=4, min=0, max=1, summary=true, modifier=true)      
642        @Description(
643                shortDefinition="class",
644                formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations"
645        )
646        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/location-mode")
647        private BoundCodeDt<LocationModeEnum> myMode;
648        
649        @Child(name="type", type=CodeableConceptDt.class, order=5, min=0, max=1, summary=true, modifier=false)  
650        @Description(
651                shortDefinition="class",
652                formalDefinition="Indicates the type of function performed at the location"
653        )
654        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType")
655        private BoundCodeableConceptDt<LocationTypeEnum> myType;
656        
657        @Child(name="telecom", type=ContactPointDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
658        @Description(
659                shortDefinition="",
660                formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites"
661        )
662        private java.util.List<ContactPointDt> myTelecom;
663        
664        @Child(name="address", type=AddressDt.class, order=7, min=0, max=1, summary=false, modifier=false)      
665        @Description(
666                shortDefinition="",
667                formalDefinition=""
668        )
669        private AddressDt myAddress;
670        
671        @Child(name="physicalType", type=CodeableConceptDt.class, order=8, min=0, max=1, summary=true, modifier=false)  
672        @Description(
673                shortDefinition="class",
674                formalDefinition="Physical form of the location, e.g. building, room, vehicle, road"
675        )
676        private CodeableConceptDt myPhysicalType;
677        
678        @Child(name="position", order=9, min=0, max=1, summary=false, modifier=false)   
679        @Description(
680                shortDefinition="",
681                formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)"
682        )
683        private Position myPosition;
684        
685        @Child(name="managingOrganization", order=10, min=0, max=1, summary=true, modifier=false, type={
686                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
687        @Description(
688                shortDefinition="",
689                formalDefinition="The organization responsible for the provisioning and upkeep of the location"
690        )
691        private ResourceReferenceDt myManagingOrganization;
692        
693        @Child(name="partOf", order=11, min=0, max=1, summary=false, modifier=false, type={
694                ca.uhn.fhir.model.dstu2.resource.Location.class })
695        @Description(
696                shortDefinition="",
697                formalDefinition="Another Location which this Location is physically part of"
698        )
699        private ResourceReferenceDt myPartOf;
700        
701
702        @Override
703        public boolean isEmpty() {
704                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myStatus,  myName,  myDescription,  myMode,  myType,  myTelecom,  myAddress,  myPhysicalType,  myPosition,  myManagingOrganization,  myPartOf);
705        }
706        
707        @Override
708        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
709                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myName, myDescription, myMode, myType, myTelecom, myAddress, myPhysicalType, myPosition, myManagingOrganization, myPartOf);
710        }
711
712        /**
713         * Gets the value(s) for <b>identifier</b> (id).
714         * creating it if it does
715         * not exist. Will not return <code>null</code>.
716         *
717     * <p>
718     * <b>Definition:</b>
719     * Unique code or number identifying the location to its users
720     * </p> 
721         */
722        public java.util.List<IdentifierDt> getIdentifier() {  
723                if (myIdentifier == null) {
724                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
725                }
726                return myIdentifier;
727        }
728
729        /**
730         * Sets the value(s) for <b>identifier</b> (id)
731         *
732     * <p>
733     * <b>Definition:</b>
734     * Unique code or number identifying the location to its users
735     * </p> 
736         */
737        public Location setIdentifier(java.util.List<IdentifierDt> theValue) {
738                myIdentifier = theValue;
739                return this;
740        }
741        
742        
743
744        /**
745         * Adds and returns a new value for <b>identifier</b> (id)
746         *
747     * <p>
748     * <b>Definition:</b>
749     * Unique code or number identifying the location to its users
750     * </p> 
751         */
752        public IdentifierDt addIdentifier() {
753                IdentifierDt newType = new IdentifierDt();
754                getIdentifier().add(newType);
755                return newType; 
756        }
757
758        /**
759         * Adds a given new value for <b>identifier</b> (id)
760         *
761         * <p>
762         * <b>Definition:</b>
763         * Unique code or number identifying the location to its users
764         * </p>
765         * @param theValue The identifier to add (must not be <code>null</code>)
766         */
767        public Location addIdentifier(IdentifierDt theValue) {
768                if (theValue == null) {
769                        throw new NullPointerException("theValue must not be null");
770                }
771                getIdentifier().add(theValue);
772                return this;
773        }
774
775        /**
776         * Gets the first repetition for <b>identifier</b> (id),
777         * creating it if it does not already exist.
778         *
779     * <p>
780     * <b>Definition:</b>
781     * Unique code or number identifying the location to its users
782     * </p> 
783         */
784        public IdentifierDt getIdentifierFirstRep() {
785                if (getIdentifier().isEmpty()) {
786                        return addIdentifier();
787                }
788                return getIdentifier().get(0); 
789        }
790  
791        /**
792         * Gets the value(s) for <b>status</b> (status).
793         * creating it if it does
794         * not exist. Will not return <code>null</code>.
795         *
796     * <p>
797     * <b>Definition:</b>
798     * 
799     * </p> 
800         */
801        public BoundCodeDt<LocationStatusEnum> getStatusElement() {  
802                if (myStatus == null) {
803                        myStatus = new BoundCodeDt<LocationStatusEnum>(LocationStatusEnum.VALUESET_BINDER);
804                }
805                return myStatus;
806        }
807
808        
809        /**
810         * Gets the value(s) for <b>status</b> (status).
811         * creating it if it does
812         * not exist. This method may return <code>null</code>.
813         *
814     * <p>
815     * <b>Definition:</b>
816     * 
817     * </p> 
818         */
819        public String getStatus() {  
820                return getStatusElement().getValue();
821        }
822
823        /**
824         * Sets the value(s) for <b>status</b> (status)
825         *
826     * <p>
827     * <b>Definition:</b>
828     * 
829     * </p> 
830         */
831        public Location setStatus(BoundCodeDt<LocationStatusEnum> theValue) {
832                myStatus = theValue;
833                return this;
834        }
835        
836        
837
838        /**
839         * Sets the value(s) for <b>status</b> (status)
840         *
841     * <p>
842     * <b>Definition:</b>
843     * 
844     * </p> 
845         */
846        public Location setStatus(LocationStatusEnum theValue) {
847                setStatus(new BoundCodeDt<LocationStatusEnum>(LocationStatusEnum.VALUESET_BINDER, theValue));
848                
849/*
850                getStatusElement().setValueAsEnum(theValue);
851*/
852                return this;
853        }
854
855  
856        /**
857         * Gets the value(s) for <b>name</b> ().
858         * creating it if it does
859         * not exist. Will not return <code>null</code>.
860         *
861     * <p>
862     * <b>Definition:</b>
863     * Name of the location as used by humans. Does not need to be unique.
864     * </p> 
865         */
866        public StringDt getNameElement() {  
867                if (myName == null) {
868                        myName = new StringDt();
869                }
870                return myName;
871        }
872
873        
874        /**
875         * Gets the value(s) for <b>name</b> ().
876         * creating it if it does
877         * not exist. This method may return <code>null</code>.
878         *
879     * <p>
880     * <b>Definition:</b>
881     * Name of the location as used by humans. Does not need to be unique.
882     * </p> 
883         */
884        public String getName() {  
885                return getNameElement().getValue();
886        }
887
888        /**
889         * Sets the value(s) for <b>name</b> ()
890         *
891     * <p>
892     * <b>Definition:</b>
893     * Name of the location as used by humans. Does not need to be unique.
894     * </p> 
895         */
896        public Location setName(StringDt theValue) {
897                myName = theValue;
898                return this;
899        }
900        
901        
902
903        /**
904         * Sets the value for <b>name</b> ()
905         *
906     * <p>
907     * <b>Definition:</b>
908     * Name of the location as used by humans. Does not need to be unique.
909     * </p> 
910         */
911        public Location setName( String theString) {
912                myName = new StringDt(theString); 
913                return this; 
914        }
915
916 
917        /**
918         * Gets the value(s) for <b>description</b> ().
919         * creating it if it does
920         * not exist. Will not return <code>null</code>.
921         *
922     * <p>
923     * <b>Definition:</b>
924     * Description of the Location, which helps in finding or referencing the place
925     * </p> 
926         */
927        public StringDt getDescriptionElement() {  
928                if (myDescription == null) {
929                        myDescription = new StringDt();
930                }
931                return myDescription;
932        }
933
934        
935        /**
936         * Gets the value(s) for <b>description</b> ().
937         * creating it if it does
938         * not exist. This method may return <code>null</code>.
939         *
940     * <p>
941     * <b>Definition:</b>
942     * Description of the Location, which helps in finding or referencing the place
943     * </p> 
944         */
945        public String getDescription() {  
946                return getDescriptionElement().getValue();
947        }
948
949        /**
950         * Sets the value(s) for <b>description</b> ()
951         *
952     * <p>
953     * <b>Definition:</b>
954     * Description of the Location, which helps in finding or referencing the place
955     * </p> 
956         */
957        public Location setDescription(StringDt theValue) {
958                myDescription = theValue;
959                return this;
960        }
961        
962        
963
964        /**
965         * Sets the value for <b>description</b> ()
966         *
967     * <p>
968     * <b>Definition:</b>
969     * Description of the Location, which helps in finding or referencing the place
970     * </p> 
971         */
972        public Location setDescription( String theString) {
973                myDescription = new StringDt(theString); 
974                return this; 
975        }
976
977 
978        /**
979         * Gets the value(s) for <b>mode</b> (class).
980         * creating it if it does
981         * not exist. Will not return <code>null</code>.
982         *
983     * <p>
984     * <b>Definition:</b>
985     * Indicates whether a resource instance represents a specific location or a class of locations
986     * </p> 
987         */
988        public BoundCodeDt<LocationModeEnum> getModeElement() {  
989                if (myMode == null) {
990                        myMode = new BoundCodeDt<LocationModeEnum>(LocationModeEnum.VALUESET_BINDER);
991                }
992                return myMode;
993        }
994
995        
996        /**
997         * Gets the value(s) for <b>mode</b> (class).
998         * creating it if it does
999         * not exist. This method may return <code>null</code>.
1000         *
1001     * <p>
1002     * <b>Definition:</b>
1003     * Indicates whether a resource instance represents a specific location or a class of locations
1004     * </p> 
1005         */
1006        public String getMode() {  
1007                return getModeElement().getValue();
1008        }
1009
1010        /**
1011         * Sets the value(s) for <b>mode</b> (class)
1012         *
1013     * <p>
1014     * <b>Definition:</b>
1015     * Indicates whether a resource instance represents a specific location or a class of locations
1016     * </p> 
1017         */
1018        public Location setMode(BoundCodeDt<LocationModeEnum> theValue) {
1019                myMode = theValue;
1020                return this;
1021        }
1022        
1023        
1024
1025        /**
1026         * Sets the value(s) for <b>mode</b> (class)
1027         *
1028     * <p>
1029     * <b>Definition:</b>
1030     * Indicates whether a resource instance represents a specific location or a class of locations
1031     * </p> 
1032         */
1033        public Location setMode(LocationModeEnum theValue) {
1034                setMode(new BoundCodeDt<LocationModeEnum>(LocationModeEnum.VALUESET_BINDER, theValue));
1035                
1036/*
1037                getModeElement().setValueAsEnum(theValue);
1038*/
1039                return this;
1040        }
1041
1042  
1043        /**
1044         * Gets the value(s) for <b>type</b> (class).
1045         * creating it if it does
1046         * not exist. Will not return <code>null</code>.
1047         *
1048     * <p>
1049     * <b>Definition:</b>
1050     * Indicates the type of function performed at the location
1051     * </p> 
1052         */
1053        public BoundCodeableConceptDt<LocationTypeEnum> getType() {  
1054                if (myType == null) {
1055                        myType = new BoundCodeableConceptDt<LocationTypeEnum>(LocationTypeEnum.VALUESET_BINDER);
1056                }
1057                return myType;
1058        }
1059
1060        /**
1061         * Sets the value(s) for <b>type</b> (class)
1062         *
1063     * <p>
1064     * <b>Definition:</b>
1065     * Indicates the type of function performed at the location
1066     * </p> 
1067         */
1068        public Location setType(BoundCodeableConceptDt<LocationTypeEnum> theValue) {
1069                myType = theValue;
1070                return this;
1071        }
1072        
1073        
1074
1075        /**
1076         * Sets the value(s) for <b>type</b> (class)
1077         *
1078     * <p>
1079     * <b>Definition:</b>
1080     * Indicates the type of function performed at the location
1081     * </p> 
1082         */
1083        public Location setType(LocationTypeEnum theValue) {
1084                setType(new BoundCodeableConceptDt<LocationTypeEnum>(LocationTypeEnum.VALUESET_BINDER, theValue));
1085                
1086/*
1087                getType().setValueAsEnum(theValue);
1088*/
1089                return this;
1090        }
1091
1092  
1093        /**
1094         * Gets the value(s) for <b>telecom</b> ().
1095         * creating it if it does
1096         * not exist. Will not return <code>null</code>.
1097         *
1098     * <p>
1099     * <b>Definition:</b>
1100     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
1101     * </p> 
1102         */
1103        public java.util.List<ContactPointDt> getTelecom() {  
1104                if (myTelecom == null) {
1105                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1106                }
1107                return myTelecom;
1108        }
1109
1110        /**
1111         * Sets the value(s) for <b>telecom</b> ()
1112         *
1113     * <p>
1114     * <b>Definition:</b>
1115     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
1116     * </p> 
1117         */
1118        public Location setTelecom(java.util.List<ContactPointDt> theValue) {
1119                myTelecom = theValue;
1120                return this;
1121        }
1122        
1123        
1124
1125        /**
1126         * Adds and returns a new value for <b>telecom</b> ()
1127         *
1128     * <p>
1129     * <b>Definition:</b>
1130     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
1131     * </p> 
1132         */
1133        public ContactPointDt addTelecom() {
1134                ContactPointDt newType = new ContactPointDt();
1135                getTelecom().add(newType);
1136                return newType; 
1137        }
1138
1139        /**
1140         * Adds a given new value for <b>telecom</b> ()
1141         *
1142         * <p>
1143         * <b>Definition:</b>
1144         * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
1145         * </p>
1146         * @param theValue The telecom to add (must not be <code>null</code>)
1147         */
1148        public Location addTelecom(ContactPointDt theValue) {
1149                if (theValue == null) {
1150                        throw new NullPointerException("theValue must not be null");
1151                }
1152                getTelecom().add(theValue);
1153                return this;
1154        }
1155
1156        /**
1157         * Gets the first repetition for <b>telecom</b> (),
1158         * creating it if it does not already exist.
1159         *
1160     * <p>
1161     * <b>Definition:</b>
1162     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
1163     * </p> 
1164         */
1165        public ContactPointDt getTelecomFirstRep() {
1166                if (getTelecom().isEmpty()) {
1167                        return addTelecom();
1168                }
1169                return getTelecom().get(0); 
1170        }
1171  
1172        /**
1173         * Gets the value(s) for <b>address</b> ().
1174         * creating it if it does
1175         * not exist. Will not return <code>null</code>.
1176         *
1177     * <p>
1178     * <b>Definition:</b>
1179     * 
1180     * </p> 
1181         */
1182        public AddressDt getAddress() {  
1183                if (myAddress == null) {
1184                        myAddress = new AddressDt();
1185                }
1186                return myAddress;
1187        }
1188
1189        /**
1190         * Sets the value(s) for <b>address</b> ()
1191         *
1192     * <p>
1193     * <b>Definition:</b>
1194     * 
1195     * </p> 
1196         */
1197        public Location setAddress(AddressDt theValue) {
1198                myAddress = theValue;
1199                return this;
1200        }
1201        
1202        
1203
1204  
1205        /**
1206         * Gets the value(s) for <b>physicalType</b> (class).
1207         * creating it if it does
1208         * not exist. Will not return <code>null</code>.
1209         *
1210     * <p>
1211     * <b>Definition:</b>
1212     * Physical form of the location, e.g. building, room, vehicle, road
1213     * </p> 
1214         */
1215        public CodeableConceptDt getPhysicalType() {  
1216                if (myPhysicalType == null) {
1217                        myPhysicalType = new CodeableConceptDt();
1218                }
1219                return myPhysicalType;
1220        }
1221
1222        /**
1223         * Sets the value(s) for <b>physicalType</b> (class)
1224         *
1225     * <p>
1226     * <b>Definition:</b>
1227     * Physical form of the location, e.g. building, room, vehicle, road
1228     * </p> 
1229         */
1230        public Location setPhysicalType(CodeableConceptDt theValue) {
1231                myPhysicalType = theValue;
1232                return this;
1233        }
1234        
1235        
1236
1237  
1238        /**
1239         * Gets the value(s) for <b>position</b> ().
1240         * creating it if it does
1241         * not exist. Will not return <code>null</code>.
1242         *
1243     * <p>
1244     * <b>Definition:</b>
1245     * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)
1246     * </p> 
1247         */
1248        public Position getPosition() {  
1249                if (myPosition == null) {
1250                        myPosition = new Position();
1251                }
1252                return myPosition;
1253        }
1254
1255        /**
1256         * Sets the value(s) for <b>position</b> ()
1257         *
1258     * <p>
1259     * <b>Definition:</b>
1260     * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)
1261     * </p> 
1262         */
1263        public Location setPosition(Position theValue) {
1264                myPosition = theValue;
1265                return this;
1266        }
1267        
1268        
1269
1270  
1271        /**
1272         * Gets the value(s) for <b>managingOrganization</b> ().
1273         * creating it if it does
1274         * not exist. Will not return <code>null</code>.
1275         *
1276     * <p>
1277     * <b>Definition:</b>
1278     * The organization responsible for the provisioning and upkeep of the location
1279     * </p> 
1280         */
1281        public ResourceReferenceDt getManagingOrganization() {  
1282                if (myManagingOrganization == null) {
1283                        myManagingOrganization = new ResourceReferenceDt();
1284                }
1285                return myManagingOrganization;
1286        }
1287
1288        /**
1289         * Sets the value(s) for <b>managingOrganization</b> ()
1290         *
1291     * <p>
1292     * <b>Definition:</b>
1293     * The organization responsible for the provisioning and upkeep of the location
1294     * </p> 
1295         */
1296        public Location setManagingOrganization(ResourceReferenceDt theValue) {
1297                myManagingOrganization = theValue;
1298                return this;
1299        }
1300        
1301        
1302
1303  
1304        /**
1305         * Gets the value(s) for <b>partOf</b> ().
1306         * creating it if it does
1307         * not exist. Will not return <code>null</code>.
1308         *
1309     * <p>
1310     * <b>Definition:</b>
1311     * Another Location which this Location is physically part of
1312     * </p> 
1313         */
1314        public ResourceReferenceDt getPartOf() {  
1315                if (myPartOf == null) {
1316                        myPartOf = new ResourceReferenceDt();
1317                }
1318                return myPartOf;
1319        }
1320
1321        /**
1322         * Sets the value(s) for <b>partOf</b> ()
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * Another Location which this Location is physically part of
1327     * </p> 
1328         */
1329        public Location setPartOf(ResourceReferenceDt theValue) {
1330                myPartOf = theValue;
1331                return this;
1332        }
1333        
1334        
1335
1336  
1337        /**
1338         * Block class for child element: <b>Location.position</b> ()
1339         *
1340     * <p>
1341     * <b>Definition:</b>
1342     * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)
1343     * </p> 
1344         */
1345        @Block()        
1346        public static class Position 
1347            extends  BaseIdentifiableElement        implements IResourceBlock {
1348        
1349        @Child(name="longitude", type=DecimalDt.class, order=0, min=1, max=1, summary=false, modifier=false)    
1350        @Description(
1351                shortDefinition="",
1352                formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)"
1353        )
1354        private DecimalDt myLongitude;
1355        
1356        @Child(name="latitude", type=DecimalDt.class, order=1, min=1, max=1, summary=false, modifier=false)     
1357        @Description(
1358                shortDefinition="",
1359                formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)"
1360        )
1361        private DecimalDt myLatitude;
1362        
1363        @Child(name="altitude", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)     
1364        @Description(
1365                shortDefinition="",
1366                formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)"
1367        )
1368        private DecimalDt myAltitude;
1369        
1370
1371        @Override
1372        public boolean isEmpty() {
1373                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLongitude,  myLatitude,  myAltitude);
1374        }
1375        
1376        @Override
1377        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1378                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLongitude, myLatitude, myAltitude);
1379        }
1380
1381        /**
1382         * Gets the value(s) for <b>longitude</b> ().
1383         * creating it if it does
1384         * not exist. Will not return <code>null</code>.
1385         *
1386     * <p>
1387     * <b>Definition:</b>
1388     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1389     * </p> 
1390         */
1391        public DecimalDt getLongitudeElement() {  
1392                if (myLongitude == null) {
1393                        myLongitude = new DecimalDt();
1394                }
1395                return myLongitude;
1396        }
1397
1398        
1399        /**
1400         * Gets the value(s) for <b>longitude</b> ().
1401         * creating it if it does
1402         * not exist. This method may return <code>null</code>.
1403         *
1404     * <p>
1405     * <b>Definition:</b>
1406     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1407     * </p> 
1408         */
1409        public BigDecimal getLongitude() {  
1410                return getLongitudeElement().getValue();
1411        }
1412
1413        /**
1414         * Sets the value(s) for <b>longitude</b> ()
1415         *
1416     * <p>
1417     * <b>Definition:</b>
1418     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1419     * </p> 
1420         */
1421        public Position setLongitude(DecimalDt theValue) {
1422                myLongitude = theValue;
1423                return this;
1424        }
1425        
1426        
1427
1428        /**
1429         * Sets the value for <b>longitude</b> ()
1430         *
1431     * <p>
1432     * <b>Definition:</b>
1433     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1434     * </p> 
1435         */
1436        public Position setLongitude( long theValue) {
1437                myLongitude = new DecimalDt(theValue); 
1438                return this; 
1439        }
1440
1441        /**
1442         * Sets the value for <b>longitude</b> ()
1443         *
1444     * <p>
1445     * <b>Definition:</b>
1446     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1447     * </p> 
1448         */
1449        public Position setLongitude( double theValue) {
1450                myLongitude = new DecimalDt(theValue); 
1451                return this; 
1452        }
1453
1454        /**
1455         * Sets the value for <b>longitude</b> ()
1456         *
1457     * <p>
1458     * <b>Definition:</b>
1459     * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
1460     * </p> 
1461         */
1462        public Position setLongitude( java.math.BigDecimal theValue) {
1463                myLongitude = new DecimalDt(theValue); 
1464                return this; 
1465        }
1466
1467 
1468        /**
1469         * Gets the value(s) for <b>latitude</b> ().
1470         * creating it if it does
1471         * not exist. Will not return <code>null</code>.
1472         *
1473     * <p>
1474     * <b>Definition:</b>
1475     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1476     * </p> 
1477         */
1478        public DecimalDt getLatitudeElement() {  
1479                if (myLatitude == null) {
1480                        myLatitude = new DecimalDt();
1481                }
1482                return myLatitude;
1483        }
1484
1485        
1486        /**
1487         * Gets the value(s) for <b>latitude</b> ().
1488         * creating it if it does
1489         * not exist. This method may return <code>null</code>.
1490         *
1491     * <p>
1492     * <b>Definition:</b>
1493     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1494     * </p> 
1495         */
1496        public BigDecimal getLatitude() {  
1497                return getLatitudeElement().getValue();
1498        }
1499
1500        /**
1501         * Sets the value(s) for <b>latitude</b> ()
1502         *
1503     * <p>
1504     * <b>Definition:</b>
1505     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1506     * </p> 
1507         */
1508        public Position setLatitude(DecimalDt theValue) {
1509                myLatitude = theValue;
1510                return this;
1511        }
1512        
1513        
1514
1515        /**
1516         * Sets the value for <b>latitude</b> ()
1517         *
1518     * <p>
1519     * <b>Definition:</b>
1520     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1521     * </p> 
1522         */
1523        public Position setLatitude( long theValue) {
1524                myLatitude = new DecimalDt(theValue); 
1525                return this; 
1526        }
1527
1528        /**
1529         * Sets the value for <b>latitude</b> ()
1530         *
1531     * <p>
1532     * <b>Definition:</b>
1533     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1534     * </p> 
1535         */
1536        public Position setLatitude( double theValue) {
1537                myLatitude = new DecimalDt(theValue); 
1538                return this; 
1539        }
1540
1541        /**
1542         * Sets the value for <b>latitude</b> ()
1543         *
1544     * <p>
1545     * <b>Definition:</b>
1546     * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
1547     * </p> 
1548         */
1549        public Position setLatitude( java.math.BigDecimal theValue) {
1550                myLatitude = new DecimalDt(theValue); 
1551                return this; 
1552        }
1553
1554 
1555        /**
1556         * Gets the value(s) for <b>altitude</b> ().
1557         * creating it if it does
1558         * not exist. Will not return <code>null</code>.
1559         *
1560     * <p>
1561     * <b>Definition:</b>
1562     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1563     * </p> 
1564         */
1565        public DecimalDt getAltitudeElement() {  
1566                if (myAltitude == null) {
1567                        myAltitude = new DecimalDt();
1568                }
1569                return myAltitude;
1570        }
1571
1572        
1573        /**
1574         * Gets the value(s) for <b>altitude</b> ().
1575         * creating it if it does
1576         * not exist. This method may return <code>null</code>.
1577         *
1578     * <p>
1579     * <b>Definition:</b>
1580     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1581     * </p> 
1582         */
1583        public BigDecimal getAltitude() {  
1584                return getAltitudeElement().getValue();
1585        }
1586
1587        /**
1588         * Sets the value(s) for <b>altitude</b> ()
1589         *
1590     * <p>
1591     * <b>Definition:</b>
1592     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1593     * </p> 
1594         */
1595        public Position setAltitude(DecimalDt theValue) {
1596                myAltitude = theValue;
1597                return this;
1598        }
1599        
1600        
1601
1602        /**
1603         * Sets the value for <b>altitude</b> ()
1604         *
1605     * <p>
1606     * <b>Definition:</b>
1607     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1608     * </p> 
1609         */
1610        public Position setAltitude( long theValue) {
1611                myAltitude = new DecimalDt(theValue); 
1612                return this; 
1613        }
1614
1615        /**
1616         * Sets the value for <b>altitude</b> ()
1617         *
1618     * <p>
1619     * <b>Definition:</b>
1620     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1621     * </p> 
1622         */
1623        public Position setAltitude( double theValue) {
1624                myAltitude = new DecimalDt(theValue); 
1625                return this; 
1626        }
1627
1628        /**
1629         * Sets the value for <b>altitude</b> ()
1630         *
1631     * <p>
1632     * <b>Definition:</b>
1633     * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
1634     * </p> 
1635         */
1636        public Position setAltitude( java.math.BigDecimal theValue) {
1637                myAltitude = new DecimalDt(theValue); 
1638                return this; 
1639        }
1640
1641 
1642
1643
1644        }
1645
1646
1647
1648
1649    @Override
1650    public String getResourceName() {
1651        return "Location";
1652    }
1653    
1654    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1655        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1656    }
1657
1658
1659}