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>DiagnosticReport</b> Resource
320 * (clinical.diagnostics)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * To support reporting for any diagnostic report into a clinical data repository.
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/DiagnosticReport">http://hl7.org/fhir/profiles/DiagnosticReport</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/profiles/DiagnosticReport", id="diagnosticreport")
339public class DiagnosticReport extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>status</b>
344         * <p>
345         * Description: <b>The status of the report</b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>DiagnosticReport.status</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token"  )
351        public static final String SP_STATUS = "status";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>status</b>
355         * <p>
356         * Description: <b>The status of the report</b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>DiagnosticReport.status</b><br>
359         * </p>
360         */
361        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
362
363        /**
364         * Search parameter constant for <b>issued</b>
365         * <p>
366         * Description: <b>When the report was issued</b><br>
367         * Type: <b>date</b><br>
368         * Path: <b>DiagnosticReport.issued</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date"  )
372        public static final String SP_ISSUED = "issued";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>issued</b>
376         * <p>
377         * Description: <b>When the report was issued</b><br>
378         * Type: <b>date</b><br>
379         * Path: <b>DiagnosticReport.issued</b><br>
380         * </p>
381         */
382        public static final DateClientParam ISSUED = new DateClientParam(SP_ISSUED);
383
384        /**
385         * Search parameter constant for <b>subject</b>
386         * <p>
387         * Description: <b>The subject of the report</b><br>
388         * Type: <b>reference</b><br>
389         * Path: <b>DiagnosticReport.subject</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference"  )
393        public static final String SP_SUBJECT = "subject";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
397         * <p>
398         * Description: <b>The subject of the report</b><br>
399         * Type: <b>reference</b><br>
400         * Path: <b>DiagnosticReport.subject</b><br>
401         * </p>
402         */
403        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
404
405        /**
406         * Search parameter constant for <b>performer</b>
407         * <p>
408         * Description: <b>Who was the source of the report (organization)</b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>DiagnosticReport.performer</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference"  )
414        public static final String SP_PERFORMER = "performer";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>performer</b>
418         * <p>
419         * Description: <b>Who was the source of the report (organization)</b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>DiagnosticReport.performer</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam PERFORMER = new ReferenceClientParam(SP_PERFORMER);
425
426        /**
427         * Search parameter constant for <b>identifier</b>
428         * <p>
429         * Description: <b>An identifier for the report</b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>DiagnosticReport.identifier</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token"  )
435        public static final String SP_IDENTIFIER = "identifier";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
439         * <p>
440         * Description: <b>An identifier for the report</b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>DiagnosticReport.identifier</b><br>
443         * </p>
444         */
445        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
446
447        /**
448         * Search parameter constant for <b>category</b>
449         * <p>
450         * Description: <b>Which diagnostic discipline/department created the report</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>DiagnosticReport.category</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token"  )
456        public static final String SP_CATEGORY = "category";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>category</b>
460         * <p>
461         * Description: <b>Which diagnostic discipline/department created the report</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>DiagnosticReport.category</b><br>
464         * </p>
465         */
466        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
467
468        /**
469         * Search parameter constant for <b>date</b>
470         * <p>
471         * Description: <b>The clinically relevant time of the report</b><br>
472         * Type: <b>date</b><br>
473         * Path: <b>DiagnosticReport.effective[x]</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="date", path="DiagnosticReport.effective[x]", description="The clinically relevant time of the report", type="date"  )
477        public static final String SP_DATE = "date";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>date</b>
481         * <p>
482         * Description: <b>The clinically relevant time of the report</b><br>
483         * Type: <b>date</b><br>
484         * Path: <b>DiagnosticReport.effective[x]</b><br>
485         * </p>
486         */
487        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
488
489        /**
490         * Search parameter constant for <b>specimen</b>
491         * <p>
492         * Description: <b>The specimen details</b><br>
493         * Type: <b>reference</b><br>
494         * Path: <b>DiagnosticReport.specimen</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference"  )
498        public static final String SP_SPECIMEN = "specimen";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
502         * <p>
503         * Description: <b>The specimen details</b><br>
504         * Type: <b>reference</b><br>
505         * Path: <b>DiagnosticReport.specimen</b><br>
506         * </p>
507         */
508        public static final ReferenceClientParam SPECIMEN = new ReferenceClientParam(SP_SPECIMEN);
509
510        /**
511         * Search parameter constant for <b>code</b>
512         * <p>
513         * Description: <b>The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result</b><br>
514         * Type: <b>token</b><br>
515         * Path: <b>DiagnosticReport.code</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="code", path="DiagnosticReport.code", description="The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result", type="token"  )
519        public static final String SP_CODE = "code";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>code</b>
523         * <p>
524         * Description: <b>The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result</b><br>
525         * Type: <b>token</b><br>
526         * Path: <b>DiagnosticReport.code</b><br>
527         * </p>
528         */
529        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
530
531        /**
532         * Search parameter constant for <b>result</b>
533         * <p>
534         * Description: <b>Link to an atomic result (observation resource)</b><br>
535         * Type: <b>reference</b><br>
536         * Path: <b>DiagnosticReport.result</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference"  )
540        public static final String SP_RESULT = "result";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>result</b>
544         * <p>
545         * Description: <b>Link to an atomic result (observation resource)</b><br>
546         * Type: <b>reference</b><br>
547         * Path: <b>DiagnosticReport.result</b><br>
548         * </p>
549         */
550        public static final ReferenceClientParam RESULT = new ReferenceClientParam(SP_RESULT);
551
552        /**
553         * Search parameter constant for <b>diagnosis</b>
554         * <p>
555         * Description: <b>A coded diagnosis on the report</b><br>
556         * Type: <b>token</b><br>
557         * Path: <b>DiagnosticReport.codedDiagnosis</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token"  )
561        public static final String SP_DIAGNOSIS = "diagnosis";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>diagnosis</b>
565         * <p>
566         * Description: <b>A coded diagnosis on the report</b><br>
567         * Type: <b>token</b><br>
568         * Path: <b>DiagnosticReport.codedDiagnosis</b><br>
569         * </p>
570         */
571        public static final TokenClientParam DIAGNOSIS = new TokenClientParam(SP_DIAGNOSIS);
572
573        /**
574         * Search parameter constant for <b>image</b>
575         * <p>
576         * Description: <b>A reference to the image source.</b><br>
577         * Type: <b>reference</b><br>
578         * Path: <b>DiagnosticReport.image.link</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference"  )
582        public static final String SP_IMAGE = "image";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>image</b>
586         * <p>
587         * Description: <b>A reference to the image source.</b><br>
588         * Type: <b>reference</b><br>
589         * Path: <b>DiagnosticReport.image.link</b><br>
590         * </p>
591         */
592        public static final ReferenceClientParam IMAGE = new ReferenceClientParam(SP_IMAGE);
593
594        /**
595         * Search parameter constant for <b>request</b>
596         * <p>
597         * Description: <b>Reference to the test or procedure request.</b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>DiagnosticReport.request</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="request", path="DiagnosticReport.request", description="Reference to the test or procedure request.", type="reference"  )
603        public static final String SP_REQUEST = "request";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>request</b>
607         * <p>
608         * Description: <b>Reference to the test or procedure request.</b><br>
609         * Type: <b>reference</b><br>
610         * Path: <b>DiagnosticReport.request</b><br>
611         * </p>
612         */
613        public static final ReferenceClientParam REQUEST = new ReferenceClientParam(SP_REQUEST);
614
615        /**
616         * Search parameter constant for <b>patient</b>
617         * <p>
618         * Description: <b>The subject of the report if a patient</b><br>
619         * Type: <b>reference</b><br>
620         * Path: <b>DiagnosticReport.subject</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference"  )
624        public static final String SP_PATIENT = "patient";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
628         * <p>
629         * Description: <b>The subject of the report if a patient</b><br>
630         * Type: <b>reference</b><br>
631         * Path: <b>DiagnosticReport.subject</b><br>
632         * </p>
633         */
634        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
635
636        /**
637         * Search parameter constant for <b>encounter</b>
638         * <p>
639         * Description: <b>The Encounter when the order was made</b><br>
640         * Type: <b>reference</b><br>
641         * Path: <b>DiagnosticReport.encounter</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference"  )
645        public static final String SP_ENCOUNTER = "encounter";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
649         * <p>
650         * Description: <b>The Encounter when the order was made</b><br>
651         * Type: <b>reference</b><br>
652         * Path: <b>DiagnosticReport.encounter</b><br>
653         * </p>
654         */
655        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
656
657
658        /**
659         * Constant for fluent queries to be used to add include statements. Specifies
660         * the path value of "<b>DiagnosticReport:encounter</b>".
661         */
662        public static final Include INCLUDE_ENCOUNTER = new Include("DiagnosticReport:encounter");
663
664        /**
665         * Constant for fluent queries to be used to add include statements. Specifies
666         * the path value of "<b>DiagnosticReport:image</b>".
667         */
668        public static final Include INCLUDE_IMAGE = new Include("DiagnosticReport:image");
669
670        /**
671         * Constant for fluent queries to be used to add include statements. Specifies
672         * the path value of "<b>DiagnosticReport:patient</b>".
673         */
674        public static final Include INCLUDE_PATIENT = new Include("DiagnosticReport:patient");
675
676        /**
677         * Constant for fluent queries to be used to add include statements. Specifies
678         * the path value of "<b>DiagnosticReport:performer</b>".
679         */
680        public static final Include INCLUDE_PERFORMER = new Include("DiagnosticReport:performer");
681
682        /**
683         * Constant for fluent queries to be used to add include statements. Specifies
684         * the path value of "<b>DiagnosticReport:request</b>".
685         */
686        public static final Include INCLUDE_REQUEST = new Include("DiagnosticReport:request");
687
688        /**
689         * Constant for fluent queries to be used to add include statements. Specifies
690         * the path value of "<b>DiagnosticReport:result</b>".
691         */
692        public static final Include INCLUDE_RESULT = new Include("DiagnosticReport:result");
693
694        /**
695         * Constant for fluent queries to be used to add include statements. Specifies
696         * the path value of "<b>DiagnosticReport:specimen</b>".
697         */
698        public static final Include INCLUDE_SPECIMEN = new Include("DiagnosticReport:specimen");
699
700        /**
701         * Constant for fluent queries to be used to add include statements. Specifies
702         * the path value of "<b>DiagnosticReport:subject</b>".
703         */
704        public static final Include INCLUDE_SUBJECT = new Include("DiagnosticReport:subject");
705
706
707        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
708        @Description(
709                shortDefinition="id",
710                formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider"
711        )
712        private java.util.List<IdentifierDt> myIdentifier;
713        
714        @Child(name="status", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=true)    
715        @Description(
716                shortDefinition="status",
717                formalDefinition="The status of the diagnostic report as a whole"
718        )
719        private BoundCodeDt<DiagnosticReportStatusEnum> myStatus;
720        
721        @Child(name="category", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)      
722        @Description(
723                shortDefinition="class",
724                formalDefinition="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes."
725        )
726        private CodeableConceptDt myCategory;
727        
728        @Child(name="code", type=CodeableConceptDt.class, order=3, min=1, max=1, summary=true, modifier=false)  
729        @Description(
730                shortDefinition="what",
731                formalDefinition="A code or name that describes this diagnostic report"
732        )
733        private CodeableConceptDt myCode;
734        
735        @Child(name="subject", order=4, min=1, max=1, summary=true, modifier=false, type={
736                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Location.class })
737        @Description(
738                shortDefinition="who.focus",
739                formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources."
740        )
741        private ResourceReferenceDt mySubject;
742        
743        @Child(name="encounter", order=5, min=0, max=1, summary=true, modifier=false, type={
744                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
745        @Description(
746                shortDefinition="context",
747                formalDefinition="The link to the health care event (encounter) when the order was made."
748        )
749        private ResourceReferenceDt myEncounter;
750        
751        @Child(name="effective", order=6, min=1, max=1, summary=true, modifier=false, type={
752                DateTimeDt.class,               PeriodDt.class  })
753        @Description(
754                shortDefinition="when.done",
755                formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself."
756        )
757        private IDatatype myEffective;
758        
759        @Child(name="issued", type=InstantDt.class, order=7, min=1, max=1, summary=true, modifier=false)        
760        @Description(
761                shortDefinition="when.recorded",
762                formalDefinition="The date and time that this version of the report was released from the source diagnostic service"
763        )
764        private InstantDt myIssued;
765        
766        @Child(name="performer", order=8, min=1, max=1, summary=true, modifier=false, type={
767                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.class     })
768        @Description(
769                shortDefinition="who.witness",
770                formalDefinition="The diagnostic service that is responsible for issuing the report"
771        )
772        private ResourceReferenceDt myPerformer;
773        
774        @Child(name="request", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
775                ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder.class,                 ca.uhn.fhir.model.dstu2.resource.ProcedureRequest.class,                ca.uhn.fhir.model.dstu2.resource.ReferralRequest.class  })
776        @Description(
777                shortDefinition="",
778                formalDefinition="Details concerning a test or procedure requested."
779        )
780        private java.util.List<ResourceReferenceDt> myRequest;
781        
782        @Child(name="specimen", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
783                ca.uhn.fhir.model.dstu2.resource.Specimen.class })
784        @Description(
785                shortDefinition="",
786                formalDefinition="Details about the specimens on which this diagnostic report is based"
787        )
788        private java.util.List<ResourceReferenceDt> mySpecimen;
789        
790        @Child(name="result", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
791                ca.uhn.fhir.model.dstu2.resource.Observation.class      })
792        @Description(
793                shortDefinition="",
794                formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")."
795        )
796        private java.util.List<ResourceReferenceDt> myResult;
797        
798        @Child(name="imagingStudy", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
799                ca.uhn.fhir.model.dstu2.resource.ImagingStudy.class,            ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection.class   })
800        @Description(
801                shortDefinition="",
802                formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images."
803        )
804        private java.util.List<ResourceReferenceDt> myImagingStudy;
805        
806        @Child(name="image", order=13, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
807        @Description(
808                shortDefinition="",
809                formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)."
810        )
811        private java.util.List<Image> myImage;
812        
813        @Child(name="conclusion", type=StringDt.class, order=14, min=0, max=1, summary=false, modifier=false)   
814        @Description(
815                shortDefinition="",
816                formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report"
817        )
818        private StringDt myConclusion;
819        
820        @Child(name="codedDiagnosis", type=CodeableConceptDt.class, order=15, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
821        @Description(
822                shortDefinition="",
823                formalDefinition=""
824        )
825        private java.util.List<CodeableConceptDt> myCodedDiagnosis;
826        
827        @Child(name="presentedForm", type=AttachmentDt.class, order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
828        @Description(
829                shortDefinition="",
830                formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent."
831        )
832        private java.util.List<AttachmentDt> myPresentedForm;
833        
834
835        @Override
836        public boolean isEmpty() {
837                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myStatus,  myCategory,  myCode,  mySubject,  myEncounter,  myEffective,  myIssued,  myPerformer,  myRequest,  mySpecimen,  myResult,  myImagingStudy,  myImage,  myConclusion,  myCodedDiagnosis,  myPresentedForm);
838        }
839        
840        @Override
841        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
842                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myCategory, myCode, mySubject, myEncounter, myEffective, myIssued, myPerformer, myRequest, mySpecimen, myResult, myImagingStudy, myImage, myConclusion, myCodedDiagnosis, myPresentedForm);
843        }
844
845        /**
846         * Gets the value(s) for <b>identifier</b> (id).
847         * creating it if it does
848         * not exist. Will not return <code>null</code>.
849         *
850     * <p>
851     * <b>Definition:</b>
852     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
853     * </p> 
854         */
855        public java.util.List<IdentifierDt> getIdentifier() {  
856                if (myIdentifier == null) {
857                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
858                }
859                return myIdentifier;
860        }
861
862        /**
863         * Sets the value(s) for <b>identifier</b> (id)
864         *
865     * <p>
866     * <b>Definition:</b>
867     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
868     * </p> 
869         */
870        public DiagnosticReport setIdentifier(java.util.List<IdentifierDt> theValue) {
871                myIdentifier = theValue;
872                return this;
873        }
874        
875        
876
877        /**
878         * Adds and returns a new value for <b>identifier</b> (id)
879         *
880     * <p>
881     * <b>Definition:</b>
882     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
883     * </p> 
884         */
885        public IdentifierDt addIdentifier() {
886                IdentifierDt newType = new IdentifierDt();
887                getIdentifier().add(newType);
888                return newType; 
889        }
890
891        /**
892         * Adds a given new value for <b>identifier</b> (id)
893         *
894         * <p>
895         * <b>Definition:</b>
896         * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
897         * </p>
898         * @param theValue The identifier to add (must not be <code>null</code>)
899         */
900        public DiagnosticReport addIdentifier(IdentifierDt theValue) {
901                if (theValue == null) {
902                        throw new NullPointerException("theValue must not be null");
903                }
904                getIdentifier().add(theValue);
905                return this;
906        }
907
908        /**
909         * Gets the first repetition for <b>identifier</b> (id),
910         * creating it if it does not already exist.
911         *
912     * <p>
913     * <b>Definition:</b>
914     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
915     * </p> 
916         */
917        public IdentifierDt getIdentifierFirstRep() {
918                if (getIdentifier().isEmpty()) {
919                        return addIdentifier();
920                }
921                return getIdentifier().get(0); 
922        }
923  
924        /**
925         * Gets the value(s) for <b>status</b> (status).
926         * creating it if it does
927         * not exist. Will not return <code>null</code>.
928         *
929     * <p>
930     * <b>Definition:</b>
931     * The status of the diagnostic report as a whole
932     * </p> 
933         */
934        public BoundCodeDt<DiagnosticReportStatusEnum> getStatusElement() {  
935                if (myStatus == null) {
936                        myStatus = new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER);
937                }
938                return myStatus;
939        }
940
941        
942        /**
943         * Gets the value(s) for <b>status</b> (status).
944         * creating it if it does
945         * not exist. Will not return <code>null</code>.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * The status of the diagnostic report as a whole
950     * </p> 
951         */
952        public String getStatus() {  
953                return getStatusElement().getValue();
954        }
955
956        /**
957         * Sets the value(s) for <b>status</b> (status)
958         *
959     * <p>
960     * <b>Definition:</b>
961     * The status of the diagnostic report as a whole
962     * </p> 
963         */
964        public DiagnosticReport setStatus(BoundCodeDt<DiagnosticReportStatusEnum> theValue) {
965                myStatus = theValue;
966                return this;
967        }
968        
969        
970
971        /**
972         * Sets the value(s) for <b>status</b> (status)
973         *
974     * <p>
975     * <b>Definition:</b>
976     * The status of the diagnostic report as a whole
977     * </p> 
978         */
979        public DiagnosticReport setStatus(DiagnosticReportStatusEnum theValue) {
980                setStatus(new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER, theValue));
981                
982/*
983                getStatusElement().setValueAsEnum(theValue);
984*/
985                return this;
986        }
987
988  
989        /**
990         * Gets the value(s) for <b>category</b> (class).
991         * creating it if it does
992         * not exist. Will not return <code>null</code>.
993         *
994     * <p>
995     * <b>Definition:</b>
996     * A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.
997     * </p> 
998         */
999        public CodeableConceptDt getCategory() {  
1000                if (myCategory == null) {
1001                        myCategory = new CodeableConceptDt();
1002                }
1003                return myCategory;
1004        }
1005
1006        /**
1007         * Sets the value(s) for <b>category</b> (class)
1008         *
1009     * <p>
1010     * <b>Definition:</b>
1011     * A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.
1012     * </p> 
1013         */
1014        public DiagnosticReport setCategory(CodeableConceptDt theValue) {
1015                myCategory = theValue;
1016                return this;
1017        }
1018        
1019        
1020
1021  
1022        /**
1023         * Gets the value(s) for <b>code</b> (what).
1024         * creating it if it does
1025         * not exist. Will not return <code>null</code>.
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * A code or name that describes this diagnostic report
1030     * </p> 
1031         */
1032        public CodeableConceptDt getCode() {  
1033                if (myCode == null) {
1034                        myCode = new CodeableConceptDt();
1035                }
1036                return myCode;
1037        }
1038
1039        /**
1040         * Sets the value(s) for <b>code</b> (what)
1041         *
1042     * <p>
1043     * <b>Definition:</b>
1044     * A code or name that describes this diagnostic report
1045     * </p> 
1046         */
1047        public DiagnosticReport setCode(CodeableConceptDt theValue) {
1048                myCode = theValue;
1049                return this;
1050        }
1051        
1052        
1053
1054  
1055        /**
1056         * Gets the value(s) for <b>subject</b> (who.focus).
1057         * creating it if it does
1058         * not exist. Will not return <code>null</code>.
1059         *
1060     * <p>
1061     * <b>Definition:</b>
1062     * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.
1063     * </p> 
1064         */
1065        public ResourceReferenceDt getSubject() {  
1066                if (mySubject == null) {
1067                        mySubject = new ResourceReferenceDt();
1068                }
1069                return mySubject;
1070        }
1071
1072        /**
1073         * Sets the value(s) for <b>subject</b> (who.focus)
1074         *
1075     * <p>
1076     * <b>Definition:</b>
1077     * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.
1078     * </p> 
1079         */
1080        public DiagnosticReport setSubject(ResourceReferenceDt theValue) {
1081                mySubject = theValue;
1082                return this;
1083        }
1084        
1085        
1086
1087  
1088        /**
1089         * Gets the value(s) for <b>encounter</b> (context).
1090         * creating it if it does
1091         * not exist. Will not return <code>null</code>.
1092         *
1093     * <p>
1094     * <b>Definition:</b>
1095     * The link to the health care event (encounter) when the order was made.
1096     * </p> 
1097         */
1098        public ResourceReferenceDt getEncounter() {  
1099                if (myEncounter == null) {
1100                        myEncounter = new ResourceReferenceDt();
1101                }
1102                return myEncounter;
1103        }
1104
1105        /**
1106         * Sets the value(s) for <b>encounter</b> (context)
1107         *
1108     * <p>
1109     * <b>Definition:</b>
1110     * The link to the health care event (encounter) when the order was made.
1111     * </p> 
1112         */
1113        public DiagnosticReport setEncounter(ResourceReferenceDt theValue) {
1114                myEncounter = theValue;
1115                return this;
1116        }
1117        
1118        
1119
1120  
1121        /**
1122         * Gets the value(s) for <b>effective[x]</b> (when.done).
1123         * creating it if it does
1124         * not exist. Will not return <code>null</code>.
1125         *
1126     * <p>
1127     * <b>Definition:</b>
1128     * The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
1129     * </p> 
1130         */
1131        public IDatatype getEffective() {  
1132                return myEffective;
1133        }
1134
1135        /**
1136         * Sets the value(s) for <b>effective[x]</b> (when.done)
1137         *
1138     * <p>
1139     * <b>Definition:</b>
1140     * The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
1141     * </p> 
1142         */
1143        public DiagnosticReport setEffective(IDatatype theValue) {
1144                myEffective = theValue;
1145                return this;
1146        }
1147        
1148        
1149
1150  
1151        /**
1152         * Gets the value(s) for <b>issued</b> (when.recorded).
1153         * creating it if it does
1154         * not exist. Will not return <code>null</code>.
1155         *
1156     * <p>
1157     * <b>Definition:</b>
1158     * The date and time that this version of the report was released from the source diagnostic service
1159     * </p> 
1160         */
1161        public InstantDt getIssuedElement() {  
1162                if (myIssued == null) {
1163                        myIssued = new InstantDt();
1164                }
1165                return myIssued;
1166        }
1167
1168        
1169        /**
1170         * Gets the value(s) for <b>issued</b> (when.recorded).
1171         * creating it if it does
1172         * not exist. Will not return <code>null</code>.
1173         *
1174     * <p>
1175     * <b>Definition:</b>
1176     * The date and time that this version of the report was released from the source diagnostic service
1177     * </p> 
1178         */
1179        public Date getIssued() {  
1180                return getIssuedElement().getValue();
1181        }
1182
1183        /**
1184         * Sets the value(s) for <b>issued</b> (when.recorded)
1185         *
1186     * <p>
1187     * <b>Definition:</b>
1188     * The date and time that this version of the report was released from the source diagnostic service
1189     * </p> 
1190         */
1191        public DiagnosticReport setIssued(InstantDt theValue) {
1192                myIssued = theValue;
1193                return this;
1194        }
1195        
1196        
1197
1198        /**
1199         * Sets the value for <b>issued</b> (when.recorded)
1200         *
1201     * <p>
1202     * <b>Definition:</b>
1203     * The date and time that this version of the report was released from the source diagnostic service
1204     * </p> 
1205         */
1206        public DiagnosticReport setIssuedWithMillisPrecision( Date theDate) {
1207                myIssued = new InstantDt(theDate); 
1208                return this; 
1209        }
1210
1211        /**
1212         * Sets the value for <b>issued</b> (when.recorded)
1213         *
1214     * <p>
1215     * <b>Definition:</b>
1216     * The date and time that this version of the report was released from the source diagnostic service
1217     * </p> 
1218         */
1219        public DiagnosticReport setIssued( Date theDate,  TemporalPrecisionEnum thePrecision) {
1220                myIssued = new InstantDt(theDate, thePrecision); 
1221                return this; 
1222        }
1223
1224 
1225        /**
1226         * Gets the value(s) for <b>performer</b> (who.witness).
1227         * creating it if it does
1228         * not exist. Will not return <code>null</code>.
1229         *
1230     * <p>
1231     * <b>Definition:</b>
1232     * The diagnostic service that is responsible for issuing the report
1233     * </p> 
1234         */
1235        public ResourceReferenceDt getPerformer() {  
1236                if (myPerformer == null) {
1237                        myPerformer = new ResourceReferenceDt();
1238                }
1239                return myPerformer;
1240        }
1241
1242        /**
1243         * Sets the value(s) for <b>performer</b> (who.witness)
1244         *
1245     * <p>
1246     * <b>Definition:</b>
1247     * The diagnostic service that is responsible for issuing the report
1248     * </p> 
1249         */
1250        public DiagnosticReport setPerformer(ResourceReferenceDt theValue) {
1251                myPerformer = theValue;
1252                return this;
1253        }
1254        
1255        
1256
1257  
1258        /**
1259         * Gets the value(s) for <b>request</b> ().
1260         * creating it if it does
1261         * not exist. Will not return <code>null</code>.
1262         *
1263     * <p>
1264     * <b>Definition:</b>
1265     * Details concerning a test or procedure requested.
1266     * </p> 
1267         */
1268        public java.util.List<ResourceReferenceDt> getRequest() {  
1269                if (myRequest == null) {
1270                        myRequest = new java.util.ArrayList<ResourceReferenceDt>();
1271                }
1272                return myRequest;
1273        }
1274
1275        /**
1276         * Sets the value(s) for <b>request</b> ()
1277         *
1278     * <p>
1279     * <b>Definition:</b>
1280     * Details concerning a test or procedure requested.
1281     * </p> 
1282         */
1283        public DiagnosticReport setRequest(java.util.List<ResourceReferenceDt> theValue) {
1284                myRequest = theValue;
1285                return this;
1286        }
1287        
1288        
1289
1290        /**
1291         * Adds and returns a new value for <b>request</b> ()
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * Details concerning a test or procedure requested.
1296     * </p> 
1297         */
1298        public ResourceReferenceDt addRequest() {
1299                ResourceReferenceDt newType = new ResourceReferenceDt();
1300                getRequest().add(newType);
1301                return newType; 
1302        }
1303  
1304        /**
1305         * Gets the value(s) for <b>specimen</b> ().
1306         * creating it if it does
1307         * not exist. Will not return <code>null</code>.
1308         *
1309     * <p>
1310     * <b>Definition:</b>
1311     * Details about the specimens on which this diagnostic report is based
1312     * </p> 
1313         */
1314        public java.util.List<ResourceReferenceDt> getSpecimen() {  
1315                if (mySpecimen == null) {
1316                        mySpecimen = new java.util.ArrayList<ResourceReferenceDt>();
1317                }
1318                return mySpecimen;
1319        }
1320
1321        /**
1322         * Sets the value(s) for <b>specimen</b> ()
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * Details about the specimens on which this diagnostic report is based
1327     * </p> 
1328         */
1329        public DiagnosticReport setSpecimen(java.util.List<ResourceReferenceDt> theValue) {
1330                mySpecimen = theValue;
1331                return this;
1332        }
1333        
1334        
1335
1336        /**
1337         * Adds and returns a new value for <b>specimen</b> ()
1338         *
1339     * <p>
1340     * <b>Definition:</b>
1341     * Details about the specimens on which this diagnostic report is based
1342     * </p> 
1343         */
1344        public ResourceReferenceDt addSpecimen() {
1345                ResourceReferenceDt newType = new ResourceReferenceDt();
1346                getSpecimen().add(newType);
1347                return newType; 
1348        }
1349  
1350        /**
1351         * Gets the value(s) for <b>result</b> ().
1352         * creating it if it does
1353         * not exist. Will not return <code>null</code>.
1354         *
1355     * <p>
1356     * <b>Definition:</b>
1357     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \&quot;atomic\&quot; results), or they can be grouping observations that include references to other members of the group (e.g. \&quot;panels\&quot;).
1358     * </p> 
1359         */
1360        public java.util.List<ResourceReferenceDt> getResult() {  
1361                if (myResult == null) {
1362                        myResult = new java.util.ArrayList<ResourceReferenceDt>();
1363                }
1364                return myResult;
1365        }
1366
1367        /**
1368         * Sets the value(s) for <b>result</b> ()
1369         *
1370     * <p>
1371     * <b>Definition:</b>
1372     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \&quot;atomic\&quot; results), or they can be grouping observations that include references to other members of the group (e.g. \&quot;panels\&quot;).
1373     * </p> 
1374         */
1375        public DiagnosticReport setResult(java.util.List<ResourceReferenceDt> theValue) {
1376                myResult = theValue;
1377                return this;
1378        }
1379        
1380        
1381
1382        /**
1383         * Adds and returns a new value for <b>result</b> ()
1384         *
1385     * <p>
1386     * <b>Definition:</b>
1387     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \&quot;atomic\&quot; results), or they can be grouping observations that include references to other members of the group (e.g. \&quot;panels\&quot;).
1388     * </p> 
1389         */
1390        public ResourceReferenceDt addResult() {
1391                ResourceReferenceDt newType = new ResourceReferenceDt();
1392                getResult().add(newType);
1393                return newType; 
1394        }
1395  
1396        /**
1397         * Gets the value(s) for <b>imagingStudy</b> ().
1398         * creating it if it does
1399         * not exist. Will not return <code>null</code>.
1400         *
1401     * <p>
1402     * <b>Definition:</b>
1403     * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.
1404     * </p> 
1405         */
1406        public java.util.List<ResourceReferenceDt> getImagingStudy() {  
1407                if (myImagingStudy == null) {
1408                        myImagingStudy = new java.util.ArrayList<ResourceReferenceDt>();
1409                }
1410                return myImagingStudy;
1411        }
1412
1413        /**
1414         * Sets the value(s) for <b>imagingStudy</b> ()
1415         *
1416     * <p>
1417     * <b>Definition:</b>
1418     * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.
1419     * </p> 
1420         */
1421        public DiagnosticReport setImagingStudy(java.util.List<ResourceReferenceDt> theValue) {
1422                myImagingStudy = theValue;
1423                return this;
1424        }
1425        
1426        
1427
1428        /**
1429         * Adds and returns a new value for <b>imagingStudy</b> ()
1430         *
1431     * <p>
1432     * <b>Definition:</b>
1433     * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.
1434     * </p> 
1435         */
1436        public ResourceReferenceDt addImagingStudy() {
1437                ResourceReferenceDt newType = new ResourceReferenceDt();
1438                getImagingStudy().add(newType);
1439                return newType; 
1440        }
1441  
1442        /**
1443         * Gets the value(s) for <b>image</b> ().
1444         * creating it if it does
1445         * not exist. Will not return <code>null</code>.
1446         *
1447     * <p>
1448     * <b>Definition:</b>
1449     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1450     * </p> 
1451         */
1452        public java.util.List<Image> getImage() {  
1453                if (myImage == null) {
1454                        myImage = new java.util.ArrayList<Image>();
1455                }
1456                return myImage;
1457        }
1458
1459        /**
1460         * Sets the value(s) for <b>image</b> ()
1461         *
1462     * <p>
1463     * <b>Definition:</b>
1464     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1465     * </p> 
1466         */
1467        public DiagnosticReport setImage(java.util.List<Image> theValue) {
1468                myImage = theValue;
1469                return this;
1470        }
1471        
1472        
1473
1474        /**
1475         * Adds and returns a new value for <b>image</b> ()
1476         *
1477     * <p>
1478     * <b>Definition:</b>
1479     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1480     * </p> 
1481         */
1482        public Image addImage() {
1483                Image newType = new Image();
1484                getImage().add(newType);
1485                return newType; 
1486        }
1487
1488        /**
1489         * Adds a given new value for <b>image</b> ()
1490         *
1491         * <p>
1492         * <b>Definition:</b>
1493         * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1494         * </p>
1495         * @param theValue The image to add (must not be <code>null</code>)
1496         */
1497        public DiagnosticReport addImage(Image theValue) {
1498                if (theValue == null) {
1499                        throw new NullPointerException("theValue must not be null");
1500                }
1501                getImage().add(theValue);
1502                return this;
1503        }
1504
1505        /**
1506         * Gets the first repetition for <b>image</b> (),
1507         * creating it if it does not already exist.
1508         *
1509     * <p>
1510     * <b>Definition:</b>
1511     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1512     * </p> 
1513         */
1514        public Image getImageFirstRep() {
1515                if (getImage().isEmpty()) {
1516                        return addImage();
1517                }
1518                return getImage().get(0); 
1519        }
1520  
1521        /**
1522         * Gets the value(s) for <b>conclusion</b> ().
1523         * creating it if it does
1524         * not exist. Will not return <code>null</code>.
1525         *
1526     * <p>
1527     * <b>Definition:</b>
1528     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1529     * </p> 
1530         */
1531        public StringDt getConclusionElement() {  
1532                if (myConclusion == null) {
1533                        myConclusion = new StringDt();
1534                }
1535                return myConclusion;
1536        }
1537
1538        
1539        /**
1540         * Gets the value(s) for <b>conclusion</b> ().
1541         * creating it if it does
1542         * not exist. Will not return <code>null</code>.
1543         *
1544     * <p>
1545     * <b>Definition:</b>
1546     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1547     * </p> 
1548         */
1549        public String getConclusion() {  
1550                return getConclusionElement().getValue();
1551        }
1552
1553        /**
1554         * Sets the value(s) for <b>conclusion</b> ()
1555         *
1556     * <p>
1557     * <b>Definition:</b>
1558     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1559     * </p> 
1560         */
1561        public DiagnosticReport setConclusion(StringDt theValue) {
1562                myConclusion = theValue;
1563                return this;
1564        }
1565        
1566        
1567
1568        /**
1569         * Sets the value for <b>conclusion</b> ()
1570         *
1571     * <p>
1572     * <b>Definition:</b>
1573     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1574     * </p> 
1575         */
1576        public DiagnosticReport setConclusion( String theString) {
1577                myConclusion = new StringDt(theString); 
1578                return this; 
1579        }
1580
1581 
1582        /**
1583         * Gets the value(s) for <b>codedDiagnosis</b> ().
1584         * creating it if it does
1585         * not exist. Will not return <code>null</code>.
1586         *
1587     * <p>
1588     * <b>Definition:</b>
1589     * 
1590     * </p> 
1591         */
1592        public java.util.List<CodeableConceptDt> getCodedDiagnosis() {  
1593                if (myCodedDiagnosis == null) {
1594                        myCodedDiagnosis = new java.util.ArrayList<CodeableConceptDt>();
1595                }
1596                return myCodedDiagnosis;
1597        }
1598
1599        /**
1600         * Sets the value(s) for <b>codedDiagnosis</b> ()
1601         *
1602     * <p>
1603     * <b>Definition:</b>
1604     * 
1605     * </p> 
1606         */
1607        public DiagnosticReport setCodedDiagnosis(java.util.List<CodeableConceptDt> theValue) {
1608                myCodedDiagnosis = theValue;
1609                return this;
1610        }
1611        
1612        
1613
1614        /**
1615         * Adds and returns a new value for <b>codedDiagnosis</b> ()
1616         *
1617     * <p>
1618     * <b>Definition:</b>
1619     * 
1620     * </p> 
1621         */
1622        public CodeableConceptDt addCodedDiagnosis() {
1623                CodeableConceptDt newType = new CodeableConceptDt();
1624                getCodedDiagnosis().add(newType);
1625                return newType; 
1626        }
1627
1628        /**
1629         * Adds a given new value for <b>codedDiagnosis</b> ()
1630         *
1631         * <p>
1632         * <b>Definition:</b>
1633         * 
1634         * </p>
1635         * @param theValue The codedDiagnosis to add (must not be <code>null</code>)
1636         */
1637        public DiagnosticReport addCodedDiagnosis(CodeableConceptDt theValue) {
1638                if (theValue == null) {
1639                        throw new NullPointerException("theValue must not be null");
1640                }
1641                getCodedDiagnosis().add(theValue);
1642                return this;
1643        }
1644
1645        /**
1646         * Gets the first repetition for <b>codedDiagnosis</b> (),
1647         * creating it if it does not already exist.
1648         *
1649     * <p>
1650     * <b>Definition:</b>
1651     * 
1652     * </p> 
1653         */
1654        public CodeableConceptDt getCodedDiagnosisFirstRep() {
1655                if (getCodedDiagnosis().isEmpty()) {
1656                        return addCodedDiagnosis();
1657                }
1658                return getCodedDiagnosis().get(0); 
1659        }
1660  
1661        /**
1662         * Gets the value(s) for <b>presentedForm</b> ().
1663         * creating it if it does
1664         * not exist. Will not return <code>null</code>.
1665         *
1666     * <p>
1667     * <b>Definition:</b>
1668     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1669     * </p> 
1670         */
1671        public java.util.List<AttachmentDt> getPresentedForm() {  
1672                if (myPresentedForm == null) {
1673                        myPresentedForm = new java.util.ArrayList<AttachmentDt>();
1674                }
1675                return myPresentedForm;
1676        }
1677
1678        /**
1679         * Sets the value(s) for <b>presentedForm</b> ()
1680         *
1681     * <p>
1682     * <b>Definition:</b>
1683     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1684     * </p> 
1685         */
1686        public DiagnosticReport setPresentedForm(java.util.List<AttachmentDt> theValue) {
1687                myPresentedForm = theValue;
1688                return this;
1689        }
1690        
1691        
1692
1693        /**
1694         * Adds and returns a new value for <b>presentedForm</b> ()
1695         *
1696     * <p>
1697     * <b>Definition:</b>
1698     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1699     * </p> 
1700         */
1701        public AttachmentDt addPresentedForm() {
1702                AttachmentDt newType = new AttachmentDt();
1703                getPresentedForm().add(newType);
1704                return newType; 
1705        }
1706
1707        /**
1708         * Adds a given new value for <b>presentedForm</b> ()
1709         *
1710         * <p>
1711         * <b>Definition:</b>
1712         * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1713         * </p>
1714         * @param theValue The presentedForm to add (must not be <code>null</code>)
1715         */
1716        public DiagnosticReport addPresentedForm(AttachmentDt theValue) {
1717                if (theValue == null) {
1718                        throw new NullPointerException("theValue must not be null");
1719                }
1720                getPresentedForm().add(theValue);
1721                return this;
1722        }
1723
1724        /**
1725         * Gets the first repetition for <b>presentedForm</b> (),
1726         * creating it if it does not already exist.
1727         *
1728     * <p>
1729     * <b>Definition:</b>
1730     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1731     * </p> 
1732         */
1733        public AttachmentDt getPresentedFormFirstRep() {
1734                if (getPresentedForm().isEmpty()) {
1735                        return addPresentedForm();
1736                }
1737                return getPresentedForm().get(0); 
1738        }
1739  
1740        /**
1741         * Block class for child element: <b>DiagnosticReport.image</b> ()
1742         *
1743     * <p>
1744     * <b>Definition:</b>
1745     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
1746     * </p> 
1747         */
1748        @Block()        
1749        public static class Image 
1750            extends  BaseIdentifiableElement        implements IResourceBlock {
1751        
1752        @Child(name="comment", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)       
1753        @Description(
1754                shortDefinition="",
1755                formalDefinition="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features."
1756        )
1757        private StringDt myComment;
1758        
1759        @Child(name="link", order=1, min=1, max=1, summary=true, modifier=false, type={
1760                ca.uhn.fhir.model.dstu2.resource.Media.class    })
1761        @Description(
1762                shortDefinition="",
1763                formalDefinition=""
1764        )
1765        private ResourceReferenceDt myLink;
1766        
1767
1768        @Override
1769        public boolean isEmpty() {
1770                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myComment,  myLink);
1771        }
1772        
1773        @Override
1774        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1775                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myComment, myLink);
1776        }
1777
1778        /**
1779         * Gets the value(s) for <b>comment</b> ().
1780         * creating it if it does
1781         * not exist. Will not return <code>null</code>.
1782         *
1783     * <p>
1784     * <b>Definition:</b>
1785     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.
1786     * </p> 
1787         */
1788        public StringDt getCommentElement() {  
1789                if (myComment == null) {
1790                        myComment = new StringDt();
1791                }
1792                return myComment;
1793        }
1794
1795        
1796        /**
1797         * Gets the value(s) for <b>comment</b> ().
1798         * creating it if it does
1799         * not exist. Will not return <code>null</code>.
1800         *
1801     * <p>
1802     * <b>Definition:</b>
1803     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.
1804     * </p> 
1805         */
1806        public String getComment() {  
1807                return getCommentElement().getValue();
1808        }
1809
1810        /**
1811         * Sets the value(s) for <b>comment</b> ()
1812         *
1813     * <p>
1814     * <b>Definition:</b>
1815     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.
1816     * </p> 
1817         */
1818        public Image setComment(StringDt theValue) {
1819                myComment = theValue;
1820                return this;
1821        }
1822        
1823        
1824
1825        /**
1826         * Sets the value for <b>comment</b> ()
1827         *
1828     * <p>
1829     * <b>Definition:</b>
1830     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.
1831     * </p> 
1832         */
1833        public Image setComment( String theString) {
1834                myComment = new StringDt(theString); 
1835                return this; 
1836        }
1837
1838 
1839        /**
1840         * Gets the value(s) for <b>link</b> ().
1841         * creating it if it does
1842         * not exist. Will not return <code>null</code>.
1843         *
1844     * <p>
1845     * <b>Definition:</b>
1846     * 
1847     * </p> 
1848         */
1849        public ResourceReferenceDt getLink() {  
1850                if (myLink == null) {
1851                        myLink = new ResourceReferenceDt();
1852                }
1853                return myLink;
1854        }
1855
1856        /**
1857         * Sets the value(s) for <b>link</b> ()
1858         *
1859     * <p>
1860     * <b>Definition:</b>
1861     * 
1862     * </p> 
1863         */
1864        public Image setLink(ResourceReferenceDt theValue) {
1865                myLink = theValue;
1866                return this;
1867        }
1868        
1869        
1870
1871  
1872
1873
1874        }
1875
1876
1877
1878
1879    @Override
1880    public String getResourceName() {
1881        return "DiagnosticReport";
1882    }
1883    
1884    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1885        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1886    }
1887
1888
1889}