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.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>Practitioner</b> Resource
320 * (administrative.individual)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A person who is directly or indirectly involved in the provisioning of healthcare.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * Need to track doctors, staff, locums etc. for both healthcare practitioners, funders, etc.
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/Practitioner">http://hl7.org/fhir/profiles/Practitioner</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="Practitioner", profile="http://hl7.org/fhir/profiles/Practitioner", id="practitioner")
339public class Practitioner extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>identifier</b>
344         * <p>
345         * Description: <b>A practitioner's Identifier</b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>Practitioner.identifier</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token"  )
351        public static final String SP_IDENTIFIER = "identifier";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
355         * <p>
356         * Description: <b>A practitioner's Identifier</b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>Practitioner.identifier</b><br>
359         * </p>
360         */
361        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
362
363        /**
364         * Search parameter constant for <b>name</b>
365         * <p>
366         * Description: <b>A portion of either family or given name</b><br>
367         * Type: <b>string</b><br>
368         * Path: <b>Practitioner.name</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name", type="string"  )
372        public static final String SP_NAME = "name";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>name</b>
376         * <p>
377         * Description: <b>A portion of either family or given name</b><br>
378         * Type: <b>string</b><br>
379         * Path: <b>Practitioner.name</b><br>
380         * </p>
381         */
382        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
383
384        /**
385         * Search parameter constant for <b>family</b>
386         * <p>
387         * Description: <b>A portion of the family name</b><br>
388         * Type: <b>string</b><br>
389         * Path: <b>Practitioner.name.family</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="family", path="Practitioner.name.family", description="A portion of the family name", type="string"  )
393        public static final String SP_FAMILY = "family";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>family</b>
397         * <p>
398         * Description: <b>A portion of the family name</b><br>
399         * Type: <b>string</b><br>
400         * Path: <b>Practitioner.name.family</b><br>
401         * </p>
402         */
403        public static final StringClientParam FAMILY = new StringClientParam(SP_FAMILY);
404
405        /**
406         * Search parameter constant for <b>given</b>
407         * <p>
408         * Description: <b>A portion of the given name</b><br>
409         * Type: <b>string</b><br>
410         * Path: <b>Practitioner.name.given</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="given", path="Practitioner.name.given", description="A portion of the given name", type="string"  )
414        public static final String SP_GIVEN = "given";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>given</b>
418         * <p>
419         * Description: <b>A portion of the given name</b><br>
420         * Type: <b>string</b><br>
421         * Path: <b>Practitioner.name.given</b><br>
422         * </p>
423         */
424        public static final StringClientParam GIVEN = new StringClientParam(SP_GIVEN);
425
426        /**
427         * Search parameter constant for <b>phonetic</b>
428         * <p>
429         * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
430         * Type: <b>string</b><br>
431         * Path: <b>Practitioner.name</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string"  )
435        public static final String SP_PHONETIC = "phonetic";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
439         * <p>
440         * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
441         * Type: <b>string</b><br>
442         * Path: <b>Practitioner.name</b><br>
443         * </p>
444         */
445        public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
446
447        /**
448         * Search parameter constant for <b>telecom</b>
449         * <p>
450         * Description: <b>The value in any kind of contact</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>Practitioner.telecom</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="token"  )
456        public static final String SP_TELECOM = "telecom";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
460         * <p>
461         * Description: <b>The value in any kind of contact</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>Practitioner.telecom</b><br>
464         * </p>
465         */
466        public static final TokenClientParam TELECOM = new TokenClientParam(SP_TELECOM);
467
468        /**
469         * Search parameter constant for <b>phone</b>
470         * <p>
471         * Description: <b>A value in a phone contact</b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>Practitioner.telecom(system=phone)</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="phone", path="Practitioner.telecom(system=phone)", description="A value in a phone contact", type="token"  )
477        public static final String SP_PHONE = "phone";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>phone</b>
481         * <p>
482         * Description: <b>A value in a phone contact</b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>Practitioner.telecom(system=phone)</b><br>
485         * </p>
486         */
487        public static final TokenClientParam PHONE = new TokenClientParam(SP_PHONE);
488
489        /**
490         * Search parameter constant for <b>email</b>
491         * <p>
492         * Description: <b>A value in an email contact</b><br>
493         * Type: <b>token</b><br>
494         * Path: <b>Practitioner.telecom(system=email)</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="email", path="Practitioner.telecom(system=email)", description="A value in an email contact", type="token"  )
498        public static final String SP_EMAIL = "email";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>email</b>
502         * <p>
503         * Description: <b>A value in an email contact</b><br>
504         * Type: <b>token</b><br>
505         * Path: <b>Practitioner.telecom(system=email)</b><br>
506         * </p>
507         */
508        public static final TokenClientParam EMAIL = new TokenClientParam(SP_EMAIL);
509
510        /**
511         * Search parameter constant for <b>address</b>
512         * <p>
513         * Description: <b>An address in any kind of address/part</b><br>
514         * Type: <b>string</b><br>
515         * Path: <b>Practitioner.address</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part", type="string"  )
519        public static final String SP_ADDRESS = "address";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>address</b>
523         * <p>
524         * Description: <b>An address in any kind of address/part</b><br>
525         * Type: <b>string</b><br>
526         * Path: <b>Practitioner.address</b><br>
527         * </p>
528         */
529        public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
530
531        /**
532         * Search parameter constant for <b>address-city</b>
533         * <p>
534         * Description: <b>A city specified in an address</b><br>
535         * Type: <b>string</b><br>
536         * Path: <b>Practitioner.address.city</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="address-city", path="Practitioner.address.city", description="A city specified in an address", type="string"  )
540        public static final String SP_ADDRESS_CITY = "address-city";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
544         * <p>
545         * Description: <b>A city specified in an address</b><br>
546         * Type: <b>string</b><br>
547         * Path: <b>Practitioner.address.city</b><br>
548         * </p>
549         */
550        public static final StringClientParam ADDRESS_CITY = new StringClientParam(SP_ADDRESS_CITY);
551
552        /**
553         * Search parameter constant for <b>address-state</b>
554         * <p>
555         * Description: <b>A state specified in an address</b><br>
556         * Type: <b>string</b><br>
557         * Path: <b>Practitioner.address.state</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="address-state", path="Practitioner.address.state", description="A state specified in an address", type="string"  )
561        public static final String SP_ADDRESS_STATE = "address-state";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
565         * <p>
566         * Description: <b>A state specified in an address</b><br>
567         * Type: <b>string</b><br>
568         * Path: <b>Practitioner.address.state</b><br>
569         * </p>
570         */
571        public static final StringClientParam ADDRESS_STATE = new StringClientParam(SP_ADDRESS_STATE);
572
573        /**
574         * Search parameter constant for <b>address-postalcode</b>
575         * <p>
576         * Description: <b>A postalCode specified in an address</b><br>
577         * Type: <b>string</b><br>
578         * Path: <b>Practitioner.address.postalCode</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="address-postalcode", path="Practitioner.address.postalCode", description="A postalCode specified in an address", type="string"  )
582        public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
586         * <p>
587         * Description: <b>A postalCode specified in an address</b><br>
588         * Type: <b>string</b><br>
589         * Path: <b>Practitioner.address.postalCode</b><br>
590         * </p>
591         */
592        public static final StringClientParam ADDRESS_POSTALCODE = new StringClientParam(SP_ADDRESS_POSTALCODE);
593
594        /**
595         * Search parameter constant for <b>address-country</b>
596         * <p>
597         * Description: <b>A country specified in an address</b><br>
598         * Type: <b>string</b><br>
599         * Path: <b>Practitioner.address.country</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="address-country", path="Practitioner.address.country", description="A country specified in an address", type="string"  )
603        public static final String SP_ADDRESS_COUNTRY = "address-country";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
607         * <p>
608         * Description: <b>A country specified in an address</b><br>
609         * Type: <b>string</b><br>
610         * Path: <b>Practitioner.address.country</b><br>
611         * </p>
612         */
613        public static final StringClientParam ADDRESS_COUNTRY = new StringClientParam(SP_ADDRESS_COUNTRY);
614
615        /**
616         * Search parameter constant for <b>address-use</b>
617         * <p>
618         * Description: <b>A use code specified in an address</b><br>
619         * Type: <b>token</b><br>
620         * Path: <b>Practitioner.address.use</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="address-use", path="Practitioner.address.use", description="A use code specified in an address", type="token"  )
624        public static final String SP_ADDRESS_USE = "address-use";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
628         * <p>
629         * Description: <b>A use code specified in an address</b><br>
630         * Type: <b>token</b><br>
631         * Path: <b>Practitioner.address.use</b><br>
632         * </p>
633         */
634        public static final TokenClientParam ADDRESS_USE = new TokenClientParam(SP_ADDRESS_USE);
635
636        /**
637         * Search parameter constant for <b>gender</b>
638         * <p>
639         * Description: <b>Gender of the practitioner</b><br>
640         * Type: <b>token</b><br>
641         * Path: <b>Practitioner.gender</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token"  )
645        public static final String SP_GENDER = "gender";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>gender</b>
649         * <p>
650         * Description: <b>Gender of the practitioner</b><br>
651         * Type: <b>token</b><br>
652         * Path: <b>Practitioner.gender</b><br>
653         * </p>
654         */
655        public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
656
657        /**
658         * Search parameter constant for <b>organization</b>
659         * <p>
660         * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
661         * Type: <b>reference</b><br>
662         * Path: <b>Practitioner.practitionerRole.managingOrganization</b><br>
663         * </p>
664         */
665        @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.managingOrganization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference"  )
666        public static final String SP_ORGANIZATION = "organization";
667
668        /**
669         * <b>Fluent Client</b> search parameter constant for <b>organization</b>
670         * <p>
671         * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
672         * Type: <b>reference</b><br>
673         * Path: <b>Practitioner.practitionerRole.managingOrganization</b><br>
674         * </p>
675         */
676        public static final ReferenceClientParam ORGANIZATION = new ReferenceClientParam(SP_ORGANIZATION);
677
678        /**
679         * Search parameter constant for <b>communication</b>
680         * <p>
681         * Description: <b>One of the languages that the practitioner can communicate with</b><br>
682         * Type: <b>token</b><br>
683         * Path: <b>Practitioner.communication</b><br>
684         * </p>
685         */
686        @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token"  )
687        public static final String SP_COMMUNICATION = "communication";
688
689        /**
690         * <b>Fluent Client</b> search parameter constant for <b>communication</b>
691         * <p>
692         * Description: <b>One of the languages that the practitioner can communicate with</b><br>
693         * Type: <b>token</b><br>
694         * Path: <b>Practitioner.communication</b><br>
695         * </p>
696         */
697        public static final TokenClientParam COMMUNICATION = new TokenClientParam(SP_COMMUNICATION);
698
699        /**
700         * Search parameter constant for <b>location</b>
701         * <p>
702         * Description: <b>One of the locations at which this practitioner provides care</b><br>
703         * Type: <b>reference</b><br>
704         * Path: <b>Practitioner.practitionerRole.location</b><br>
705         * </p>
706         */
707        @SearchParamDefinition(name="location", path="Practitioner.practitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference"  )
708        public static final String SP_LOCATION = "location";
709
710        /**
711         * <b>Fluent Client</b> search parameter constant for <b>location</b>
712         * <p>
713         * Description: <b>One of the locations at which this practitioner provides care</b><br>
714         * Type: <b>reference</b><br>
715         * Path: <b>Practitioner.practitionerRole.location</b><br>
716         * </p>
717         */
718        public static final ReferenceClientParam LOCATION = new ReferenceClientParam(SP_LOCATION);
719
720        /**
721         * Search parameter constant for <b>specialty</b>
722         * <p>
723         * Description: <b>The practitioner has this specialty at an organization</b><br>
724         * Type: <b>token</b><br>
725         * Path: <b>Practitioner.practitionerRole.specialty</b><br>
726         * </p>
727         */
728        @SearchParamDefinition(name="specialty", path="Practitioner.practitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token"  )
729        public static final String SP_SPECIALTY = "specialty";
730
731        /**
732         * <b>Fluent Client</b> search parameter constant for <b>specialty</b>
733         * <p>
734         * Description: <b>The practitioner has this specialty at an organization</b><br>
735         * Type: <b>token</b><br>
736         * Path: <b>Practitioner.practitionerRole.specialty</b><br>
737         * </p>
738         */
739        public static final TokenClientParam SPECIALTY = new TokenClientParam(SP_SPECIALTY);
740
741        /**
742         * Search parameter constant for <b>role</b>
743         * <p>
744         * Description: <b>The practitioner can perform this role at for the organization</b><br>
745         * Type: <b>token</b><br>
746         * Path: <b>Practitioner.practitionerRole.role</b><br>
747         * </p>
748         */
749        @SearchParamDefinition(name="role", path="Practitioner.practitionerRole.role", description="The practitioner can perform this role at for the organization", type="token"  )
750        public static final String SP_ROLE = "role";
751
752        /**
753         * <b>Fluent Client</b> search parameter constant for <b>role</b>
754         * <p>
755         * Description: <b>The practitioner can perform this role at for the organization</b><br>
756         * Type: <b>token</b><br>
757         * Path: <b>Practitioner.practitionerRole.role</b><br>
758         * </p>
759         */
760        public static final TokenClientParam ROLE = new TokenClientParam(SP_ROLE);
761
762
763        /**
764         * Constant for fluent queries to be used to add include statements. Specifies
765         * the path value of "<b>Practitioner:location</b>".
766         */
767        public static final Include INCLUDE_LOCATION = new Include("Practitioner:location");
768
769        /**
770         * Constant for fluent queries to be used to add include statements. Specifies
771         * the path value of "<b>Practitioner:organization</b>".
772         */
773        public static final Include INCLUDE_ORGANIZATION = new Include("Practitioner:organization");
774
775
776        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
777        @Description(
778                shortDefinition="id",
779                formalDefinition="An identifier that applies to this person in this role"
780        )
781        private java.util.List<IdentifierDt> myIdentifier;
782        
783        @Child(name="active", type=BooleanDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
784        @Description(
785                shortDefinition="status",
786                formalDefinition="Whether this practitioner's record is in active use"
787        )
788        private BooleanDt myActive;
789        
790        @Child(name="name", type=HumanNameDt.class, order=2, min=0, max=1, summary=true, modifier=false)        
791        @Description(
792                shortDefinition="",
793                formalDefinition="A name associated with the person"
794        )
795        private HumanNameDt myName;
796        
797        @Child(name="telecom", type=ContactPointDt.class, order=3, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
798        @Description(
799                shortDefinition="",
800                formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address."
801        )
802        private java.util.List<ContactPointDt> myTelecom;
803        
804        @Child(name="address", type=AddressDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
805        @Description(
806                shortDefinition="",
807                formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered"
808        )
809        private java.util.List<AddressDt> myAddress;
810        
811        @Child(name="gender", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=false)   
812        @Description(
813                shortDefinition="",
814                formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
815        )
816        private BoundCodeDt<AdministrativeGenderEnum> myGender;
817        
818        @Child(name="birthDate", type=DateDt.class, order=6, min=0, max=1, summary=true, modifier=false)        
819        @Description(
820                shortDefinition="",
821                formalDefinition="The date of birth for the practitioner"
822        )
823        private DateDt myBirthDate;
824        
825        @Child(name="photo", type=AttachmentDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
826        @Description(
827                shortDefinition="",
828                formalDefinition="Image of the person"
829        )
830        private java.util.List<AttachmentDt> myPhoto;
831        
832        @Child(name="practitionerRole", order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
833        @Description(
834                shortDefinition="",
835                formalDefinition="The list of roles/organizations that the practitioner is associated with"
836        )
837        private java.util.List<PractitionerRole> myPractitionerRole;
838        
839        @Child(name="qualification", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
840        @Description(
841                shortDefinition="",
842                formalDefinition=""
843        )
844        private java.util.List<Qualification> myQualification;
845        
846        @Child(name="communication", type=CodeableConceptDt.class, order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
847        @Description(
848                shortDefinition="",
849                formalDefinition="A language the practitioner is able to use in patient communication"
850        )
851        private java.util.List<CodeableConceptDt> myCommunication;
852        
853
854        @Override
855        public boolean isEmpty() {
856                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myActive,  myName,  myTelecom,  myAddress,  myGender,  myBirthDate,  myPhoto,  myPractitionerRole,  myQualification,  myCommunication);
857        }
858        
859        @Override
860        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
861                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myActive, myName, myTelecom, myAddress, myGender, myBirthDate, myPhoto, myPractitionerRole, myQualification, myCommunication);
862        }
863
864        /**
865         * Gets the value(s) for <b>identifier</b> (id).
866         * creating it if it does
867         * not exist. Will not return <code>null</code>.
868         *
869     * <p>
870     * <b>Definition:</b>
871     * An identifier that applies to this person in this role
872     * </p> 
873         */
874        public java.util.List<IdentifierDt> getIdentifier() {  
875                if (myIdentifier == null) {
876                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
877                }
878                return myIdentifier;
879        }
880
881        /**
882         * Sets the value(s) for <b>identifier</b> (id)
883         *
884     * <p>
885     * <b>Definition:</b>
886     * An identifier that applies to this person in this role
887     * </p> 
888         */
889        public Practitioner setIdentifier(java.util.List<IdentifierDt> theValue) {
890                myIdentifier = theValue;
891                return this;
892        }
893        
894        
895
896        /**
897         * Adds and returns a new value for <b>identifier</b> (id)
898         *
899     * <p>
900     * <b>Definition:</b>
901     * An identifier that applies to this person in this role
902     * </p> 
903         */
904        public IdentifierDt addIdentifier() {
905                IdentifierDt newType = new IdentifierDt();
906                getIdentifier().add(newType);
907                return newType; 
908        }
909
910        /**
911         * Adds a given new value for <b>identifier</b> (id)
912         *
913         * <p>
914         * <b>Definition:</b>
915         * An identifier that applies to this person in this role
916         * </p>
917         * @param theValue The identifier to add (must not be <code>null</code>)
918         */
919        public Practitioner addIdentifier(IdentifierDt theValue) {
920                if (theValue == null) {
921                        throw new NullPointerException("theValue must not be null");
922                }
923                getIdentifier().add(theValue);
924                return this;
925        }
926
927        /**
928         * Gets the first repetition for <b>identifier</b> (id),
929         * creating it if it does not already exist.
930         *
931     * <p>
932     * <b>Definition:</b>
933     * An identifier that applies to this person in this role
934     * </p> 
935         */
936        public IdentifierDt getIdentifierFirstRep() {
937                if (getIdentifier().isEmpty()) {
938                        return addIdentifier();
939                }
940                return getIdentifier().get(0); 
941        }
942  
943        /**
944         * Gets the value(s) for <b>active</b> (status).
945         * creating it if it does
946         * not exist. Will not return <code>null</code>.
947         *
948     * <p>
949     * <b>Definition:</b>
950     * Whether this practitioner's record is in active use
951     * </p> 
952         */
953        public BooleanDt getActiveElement() {  
954                if (myActive == null) {
955                        myActive = new BooleanDt();
956                }
957                return myActive;
958        }
959
960        
961        /**
962         * Gets the value(s) for <b>active</b> (status).
963         * creating it if it does
964         * not exist. Will not return <code>null</code>.
965         *
966     * <p>
967     * <b>Definition:</b>
968     * Whether this practitioner's record is in active use
969     * </p> 
970         */
971        public Boolean getActive() {  
972                return getActiveElement().getValue();
973        }
974
975        /**
976         * Sets the value(s) for <b>active</b> (status)
977         *
978     * <p>
979     * <b>Definition:</b>
980     * Whether this practitioner's record is in active use
981     * </p> 
982         */
983        public Practitioner setActive(BooleanDt theValue) {
984                myActive = theValue;
985                return this;
986        }
987        
988        
989
990        /**
991         * Sets the value for <b>active</b> (status)
992         *
993     * <p>
994     * <b>Definition:</b>
995     * Whether this practitioner's record is in active use
996     * </p> 
997         */
998        public Practitioner setActive( boolean theBoolean) {
999                myActive = new BooleanDt(theBoolean); 
1000                return this; 
1001        }
1002
1003 
1004        /**
1005         * Gets the value(s) for <b>name</b> ().
1006         * creating it if it does
1007         * not exist. Will not return <code>null</code>.
1008         *
1009     * <p>
1010     * <b>Definition:</b>
1011     * A name associated with the person
1012     * </p> 
1013         */
1014        public HumanNameDt getName() {  
1015                if (myName == null) {
1016                        myName = new HumanNameDt();
1017                }
1018                return myName;
1019        }
1020
1021        /**
1022         * Sets the value(s) for <b>name</b> ()
1023         *
1024     * <p>
1025     * <b>Definition:</b>
1026     * A name associated with the person
1027     * </p> 
1028         */
1029        public Practitioner setName(HumanNameDt theValue) {
1030                myName = theValue;
1031                return this;
1032        }
1033        
1034        
1035
1036  
1037        /**
1038         * Gets the value(s) for <b>telecom</b> ().
1039         * creating it if it does
1040         * not exist. Will not return <code>null</code>.
1041         *
1042     * <p>
1043     * <b>Definition:</b>
1044     * A contact detail for the practitioner, e.g. a telephone number or an email address.
1045     * </p> 
1046         */
1047        public java.util.List<ContactPointDt> getTelecom() {  
1048                if (myTelecom == null) {
1049                        myTelecom = new java.util.ArrayList<ContactPointDt>();
1050                }
1051                return myTelecom;
1052        }
1053
1054        /**
1055         * Sets the value(s) for <b>telecom</b> ()
1056         *
1057     * <p>
1058     * <b>Definition:</b>
1059     * A contact detail for the practitioner, e.g. a telephone number or an email address.
1060     * </p> 
1061         */
1062        public Practitioner setTelecom(java.util.List<ContactPointDt> theValue) {
1063                myTelecom = theValue;
1064                return this;
1065        }
1066        
1067        
1068
1069        /**
1070         * Adds and returns a new value for <b>telecom</b> ()
1071         *
1072     * <p>
1073     * <b>Definition:</b>
1074     * A contact detail for the practitioner, e.g. a telephone number or an email address.
1075     * </p> 
1076         */
1077        public ContactPointDt addTelecom() {
1078                ContactPointDt newType = new ContactPointDt();
1079                getTelecom().add(newType);
1080                return newType; 
1081        }
1082
1083        /**
1084         * Adds a given new value for <b>telecom</b> ()
1085         *
1086         * <p>
1087         * <b>Definition:</b>
1088         * A contact detail for the practitioner, e.g. a telephone number or an email address.
1089         * </p>
1090         * @param theValue The telecom to add (must not be <code>null</code>)
1091         */
1092        public Practitioner addTelecom(ContactPointDt theValue) {
1093                if (theValue == null) {
1094                        throw new NullPointerException("theValue must not be null");
1095                }
1096                getTelecom().add(theValue);
1097                return this;
1098        }
1099
1100        /**
1101         * Gets the first repetition for <b>telecom</b> (),
1102         * creating it if it does not already exist.
1103         *
1104     * <p>
1105     * <b>Definition:</b>
1106     * A contact detail for the practitioner, e.g. a telephone number or an email address.
1107     * </p> 
1108         */
1109        public ContactPointDt getTelecomFirstRep() {
1110                if (getTelecom().isEmpty()) {
1111                        return addTelecom();
1112                }
1113                return getTelecom().get(0); 
1114        }
1115  
1116        /**
1117         * Gets the value(s) for <b>address</b> ().
1118         * creating it if it does
1119         * not exist. Will not return <code>null</code>.
1120         *
1121     * <p>
1122     * <b>Definition:</b>
1123     * The postal address where the practitioner can be found or visited or to which mail can be delivered
1124     * </p> 
1125         */
1126        public java.util.List<AddressDt> getAddress() {  
1127                if (myAddress == null) {
1128                        myAddress = new java.util.ArrayList<AddressDt>();
1129                }
1130                return myAddress;
1131        }
1132
1133        /**
1134         * Sets the value(s) for <b>address</b> ()
1135         *
1136     * <p>
1137     * <b>Definition:</b>
1138     * The postal address where the practitioner can be found or visited or to which mail can be delivered
1139     * </p> 
1140         */
1141        public Practitioner setAddress(java.util.List<AddressDt> theValue) {
1142                myAddress = theValue;
1143                return this;
1144        }
1145        
1146        
1147
1148        /**
1149         * Adds and returns a new value for <b>address</b> ()
1150         *
1151     * <p>
1152     * <b>Definition:</b>
1153     * The postal address where the practitioner can be found or visited or to which mail can be delivered
1154     * </p> 
1155         */
1156        public AddressDt addAddress() {
1157                AddressDt newType = new AddressDt();
1158                getAddress().add(newType);
1159                return newType; 
1160        }
1161
1162        /**
1163         * Adds a given new value for <b>address</b> ()
1164         *
1165         * <p>
1166         * <b>Definition:</b>
1167         * The postal address where the practitioner can be found or visited or to which mail can be delivered
1168         * </p>
1169         * @param theValue The address to add (must not be <code>null</code>)
1170         */
1171        public Practitioner addAddress(AddressDt theValue) {
1172                if (theValue == null) {
1173                        throw new NullPointerException("theValue must not be null");
1174                }
1175                getAddress().add(theValue);
1176                return this;
1177        }
1178
1179        /**
1180         * Gets the first repetition for <b>address</b> (),
1181         * creating it if it does not already exist.
1182         *
1183     * <p>
1184     * <b>Definition:</b>
1185     * The postal address where the practitioner can be found or visited or to which mail can be delivered
1186     * </p> 
1187         */
1188        public AddressDt getAddressFirstRep() {
1189                if (getAddress().isEmpty()) {
1190                        return addAddress();
1191                }
1192                return getAddress().get(0); 
1193        }
1194  
1195        /**
1196         * Gets the value(s) for <b>gender</b> ().
1197         * creating it if it does
1198         * not exist. Will not return <code>null</code>.
1199         *
1200     * <p>
1201     * <b>Definition:</b>
1202     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1203     * </p> 
1204         */
1205        public BoundCodeDt<AdministrativeGenderEnum> getGenderElement() {  
1206                if (myGender == null) {
1207                        myGender = new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER);
1208                }
1209                return myGender;
1210        }
1211
1212        
1213        /**
1214         * Gets the value(s) for <b>gender</b> ().
1215         * creating it if it does
1216         * not exist. Will not return <code>null</code>.
1217         *
1218     * <p>
1219     * <b>Definition:</b>
1220     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1221     * </p> 
1222         */
1223        public String getGender() {  
1224                return getGenderElement().getValue();
1225        }
1226
1227        /**
1228         * Sets the value(s) for <b>gender</b> ()
1229         *
1230     * <p>
1231     * <b>Definition:</b>
1232     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1233     * </p> 
1234         */
1235        public Practitioner setGender(BoundCodeDt<AdministrativeGenderEnum> theValue) {
1236                myGender = theValue;
1237                return this;
1238        }
1239        
1240        
1241
1242        /**
1243         * Sets the value(s) for <b>gender</b> ()
1244         *
1245     * <p>
1246     * <b>Definition:</b>
1247     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1248     * </p> 
1249         */
1250        public Practitioner setGender(AdministrativeGenderEnum theValue) {
1251                setGender(new BoundCodeDt<AdministrativeGenderEnum>(AdministrativeGenderEnum.VALUESET_BINDER, theValue));
1252                
1253/*
1254                getGenderElement().setValueAsEnum(theValue);
1255*/
1256                return this;
1257        }
1258
1259  
1260        /**
1261         * Gets the value(s) for <b>birthDate</b> ().
1262         * creating it if it does
1263         * not exist. Will not return <code>null</code>.
1264         *
1265     * <p>
1266     * <b>Definition:</b>
1267     * The date of birth for the practitioner
1268     * </p> 
1269         */
1270        public DateDt getBirthDateElement() {  
1271                if (myBirthDate == null) {
1272                        myBirthDate = new DateDt();
1273                }
1274                return myBirthDate;
1275        }
1276
1277        
1278        /**
1279         * Gets the value(s) for <b>birthDate</b> ().
1280         * creating it if it does
1281         * not exist. Will not return <code>null</code>.
1282         *
1283     * <p>
1284     * <b>Definition:</b>
1285     * The date of birth for the practitioner
1286     * </p> 
1287         */
1288        public Date getBirthDate() {  
1289                return getBirthDateElement().getValue();
1290        }
1291
1292        /**
1293         * Sets the value(s) for <b>birthDate</b> ()
1294         *
1295     * <p>
1296     * <b>Definition:</b>
1297     * The date of birth for the practitioner
1298     * </p> 
1299         */
1300        public Practitioner setBirthDate(DateDt theValue) {
1301                myBirthDate = theValue;
1302                return this;
1303        }
1304        
1305        
1306
1307        /**
1308         * Sets the value for <b>birthDate</b> ()
1309         *
1310     * <p>
1311     * <b>Definition:</b>
1312     * The date of birth for the practitioner
1313     * </p> 
1314         */
1315        public Practitioner setBirthDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1316                myBirthDate = new DateDt(theDate, thePrecision); 
1317                return this; 
1318        }
1319
1320        /**
1321         * Sets the value for <b>birthDate</b> ()
1322         *
1323     * <p>
1324     * <b>Definition:</b>
1325     * The date of birth for the practitioner
1326     * </p> 
1327         */
1328        public Practitioner setBirthDateWithDayPrecision( Date theDate) {
1329                myBirthDate = new DateDt(theDate); 
1330                return this; 
1331        }
1332
1333 
1334        /**
1335         * Gets the value(s) for <b>photo</b> ().
1336         * creating it if it does
1337         * not exist. Will not return <code>null</code>.
1338         *
1339     * <p>
1340     * <b>Definition:</b>
1341     * Image of the person
1342     * </p> 
1343         */
1344        public java.util.List<AttachmentDt> getPhoto() {  
1345                if (myPhoto == null) {
1346                        myPhoto = new java.util.ArrayList<AttachmentDt>();
1347                }
1348                return myPhoto;
1349        }
1350
1351        /**
1352         * Sets the value(s) for <b>photo</b> ()
1353         *
1354     * <p>
1355     * <b>Definition:</b>
1356     * Image of the person
1357     * </p> 
1358         */
1359        public Practitioner setPhoto(java.util.List<AttachmentDt> theValue) {
1360                myPhoto = theValue;
1361                return this;
1362        }
1363        
1364        
1365
1366        /**
1367         * Adds and returns a new value for <b>photo</b> ()
1368         *
1369     * <p>
1370     * <b>Definition:</b>
1371     * Image of the person
1372     * </p> 
1373         */
1374        public AttachmentDt addPhoto() {
1375                AttachmentDt newType = new AttachmentDt();
1376                getPhoto().add(newType);
1377                return newType; 
1378        }
1379
1380        /**
1381         * Adds a given new value for <b>photo</b> ()
1382         *
1383         * <p>
1384         * <b>Definition:</b>
1385         * Image of the person
1386         * </p>
1387         * @param theValue The photo to add (must not be <code>null</code>)
1388         */
1389        public Practitioner addPhoto(AttachmentDt theValue) {
1390                if (theValue == null) {
1391                        throw new NullPointerException("theValue must not be null");
1392                }
1393                getPhoto().add(theValue);
1394                return this;
1395        }
1396
1397        /**
1398         * Gets the first repetition for <b>photo</b> (),
1399         * creating it if it does not already exist.
1400         *
1401     * <p>
1402     * <b>Definition:</b>
1403     * Image of the person
1404     * </p> 
1405         */
1406        public AttachmentDt getPhotoFirstRep() {
1407                if (getPhoto().isEmpty()) {
1408                        return addPhoto();
1409                }
1410                return getPhoto().get(0); 
1411        }
1412  
1413        /**
1414         * Gets the value(s) for <b>practitionerRole</b> ().
1415         * creating it if it does
1416         * not exist. Will not return <code>null</code>.
1417         *
1418     * <p>
1419     * <b>Definition:</b>
1420     * The list of roles/organizations that the practitioner is associated with
1421     * </p> 
1422         */
1423        public java.util.List<PractitionerRole> getPractitionerRole() {  
1424                if (myPractitionerRole == null) {
1425                        myPractitionerRole = new java.util.ArrayList<PractitionerRole>();
1426                }
1427                return myPractitionerRole;
1428        }
1429
1430        /**
1431         * Sets the value(s) for <b>practitionerRole</b> ()
1432         *
1433     * <p>
1434     * <b>Definition:</b>
1435     * The list of roles/organizations that the practitioner is associated with
1436     * </p> 
1437         */
1438        public Practitioner setPractitionerRole(java.util.List<PractitionerRole> theValue) {
1439                myPractitionerRole = theValue;
1440                return this;
1441        }
1442        
1443        
1444
1445        /**
1446         * Adds and returns a new value for <b>practitionerRole</b> ()
1447         *
1448     * <p>
1449     * <b>Definition:</b>
1450     * The list of roles/organizations that the practitioner is associated with
1451     * </p> 
1452         */
1453        public PractitionerRole addPractitionerRole() {
1454                PractitionerRole newType = new PractitionerRole();
1455                getPractitionerRole().add(newType);
1456                return newType; 
1457        }
1458
1459        /**
1460         * Adds a given new value for <b>practitionerRole</b> ()
1461         *
1462         * <p>
1463         * <b>Definition:</b>
1464         * The list of roles/organizations that the practitioner is associated with
1465         * </p>
1466         * @param theValue The practitionerRole to add (must not be <code>null</code>)
1467         */
1468        public Practitioner addPractitionerRole(PractitionerRole theValue) {
1469                if (theValue == null) {
1470                        throw new NullPointerException("theValue must not be null");
1471                }
1472                getPractitionerRole().add(theValue);
1473                return this;
1474        }
1475
1476        /**
1477         * Gets the first repetition for <b>practitionerRole</b> (),
1478         * creating it if it does not already exist.
1479         *
1480     * <p>
1481     * <b>Definition:</b>
1482     * The list of roles/organizations that the practitioner is associated with
1483     * </p> 
1484         */
1485        public PractitionerRole getPractitionerRoleFirstRep() {
1486                if (getPractitionerRole().isEmpty()) {
1487                        return addPractitionerRole();
1488                }
1489                return getPractitionerRole().get(0); 
1490        }
1491  
1492        /**
1493         * Gets the value(s) for <b>qualification</b> ().
1494         * creating it if it does
1495         * not exist. Will not return <code>null</code>.
1496         *
1497     * <p>
1498     * <b>Definition:</b>
1499     * 
1500     * </p> 
1501         */
1502        public java.util.List<Qualification> getQualification() {  
1503                if (myQualification == null) {
1504                        myQualification = new java.util.ArrayList<Qualification>();
1505                }
1506                return myQualification;
1507        }
1508
1509        /**
1510         * Sets the value(s) for <b>qualification</b> ()
1511         *
1512     * <p>
1513     * <b>Definition:</b>
1514     * 
1515     * </p> 
1516         */
1517        public Practitioner setQualification(java.util.List<Qualification> theValue) {
1518                myQualification = theValue;
1519                return this;
1520        }
1521        
1522        
1523
1524        /**
1525         * Adds and returns a new value for <b>qualification</b> ()
1526         *
1527     * <p>
1528     * <b>Definition:</b>
1529     * 
1530     * </p> 
1531         */
1532        public Qualification addQualification() {
1533                Qualification newType = new Qualification();
1534                getQualification().add(newType);
1535                return newType; 
1536        }
1537
1538        /**
1539         * Adds a given new value for <b>qualification</b> ()
1540         *
1541         * <p>
1542         * <b>Definition:</b>
1543         * 
1544         * </p>
1545         * @param theValue The qualification to add (must not be <code>null</code>)
1546         */
1547        public Practitioner addQualification(Qualification theValue) {
1548                if (theValue == null) {
1549                        throw new NullPointerException("theValue must not be null");
1550                }
1551                getQualification().add(theValue);
1552                return this;
1553        }
1554
1555        /**
1556         * Gets the first repetition for <b>qualification</b> (),
1557         * creating it if it does not already exist.
1558         *
1559     * <p>
1560     * <b>Definition:</b>
1561     * 
1562     * </p> 
1563         */
1564        public Qualification getQualificationFirstRep() {
1565                if (getQualification().isEmpty()) {
1566                        return addQualification();
1567                }
1568                return getQualification().get(0); 
1569        }
1570  
1571        /**
1572         * Gets the value(s) for <b>communication</b> ().
1573         * creating it if it does
1574         * not exist. Will not return <code>null</code>.
1575         *
1576     * <p>
1577     * <b>Definition:</b>
1578     * A language the practitioner is able to use in patient communication
1579     * </p> 
1580         */
1581        public java.util.List<CodeableConceptDt> getCommunication() {  
1582                if (myCommunication == null) {
1583                        myCommunication = new java.util.ArrayList<CodeableConceptDt>();
1584                }
1585                return myCommunication;
1586        }
1587
1588        /**
1589         * Sets the value(s) for <b>communication</b> ()
1590         *
1591     * <p>
1592     * <b>Definition:</b>
1593     * A language the practitioner is able to use in patient communication
1594     * </p> 
1595         */
1596        public Practitioner setCommunication(java.util.List<CodeableConceptDt> theValue) {
1597                myCommunication = theValue;
1598                return this;
1599        }
1600        
1601        
1602
1603        /**
1604         * Adds and returns a new value for <b>communication</b> ()
1605         *
1606     * <p>
1607     * <b>Definition:</b>
1608     * A language the practitioner is able to use in patient communication
1609     * </p> 
1610         */
1611        public CodeableConceptDt addCommunication() {
1612                CodeableConceptDt newType = new CodeableConceptDt();
1613                getCommunication().add(newType);
1614                return newType; 
1615        }
1616
1617        /**
1618         * Adds a given new value for <b>communication</b> ()
1619         *
1620         * <p>
1621         * <b>Definition:</b>
1622         * A language the practitioner is able to use in patient communication
1623         * </p>
1624         * @param theValue The communication to add (must not be <code>null</code>)
1625         */
1626        public Practitioner addCommunication(CodeableConceptDt theValue) {
1627                if (theValue == null) {
1628                        throw new NullPointerException("theValue must not be null");
1629                }
1630                getCommunication().add(theValue);
1631                return this;
1632        }
1633
1634        /**
1635         * Gets the first repetition for <b>communication</b> (),
1636         * creating it if it does not already exist.
1637         *
1638     * <p>
1639     * <b>Definition:</b>
1640     * A language the practitioner is able to use in patient communication
1641     * </p> 
1642         */
1643        public CodeableConceptDt getCommunicationFirstRep() {
1644                if (getCommunication().isEmpty()) {
1645                        return addCommunication();
1646                }
1647                return getCommunication().get(0); 
1648        }
1649  
1650        /**
1651         * Block class for child element: <b>Practitioner.practitionerRole</b> ()
1652         *
1653     * <p>
1654     * <b>Definition:</b>
1655     * The list of roles/organizations that the practitioner is associated with
1656     * </p> 
1657         */
1658        @Block()        
1659        public static class PractitionerRole 
1660            extends  BaseIdentifiableElement        implements IResourceBlock {
1661        
1662        @Child(name="managingOrganization", order=0, min=0, max=1, summary=false, modifier=false, type={
1663                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
1664        @Description(
1665                shortDefinition="",
1666                formalDefinition="The organization where the Practitioner performs the roles associated"
1667        )
1668        private ResourceReferenceDt myManagingOrganization;
1669        
1670        @Child(name="role", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=true, modifier=false)  
1671        @Description(
1672                shortDefinition="",
1673                formalDefinition="Roles which this practitioner is authorized to perform for the organization"
1674        )
1675        private BoundCodeableConceptDt<PractitionerRoleEnum> myRole;
1676        
1677        @Child(name="specialty", type=CodeableConceptDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
1678        @Description(
1679                shortDefinition="",
1680                formalDefinition="Specific specialty of the practitioner"
1681        )
1682        private java.util.List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> mySpecialty;
1683        
1684        @Child(name="period", type=PeriodDt.class, order=3, min=0, max=1, summary=true, modifier=false) 
1685        @Description(
1686                shortDefinition="when.done",
1687                formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization"
1688        )
1689        private PeriodDt myPeriod;
1690        
1691        @Child(name="location", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
1692                ca.uhn.fhir.model.dstu2.resource.Location.class })
1693        @Description(
1694                shortDefinition="where",
1695                formalDefinition="The location(s) at which this practitioner provides care"
1696        )
1697        private java.util.List<ResourceReferenceDt> myLocation;
1698        
1699        @Child(name="healthcareService", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
1700                ca.uhn.fhir.model.dstu2.resource.HealthcareService.class        })
1701        @Description(
1702                shortDefinition="",
1703                formalDefinition=""
1704        )
1705        private java.util.List<ResourceReferenceDt> myHealthcareService;
1706        
1707
1708        @Override
1709        public boolean isEmpty() {
1710                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myManagingOrganization,  myRole,  mySpecialty,  myPeriod,  myLocation,  myHealthcareService);
1711        }
1712        
1713        @Override
1714        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1715                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myManagingOrganization, myRole, mySpecialty, myPeriod, myLocation, myHealthcareService);
1716        }
1717
1718        /**
1719         * Gets the value(s) for <b>managingOrganization</b> ().
1720         * creating it if it does
1721         * not exist. Will not return <code>null</code>.
1722         *
1723     * <p>
1724     * <b>Definition:</b>
1725     * The organization where the Practitioner performs the roles associated
1726     * </p> 
1727         */
1728        public ResourceReferenceDt getManagingOrganization() {  
1729                if (myManagingOrganization == null) {
1730                        myManagingOrganization = new ResourceReferenceDt();
1731                }
1732                return myManagingOrganization;
1733        }
1734
1735        /**
1736         * Sets the value(s) for <b>managingOrganization</b> ()
1737         *
1738     * <p>
1739     * <b>Definition:</b>
1740     * The organization where the Practitioner performs the roles associated
1741     * </p> 
1742         */
1743        public PractitionerRole setManagingOrganization(ResourceReferenceDt theValue) {
1744                myManagingOrganization = theValue;
1745                return this;
1746        }
1747        
1748        
1749
1750  
1751        /**
1752         * Gets the value(s) for <b>role</b> ().
1753         * creating it if it does
1754         * not exist. Will not return <code>null</code>.
1755         *
1756     * <p>
1757     * <b>Definition:</b>
1758     * Roles which this practitioner is authorized to perform for the organization
1759     * </p> 
1760         */
1761        public BoundCodeableConceptDt<PractitionerRoleEnum> getRole() {  
1762                if (myRole == null) {
1763                        myRole = new BoundCodeableConceptDt<PractitionerRoleEnum>(PractitionerRoleEnum.VALUESET_BINDER);
1764                }
1765                return myRole;
1766        }
1767
1768        /**
1769         * Sets the value(s) for <b>role</b> ()
1770         *
1771     * <p>
1772     * <b>Definition:</b>
1773     * Roles which this practitioner is authorized to perform for the organization
1774     * </p> 
1775         */
1776        public PractitionerRole setRole(BoundCodeableConceptDt<PractitionerRoleEnum> theValue) {
1777                myRole = theValue;
1778                return this;
1779        }
1780        
1781        
1782
1783        /**
1784         * Sets the value(s) for <b>role</b> ()
1785         *
1786     * <p>
1787     * <b>Definition:</b>
1788     * Roles which this practitioner is authorized to perform for the organization
1789     * </p> 
1790         */
1791        public PractitionerRole setRole(PractitionerRoleEnum theValue) {
1792                setRole(new BoundCodeableConceptDt<PractitionerRoleEnum>(PractitionerRoleEnum.VALUESET_BINDER, theValue));
1793                
1794/*
1795                getRole().setValueAsEnum(theValue);
1796*/
1797                return this;
1798        }
1799
1800  
1801        /**
1802         * Gets the value(s) for <b>specialty</b> ().
1803         * creating it if it does
1804         * not exist. Will not return <code>null</code>.
1805         *
1806     * <p>
1807     * <b>Definition:</b>
1808     * Specific specialty of the practitioner
1809     * </p> 
1810         */
1811        public java.util.List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> getSpecialty() {  
1812                if (mySpecialty == null) {
1813                        mySpecialty = new java.util.ArrayList<BoundCodeableConceptDt<PractitionerSpecialtyEnum>>();
1814                }
1815                return mySpecialty;
1816        }
1817
1818        /**
1819         * Sets the value(s) for <b>specialty</b> ()
1820         *
1821     * <p>
1822     * <b>Definition:</b>
1823     * Specific specialty of the practitioner
1824     * </p> 
1825         */
1826        public PractitionerRole setSpecialty(java.util.List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> theValue) {
1827                mySpecialty = theValue;
1828                return this;
1829        }
1830        
1831        
1832
1833        /**
1834         * Add a value for <b>specialty</b> () using an enumerated type. This
1835         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1836         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1837         * you may also use the {@link #addSpecialty()} method.
1838         *
1839     * <p>
1840     * <b>Definition:</b>
1841     * Specific specialty of the practitioner
1842     * </p> 
1843         */
1844        public BoundCodeableConceptDt<PractitionerSpecialtyEnum> addSpecialty(PractitionerSpecialtyEnum theValue) {
1845                BoundCodeableConceptDt<PractitionerSpecialtyEnum> retVal = new BoundCodeableConceptDt<PractitionerSpecialtyEnum>(PractitionerSpecialtyEnum.VALUESET_BINDER, theValue);
1846                getSpecialty().add(retVal);
1847                return retVal;
1848        }
1849
1850        /**
1851         * Gets the first repetition for <b>specialty</b> (),
1852         * creating it if it does not already exist.
1853         *
1854     * <p>
1855     * <b>Definition:</b>
1856     * Specific specialty of the practitioner
1857     * </p> 
1858         */
1859        public BoundCodeableConceptDt<PractitionerSpecialtyEnum> getSpecialtyFirstRep() {
1860                if (getSpecialty().size() == 0) {
1861                        addSpecialty();
1862                }
1863                return getSpecialty().get(0);
1864        }
1865
1866        /**
1867         * Add a value for <b>specialty</b> ()
1868         *
1869     * <p>
1870     * <b>Definition:</b>
1871     * Specific specialty of the practitioner
1872     * </p> 
1873         */
1874        public BoundCodeableConceptDt<PractitionerSpecialtyEnum> addSpecialty() {
1875                BoundCodeableConceptDt<PractitionerSpecialtyEnum> retVal = new BoundCodeableConceptDt<PractitionerSpecialtyEnum>(PractitionerSpecialtyEnum.VALUESET_BINDER);
1876                getSpecialty().add(retVal);
1877                return retVal;
1878        }
1879
1880        /**
1881         * Sets the value(s), and clears any existing value(s) for <b>specialty</b> ()
1882         *
1883     * <p>
1884     * <b>Definition:</b>
1885     * Specific specialty of the practitioner
1886     * </p> 
1887         */
1888        public PractitionerRole setSpecialty(PractitionerSpecialtyEnum theValue) {
1889                getSpecialty().clear();
1890                addSpecialty(theValue);
1891                return this;
1892        }
1893
1894  
1895        /**
1896         * Gets the value(s) for <b>period</b> (when.done).
1897         * creating it if it does
1898         * not exist. Will not return <code>null</code>.
1899         *
1900     * <p>
1901     * <b>Definition:</b>
1902     * The period during which the person is authorized to act as a practitioner in these role(s) for the organization
1903     * </p> 
1904         */
1905        public PeriodDt getPeriod() {  
1906                if (myPeriod == null) {
1907                        myPeriod = new PeriodDt();
1908                }
1909                return myPeriod;
1910        }
1911
1912        /**
1913         * Sets the value(s) for <b>period</b> (when.done)
1914         *
1915     * <p>
1916     * <b>Definition:</b>
1917     * The period during which the person is authorized to act as a practitioner in these role(s) for the organization
1918     * </p> 
1919         */
1920        public PractitionerRole setPeriod(PeriodDt theValue) {
1921                myPeriod = theValue;
1922                return this;
1923        }
1924        
1925        
1926
1927  
1928        /**
1929         * Gets the value(s) for <b>location</b> (where).
1930         * creating it if it does
1931         * not exist. Will not return <code>null</code>.
1932         *
1933     * <p>
1934     * <b>Definition:</b>
1935     * The location(s) at which this practitioner provides care
1936     * </p> 
1937         */
1938        public java.util.List<ResourceReferenceDt> getLocation() {  
1939                if (myLocation == null) {
1940                        myLocation = new java.util.ArrayList<ResourceReferenceDt>();
1941                }
1942                return myLocation;
1943        }
1944
1945        /**
1946         * Sets the value(s) for <b>location</b> (where)
1947         *
1948     * <p>
1949     * <b>Definition:</b>
1950     * The location(s) at which this practitioner provides care
1951     * </p> 
1952         */
1953        public PractitionerRole setLocation(java.util.List<ResourceReferenceDt> theValue) {
1954                myLocation = theValue;
1955                return this;
1956        }
1957        
1958        
1959
1960        /**
1961         * Adds and returns a new value for <b>location</b> (where)
1962         *
1963     * <p>
1964     * <b>Definition:</b>
1965     * The location(s) at which this practitioner provides care
1966     * </p> 
1967         */
1968        public ResourceReferenceDt addLocation() {
1969                ResourceReferenceDt newType = new ResourceReferenceDt();
1970                getLocation().add(newType);
1971                return newType; 
1972        }
1973  
1974        /**
1975         * Gets the value(s) for <b>healthcareService</b> ().
1976         * creating it if it does
1977         * not exist. Will not return <code>null</code>.
1978         *
1979     * <p>
1980     * <b>Definition:</b>
1981     * 
1982     * </p> 
1983         */
1984        public java.util.List<ResourceReferenceDt> getHealthcareService() {  
1985                if (myHealthcareService == null) {
1986                        myHealthcareService = new java.util.ArrayList<ResourceReferenceDt>();
1987                }
1988                return myHealthcareService;
1989        }
1990
1991        /**
1992         * Sets the value(s) for <b>healthcareService</b> ()
1993         *
1994     * <p>
1995     * <b>Definition:</b>
1996     * 
1997     * </p> 
1998         */
1999        public PractitionerRole setHealthcareService(java.util.List<ResourceReferenceDt> theValue) {
2000                myHealthcareService = theValue;
2001                return this;
2002        }
2003        
2004        
2005
2006        /**
2007         * Adds and returns a new value for <b>healthcareService</b> ()
2008         *
2009     * <p>
2010     * <b>Definition:</b>
2011     * 
2012     * </p> 
2013         */
2014        public ResourceReferenceDt addHealthcareService() {
2015                ResourceReferenceDt newType = new ResourceReferenceDt();
2016                getHealthcareService().add(newType);
2017                return newType; 
2018        }
2019  
2020
2021
2022        }
2023
2024
2025        /**
2026         * Block class for child element: <b>Practitioner.qualification</b> ()
2027         *
2028     * <p>
2029     * <b>Definition:</b>
2030     * 
2031     * </p> 
2032         */
2033        @Block()        
2034        public static class Qualification 
2035            extends  BaseIdentifiableElement        implements IResourceBlock {
2036        
2037        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
2038        @Description(
2039                shortDefinition="",
2040                formalDefinition="An identifier that applies to this person's qualification in this role"
2041        )
2042        private java.util.List<IdentifierDt> myIdentifier;
2043        
2044        @Child(name="code", type=CodeableConceptDt.class, order=1, min=1, max=1, summary=false, modifier=false) 
2045        @Description(
2046                shortDefinition="",
2047                formalDefinition=""
2048        )
2049        private CodeableConceptDt myCode;
2050        
2051        @Child(name="period", type=PeriodDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
2052        @Description(
2053                shortDefinition="",
2054                formalDefinition="Period during which the qualification is valid"
2055        )
2056        private PeriodDt myPeriod;
2057        
2058        @Child(name="issuer", order=3, min=0, max=1, summary=false, modifier=false, type={
2059                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
2060        @Description(
2061                shortDefinition="",
2062                formalDefinition="Organization that regulates and issues the qualification"
2063        )
2064        private ResourceReferenceDt myIssuer;
2065        
2066
2067        @Override
2068        public boolean isEmpty() {
2069                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myCode,  myPeriod,  myIssuer);
2070        }
2071        
2072        @Override
2073        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2074                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCode, myPeriod, myIssuer);
2075        }
2076
2077        /**
2078         * Gets the value(s) for <b>identifier</b> ().
2079         * creating it if it does
2080         * not exist. Will not return <code>null</code>.
2081         *
2082     * <p>
2083     * <b>Definition:</b>
2084     * An identifier that applies to this person's qualification in this role
2085     * </p> 
2086         */
2087        public java.util.List<IdentifierDt> getIdentifier() {  
2088                if (myIdentifier == null) {
2089                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
2090                }
2091                return myIdentifier;
2092        }
2093
2094        /**
2095         * Sets the value(s) for <b>identifier</b> ()
2096         *
2097     * <p>
2098     * <b>Definition:</b>
2099     * An identifier that applies to this person's qualification in this role
2100     * </p> 
2101         */
2102        public Qualification setIdentifier(java.util.List<IdentifierDt> theValue) {
2103                myIdentifier = theValue;
2104                return this;
2105        }
2106        
2107        
2108
2109        /**
2110         * Adds and returns a new value for <b>identifier</b> ()
2111         *
2112     * <p>
2113     * <b>Definition:</b>
2114     * An identifier that applies to this person's qualification in this role
2115     * </p> 
2116         */
2117        public IdentifierDt addIdentifier() {
2118                IdentifierDt newType = new IdentifierDt();
2119                getIdentifier().add(newType);
2120                return newType; 
2121        }
2122
2123        /**
2124         * Adds a given new value for <b>identifier</b> ()
2125         *
2126         * <p>
2127         * <b>Definition:</b>
2128         * An identifier that applies to this person's qualification in this role
2129         * </p>
2130         * @param theValue The identifier to add (must not be <code>null</code>)
2131         */
2132        public Qualification addIdentifier(IdentifierDt theValue) {
2133                if (theValue == null) {
2134                        throw new NullPointerException("theValue must not be null");
2135                }
2136                getIdentifier().add(theValue);
2137                return this;
2138        }
2139
2140        /**
2141         * Gets the first repetition for <b>identifier</b> (),
2142         * creating it if it does not already exist.
2143         *
2144     * <p>
2145     * <b>Definition:</b>
2146     * An identifier that applies to this person's qualification in this role
2147     * </p> 
2148         */
2149        public IdentifierDt getIdentifierFirstRep() {
2150                if (getIdentifier().isEmpty()) {
2151                        return addIdentifier();
2152                }
2153                return getIdentifier().get(0); 
2154        }
2155  
2156        /**
2157         * Gets the value(s) for <b>code</b> ().
2158         * creating it if it does
2159         * not exist. Will not return <code>null</code>.
2160         *
2161     * <p>
2162     * <b>Definition:</b>
2163     * 
2164     * </p> 
2165         */
2166        public CodeableConceptDt getCode() {  
2167                if (myCode == null) {
2168                        myCode = new CodeableConceptDt();
2169                }
2170                return myCode;
2171        }
2172
2173        /**
2174         * Sets the value(s) for <b>code</b> ()
2175         *
2176     * <p>
2177     * <b>Definition:</b>
2178     * 
2179     * </p> 
2180         */
2181        public Qualification setCode(CodeableConceptDt theValue) {
2182                myCode = theValue;
2183                return this;
2184        }
2185        
2186        
2187
2188  
2189        /**
2190         * Gets the value(s) for <b>period</b> ().
2191         * creating it if it does
2192         * not exist. Will not return <code>null</code>.
2193         *
2194     * <p>
2195     * <b>Definition:</b>
2196     * Period during which the qualification is valid
2197     * </p> 
2198         */
2199        public PeriodDt getPeriod() {  
2200                if (myPeriod == null) {
2201                        myPeriod = new PeriodDt();
2202                }
2203                return myPeriod;
2204        }
2205
2206        /**
2207         * Sets the value(s) for <b>period</b> ()
2208         *
2209     * <p>
2210     * <b>Definition:</b>
2211     * Period during which the qualification is valid
2212     * </p> 
2213         */
2214        public Qualification setPeriod(PeriodDt theValue) {
2215                myPeriod = theValue;
2216                return this;
2217        }
2218        
2219        
2220
2221  
2222        /**
2223         * Gets the value(s) for <b>issuer</b> ().
2224         * creating it if it does
2225         * not exist. Will not return <code>null</code>.
2226         *
2227     * <p>
2228     * <b>Definition:</b>
2229     * Organization that regulates and issues the qualification
2230     * </p> 
2231         */
2232        public ResourceReferenceDt getIssuer() {  
2233                if (myIssuer == null) {
2234                        myIssuer = new ResourceReferenceDt();
2235                }
2236                return myIssuer;
2237        }
2238
2239        /**
2240         * Sets the value(s) for <b>issuer</b> ()
2241         *
2242     * <p>
2243     * <b>Definition:</b>
2244     * Organization that regulates and issues the qualification
2245     * </p> 
2246         */
2247        public Qualification setIssuer(ResourceReferenceDt theValue) {
2248                myIssuer = theValue;
2249                return this;
2250        }
2251        
2252        
2253
2254  
2255
2256
2257        }
2258
2259
2260
2261
2262    @Override
2263    public String getResourceName() {
2264        return "Practitioner";
2265    }
2266    
2267    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2268        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2269    }
2270
2271
2272}