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>ImagingStudy</b> Resource
320 * (clinical.diagnostics)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/ImagingStudy">http://hl7.org/fhir/profiles/ImagingStudy</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="ImagingStudy", profile="http://hl7.org/fhir/profiles/ImagingStudy", id="imagingstudy")
339public class ImagingStudy extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>patient</b>
344         * <p>
345         * Description: <b>Who the study is about</b><br>
346         * Type: <b>reference</b><br>
347         * Path: <b>ImagingStudy.patient</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference"  )
351        public static final String SP_PATIENT = "patient";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
355         * <p>
356         * Description: <b>Who the study is about</b><br>
357         * Type: <b>reference</b><br>
358         * Path: <b>ImagingStudy.patient</b><br>
359         * </p>
360         */
361        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
362
363        /**
364         * Search parameter constant for <b>started</b>
365         * <p>
366         * Description: <b>When the study was started</b><br>
367         * Type: <b>date</b><br>
368         * Path: <b>ImagingStudy.started</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date"  )
372        public static final String SP_STARTED = "started";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>started</b>
376         * <p>
377         * Description: <b>When the study was started</b><br>
378         * Type: <b>date</b><br>
379         * Path: <b>ImagingStudy.started</b><br>
380         * </p>
381         */
382        public static final DateClientParam STARTED = new DateClientParam(SP_STARTED);
383
384        /**
385         * Search parameter constant for <b>accession</b>
386         * <p>
387         * Description: <b>The accession identifier for the study</b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>ImagingStudy.accession</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession identifier for the study", type="token"  )
393        public static final String SP_ACCESSION = "accession";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>accession</b>
397         * <p>
398         * Description: <b>The accession identifier for the study</b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>ImagingStudy.accession</b><br>
401         * </p>
402         */
403        public static final TokenClientParam ACCESSION = new TokenClientParam(SP_ACCESSION);
404
405        /**
406         * Search parameter constant for <b>study</b>
407         * <p>
408         * Description: <b>The study identifier for the image</b><br>
409         * Type: <b>uri</b><br>
410         * Path: <b>ImagingStudy.uid</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="study", path="ImagingStudy.uid", description="The study identifier for the image", type="uri"  )
414        public static final String SP_STUDY = "study";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>study</b>
418         * <p>
419         * Description: <b>The study identifier for the image</b><br>
420         * Type: <b>uri</b><br>
421         * Path: <b>ImagingStudy.uid</b><br>
422         * </p>
423         */
424        public static final UriClientParam STUDY = new UriClientParam(SP_STUDY);
425
426        /**
427         * Search parameter constant for <b>series</b>
428         * <p>
429         * Description: <b>The identifier of the series of images</b><br>
430         * Type: <b>uri</b><br>
431         * Path: <b>ImagingStudy.series.uid</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The identifier of the series of images", type="uri"  )
435        public static final String SP_SERIES = "series";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>series</b>
439         * <p>
440         * Description: <b>The identifier of the series of images</b><br>
441         * Type: <b>uri</b><br>
442         * Path: <b>ImagingStudy.series.uid</b><br>
443         * </p>
444         */
445        public static final UriClientParam SERIES = new UriClientParam(SP_SERIES);
446
447        /**
448         * Search parameter constant for <b>modality</b>
449         * <p>
450         * Description: <b>The modality of the series</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>ImagingStudy.series.modality</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the series", type="token"  )
456        public static final String SP_MODALITY = "modality";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>modality</b>
460         * <p>
461         * Description: <b>The modality of the series</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>ImagingStudy.series.modality</b><br>
464         * </p>
465         */
466        public static final TokenClientParam MODALITY = new TokenClientParam(SP_MODALITY);
467
468        /**
469         * Search parameter constant for <b>bodysite</b>
470         * <p>
471         * Description: <b>The body site studied</b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>ImagingStudy.series.bodySite</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="The body site studied", type="token"  )
477        public static final String SP_BODYSITE = "bodysite";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>bodysite</b>
481         * <p>
482         * Description: <b>The body site studied</b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>ImagingStudy.series.bodySite</b><br>
485         * </p>
486         */
487        public static final TokenClientParam BODYSITE = new TokenClientParam(SP_BODYSITE);
488
489        /**
490         * Search parameter constant for <b>uid</b>
491         * <p>
492         * Description: <b>The instance unique identifier</b><br>
493         * Type: <b>uri</b><br>
494         * Path: <b>ImagingStudy.series.instance.uid</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="uid", path="ImagingStudy.series.instance.uid", description="The instance unique identifier", type="uri"  )
498        public static final String SP_UID = "uid";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>uid</b>
502         * <p>
503         * Description: <b>The instance unique identifier</b><br>
504         * Type: <b>uri</b><br>
505         * Path: <b>ImagingStudy.series.instance.uid</b><br>
506         * </p>
507         */
508        public static final UriClientParam UID = new UriClientParam(SP_UID);
509
510        /**
511         * Search parameter constant for <b>dicom-class</b>
512         * <p>
513         * Description: <b>The type of the instance</b><br>
514         * Type: <b>uri</b><br>
515         * Path: <b>ImagingStudy.series.instance.sopClass</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopClass", description="The type of the instance", type="uri"  )
519        public static final String SP_DICOM_CLASS = "dicom-class";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>dicom-class</b>
523         * <p>
524         * Description: <b>The type of the instance</b><br>
525         * Type: <b>uri</b><br>
526         * Path: <b>ImagingStudy.series.instance.sopClass</b><br>
527         * </p>
528         */
529        public static final UriClientParam DICOM_CLASS = new UriClientParam(SP_DICOM_CLASS);
530
531        /**
532         * Search parameter constant for <b>order</b>
533         * <p>
534         * Description: <b>The order for the image</b><br>
535         * Type: <b>reference</b><br>
536         * Path: <b>ImagingStudy.order</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="order", path="ImagingStudy.order", description="The order for the image", type="reference"  )
540        public static final String SP_ORDER = "order";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>order</b>
544         * <p>
545         * Description: <b>The order for the image</b><br>
546         * Type: <b>reference</b><br>
547         * Path: <b>ImagingStudy.order</b><br>
548         * </p>
549         */
550        public static final ReferenceClientParam ORDER = new ReferenceClientParam(SP_ORDER);
551
552
553        /**
554         * Constant for fluent queries to be used to add include statements. Specifies
555         * the path value of "<b>ImagingStudy:order</b>".
556         */
557        public static final Include INCLUDE_ORDER = new Include("ImagingStudy:order");
558
559        /**
560         * Constant for fluent queries to be used to add include statements. Specifies
561         * the path value of "<b>ImagingStudy:patient</b>".
562         */
563        public static final Include INCLUDE_PATIENT = new Include("ImagingStudy:patient");
564
565
566        @Child(name="started", type=DateTimeDt.class, order=0, min=0, max=1, summary=false, modifier=false)     
567        @Description(
568                shortDefinition="when.init",
569                formalDefinition="Date and Time the study started"
570        )
571        private DateTimeDt myStarted;
572        
573        @Child(name="patient", order=1, min=1, max=1, summary=false, modifier=false, type={
574                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
575        @Description(
576                shortDefinition="who.focus",
577                formalDefinition="The patient imaged in the study."
578        )
579        private ResourceReferenceDt myPatient;
580        
581        @Child(name="uid", type=OidDt.class, order=2, min=1, max=1, summary=false, modifier=false)      
582        @Description(
583                shortDefinition="id",
584                formalDefinition="Formal identifier for the study"
585        )
586        private OidDt myUid;
587        
588        @Child(name="accession", type=IdentifierDt.class, order=3, min=0, max=1, summary=false, modifier=false) 
589        @Description(
590                shortDefinition="id",
591                formalDefinition="Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions.  See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)"
592        )
593        private IdentifierDt myAccession;
594        
595        @Child(name="identifier", type=IdentifierDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
596        @Description(
597                shortDefinition="id",
598                formalDefinition="Other identifiers for the study"
599        )
600        private java.util.List<IdentifierDt> myIdentifier;
601        
602        @Child(name="order", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
603                ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder.class  })
604        @Description(
605                shortDefinition="",
606                formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed"
607        )
608        private java.util.List<ResourceReferenceDt> myOrder;
609        
610        @Child(name="modalityList", type=CodingDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
611        @Description(
612                shortDefinition="class",
613                formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)"
614        )
615        private java.util.List<CodingDt> myModalityList;
616        
617        @Child(name="referrer", order=7, min=0, max=1, summary=false, modifier=false, type={
618                ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
619        @Description(
620                shortDefinition="who.cause",
621                formalDefinition="The requesting/referring physician"
622        )
623        private ResourceReferenceDt myReferrer;
624        
625        @Child(name="availability", type=CodeDt.class, order=8, min=0, max=1, summary=false, modifier=false)    
626        @Description(
627                shortDefinition="status",
628                formalDefinition="Availability of study (online, offline or nearline)"
629        )
630        private BoundCodeDt<InstanceAvailabilityEnum> myAvailability;
631        
632        @Child(name="url", type=UriDt.class, order=9, min=0, max=1, summary=false, modifier=false)      
633        @Description(
634                shortDefinition="",
635                formalDefinition="WADO-RS resource where Study is available."
636        )
637        private UriDt myUrl;
638        
639        @Child(name="numberOfSeries", type=UnsignedIntDt.class, order=10, min=1, max=1, summary=false, modifier=false)  
640        @Description(
641                shortDefinition="",
642                formalDefinition="Number of Series in Study"
643        )
644        private UnsignedIntDt myNumberOfSeries;
645        
646        @Child(name="numberOfInstances", type=UnsignedIntDt.class, order=11, min=1, max=1, summary=false, modifier=false)       
647        @Description(
648                shortDefinition="",
649                formalDefinition="Number of SOP Instances in Study"
650        )
651        private UnsignedIntDt myNumberOfInstances;
652        
653        @Child(name="procedure", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
654                ca.uhn.fhir.model.dstu2.resource.Procedure.class        })
655        @Description(
656                shortDefinition="",
657                formalDefinition="Type of procedure performed"
658        )
659        private java.util.List<ResourceReferenceDt> myProcedure;
660        
661        @Child(name="interpreter", order=13, min=0, max=1, summary=false, modifier=false, type={
662                ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
663        @Description(
664                shortDefinition="who.witness",
665                formalDefinition="Who read the study and interpreted the images or other content"
666        )
667        private ResourceReferenceDt myInterpreter;
668        
669        @Child(name="description", type=StringDt.class, order=14, min=0, max=1, summary=false, modifier=false)  
670        @Description(
671                shortDefinition="",
672                formalDefinition="Institution-generated description or classification of the Study performed"
673        )
674        private StringDt myDescription;
675        
676        @Child(name="series", order=15, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
677        @Description(
678                shortDefinition="",
679                formalDefinition="Each study has one or more series of images or other content"
680        )
681        private java.util.List<Series> mySeries;
682        
683
684        @Override
685        public boolean isEmpty() {
686                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myStarted,  myPatient,  myUid,  myAccession,  myIdentifier,  myOrder,  myModalityList,  myReferrer,  myAvailability,  myUrl,  myNumberOfSeries,  myNumberOfInstances,  myProcedure,  myInterpreter,  myDescription,  mySeries);
687        }
688        
689        @Override
690        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
691                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStarted, myPatient, myUid, myAccession, myIdentifier, myOrder, myModalityList, myReferrer, myAvailability, myUrl, myNumberOfSeries, myNumberOfInstances, myProcedure, myInterpreter, myDescription, mySeries);
692        }
693
694        /**
695         * Gets the value(s) for <b>started</b> (when.init).
696         * creating it if it does
697         * not exist. Will not return <code>null</code>.
698         *
699     * <p>
700     * <b>Definition:</b>
701     * Date and Time the study started
702     * </p> 
703         */
704        public DateTimeDt getStartedElement() {  
705                if (myStarted == null) {
706                        myStarted = new DateTimeDt();
707                }
708                return myStarted;
709        }
710
711        
712        /**
713         * Gets the value(s) for <b>started</b> (when.init).
714         * creating it if it does
715         * not exist. Will not return <code>null</code>.
716         *
717     * <p>
718     * <b>Definition:</b>
719     * Date and Time the study started
720     * </p> 
721         */
722        public Date getStarted() {  
723                return getStartedElement().getValue();
724        }
725
726        /**
727         * Sets the value(s) for <b>started</b> (when.init)
728         *
729     * <p>
730     * <b>Definition:</b>
731     * Date and Time the study started
732     * </p> 
733         */
734        public ImagingStudy setStarted(DateTimeDt theValue) {
735                myStarted = theValue;
736                return this;
737        }
738        
739        
740
741        /**
742         * Sets the value for <b>started</b> (when.init)
743         *
744     * <p>
745     * <b>Definition:</b>
746     * Date and Time the study started
747     * </p> 
748         */
749        public ImagingStudy setStarted( Date theDate,  TemporalPrecisionEnum thePrecision) {
750                myStarted = new DateTimeDt(theDate, thePrecision); 
751                return this; 
752        }
753
754        /**
755         * Sets the value for <b>started</b> (when.init)
756         *
757     * <p>
758     * <b>Definition:</b>
759     * Date and Time the study started
760     * </p> 
761         */
762        public ImagingStudy setStartedWithSecondsPrecision( Date theDate) {
763                myStarted = new DateTimeDt(theDate); 
764                return this; 
765        }
766
767 
768        /**
769         * Gets the value(s) for <b>patient</b> (who.focus).
770         * creating it if it does
771         * not exist. Will not return <code>null</code>.
772         *
773     * <p>
774     * <b>Definition:</b>
775     * The patient imaged in the study.
776     * </p> 
777         */
778        public ResourceReferenceDt getPatient() {  
779                if (myPatient == null) {
780                        myPatient = new ResourceReferenceDt();
781                }
782                return myPatient;
783        }
784
785        /**
786         * Sets the value(s) for <b>patient</b> (who.focus)
787         *
788     * <p>
789     * <b>Definition:</b>
790     * The patient imaged in the study.
791     * </p> 
792         */
793        public ImagingStudy setPatient(ResourceReferenceDt theValue) {
794                myPatient = theValue;
795                return this;
796        }
797        
798        
799
800  
801        /**
802         * Gets the value(s) for <b>uid</b> (id).
803         * creating it if it does
804         * not exist. Will not return <code>null</code>.
805         *
806     * <p>
807     * <b>Definition:</b>
808     * Formal identifier for the study
809     * </p> 
810         */
811        public OidDt getUidElement() {  
812                if (myUid == null) {
813                        myUid = new OidDt();
814                }
815                return myUid;
816        }
817
818        
819        /**
820         * Gets the value(s) for <b>uid</b> (id).
821         * creating it if it does
822         * not exist. Will not return <code>null</code>.
823         *
824     * <p>
825     * <b>Definition:</b>
826     * Formal identifier for the study
827     * </p> 
828         */
829        public String getUid() {  
830                return getUidElement().getValue();
831        }
832
833        /**
834         * Sets the value(s) for <b>uid</b> (id)
835         *
836     * <p>
837     * <b>Definition:</b>
838     * Formal identifier for the study
839     * </p> 
840         */
841        public ImagingStudy setUid(OidDt theValue) {
842                myUid = theValue;
843                return this;
844        }
845        
846        
847
848  
849        /**
850         * Gets the value(s) for <b>accession</b> (id).
851         * creating it if it does
852         * not exist. Will not return <code>null</code>.
853         *
854     * <p>
855     * <b>Definition:</b>
856     * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions.  See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)
857     * </p> 
858         */
859        public IdentifierDt getAccession() {  
860                if (myAccession == null) {
861                        myAccession = new IdentifierDt();
862                }
863                return myAccession;
864        }
865
866        /**
867         * Sets the value(s) for <b>accession</b> (id)
868         *
869     * <p>
870     * <b>Definition:</b>
871     * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions.  See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)
872     * </p> 
873         */
874        public ImagingStudy setAccession(IdentifierDt theValue) {
875                myAccession = theValue;
876                return this;
877        }
878        
879        
880
881  
882        /**
883         * Gets the value(s) for <b>identifier</b> (id).
884         * creating it if it does
885         * not exist. Will not return <code>null</code>.
886         *
887     * <p>
888     * <b>Definition:</b>
889     * Other identifiers for the study
890     * </p> 
891         */
892        public java.util.List<IdentifierDt> getIdentifier() {  
893                if (myIdentifier == null) {
894                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
895                }
896                return myIdentifier;
897        }
898
899        /**
900         * Sets the value(s) for <b>identifier</b> (id)
901         *
902     * <p>
903     * <b>Definition:</b>
904     * Other identifiers for the study
905     * </p> 
906         */
907        public ImagingStudy setIdentifier(java.util.List<IdentifierDt> theValue) {
908                myIdentifier = theValue;
909                return this;
910        }
911        
912        
913
914        /**
915         * Adds and returns a new value for <b>identifier</b> (id)
916         *
917     * <p>
918     * <b>Definition:</b>
919     * Other identifiers for the study
920     * </p> 
921         */
922        public IdentifierDt addIdentifier() {
923                IdentifierDt newType = new IdentifierDt();
924                getIdentifier().add(newType);
925                return newType; 
926        }
927
928        /**
929         * Adds a given new value for <b>identifier</b> (id)
930         *
931         * <p>
932         * <b>Definition:</b>
933         * Other identifiers for the study
934         * </p>
935         * @param theValue The identifier to add (must not be <code>null</code>)
936         */
937        public ImagingStudy addIdentifier(IdentifierDt theValue) {
938                if (theValue == null) {
939                        throw new NullPointerException("theValue must not be null");
940                }
941                getIdentifier().add(theValue);
942                return this;
943        }
944
945        /**
946         * Gets the first repetition for <b>identifier</b> (id),
947         * creating it if it does not already exist.
948         *
949     * <p>
950     * <b>Definition:</b>
951     * Other identifiers for the study
952     * </p> 
953         */
954        public IdentifierDt getIdentifierFirstRep() {
955                if (getIdentifier().isEmpty()) {
956                        return addIdentifier();
957                }
958                return getIdentifier().get(0); 
959        }
960  
961        /**
962         * Gets the value(s) for <b>order</b> ().
963         * creating it if it does
964         * not exist. Will not return <code>null</code>.
965         *
966     * <p>
967     * <b>Definition:</b>
968     * A list of the diagnostic orders that resulted in this imaging study being performed
969     * </p> 
970         */
971        public java.util.List<ResourceReferenceDt> getOrder() {  
972                if (myOrder == null) {
973                        myOrder = new java.util.ArrayList<ResourceReferenceDt>();
974                }
975                return myOrder;
976        }
977
978        /**
979         * Sets the value(s) for <b>order</b> ()
980         *
981     * <p>
982     * <b>Definition:</b>
983     * A list of the diagnostic orders that resulted in this imaging study being performed
984     * </p> 
985         */
986        public ImagingStudy setOrder(java.util.List<ResourceReferenceDt> theValue) {
987                myOrder = theValue;
988                return this;
989        }
990        
991        
992
993        /**
994         * Adds and returns a new value for <b>order</b> ()
995         *
996     * <p>
997     * <b>Definition:</b>
998     * A list of the diagnostic orders that resulted in this imaging study being performed
999     * </p> 
1000         */
1001        public ResourceReferenceDt addOrder() {
1002                ResourceReferenceDt newType = new ResourceReferenceDt();
1003                getOrder().add(newType);
1004                return newType; 
1005        }
1006  
1007        /**
1008         * Gets the value(s) for <b>modalityList</b> (class).
1009         * creating it if it does
1010         * not exist. Will not return <code>null</code>.
1011         *
1012     * <p>
1013     * <b>Definition:</b>
1014     * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
1015     * </p> 
1016         */
1017        public java.util.List<CodingDt> getModalityList() {  
1018                if (myModalityList == null) {
1019                        myModalityList = new java.util.ArrayList<CodingDt>();
1020                }
1021                return myModalityList;
1022        }
1023
1024        /**
1025         * Sets the value(s) for <b>modalityList</b> (class)
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
1030     * </p> 
1031         */
1032        public ImagingStudy setModalityList(java.util.List<CodingDt> theValue) {
1033                myModalityList = theValue;
1034                return this;
1035        }
1036        
1037        
1038
1039        /**
1040         * Adds and returns a new value for <b>modalityList</b> (class)
1041         *
1042     * <p>
1043     * <b>Definition:</b>
1044     * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
1045     * </p> 
1046         */
1047        public CodingDt addModalityList() {
1048                CodingDt newType = new CodingDt();
1049                getModalityList().add(newType);
1050                return newType; 
1051        }
1052
1053        /**
1054         * Adds a given new value for <b>modalityList</b> (class)
1055         *
1056         * <p>
1057         * <b>Definition:</b>
1058         * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
1059         * </p>
1060         * @param theValue The modalityList to add (must not be <code>null</code>)
1061         */
1062        public ImagingStudy addModalityList(CodingDt theValue) {
1063                if (theValue == null) {
1064                        throw new NullPointerException("theValue must not be null");
1065                }
1066                getModalityList().add(theValue);
1067                return this;
1068        }
1069
1070        /**
1071         * Gets the first repetition for <b>modalityList</b> (class),
1072         * creating it if it does not already exist.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
1077     * </p> 
1078         */
1079        public CodingDt getModalityListFirstRep() {
1080                if (getModalityList().isEmpty()) {
1081                        return addModalityList();
1082                }
1083                return getModalityList().get(0); 
1084        }
1085  
1086        /**
1087         * Gets the value(s) for <b>referrer</b> (who.cause).
1088         * creating it if it does
1089         * not exist. Will not return <code>null</code>.
1090         *
1091     * <p>
1092     * <b>Definition:</b>
1093     * The requesting/referring physician
1094     * </p> 
1095         */
1096        public ResourceReferenceDt getReferrer() {  
1097                if (myReferrer == null) {
1098                        myReferrer = new ResourceReferenceDt();
1099                }
1100                return myReferrer;
1101        }
1102
1103        /**
1104         * Sets the value(s) for <b>referrer</b> (who.cause)
1105         *
1106     * <p>
1107     * <b>Definition:</b>
1108     * The requesting/referring physician
1109     * </p> 
1110         */
1111        public ImagingStudy setReferrer(ResourceReferenceDt theValue) {
1112                myReferrer = theValue;
1113                return this;
1114        }
1115        
1116        
1117
1118  
1119        /**
1120         * Gets the value(s) for <b>availability</b> (status).
1121         * creating it if it does
1122         * not exist. Will not return <code>null</code>.
1123         *
1124     * <p>
1125     * <b>Definition:</b>
1126     * Availability of study (online, offline or nearline)
1127     * </p> 
1128         */
1129        public BoundCodeDt<InstanceAvailabilityEnum> getAvailabilityElement() {  
1130                if (myAvailability == null) {
1131                        myAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);
1132                }
1133                return myAvailability;
1134        }
1135
1136        
1137        /**
1138         * Gets the value(s) for <b>availability</b> (status).
1139         * creating it if it does
1140         * not exist. Will not return <code>null</code>.
1141         *
1142     * <p>
1143     * <b>Definition:</b>
1144     * Availability of study (online, offline or nearline)
1145     * </p> 
1146         */
1147        public String getAvailability() {  
1148                return getAvailabilityElement().getValue();
1149        }
1150
1151        /**
1152         * Sets the value(s) for <b>availability</b> (status)
1153         *
1154     * <p>
1155     * <b>Definition:</b>
1156     * Availability of study (online, offline or nearline)
1157     * </p> 
1158         */
1159        public ImagingStudy setAvailability(BoundCodeDt<InstanceAvailabilityEnum> theValue) {
1160                myAvailability = theValue;
1161                return this;
1162        }
1163        
1164        
1165
1166        /**
1167         * Sets the value(s) for <b>availability</b> (status)
1168         *
1169     * <p>
1170     * <b>Definition:</b>
1171     * Availability of study (online, offline or nearline)
1172     * </p> 
1173         */
1174        public ImagingStudy setAvailability(InstanceAvailabilityEnum theValue) {
1175                setAvailability(new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER, theValue));
1176                
1177/*
1178                getAvailabilityElement().setValueAsEnum(theValue);
1179*/
1180                return this;
1181        }
1182
1183  
1184        /**
1185         * Gets the value(s) for <b>url</b> ().
1186         * creating it if it does
1187         * not exist. Will not return <code>null</code>.
1188         *
1189     * <p>
1190     * <b>Definition:</b>
1191     * WADO-RS resource where Study is available.
1192     * </p> 
1193         */
1194        public UriDt getUrlElement() {  
1195                if (myUrl == null) {
1196                        myUrl = new UriDt();
1197                }
1198                return myUrl;
1199        }
1200
1201        
1202        /**
1203         * Gets the value(s) for <b>url</b> ().
1204         * creating it if it does
1205         * not exist. Will not return <code>null</code>.
1206         *
1207     * <p>
1208     * <b>Definition:</b>
1209     * WADO-RS resource where Study is available.
1210     * </p> 
1211         */
1212        public String getUrl() {  
1213                return getUrlElement().getValue();
1214        }
1215
1216        /**
1217         * Sets the value(s) for <b>url</b> ()
1218         *
1219     * <p>
1220     * <b>Definition:</b>
1221     * WADO-RS resource where Study is available.
1222     * </p> 
1223         */
1224        public ImagingStudy setUrl(UriDt theValue) {
1225                myUrl = theValue;
1226                return this;
1227        }
1228        
1229        
1230
1231        /**
1232         * Sets the value for <b>url</b> ()
1233         *
1234     * <p>
1235     * <b>Definition:</b>
1236     * WADO-RS resource where Study is available.
1237     * </p> 
1238         */
1239        public ImagingStudy setUrl( String theUri) {
1240                myUrl = new UriDt(theUri); 
1241                return this; 
1242        }
1243
1244 
1245        /**
1246         * Gets the value(s) for <b>numberOfSeries</b> ().
1247         * creating it if it does
1248         * not exist. Will not return <code>null</code>.
1249         *
1250     * <p>
1251     * <b>Definition:</b>
1252     * Number of Series in Study
1253     * </p> 
1254         */
1255        public UnsignedIntDt getNumberOfSeriesElement() {  
1256                if (myNumberOfSeries == null) {
1257                        myNumberOfSeries = new UnsignedIntDt();
1258                }
1259                return myNumberOfSeries;
1260        }
1261
1262        
1263        /**
1264         * Gets the value(s) for <b>numberOfSeries</b> ().
1265         * creating it if it does
1266         * not exist. Will not return <code>null</code>.
1267         *
1268     * <p>
1269     * <b>Definition:</b>
1270     * Number of Series in Study
1271     * </p> 
1272         */
1273        public Integer getNumberOfSeries() {  
1274                return getNumberOfSeriesElement().getValue();
1275        }
1276
1277        /**
1278         * Sets the value(s) for <b>numberOfSeries</b> ()
1279         *
1280     * <p>
1281     * <b>Definition:</b>
1282     * Number of Series in Study
1283     * </p> 
1284         */
1285        public ImagingStudy setNumberOfSeries(UnsignedIntDt theValue) {
1286                myNumberOfSeries = theValue;
1287                return this;
1288        }
1289        
1290        
1291
1292        /**
1293         * Sets the value for <b>numberOfSeries</b> ()
1294         *
1295     * <p>
1296     * <b>Definition:</b>
1297     * Number of Series in Study
1298     * </p> 
1299         */
1300        public ImagingStudy setNumberOfSeries( int theInteger) {
1301                myNumberOfSeries = new UnsignedIntDt(theInteger); 
1302                return this; 
1303        }
1304
1305 
1306        /**
1307         * Gets the value(s) for <b>numberOfInstances</b> ().
1308         * creating it if it does
1309         * not exist. Will not return <code>null</code>.
1310         *
1311     * <p>
1312     * <b>Definition:</b>
1313     * Number of SOP Instances in Study
1314     * </p> 
1315         */
1316        public UnsignedIntDt getNumberOfInstancesElement() {  
1317                if (myNumberOfInstances == null) {
1318                        myNumberOfInstances = new UnsignedIntDt();
1319                }
1320                return myNumberOfInstances;
1321        }
1322
1323        
1324        /**
1325         * Gets the value(s) for <b>numberOfInstances</b> ().
1326         * creating it if it does
1327         * not exist. Will not return <code>null</code>.
1328         *
1329     * <p>
1330     * <b>Definition:</b>
1331     * Number of SOP Instances in Study
1332     * </p> 
1333         */
1334        public Integer getNumberOfInstances() {  
1335                return getNumberOfInstancesElement().getValue();
1336        }
1337
1338        /**
1339         * Sets the value(s) for <b>numberOfInstances</b> ()
1340         *
1341     * <p>
1342     * <b>Definition:</b>
1343     * Number of SOP Instances in Study
1344     * </p> 
1345         */
1346        public ImagingStudy setNumberOfInstances(UnsignedIntDt theValue) {
1347                myNumberOfInstances = theValue;
1348                return this;
1349        }
1350        
1351        
1352
1353        /**
1354         * Sets the value for <b>numberOfInstances</b> ()
1355         *
1356     * <p>
1357     * <b>Definition:</b>
1358     * Number of SOP Instances in Study
1359     * </p> 
1360         */
1361        public ImagingStudy setNumberOfInstances( int theInteger) {
1362                myNumberOfInstances = new UnsignedIntDt(theInteger); 
1363                return this; 
1364        }
1365
1366 
1367        /**
1368         * Gets the value(s) for <b>procedure</b> ().
1369         * creating it if it does
1370         * not exist. Will not return <code>null</code>.
1371         *
1372     * <p>
1373     * <b>Definition:</b>
1374     * Type of procedure performed
1375     * </p> 
1376         */
1377        public java.util.List<ResourceReferenceDt> getProcedure() {  
1378                if (myProcedure == null) {
1379                        myProcedure = new java.util.ArrayList<ResourceReferenceDt>();
1380                }
1381                return myProcedure;
1382        }
1383
1384        /**
1385         * Sets the value(s) for <b>procedure</b> ()
1386         *
1387     * <p>
1388     * <b>Definition:</b>
1389     * Type of procedure performed
1390     * </p> 
1391         */
1392        public ImagingStudy setProcedure(java.util.List<ResourceReferenceDt> theValue) {
1393                myProcedure = theValue;
1394                return this;
1395        }
1396        
1397        
1398
1399        /**
1400         * Adds and returns a new value for <b>procedure</b> ()
1401         *
1402     * <p>
1403     * <b>Definition:</b>
1404     * Type of procedure performed
1405     * </p> 
1406         */
1407        public ResourceReferenceDt addProcedure() {
1408                ResourceReferenceDt newType = new ResourceReferenceDt();
1409                getProcedure().add(newType);
1410                return newType; 
1411        }
1412  
1413        /**
1414         * Gets the value(s) for <b>interpreter</b> (who.witness).
1415         * creating it if it does
1416         * not exist. Will not return <code>null</code>.
1417         *
1418     * <p>
1419     * <b>Definition:</b>
1420     * Who read the study and interpreted the images or other content
1421     * </p> 
1422         */
1423        public ResourceReferenceDt getInterpreter() {  
1424                if (myInterpreter == null) {
1425                        myInterpreter = new ResourceReferenceDt();
1426                }
1427                return myInterpreter;
1428        }
1429
1430        /**
1431         * Sets the value(s) for <b>interpreter</b> (who.witness)
1432         *
1433     * <p>
1434     * <b>Definition:</b>
1435     * Who read the study and interpreted the images or other content
1436     * </p> 
1437         */
1438        public ImagingStudy setInterpreter(ResourceReferenceDt theValue) {
1439                myInterpreter = theValue;
1440                return this;
1441        }
1442        
1443        
1444
1445  
1446        /**
1447         * Gets the value(s) for <b>description</b> ().
1448         * creating it if it does
1449         * not exist. Will not return <code>null</code>.
1450         *
1451     * <p>
1452     * <b>Definition:</b>
1453     * Institution-generated description or classification of the Study performed
1454     * </p> 
1455         */
1456        public StringDt getDescriptionElement() {  
1457                if (myDescription == null) {
1458                        myDescription = new StringDt();
1459                }
1460                return myDescription;
1461        }
1462
1463        
1464        /**
1465         * Gets the value(s) for <b>description</b> ().
1466         * creating it if it does
1467         * not exist. Will not return <code>null</code>.
1468         *
1469     * <p>
1470     * <b>Definition:</b>
1471     * Institution-generated description or classification of the Study performed
1472     * </p> 
1473         */
1474        public String getDescription() {  
1475                return getDescriptionElement().getValue();
1476        }
1477
1478        /**
1479         * Sets the value(s) for <b>description</b> ()
1480         *
1481     * <p>
1482     * <b>Definition:</b>
1483     * Institution-generated description or classification of the Study performed
1484     * </p> 
1485         */
1486        public ImagingStudy setDescription(StringDt theValue) {
1487                myDescription = theValue;
1488                return this;
1489        }
1490        
1491        
1492
1493        /**
1494         * Sets the value for <b>description</b> ()
1495         *
1496     * <p>
1497     * <b>Definition:</b>
1498     * Institution-generated description or classification of the Study performed
1499     * </p> 
1500         */
1501        public ImagingStudy setDescription( String theString) {
1502                myDescription = new StringDt(theString); 
1503                return this; 
1504        }
1505
1506 
1507        /**
1508         * Gets the value(s) for <b>series</b> ().
1509         * creating it if it does
1510         * not exist. Will not return <code>null</code>.
1511         *
1512     * <p>
1513     * <b>Definition:</b>
1514     * Each study has one or more series of images or other content
1515     * </p> 
1516         */
1517        public java.util.List<Series> getSeries() {  
1518                if (mySeries == null) {
1519                        mySeries = new java.util.ArrayList<Series>();
1520                }
1521                return mySeries;
1522        }
1523
1524        /**
1525         * Sets the value(s) for <b>series</b> ()
1526         *
1527     * <p>
1528     * <b>Definition:</b>
1529     * Each study has one or more series of images or other content
1530     * </p> 
1531         */
1532        public ImagingStudy setSeries(java.util.List<Series> theValue) {
1533                mySeries = theValue;
1534                return this;
1535        }
1536        
1537        
1538
1539        /**
1540         * Adds and returns a new value for <b>series</b> ()
1541         *
1542     * <p>
1543     * <b>Definition:</b>
1544     * Each study has one or more series of images or other content
1545     * </p> 
1546         */
1547        public Series addSeries() {
1548                Series newType = new Series();
1549                getSeries().add(newType);
1550                return newType; 
1551        }
1552
1553        /**
1554         * Adds a given new value for <b>series</b> ()
1555         *
1556         * <p>
1557         * <b>Definition:</b>
1558         * Each study has one or more series of images or other content
1559         * </p>
1560         * @param theValue The series to add (must not be <code>null</code>)
1561         */
1562        public ImagingStudy addSeries(Series theValue) {
1563                if (theValue == null) {
1564                        throw new NullPointerException("theValue must not be null");
1565                }
1566                getSeries().add(theValue);
1567                return this;
1568        }
1569
1570        /**
1571         * Gets the first repetition for <b>series</b> (),
1572         * creating it if it does not already exist.
1573         *
1574     * <p>
1575     * <b>Definition:</b>
1576     * Each study has one or more series of images or other content
1577     * </p> 
1578         */
1579        public Series getSeriesFirstRep() {
1580                if (getSeries().isEmpty()) {
1581                        return addSeries();
1582                }
1583                return getSeries().get(0); 
1584        }
1585  
1586        /**
1587         * Block class for child element: <b>ImagingStudy.series</b> ()
1588         *
1589     * <p>
1590     * <b>Definition:</b>
1591     * Each study has one or more series of images or other content
1592     * </p> 
1593         */
1594        @Block()        
1595        public static class Series 
1596            extends  BaseIdentifiableElement        implements IResourceBlock {
1597        
1598        @Child(name="number", type=UnsignedIntDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
1599        @Description(
1600                shortDefinition="",
1601                formalDefinition="The Numeric identifier of this series in the study."
1602        )
1603        private UnsignedIntDt myNumber;
1604        
1605        @Child(name="modality", type=CodingDt.class, order=1, min=1, max=1, summary=false, modifier=false)      
1606        @Description(
1607                shortDefinition="",
1608                formalDefinition="The modality of this series sequence"
1609        )
1610        private CodingDt myModality;
1611        
1612        @Child(name="uid", type=OidDt.class, order=2, min=1, max=1, summary=false, modifier=false)      
1613        @Description(
1614                shortDefinition="",
1615                formalDefinition="Formal identifier for this series"
1616        )
1617        private OidDt myUid;
1618        
1619        @Child(name="description", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
1620        @Description(
1621                shortDefinition="",
1622                formalDefinition="A description of the series"
1623        )
1624        private StringDt myDescription;
1625        
1626        @Child(name="numberOfInstances", type=UnsignedIntDt.class, order=4, min=1, max=1, summary=false, modifier=false)        
1627        @Description(
1628                shortDefinition="",
1629                formalDefinition="Number of SOP Instances in Series."
1630        )
1631        private UnsignedIntDt myNumberOfInstances;
1632        
1633        @Child(name="availability", type=CodeDt.class, order=5, min=0, max=1, summary=false, modifier=false)    
1634        @Description(
1635                shortDefinition="",
1636                formalDefinition="Availability of series (online, offline or nearline)"
1637        )
1638        private BoundCodeDt<InstanceAvailabilityEnum> myAvailability;
1639        
1640        @Child(name="url", type=UriDt.class, order=6, min=0, max=1, summary=false, modifier=false)      
1641        @Description(
1642                shortDefinition="",
1643                formalDefinition="URI/URL specifying the location of the referenced series using WADO-RS"
1644        )
1645        private UriDt myUrl;
1646        
1647        @Child(name="bodySite", type=CodingDt.class, order=7, min=0, max=1, summary=false, modifier=false)      
1648        @Description(
1649                shortDefinition="",
1650                formalDefinition="Body part examined. See  DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT"
1651        )
1652        private CodingDt myBodySite;
1653        
1654        @Child(name="laterality", type=CodingDt.class, order=8, min=0, max=1, summary=false, modifier=false)    
1655        @Description(
1656                shortDefinition="",
1657                formalDefinition="Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code."
1658        )
1659        private CodingDt myLaterality;
1660        
1661        @Child(name="started", type=DateTimeDt.class, order=9, min=0, max=1, summary=false, modifier=false)     
1662        @Description(
1663                shortDefinition="",
1664                formalDefinition="The date and time the series was started."
1665        )
1666        private DateTimeDt myStarted;
1667        
1668        @Child(name="instance", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
1669        @Description(
1670                shortDefinition="",
1671                formalDefinition="A single SOP Instance within the series, e.g. an image, or presentation state."
1672        )
1673        private java.util.List<SeriesInstance> myInstance;
1674        
1675
1676        @Override
1677        public boolean isEmpty() {
1678                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myNumber,  myModality,  myUid,  myDescription,  myNumberOfInstances,  myAvailability,  myUrl,  myBodySite,  myLaterality,  myStarted,  myInstance);
1679        }
1680        
1681        @Override
1682        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1683                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumber, myModality, myUid, myDescription, myNumberOfInstances, myAvailability, myUrl, myBodySite, myLaterality, myStarted, myInstance);
1684        }
1685
1686        /**
1687         * Gets the value(s) for <b>number</b> ().
1688         * creating it if it does
1689         * not exist. Will not return <code>null</code>.
1690         *
1691     * <p>
1692     * <b>Definition:</b>
1693     * The Numeric identifier of this series in the study.
1694     * </p> 
1695         */
1696        public UnsignedIntDt getNumberElement() {  
1697                if (myNumber == null) {
1698                        myNumber = new UnsignedIntDt();
1699                }
1700                return myNumber;
1701        }
1702
1703        
1704        /**
1705         * Gets the value(s) for <b>number</b> ().
1706         * creating it if it does
1707         * not exist. Will not return <code>null</code>.
1708         *
1709     * <p>
1710     * <b>Definition:</b>
1711     * The Numeric identifier of this series in the study.
1712     * </p> 
1713         */
1714        public Integer getNumber() {  
1715                return getNumberElement().getValue();
1716        }
1717
1718        /**
1719         * Sets the value(s) for <b>number</b> ()
1720         *
1721     * <p>
1722     * <b>Definition:</b>
1723     * The Numeric identifier of this series in the study.
1724     * </p> 
1725         */
1726        public Series setNumber(UnsignedIntDt theValue) {
1727                myNumber = theValue;
1728                return this;
1729        }
1730        
1731        
1732
1733        /**
1734         * Sets the value for <b>number</b> ()
1735         *
1736     * <p>
1737     * <b>Definition:</b>
1738     * The Numeric identifier of this series in the study.
1739     * </p> 
1740         */
1741        public Series setNumber( int theInteger) {
1742                myNumber = new UnsignedIntDt(theInteger); 
1743                return this; 
1744        }
1745
1746 
1747        /**
1748         * Gets the value(s) for <b>modality</b> ().
1749         * creating it if it does
1750         * not exist. Will not return <code>null</code>.
1751         *
1752     * <p>
1753     * <b>Definition:</b>
1754     * The modality of this series sequence
1755     * </p> 
1756         */
1757        public CodingDt getModality() {  
1758                if (myModality == null) {
1759                        myModality = new CodingDt();
1760                }
1761                return myModality;
1762        }
1763
1764        /**
1765         * Sets the value(s) for <b>modality</b> ()
1766         *
1767     * <p>
1768     * <b>Definition:</b>
1769     * The modality of this series sequence
1770     * </p> 
1771         */
1772        public Series setModality(CodingDt theValue) {
1773                myModality = theValue;
1774                return this;
1775        }
1776        
1777        
1778
1779  
1780        /**
1781         * Gets the value(s) for <b>uid</b> ().
1782         * creating it if it does
1783         * not exist. Will not return <code>null</code>.
1784         *
1785     * <p>
1786     * <b>Definition:</b>
1787     * Formal identifier for this series
1788     * </p> 
1789         */
1790        public OidDt getUidElement() {  
1791                if (myUid == null) {
1792                        myUid = new OidDt();
1793                }
1794                return myUid;
1795        }
1796
1797        
1798        /**
1799         * Gets the value(s) for <b>uid</b> ().
1800         * creating it if it does
1801         * not exist. Will not return <code>null</code>.
1802         *
1803     * <p>
1804     * <b>Definition:</b>
1805     * Formal identifier for this series
1806     * </p> 
1807         */
1808        public String getUid() {  
1809                return getUidElement().getValue();
1810        }
1811
1812        /**
1813         * Sets the value(s) for <b>uid</b> ()
1814         *
1815     * <p>
1816     * <b>Definition:</b>
1817     * Formal identifier for this series
1818     * </p> 
1819         */
1820        public Series setUid(OidDt theValue) {
1821                myUid = theValue;
1822                return this;
1823        }
1824        
1825        
1826
1827  
1828        /**
1829         * Gets the value(s) for <b>description</b> ().
1830         * creating it if it does
1831         * not exist. Will not return <code>null</code>.
1832         *
1833     * <p>
1834     * <b>Definition:</b>
1835     * A description of the series
1836     * </p> 
1837         */
1838        public StringDt getDescriptionElement() {  
1839                if (myDescription == null) {
1840                        myDescription = new StringDt();
1841                }
1842                return myDescription;
1843        }
1844
1845        
1846        /**
1847         * Gets the value(s) for <b>description</b> ().
1848         * creating it if it does
1849         * not exist. Will not return <code>null</code>.
1850         *
1851     * <p>
1852     * <b>Definition:</b>
1853     * A description of the series
1854     * </p> 
1855         */
1856        public String getDescription() {  
1857                return getDescriptionElement().getValue();
1858        }
1859
1860        /**
1861         * Sets the value(s) for <b>description</b> ()
1862         *
1863     * <p>
1864     * <b>Definition:</b>
1865     * A description of the series
1866     * </p> 
1867         */
1868        public Series setDescription(StringDt theValue) {
1869                myDescription = theValue;
1870                return this;
1871        }
1872        
1873        
1874
1875        /**
1876         * Sets the value for <b>description</b> ()
1877         *
1878     * <p>
1879     * <b>Definition:</b>
1880     * A description of the series
1881     * </p> 
1882         */
1883        public Series setDescription( String theString) {
1884                myDescription = new StringDt(theString); 
1885                return this; 
1886        }
1887
1888 
1889        /**
1890         * Gets the value(s) for <b>numberOfInstances</b> ().
1891         * creating it if it does
1892         * not exist. Will not return <code>null</code>.
1893         *
1894     * <p>
1895     * <b>Definition:</b>
1896     * Number of SOP Instances in Series.
1897     * </p> 
1898         */
1899        public UnsignedIntDt getNumberOfInstancesElement() {  
1900                if (myNumberOfInstances == null) {
1901                        myNumberOfInstances = new UnsignedIntDt();
1902                }
1903                return myNumberOfInstances;
1904        }
1905
1906        
1907        /**
1908         * Gets the value(s) for <b>numberOfInstances</b> ().
1909         * creating it if it does
1910         * not exist. Will not return <code>null</code>.
1911         *
1912     * <p>
1913     * <b>Definition:</b>
1914     * Number of SOP Instances in Series.
1915     * </p> 
1916         */
1917        public Integer getNumberOfInstances() {  
1918                return getNumberOfInstancesElement().getValue();
1919        }
1920
1921        /**
1922         * Sets the value(s) for <b>numberOfInstances</b> ()
1923         *
1924     * <p>
1925     * <b>Definition:</b>
1926     * Number of SOP Instances in Series.
1927     * </p> 
1928         */
1929        public Series setNumberOfInstances(UnsignedIntDt theValue) {
1930                myNumberOfInstances = theValue;
1931                return this;
1932        }
1933        
1934        
1935
1936        /**
1937         * Sets the value for <b>numberOfInstances</b> ()
1938         *
1939     * <p>
1940     * <b>Definition:</b>
1941     * Number of SOP Instances in Series.
1942     * </p> 
1943         */
1944        public Series setNumberOfInstances( int theInteger) {
1945                myNumberOfInstances = new UnsignedIntDt(theInteger); 
1946                return this; 
1947        }
1948
1949 
1950        /**
1951         * Gets the value(s) for <b>availability</b> ().
1952         * creating it if it does
1953         * not exist. Will not return <code>null</code>.
1954         *
1955     * <p>
1956     * <b>Definition:</b>
1957     * Availability of series (online, offline or nearline)
1958     * </p> 
1959         */
1960        public BoundCodeDt<InstanceAvailabilityEnum> getAvailabilityElement() {  
1961                if (myAvailability == null) {
1962                        myAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);
1963                }
1964                return myAvailability;
1965        }
1966
1967        
1968        /**
1969         * Gets the value(s) for <b>availability</b> ().
1970         * creating it if it does
1971         * not exist. Will not return <code>null</code>.
1972         *
1973     * <p>
1974     * <b>Definition:</b>
1975     * Availability of series (online, offline or nearline)
1976     * </p> 
1977         */
1978        public String getAvailability() {  
1979                return getAvailabilityElement().getValue();
1980        }
1981
1982        /**
1983         * Sets the value(s) for <b>availability</b> ()
1984         *
1985     * <p>
1986     * <b>Definition:</b>
1987     * Availability of series (online, offline or nearline)
1988     * </p> 
1989         */
1990        public Series setAvailability(BoundCodeDt<InstanceAvailabilityEnum> theValue) {
1991                myAvailability = theValue;
1992                return this;
1993        }
1994        
1995        
1996
1997        /**
1998         * Sets the value(s) for <b>availability</b> ()
1999         *
2000     * <p>
2001     * <b>Definition:</b>
2002     * Availability of series (online, offline or nearline)
2003     * </p> 
2004         */
2005        public Series setAvailability(InstanceAvailabilityEnum theValue) {
2006                setAvailability(new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER, theValue));
2007                
2008/*
2009                getAvailabilityElement().setValueAsEnum(theValue);
2010*/
2011                return this;
2012        }
2013
2014  
2015        /**
2016         * Gets the value(s) for <b>url</b> ().
2017         * creating it if it does
2018         * not exist. Will not return <code>null</code>.
2019         *
2020     * <p>
2021     * <b>Definition:</b>
2022     * URI/URL specifying the location of the referenced series using WADO-RS
2023     * </p> 
2024         */
2025        public UriDt getUrlElement() {  
2026                if (myUrl == null) {
2027                        myUrl = new UriDt();
2028                }
2029                return myUrl;
2030        }
2031
2032        
2033        /**
2034         * Gets the value(s) for <b>url</b> ().
2035         * creating it if it does
2036         * not exist. Will not return <code>null</code>.
2037         *
2038     * <p>
2039     * <b>Definition:</b>
2040     * URI/URL specifying the location of the referenced series using WADO-RS
2041     * </p> 
2042         */
2043        public String getUrl() {  
2044                return getUrlElement().getValue();
2045        }
2046
2047        /**
2048         * Sets the value(s) for <b>url</b> ()
2049         *
2050     * <p>
2051     * <b>Definition:</b>
2052     * URI/URL specifying the location of the referenced series using WADO-RS
2053     * </p> 
2054         */
2055        public Series setUrl(UriDt theValue) {
2056                myUrl = theValue;
2057                return this;
2058        }
2059        
2060        
2061
2062        /**
2063         * Sets the value for <b>url</b> ()
2064         *
2065     * <p>
2066     * <b>Definition:</b>
2067     * URI/URL specifying the location of the referenced series using WADO-RS
2068     * </p> 
2069         */
2070        public Series setUrl( String theUri) {
2071                myUrl = new UriDt(theUri); 
2072                return this; 
2073        }
2074
2075 
2076        /**
2077         * Gets the value(s) for <b>bodySite</b> ().
2078         * creating it if it does
2079         * not exist. Will not return <code>null</code>.
2080         *
2081     * <p>
2082     * <b>Definition:</b>
2083     * Body part examined. See  DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT
2084     * </p> 
2085         */
2086        public CodingDt getBodySite() {  
2087                if (myBodySite == null) {
2088                        myBodySite = new CodingDt();
2089                }
2090                return myBodySite;
2091        }
2092
2093        /**
2094         * Sets the value(s) for <b>bodySite</b> ()
2095         *
2096     * <p>
2097     * <b>Definition:</b>
2098     * Body part examined. See  DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT
2099     * </p> 
2100         */
2101        public Series setBodySite(CodingDt theValue) {
2102                myBodySite = theValue;
2103                return this;
2104        }
2105        
2106        
2107
2108  
2109        /**
2110         * Gets the value(s) for <b>laterality</b> ().
2111         * creating it if it does
2112         * not exist. Will not return <code>null</code>.
2113         *
2114     * <p>
2115     * <b>Definition:</b>
2116     * Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.
2117     * </p> 
2118         */
2119        public CodingDt getLaterality() {  
2120                if (myLaterality == null) {
2121                        myLaterality = new CodingDt();
2122                }
2123                return myLaterality;
2124        }
2125
2126        /**
2127         * Sets the value(s) for <b>laterality</b> ()
2128         *
2129     * <p>
2130     * <b>Definition:</b>
2131     * Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.
2132     * </p> 
2133         */
2134        public Series setLaterality(CodingDt theValue) {
2135                myLaterality = theValue;
2136                return this;
2137        }
2138        
2139        
2140
2141  
2142        /**
2143         * Gets the value(s) for <b>started</b> ().
2144         * creating it if it does
2145         * not exist. Will not return <code>null</code>.
2146         *
2147     * <p>
2148     * <b>Definition:</b>
2149     * The date and time the series was started.
2150     * </p> 
2151         */
2152        public DateTimeDt getStartedElement() {  
2153                if (myStarted == null) {
2154                        myStarted = new DateTimeDt();
2155                }
2156                return myStarted;
2157        }
2158
2159        
2160        /**
2161         * Gets the value(s) for <b>started</b> ().
2162         * creating it if it does
2163         * not exist. Will not return <code>null</code>.
2164         *
2165     * <p>
2166     * <b>Definition:</b>
2167     * The date and time the series was started.
2168     * </p> 
2169         */
2170        public Date getStarted() {  
2171                return getStartedElement().getValue();
2172        }
2173
2174        /**
2175         * Sets the value(s) for <b>started</b> ()
2176         *
2177     * <p>
2178     * <b>Definition:</b>
2179     * The date and time the series was started.
2180     * </p> 
2181         */
2182        public Series setStarted(DateTimeDt theValue) {
2183                myStarted = theValue;
2184                return this;
2185        }
2186        
2187        
2188
2189        /**
2190         * Sets the value for <b>started</b> ()
2191         *
2192     * <p>
2193     * <b>Definition:</b>
2194     * The date and time the series was started.
2195     * </p> 
2196         */
2197        public Series setStarted( Date theDate,  TemporalPrecisionEnum thePrecision) {
2198                myStarted = new DateTimeDt(theDate, thePrecision); 
2199                return this; 
2200        }
2201
2202        /**
2203         * Sets the value for <b>started</b> ()
2204         *
2205     * <p>
2206     * <b>Definition:</b>
2207     * The date and time the series was started.
2208     * </p> 
2209         */
2210        public Series setStartedWithSecondsPrecision( Date theDate) {
2211                myStarted = new DateTimeDt(theDate); 
2212                return this; 
2213        }
2214
2215 
2216        /**
2217         * Gets the value(s) for <b>instance</b> ().
2218         * creating it if it does
2219         * not exist. Will not return <code>null</code>.
2220         *
2221     * <p>
2222     * <b>Definition:</b>
2223     * A single SOP Instance within the series, e.g. an image, or presentation state.
2224     * </p> 
2225         */
2226        public java.util.List<SeriesInstance> getInstance() {  
2227                if (myInstance == null) {
2228                        myInstance = new java.util.ArrayList<SeriesInstance>();
2229                }
2230                return myInstance;
2231        }
2232
2233        /**
2234         * Sets the value(s) for <b>instance</b> ()
2235         *
2236     * <p>
2237     * <b>Definition:</b>
2238     * A single SOP Instance within the series, e.g. an image, or presentation state.
2239     * </p> 
2240         */
2241        public Series setInstance(java.util.List<SeriesInstance> theValue) {
2242                myInstance = theValue;
2243                return this;
2244        }
2245        
2246        
2247
2248        /**
2249         * Adds and returns a new value for <b>instance</b> ()
2250         *
2251     * <p>
2252     * <b>Definition:</b>
2253     * A single SOP Instance within the series, e.g. an image, or presentation state.
2254     * </p> 
2255         */
2256        public SeriesInstance addInstance() {
2257                SeriesInstance newType = new SeriesInstance();
2258                getInstance().add(newType);
2259                return newType; 
2260        }
2261
2262        /**
2263         * Adds a given new value for <b>instance</b> ()
2264         *
2265         * <p>
2266         * <b>Definition:</b>
2267         * A single SOP Instance within the series, e.g. an image, or presentation state.
2268         * </p>
2269         * @param theValue The instance to add (must not be <code>null</code>)
2270         */
2271        public Series addInstance(SeriesInstance theValue) {
2272                if (theValue == null) {
2273                        throw new NullPointerException("theValue must not be null");
2274                }
2275                getInstance().add(theValue);
2276                return this;
2277        }
2278
2279        /**
2280         * Gets the first repetition for <b>instance</b> (),
2281         * creating it if it does not already exist.
2282         *
2283     * <p>
2284     * <b>Definition:</b>
2285     * A single SOP Instance within the series, e.g. an image, or presentation state.
2286     * </p> 
2287         */
2288        public SeriesInstance getInstanceFirstRep() {
2289                if (getInstance().isEmpty()) {
2290                        return addInstance();
2291                }
2292                return getInstance().get(0); 
2293        }
2294  
2295
2296
2297        }
2298
2299        /**
2300         * Block class for child element: <b>ImagingStudy.series.instance</b> ()
2301         *
2302     * <p>
2303     * <b>Definition:</b>
2304     * A single SOP Instance within the series, e.g. an image, or presentation state.
2305     * </p> 
2306         */
2307        @Block()        
2308        public static class SeriesInstance 
2309            extends  BaseIdentifiableElement        implements IResourceBlock {
2310        
2311        @Child(name="number", type=UnsignedIntDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
2312        @Description(
2313                shortDefinition="",
2314                formalDefinition="The number of instance in the series"
2315        )
2316        private UnsignedIntDt myNumber;
2317        
2318        @Child(name="uid", type=OidDt.class, order=1, min=1, max=1, summary=false, modifier=false)      
2319        @Description(
2320                shortDefinition="",
2321                formalDefinition="Formal identifier for this image or other content"
2322        )
2323        private OidDt myUid;
2324        
2325        @Child(name="sopClass", type=OidDt.class, order=2, min=1, max=1, summary=false, modifier=false) 
2326        @Description(
2327                shortDefinition="",
2328                formalDefinition="DICOM instance  type"
2329        )
2330        private OidDt mySopClass;
2331        
2332        @Child(name="type", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)  
2333        @Description(
2334                shortDefinition="",
2335                formalDefinition="A human-friendly SOP Class name"
2336        )
2337        private StringDt myType;
2338        
2339        @Child(name="title", type=StringDt.class, order=4, min=0, max=1, summary=false, modifier=false) 
2340        @Description(
2341                shortDefinition="",
2342                formalDefinition="The description of the instance"
2343        )
2344        private StringDt myTitle;
2345        
2346        @Child(name="content", type=AttachmentDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
2347        @Description(
2348                shortDefinition="",
2349                formalDefinition="Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance."
2350        )
2351        private java.util.List<AttachmentDt> myContent;
2352        
2353
2354        @Override
2355        public boolean isEmpty() {
2356                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myNumber,  myUid,  mySopClass,  myType,  myTitle,  myContent);
2357        }
2358        
2359        @Override
2360        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2361                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumber, myUid, mySopClass, myType, myTitle, myContent);
2362        }
2363
2364        /**
2365         * Gets the value(s) for <b>number</b> ().
2366         * creating it if it does
2367         * not exist. Will not return <code>null</code>.
2368         *
2369     * <p>
2370     * <b>Definition:</b>
2371     * The number of instance in the series
2372     * </p> 
2373         */
2374        public UnsignedIntDt getNumberElement() {  
2375                if (myNumber == null) {
2376                        myNumber = new UnsignedIntDt();
2377                }
2378                return myNumber;
2379        }
2380
2381        
2382        /**
2383         * Gets the value(s) for <b>number</b> ().
2384         * creating it if it does
2385         * not exist. Will not return <code>null</code>.
2386         *
2387     * <p>
2388     * <b>Definition:</b>
2389     * The number of instance in the series
2390     * </p> 
2391         */
2392        public Integer getNumber() {  
2393                return getNumberElement().getValue();
2394        }
2395
2396        /**
2397         * Sets the value(s) for <b>number</b> ()
2398         *
2399     * <p>
2400     * <b>Definition:</b>
2401     * The number of instance in the series
2402     * </p> 
2403         */
2404        public SeriesInstance setNumber(UnsignedIntDt theValue) {
2405                myNumber = theValue;
2406                return this;
2407        }
2408        
2409        
2410
2411        /**
2412         * Sets the value for <b>number</b> ()
2413         *
2414     * <p>
2415     * <b>Definition:</b>
2416     * The number of instance in the series
2417     * </p> 
2418         */
2419        public SeriesInstance setNumber( int theInteger) {
2420                myNumber = new UnsignedIntDt(theInteger); 
2421                return this; 
2422        }
2423
2424 
2425        /**
2426         * Gets the value(s) for <b>uid</b> ().
2427         * creating it if it does
2428         * not exist. Will not return <code>null</code>.
2429         *
2430     * <p>
2431     * <b>Definition:</b>
2432     * Formal identifier for this image or other content
2433     * </p> 
2434         */
2435        public OidDt getUidElement() {  
2436                if (myUid == null) {
2437                        myUid = new OidDt();
2438                }
2439                return myUid;
2440        }
2441
2442        
2443        /**
2444         * Gets the value(s) for <b>uid</b> ().
2445         * creating it if it does
2446         * not exist. Will not return <code>null</code>.
2447         *
2448     * <p>
2449     * <b>Definition:</b>
2450     * Formal identifier for this image or other content
2451     * </p> 
2452         */
2453        public String getUid() {  
2454                return getUidElement().getValue();
2455        }
2456
2457        /**
2458         * Sets the value(s) for <b>uid</b> ()
2459         *
2460     * <p>
2461     * <b>Definition:</b>
2462     * Formal identifier for this image or other content
2463     * </p> 
2464         */
2465        public SeriesInstance setUid(OidDt theValue) {
2466                myUid = theValue;
2467                return this;
2468        }
2469        
2470        
2471
2472  
2473        /**
2474         * Gets the value(s) for <b>sopClass</b> ().
2475         * creating it if it does
2476         * not exist. Will not return <code>null</code>.
2477         *
2478     * <p>
2479     * <b>Definition:</b>
2480     * DICOM instance  type
2481     * </p> 
2482         */
2483        public OidDt getSopClassElement() {  
2484                if (mySopClass == null) {
2485                        mySopClass = new OidDt();
2486                }
2487                return mySopClass;
2488        }
2489
2490        
2491        /**
2492         * Gets the value(s) for <b>sopClass</b> ().
2493         * creating it if it does
2494         * not exist. Will not return <code>null</code>.
2495         *
2496     * <p>
2497     * <b>Definition:</b>
2498     * DICOM instance  type
2499     * </p> 
2500         */
2501        public String getSopClass() {  
2502                return getSopClassElement().getValue();
2503        }
2504
2505        /**
2506         * Sets the value(s) for <b>sopClass</b> ()
2507         *
2508     * <p>
2509     * <b>Definition:</b>
2510     * DICOM instance  type
2511     * </p> 
2512         */
2513        public SeriesInstance setSopClass(OidDt theValue) {
2514                mySopClass = theValue;
2515                return this;
2516        }
2517        
2518        
2519
2520  
2521        /**
2522         * Gets the value(s) for <b>type </b> ().
2523         * creating it if it does
2524         * not exist. Will not return <code>null</code>.
2525         *
2526     * <p>
2527     * <b>Definition:</b>
2528     * A human-friendly SOP Class name
2529     * </p> 
2530         */
2531        public StringDt getTypeElement() {  
2532                if (myType == null) {
2533                        myType = new StringDt();
2534                }
2535                return myType;
2536        }
2537
2538        
2539        /**
2540         * Gets the value(s) for <b>type </b> ().
2541         * creating it if it does
2542         * not exist. Will not return <code>null</code>.
2543         *
2544     * <p>
2545     * <b>Definition:</b>
2546     * A human-friendly SOP Class name
2547     * </p> 
2548         */
2549        public String getType() {  
2550                return getTypeElement().getValue();
2551        }
2552
2553        /**
2554         * Sets the value(s) for <b>type </b> ()
2555         *
2556     * <p>
2557     * <b>Definition:</b>
2558     * A human-friendly SOP Class name
2559     * </p> 
2560         */
2561        public SeriesInstance setType(StringDt theValue) {
2562                myType = theValue;
2563                return this;
2564        }
2565        
2566        
2567
2568        /**
2569         * Sets the value for <b>type </b> ()
2570         *
2571     * <p>
2572     * <b>Definition:</b>
2573     * A human-friendly SOP Class name
2574     * </p> 
2575         */
2576        public SeriesInstance setType( String theString) {
2577                myType = new StringDt(theString); 
2578                return this; 
2579        }
2580
2581 
2582        /**
2583         * Gets the value(s) for <b>title</b> ().
2584         * creating it if it does
2585         * not exist. Will not return <code>null</code>.
2586         *
2587     * <p>
2588     * <b>Definition:</b>
2589     * The description of the instance
2590     * </p> 
2591         */
2592        public StringDt getTitleElement() {  
2593                if (myTitle == null) {
2594                        myTitle = new StringDt();
2595                }
2596                return myTitle;
2597        }
2598
2599        
2600        /**
2601         * Gets the value(s) for <b>title</b> ().
2602         * creating it if it does
2603         * not exist. Will not return <code>null</code>.
2604         *
2605     * <p>
2606     * <b>Definition:</b>
2607     * The description of the instance
2608     * </p> 
2609         */
2610        public String getTitle() {  
2611                return getTitleElement().getValue();
2612        }
2613
2614        /**
2615         * Sets the value(s) for <b>title</b> ()
2616         *
2617     * <p>
2618     * <b>Definition:</b>
2619     * The description of the instance
2620     * </p> 
2621         */
2622        public SeriesInstance setTitle(StringDt theValue) {
2623                myTitle = theValue;
2624                return this;
2625        }
2626        
2627        
2628
2629        /**
2630         * Sets the value for <b>title</b> ()
2631         *
2632     * <p>
2633     * <b>Definition:</b>
2634     * The description of the instance
2635     * </p> 
2636         */
2637        public SeriesInstance setTitle( String theString) {
2638                myTitle = new StringDt(theString); 
2639                return this; 
2640        }
2641
2642 
2643        /**
2644         * Gets the value(s) for <b>content</b> ().
2645         * creating it if it does
2646         * not exist. Will not return <code>null</code>.
2647         *
2648     * <p>
2649     * <b>Definition:</b>
2650     * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.
2651     * </p> 
2652         */
2653        public java.util.List<AttachmentDt> getContent() {  
2654                if (myContent == null) {
2655                        myContent = new java.util.ArrayList<AttachmentDt>();
2656                }
2657                return myContent;
2658        }
2659
2660        /**
2661         * Sets the value(s) for <b>content</b> ()
2662         *
2663     * <p>
2664     * <b>Definition:</b>
2665     * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.
2666     * </p> 
2667         */
2668        public SeriesInstance setContent(java.util.List<AttachmentDt> theValue) {
2669                myContent = theValue;
2670                return this;
2671        }
2672        
2673        
2674
2675        /**
2676         * Adds and returns a new value for <b>content</b> ()
2677         *
2678     * <p>
2679     * <b>Definition:</b>
2680     * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.
2681     * </p> 
2682         */
2683        public AttachmentDt addContent() {
2684                AttachmentDt newType = new AttachmentDt();
2685                getContent().add(newType);
2686                return newType; 
2687        }
2688
2689        /**
2690         * Adds a given new value for <b>content</b> ()
2691         *
2692         * <p>
2693         * <b>Definition:</b>
2694         * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.
2695         * </p>
2696         * @param theValue The content to add (must not be <code>null</code>)
2697         */
2698        public SeriesInstance addContent(AttachmentDt theValue) {
2699                if (theValue == null) {
2700                        throw new NullPointerException("theValue must not be null");
2701                }
2702                getContent().add(theValue);
2703                return this;
2704        }
2705
2706        /**
2707         * Gets the first repetition for <b>content</b> (),
2708         * creating it if it does not already exist.
2709         *
2710     * <p>
2711     * <b>Definition:</b>
2712     * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.
2713     * </p> 
2714         */
2715        public AttachmentDt getContentFirstRep() {
2716                if (getContent().isEmpty()) {
2717                        return addContent();
2718                }
2719                return getContent().get(0); 
2720        }
2721  
2722
2723
2724        }
2725
2726
2727
2728
2729
2730    @Override
2731    public String getResourceName() {
2732        return "ImagingStudy";
2733    }
2734    
2735    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2736        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2737    }
2738
2739
2740}