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>Organization</b> Resource
282 * (administrative.group)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Organization">http://hl7.org/fhir/profiles/Organization</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Organization", profile="http://hl7.org/fhir/profiles/Organization", id="organization")
301public class Organization extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>name</b>
307         * <p>
308         * Description: <b>A portion of the organization's name</b><br>
309         * Type: <b>string</b><br>
310         * Path: <b>Organization.name</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="name", path="Organization.name", description="A portion of the organization's name", type="string" 
314 )
315        public static final String SP_NAME = "name";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>name</b>
319         * <p>
320         * Description: <b>A portion of the organization's name</b><br>
321         * Type: <b>string</b><br>
322         * Path: <b>Organization.name</b><br>
323         * </p>
324         */
325        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
326
327        /**
328         * Search parameter constant for <b>phonetic</b>
329         * <p>
330         * Description: <b>A portion of the organization's name using some kind of phonetic matching algorithm</b><br>
331         * Type: <b>string</b><br>
332         * Path: <b>Organization.name</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="phonetic", path="Organization.name", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" 
336 )
337        public static final String SP_PHONETIC = "phonetic";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
341         * <p>
342         * Description: <b>A portion of the organization's name using some kind of phonetic matching algorithm</b><br>
343         * Type: <b>string</b><br>
344         * Path: <b>Organization.name</b><br>
345         * </p>
346         */
347        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
348
349        /**
350         * Search parameter constant for <b>type</b>
351         * <p>
352         * Description: <b>A code for the type of organization</b><br>
353         * Type: <b>token</b><br>
354         * Path: <b>Organization.type</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="type", path="Organization.type", description="A code for the type of organization", type="token" 
358 )
359        public static final String SP_TYPE = "type";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>type</b>
363         * <p>
364         * Description: <b>A code for the type of organization</b><br>
365         * Type: <b>token</b><br>
366         * Path: <b>Organization.type</b><br>
367         * </p>
368         */
369        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
370
371        /**
372         * Search parameter constant for <b>identifier</b>
373         * <p>
374         * Description: <b>Any identifier for the organization (not the accreditation issuer's identifier)</b><br>
375         * Type: <b>token</b><br>
376         * Path: <b>Organization.identifier</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" 
380 )
381        public static final String SP_IDENTIFIER = "identifier";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
385         * <p>
386         * Description: <b>Any identifier for the organization (not the accreditation issuer's identifier)</b><br>
387         * Type: <b>token</b><br>
388         * Path: <b>Organization.identifier</b><br>
389         * </p>
390         */
391        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
392
393        /**
394         * Search parameter constant for <b>partof</b>
395         * <p>
396         * Description: <b>Search all organizations that are part of the given organization</b><br>
397         * Type: <b>reference</b><br>
398         * Path: <b>Organization.partOf</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="partof", path="Organization.partOf", description="Search all organizations that are part of the given organization", type="reference" 
402 )
403        public static final String SP_PARTOF = "partof";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>partof</b>
407         * <p>
408         * Description: <b>Search all organizations that are part of the given organization</b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>Organization.partOf</b><br>
411         * </p>
412         */
413        public static final ReferenceClientParam PARTOF = new ReferenceClientParam(SP_PARTOF);
414
415        /**
416         * Search parameter constant for <b>active</b>
417         * <p>
418         * Description: <b>Whether the organization's record is active</b><br>
419         * Type: <b>token</b><br>
420         * Path: <b>Organization.active</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="active", path="Organization.active", description="Whether the organization's record is active", type="token" 
424 )
425        public static final String SP_ACTIVE = "active";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>active</b>
429         * <p>
430         * Description: <b>Whether the organization's record is active</b><br>
431         * Type: <b>token</b><br>
432         * Path: <b>Organization.active</b><br>
433         * </p>
434         */
435        public static final TokenClientParam ACTIVE = new TokenClientParam(SP_ACTIVE);
436
437        /**
438         * Search parameter constant for <b>address</b>
439         * <p>
440         * Description: <b>A (part of the) address of the Organization</b><br>
441         * Type: <b>string</b><br>
442         * Path: <b>Organization.address</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="address", path="Organization.address", description="A (part of the) address of the Organization", type="string" 
446 )
447        public static final String SP_ADDRESS = "address";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>address</b>
451         * <p>
452         * Description: <b>A (part of the) address of the Organization</b><br>
453         * Type: <b>string</b><br>
454         * Path: <b>Organization.address</b><br>
455         * </p>
456         */
457        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
458
459        /**
460         * Search parameter constant for <b>address-city</b>
461         * <p>
462         * Description: <b>A city specified in an address</b><br>
463         * Type: <b>string</b><br>
464         * Path: <b>Organization.address.city</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="address-city", path="Organization.address.city", description="A city specified in an address", type="string" 
468 )
469        public static final String SP_ADDRESS_CITY = "address-city";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
473         * <p>
474         * Description: <b>A city specified in an address</b><br>
475         * Type: <b>string</b><br>
476         * Path: <b>Organization.address.city</b><br>
477         * </p>
478         */
479        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
480
481        /**
482         * Search parameter constant for <b>address-state</b>
483         * <p>
484         * Description: <b>A state specified in an address</b><br>
485         * Type: <b>string</b><br>
486         * Path: <b>Organization.address.state</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="address-state", path="Organization.address.state", description="A state specified in an address", type="string" 
490 )
491        public static final String SP_ADDRESS_STATE = "address-state";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
495         * <p>
496         * Description: <b>A state specified in an address</b><br>
497         * Type: <b>string</b><br>
498         * Path: <b>Organization.address.state</b><br>
499         * </p>
500         */
501        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
502
503        /**
504         * Search parameter constant for <b>address-postalcode</b>
505         * <p>
506         * Description: <b>A postal code specified in an address</b><br>
507         * Type: <b>string</b><br>
508         * Path: <b>Organization.address.postalCode</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="address-postalcode", path="Organization.address.postalCode", description="A postal code specified in an address", type="string" 
512 )
513        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
517         * <p>
518         * Description: <b>A postal code specified in an address</b><br>
519         * Type: <b>string</b><br>
520         * Path: <b>Organization.address.postalCode</b><br>
521         * </p>
522         */
523        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
524
525        /**
526         * Search parameter constant for <b>address-country</b>
527         * <p>
528         * Description: <b>A country specified in an address</b><br>
529         * Type: <b>string</b><br>
530         * Path: <b>Organization.address.country</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="address-country", path="Organization.address.country", description="A country specified in an address", type="string" 
534 )
535        public static final String SP_ADDRESS_COUNTRY = "address-country";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
539         * <p>
540         * Description: <b>A country specified in an address</b><br>
541         * Type: <b>string</b><br>
542         * Path: <b>Organization.address.country</b><br>
543         * </p>
544         */
545        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
546
547        /**
548         * Search parameter constant for <b>address-use</b>
549         * <p>
550         * Description: <b>A use code specified in an address</b><br>
551         * Type: <b>token</b><br>
552         * Path: <b>Organization.address.use</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="address-use", path="Organization.address.use", description="A use code specified in an address", type="token" 
556 )
557        public static final String SP_ADDRESS_USE = "address-use";
558
559        /**
560         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
561         * <p>
562         * Description: <b>A use code specified in an address</b><br>
563         * Type: <b>token</b><br>
564         * Path: <b>Organization.address.use</b><br>
565         * </p>
566         */
567        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
568
569
570        /**
571         * Constant for fluent queries to be used to add include statements. Specifies
572         * the path value of "<b>Organization:partof</b>".
573         */
574        public static final Include INCLUDE_PARTOF = new Include("Organization:partof");
575
576
577        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
578        @Description(
579                shortDefinition="id",
580                formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems"
581        )
582        private java.util.List<IdentifierDt> myIdentifier;
583        
584        @Child(name="active", type=BooleanDt.class, order=1, min=0, max=1, summary=true, modifier=true) 
585        @Description(
586                shortDefinition="status",
587                formalDefinition="Whether the organization's record is still in active use"
588        )
589        private BooleanDt myActive;
590        
591        @Child(name="type", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
592        @Description(
593                shortDefinition="class",
594                formalDefinition="The kind of organization that this is"
595        )
596        private CodeableConceptDt myType;
597        
598        @Child(name="name", type=StringDt.class, order=3, min=0, max=1, summary=true, modifier=false)   
599        @Description(
600                shortDefinition="",
601                formalDefinition="A name associated with the organization"
602        )
603        private StringDt myName;
604        
605        @Child(name="telecom", type=ContactPointDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
606        @Description(
607                shortDefinition="",
608                formalDefinition="A contact detail for the organization"
609        )
610        private java.util.List<ContactPointDt> myTelecom;
611        
612        @Child(name="address", type=AddressDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
613        @Description(
614                shortDefinition="",
615                formalDefinition="An address for the organization"
616        )
617        private java.util.List<AddressDt> myAddress;
618        
619        @Child(name="partOf", order=6, min=0, max=1, summary=true, modifier=false, type={
620                ca.uhn.fhir.model.dstu2.resource.Organization.class
621        })
622        @Description(
623                shortDefinition="",
624                formalDefinition="The organization of which this organization forms a part"
625        )
626        private ResourceReferenceDt myPartOf;
627        
628        @Child(name="contact", order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
629        @Description(
630                shortDefinition="",
631                formalDefinition=""
632        )
633        private java.util.List<Contact> myContact;
634        
635
636        @Override
637        public boolean isEmpty() {
638                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myActive,  myType,  myName,  myTelecom,  myAddress,  myPartOf,  myContact);
639        }
640        
641        @Override
642        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
643                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myActive, myType, myName, myTelecom, myAddress, myPartOf, myContact);
644        }
645
646        /**
647         * Gets the value(s) for <b>identifier</b> (id).
648         * creating it if it does
649         * not exist. Will not return <code>null</code>.
650         *
651     * <p>
652     * <b>Definition:</b>
653     * Identifier for the organization that is used to identify the organization across multiple disparate systems
654     * </p> 
655         */
656        public java.util.List<IdentifierDt> getIdentifier() {  
657                if (myIdentifier == null) {
658                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
659                }
660                return myIdentifier;
661        }
662
663        /**
664         * Sets the value(s) for <b>identifier</b> (id)
665         *
666     * <p>
667     * <b>Definition:</b>
668     * Identifier for the organization that is used to identify the organization across multiple disparate systems
669     * </p> 
670         */
671        public Organization setIdentifier(java.util.List<IdentifierDt> theValue) {
672                myIdentifier = theValue;
673                return this;
674        }
675        
676        
677
678        /**
679         * Adds and returns a new value for <b>identifier</b> (id)
680         *
681     * <p>
682     * <b>Definition:</b>
683     * Identifier for the organization that is used to identify the organization across multiple disparate systems
684     * </p> 
685         */
686        public IdentifierDt addIdentifier() {
687                IdentifierDt newType = new IdentifierDt();
688                getIdentifier().add(newType);
689                return newType; 
690        }
691
692        /**
693         * Adds a given new value for <b>identifier</b> (id)
694         *
695         * <p>
696         * <b>Definition:</b>
697         * Identifier for the organization that is used to identify the organization across multiple disparate systems
698         * </p>
699         * @param theValue The identifier to add (must not be <code>null</code>)
700         */
701        public Organization addIdentifier(IdentifierDt theValue) {
702                if (theValue == null) {
703                        throw new NullPointerException("theValue must not be null");
704                }
705                getIdentifier().add(theValue);
706                return this;
707        }
708
709        /**
710         * Gets the first repetition for <b>identifier</b> (id),
711         * creating it if it does not already exist.
712         *
713     * <p>
714     * <b>Definition:</b>
715     * Identifier for the organization that is used to identify the organization across multiple disparate systems
716     * </p> 
717         */
718        public IdentifierDt getIdentifierFirstRep() {
719                if (getIdentifier().isEmpty()) {
720                        return addIdentifier();
721                }
722                return getIdentifier().get(0); 
723        }
724  
725        /**
726         * Gets the value(s) for <b>active</b> (status).
727         * creating it if it does
728         * not exist. Will not return <code>null</code>.
729         *
730     * <p>
731     * <b>Definition:</b>
732     * Whether the organization's record is still in active use
733     * </p> 
734         */
735        public BooleanDt getActiveElement() {  
736                if (myActive == null) {
737                        myActive = new BooleanDt();
738                }
739                return myActive;
740        }
741
742        
743        /**
744         * Gets the value(s) for <b>active</b> (status).
745         * creating it if it does
746         * not exist. This method may return <code>null</code>.
747         *
748     * <p>
749     * <b>Definition:</b>
750     * Whether the organization's record is still in active use
751     * </p> 
752         */
753        public Boolean getActive() {  
754                return getActiveElement().getValue();
755        }
756
757        /**
758         * Sets the value(s) for <b>active</b> (status)
759         *
760     * <p>
761     * <b>Definition:</b>
762     * Whether the organization's record is still in active use
763     * </p> 
764         */
765        public Organization setActive(BooleanDt theValue) {
766                myActive = theValue;
767                return this;
768        }
769        
770        
771
772        /**
773         * Sets the value for <b>active</b> (status)
774         *
775     * <p>
776     * <b>Definition:</b>
777     * Whether the organization's record is still in active use
778     * </p> 
779         */
780        public Organization setActive( boolean theBoolean) {
781                myActive = new BooleanDt(theBoolean); 
782                return this; 
783        }
784
785 
786        /**
787         * Gets the value(s) for <b>type</b> (class).
788         * creating it if it does
789         * not exist. Will not return <code>null</code>.
790         *
791     * <p>
792     * <b>Definition:</b>
793     * The kind of organization that this is
794     * </p> 
795         */
796        public CodeableConceptDt getType() {  
797                if (myType == null) {
798                        myType = new CodeableConceptDt();
799                }
800                return myType;
801        }
802
803        /**
804         * Sets the value(s) for <b>type</b> (class)
805         *
806     * <p>
807     * <b>Definition:</b>
808     * The kind of organization that this is
809     * </p> 
810         */
811        public Organization setType(CodeableConceptDt theValue) {
812                myType = theValue;
813                return this;
814        }
815        
816        
817
818  
819        /**
820         * Gets the value(s) for <b>name</b> ().
821         * creating it if it does
822         * not exist. Will not return <code>null</code>.
823         *
824     * <p>
825     * <b>Definition:</b>
826     * A name associated with the organization
827     * </p> 
828         */
829        public StringDt getNameElement() {  
830                if (myName == null) {
831                        myName = new StringDt();
832                }
833                return myName;
834        }
835
836        
837        /**
838         * Gets the value(s) for <b>name</b> ().
839         * creating it if it does
840         * not exist. This method may return <code>null</code>.
841         *
842     * <p>
843     * <b>Definition:</b>
844     * A name associated with the organization
845     * </p> 
846         */
847        public String getName() {  
848                return getNameElement().getValue();
849        }
850
851        /**
852         * Sets the value(s) for <b>name</b> ()
853         *
854     * <p>
855     * <b>Definition:</b>
856     * A name associated with the organization
857     * </p> 
858         */
859        public Organization setName(StringDt theValue) {
860                myName = theValue;
861                return this;
862        }
863        
864        
865
866        /**
867         * Sets the value for <b>name</b> ()
868         *
869     * <p>
870     * <b>Definition:</b>
871     * A name associated with the organization
872     * </p> 
873         */
874        public Organization setName( String theString) {
875                myName = new StringDt(theString); 
876                return this; 
877        }
878
879 
880        /**
881         * Gets the value(s) for <b>telecom</b> ().
882         * creating it if it does
883         * not exist. Will not return <code>null</code>.
884         *
885     * <p>
886     * <b>Definition:</b>
887     * A contact detail for the organization
888     * </p> 
889         */
890        public java.util.List<ContactPointDt> getTelecom() {  
891                if (myTelecom == null) {
892                        myTelecom = new java.util.ArrayList<ContactPointDt>();
893                }
894                return myTelecom;
895        }
896
897        /**
898         * Sets the value(s) for <b>telecom</b> ()
899         *
900     * <p>
901     * <b>Definition:</b>
902     * A contact detail for the organization
903     * </p> 
904         */
905        public Organization setTelecom(java.util.List<ContactPointDt> theValue) {
906                myTelecom = theValue;
907                return this;
908        }
909        
910        
911
912        /**
913         * Adds and returns a new value for <b>telecom</b> ()
914         *
915     * <p>
916     * <b>Definition:</b>
917     * A contact detail for the organization
918     * </p> 
919         */
920        public ContactPointDt addTelecom() {
921                ContactPointDt newType = new ContactPointDt();
922                getTelecom().add(newType);
923                return newType; 
924        }
925
926        /**
927         * Adds a given new value for <b>telecom</b> ()
928         *
929         * <p>
930         * <b>Definition:</b>
931         * A contact detail for the organization
932         * </p>
933         * @param theValue The telecom to add (must not be <code>null</code>)
934         */
935        public Organization addTelecom(ContactPointDt theValue) {
936                if (theValue == null) {
937                        throw new NullPointerException("theValue must not be null");
938                }
939                getTelecom().add(theValue);
940                return this;
941        }
942
943        /**
944         * Gets the first repetition for <b>telecom</b> (),
945         * creating it if it does not already exist.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * A contact detail for the organization
950     * </p> 
951         */
952        public ContactPointDt getTelecomFirstRep() {
953                if (getTelecom().isEmpty()) {
954                        return addTelecom();
955                }
956                return getTelecom().get(0); 
957        }
958  
959        /**
960         * Gets the value(s) for <b>address</b> ().
961         * creating it if it does
962         * not exist. Will not return <code>null</code>.
963         *
964     * <p>
965     * <b>Definition:</b>
966     * An address for the organization
967     * </p> 
968         */
969        public java.util.List<AddressDt> getAddress() {  
970                if (myAddress == null) {
971                        myAddress = new java.util.ArrayList<AddressDt>();
972                }
973                return myAddress;
974        }
975
976        /**
977         * Sets the value(s) for <b>address</b> ()
978         *
979     * <p>
980     * <b>Definition:</b>
981     * An address for the organization
982     * </p> 
983         */
984        public Organization setAddress(java.util.List<AddressDt> theValue) {
985                myAddress = theValue;
986                return this;
987        }
988        
989        
990
991        /**
992         * Adds and returns a new value for <b>address</b> ()
993         *
994     * <p>
995     * <b>Definition:</b>
996     * An address for the organization
997     * </p> 
998         */
999        public AddressDt addAddress() {
1000                AddressDt newType = new AddressDt();
1001                getAddress().add(newType);
1002                return newType; 
1003        }
1004
1005        /**
1006         * Adds a given new value for <b>address</b> ()
1007         *
1008         * <p>
1009         * <b>Definition:</b>
1010         * An address for the organization
1011         * </p>
1012         * @param theValue The address to add (must not be <code>null</code>)
1013         */
1014        public Organization addAddress(AddressDt theValue) {
1015                if (theValue == null) {
1016                        throw new NullPointerException("theValue must not be null");
1017                }
1018                getAddress().add(theValue);
1019                return this;
1020        }
1021
1022        /**
1023         * Gets the first repetition for <b>address</b> (),
1024         * creating it if it does not already exist.
1025         *
1026     * <p>
1027     * <b>Definition:</b>
1028     * An address for the organization
1029     * </p> 
1030         */
1031        public AddressDt getAddressFirstRep() {
1032                if (getAddress().isEmpty()) {
1033                        return addAddress();
1034                }
1035                return getAddress().get(0); 
1036        }
1037  
1038        /**
1039         * Gets the value(s) for <b>partOf</b> ().
1040         * creating it if it does
1041         * not exist. Will not return <code>null</code>.
1042         *
1043     * <p>
1044     * <b>Definition:</b>
1045     * The organization of which this organization forms a part
1046     * </p> 
1047         */
1048        public ResourceReferenceDt getPartOf() {  
1049                if (myPartOf == null) {
1050                        myPartOf = new ResourceReferenceDt();
1051                }
1052                return myPartOf;
1053        }
1054
1055        /**
1056         * Sets the value(s) for <b>partOf</b> ()
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * The organization of which this organization forms a part
1061     * </p> 
1062         */
1063        public Organization setPartOf(ResourceReferenceDt theValue) {
1064                myPartOf = theValue;
1065                return this;
1066        }
1067        
1068        
1069
1070  
1071        /**
1072         * Gets the value(s) for <b>contact</b> ().
1073         * creating it if it does
1074         * not exist. Will not return <code>null</code>.
1075         *
1076     * <p>
1077     * <b>Definition:</b>
1078     * 
1079     * </p> 
1080         */
1081        public java.util.List<Contact> getContact() {  
1082                if (myContact == null) {
1083                        myContact = new java.util.ArrayList<Contact>();
1084                }
1085                return myContact;
1086        }
1087
1088        /**
1089         * Sets the value(s) for <b>contact</b> ()
1090         *
1091     * <p>
1092     * <b>Definition:</b>
1093     * 
1094     * </p> 
1095         */
1096        public Organization setContact(java.util.List<Contact> theValue) {
1097                myContact = theValue;
1098                return this;
1099        }
1100        
1101        
1102
1103        /**
1104         * Adds and returns a new value for <b>contact</b> ()
1105         *
1106     * <p>
1107     * <b>Definition:</b>
1108     * 
1109     * </p> 
1110         */
1111        public Contact addContact() {
1112                Contact newType = new Contact();
1113                getContact().add(newType);
1114                return newType; 
1115        }
1116
1117        /**
1118         * Adds a given new value for <b>contact</b> ()
1119         *
1120         * <p>
1121         * <b>Definition:</b>
1122         * 
1123         * </p>
1124         * @param theValue The contact to add (must not be <code>null</code>)
1125         */
1126        public Organization addContact(Contact theValue) {
1127                if (theValue == null) {
1128                        throw new NullPointerException("theValue must not be null");
1129                }
1130                getContact().add(theValue);
1131                return this;
1132        }
1133
1134        /**
1135         * Gets the first repetition for <b>contact</b> (),
1136         * creating it if it does not already exist.
1137         *
1138     * <p>
1139     * <b>Definition:</b>
1140     * 
1141     * </p> 
1142         */
1143        public Contact getContactFirstRep() {
1144                if (getContact().isEmpty()) {
1145                        return addContact();
1146                }
1147                return getContact().get(0); 
1148        }
1149  
1150        /**
1151         * Block class for child element: <b>Organization.contact</b> ()
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * 
1156     * </p> 
1157         */
1158        @Block()        
1159        public static class Contact 
1160            extends  BaseIdentifiableElement  
1161            implements IResourceBlock {
1162        
1163        @Child(name="purpose", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)      
1164        @Description(
1165                shortDefinition="",
1166                formalDefinition="Indicates a purpose for which the contact can be reached"
1167        )
1168        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-contactentity-type")
1169        private CodeableConceptDt myPurpose;
1170        
1171        @Child(name="name", type=HumanNameDt.class, order=1, min=0, max=1, summary=false, modifier=false)       
1172        @Description(
1173                shortDefinition="",
1174                formalDefinition="A name associated with the contact"
1175        )
1176        private HumanNameDt myName;
1177        
1178        @Child(name="telecom", type=ContactPointDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
1179        @Description(
1180                shortDefinition="",
1181                formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted."
1182        )
1183        private java.util.List<ContactPointDt> myTelecom;
1184        
1185        @Child(name="address", type=AddressDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
1186        @Description(
1187                shortDefinition="",
1188                formalDefinition="Visiting or postal addresses for the contact"
1189        )
1190        private AddressDt myAddress;
1191        
1192
1193        @Override
1194        public boolean isEmpty() {
1195                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myPurpose,  myName,  myTelecom,  myAddress);
1196        }
1197        
1198        @Override
1199        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1200                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPurpose, myName, myTelecom, myAddress);
1201        }
1202
1203        /**
1204         * Gets the value(s) for <b>purpose</b> ().
1205         * creating it if it does
1206         * not exist. Will not return <code>null</code>.
1207         *
1208     * <p>
1209     * <b>Definition:</b>
1210     * Indicates a purpose for which the contact can be reached
1211     * </p> 
1212         */
1213        public CodeableConceptDt getPurpose() {  
1214                if (myPurpose == null) {
1215                        myPurpose = new CodeableConceptDt();
1216                }
1217                return myPurpose;
1218        }
1219
1220        /**
1221         * Sets the value(s) for <b>purpose</b> ()
1222         *
1223     * <p>
1224     * <b>Definition:</b>
1225     * Indicates a purpose for which the contact can be reached
1226     * </p> 
1227         */
1228        public Contact setPurpose(CodeableConceptDt theValue) {
1229                myPurpose = theValue;
1230                return this;
1231        }
1232        
1233        
1234
1235  
1236        /**
1237         * Gets the value(s) for <b>name</b> ().
1238         * creating it if it does
1239         * not exist. Will not return <code>null</code>.
1240         *
1241     * <p>
1242     * <b>Definition:</b>
1243     * A name associated with the contact
1244     * </p> 
1245         */
1246        public HumanNameDt getName() {  
1247                if (myName == null) {
1248                        myName = new HumanNameDt();
1249                }
1250                return myName;
1251        }
1252
1253        /**
1254         * Sets the value(s) for <b>name</b> ()
1255         *
1256     * <p>
1257     * <b>Definition:</b>
1258     * A name associated with the contact
1259     * </p> 
1260         */
1261        public Contact setName(HumanNameDt theValue) {
1262                myName = theValue;
1263                return this;
1264        }
1265        
1266        
1267
1268  
1269        /**
1270         * Gets the value(s) for <b>telecom</b> ().
1271         * creating it if it does
1272         * not exist. Will not return <code>null</code>.
1273         *
1274     * <p>
1275     * <b>Definition:</b>
1276     * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
1277     * </p> 
1278         */
1279        public java.util.List<ContactPointDt> getTelecom() {  
1280                if (myTelecom == null) {
1281                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1282                }
1283                return myTelecom;
1284        }
1285
1286        /**
1287         * Sets the value(s) for <b>telecom</b> ()
1288         *
1289     * <p>
1290     * <b>Definition:</b>
1291     * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
1292     * </p> 
1293         */
1294        public Contact setTelecom(java.util.List<ContactPointDt> theValue) {
1295                myTelecom = theValue;
1296                return this;
1297        }
1298        
1299        
1300
1301        /**
1302         * Adds and returns a new value for <b>telecom</b> ()
1303         *
1304     * <p>
1305     * <b>Definition:</b>
1306     * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
1307     * </p> 
1308         */
1309        public ContactPointDt addTelecom() {
1310                ContactPointDt newType = new ContactPointDt();
1311                getTelecom().add(newType);
1312                return newType; 
1313        }
1314
1315        /**
1316         * Adds a given new value for <b>telecom</b> ()
1317         *
1318         * <p>
1319         * <b>Definition:</b>
1320         * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
1321         * </p>
1322         * @param theValue The telecom to add (must not be <code>null</code>)
1323         */
1324        public Contact addTelecom(ContactPointDt theValue) {
1325                if (theValue == null) {
1326                        throw new NullPointerException("theValue must not be null");
1327                }
1328                getTelecom().add(theValue);
1329                return this;
1330        }
1331
1332        /**
1333         * Gets the first repetition for <b>telecom</b> (),
1334         * creating it if it does not already exist.
1335         *
1336     * <p>
1337     * <b>Definition:</b>
1338     * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
1339     * </p> 
1340         */
1341        public ContactPointDt getTelecomFirstRep() {
1342                if (getTelecom().isEmpty()) {
1343                        return addTelecom();
1344                }
1345                return getTelecom().get(0); 
1346        }
1347  
1348        /**
1349         * Gets the value(s) for <b>address</b> ().
1350         * creating it if it does
1351         * not exist. Will not return <code>null</code>.
1352         *
1353     * <p>
1354     * <b>Definition:</b>
1355     * Visiting or postal addresses for the contact
1356     * </p> 
1357         */
1358        public AddressDt getAddress() {  
1359                if (myAddress == null) {
1360                        myAddress = new AddressDt();
1361                }
1362                return myAddress;
1363        }
1364
1365        /**
1366         * Sets the value(s) for <b>address</b> ()
1367         *
1368     * <p>
1369     * <b>Definition:</b>
1370     * Visiting or postal addresses for the contact
1371     * </p> 
1372         */
1373        public Contact setAddress(AddressDt theValue) {
1374                myAddress = theValue;
1375                return this;
1376        }
1377        
1378        
1379
1380  
1381
1382
1383        }
1384
1385
1386
1387
1388    @Override
1389    public String getResourceName() {
1390        return "Organization";
1391    }
1392    
1393    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1394        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1395    }
1396
1397
1398}