001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
043import ca.uhn.fhir.model.dstu2.resource.Appointment;
044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
057import ca.uhn.fhir.model.dstu2.resource.BodySite;
058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
059import ca.uhn.fhir.model.dstu2.resource.CarePlan;
060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
063import ca.uhn.fhir.model.dstu2.resource.Claim;
064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
069import ca.uhn.fhir.model.dstu2.composite.CodingDt;
070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
073import ca.uhn.fhir.model.dstu2.resource.Composition;
074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
077import ca.uhn.fhir.model.dstu2.resource.Condition;
078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
082import ca.uhn.fhir.model.dstu2.resource.Conformance;
083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
088import ca.uhn.fhir.model.dstu2.resource.Contract;
089import ca.uhn.fhir.model.dstu2.resource.Coverage;
090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
093import ca.uhn.fhir.model.dstu2.resource.Device;
094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
112import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
117import ca.uhn.fhir.model.dstu2.resource.Encounter;
118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
129import ca.uhn.fhir.model.dstu2.resource.Goal;
130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
132import ca.uhn.fhir.model.dstu2.resource.Group;
133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
138import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
145import ca.uhn.fhir.model.dstu2.resource.Immunization;
146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
154import ca.uhn.fhir.model.dstu2.resource.Location;
155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
160import ca.uhn.fhir.model.dstu2.resource.Media;
161import ca.uhn.fhir.model.dstu2.resource.Medication;
162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
171import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
177import ca.uhn.fhir.model.dstu2.resource.Observation;
178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
184import ca.uhn.fhir.model.dstu2.resource.Order;
185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.Organization;
187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
191import ca.uhn.fhir.model.dstu2.resource.Patient;
192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
193import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
194import ca.uhn.fhir.model.dstu2.resource.Person;
195import ca.uhn.fhir.model.dstu2.resource.Practitioner;
196import ca.uhn.fhir.model.dstu2.resource.Procedure;
197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
203import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
204import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
208import ca.uhn.fhir.model.dstu2.composite.RangeDt;
209import ca.uhn.fhir.model.dstu2.composite.RatioDt;
210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
223import ca.uhn.fhir.model.dstu2.resource.Schedule;
224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
228import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
229import ca.uhn.fhir.model.dstu2.resource.Slot;
230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.Specimen;
232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
237import ca.uhn.fhir.model.dstu2.resource.Substance;
238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
243import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
244import ca.uhn.fhir.model.dstu2.composite.TimingDt;
245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
249import ca.uhn.fhir.model.dstu2.resource.ValueSet;
250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
254import ca.uhn.fhir.model.api.IResource;
255import ca.uhn.fhir.model.dstu2.composite.AgeDt;
256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
257import ca.uhn.fhir.model.dstu2.composite.DurationDt;
258import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
262import ca.uhn.fhir.model.primitive.Base64BinaryDt;
263import ca.uhn.fhir.model.primitive.BooleanDt;
264import ca.uhn.fhir.model.primitive.BoundCodeDt;
265import ca.uhn.fhir.model.primitive.CodeDt;
266import ca.uhn.fhir.model.primitive.DateDt;
267import ca.uhn.fhir.model.primitive.DateTimeDt;
268import ca.uhn.fhir.model.primitive.DecimalDt;
269import ca.uhn.fhir.model.primitive.IdDt;
270import ca.uhn.fhir.model.primitive.InstantDt;
271import ca.uhn.fhir.model.primitive.IntegerDt;
272import ca.uhn.fhir.model.primitive.OidDt;
273import ca.uhn.fhir.model.primitive.PositiveIntDt;
274import ca.uhn.fhir.model.primitive.StringDt;
275import ca.uhn.fhir.model.primitive.TimeDt;
276import ca.uhn.fhir.model.primitive.UnsignedIntDt;
277import ca.uhn.fhir.model.primitive.UriDt;
278
279
280/**
281 * HAPI/FHIR <b>DiagnosticReport</b> Resource
282 * (clinical.diagnostics)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * 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.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * To support reporting for any diagnostic report into a clinical data repository.
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/DiagnosticReport">http://hl7.org/fhir/profiles/DiagnosticReport</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/profiles/DiagnosticReport", id="diagnosticreport")
301public class DiagnosticReport extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>status</b>
306         * <p>
307         * Description: <b>The status of the report</b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>DiagnosticReport.status</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token"  )
313        public static final String SP_STATUS = "status";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>status</b>
317         * <p>
318         * Description: <b>The status of the report</b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>DiagnosticReport.status</b><br>
321         * </p>
322         */
323        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
324
325        /**
326         * Search parameter constant for <b>issued</b>
327         * <p>
328         * Description: <b>When the report was issued</b><br>
329         * Type: <b>date</b><br>
330         * Path: <b>DiagnosticReport.issued</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date"  )
334        public static final String SP_ISSUED = "issued";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>issued</b>
338         * <p>
339         * Description: <b>When the report was issued</b><br>
340         * Type: <b>date</b><br>
341         * Path: <b>DiagnosticReport.issued</b><br>
342         * </p>
343         */
344        public static final DateClientParam ISSUED = new DateClientParam(SP_ISSUED);
345
346        /**
347         * Search parameter constant for <b>subject</b>
348         * <p>
349         * Description: <b>The subject of the report</b><br>
350         * Type: <b>reference</b><br>
351         * Path: <b>DiagnosticReport.subject</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" , providesMembershipIn={
355 @Compartment(name="Patient") ,  @Compartment(name="Practitioner")      }
356 )
357        public static final String SP_SUBJECT = "subject";
358
359        /**
360         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
361         * <p>
362         * Description: <b>The subject of the report</b><br>
363         * Type: <b>reference</b><br>
364         * Path: <b>DiagnosticReport.subject</b><br>
365         * </p>
366         */
367        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
368
369        /**
370         * Search parameter constant for <b>performer</b>
371         * <p>
372         * Description: <b>Who was the source of the report (organization)</b><br>
373         * Type: <b>reference</b><br>
374         * Path: <b>DiagnosticReport.performer</b><br>
375         * </p>
376         */
377        @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" , providesMembershipIn={
378 @Compartment(name="RelatedPerson")     }
379 )
380        public static final String SP_PERFORMER = "performer";
381
382        /**
383         * <b>Fluent Client</b> search parameter constant for <b>performer</b>
384         * <p>
385         * Description: <b>Who was the source of the report (organization)</b><br>
386         * Type: <b>reference</b><br>
387         * Path: <b>DiagnosticReport.performer</b><br>
388         * </p>
389         */
390        public static final ReferenceClientParam PERFORMER = new ReferenceClientParam(SP_PERFORMER);
391
392        /**
393         * Search parameter constant for <b>identifier</b>
394         * <p>
395         * Description: <b>An identifier for the report</b><br>
396         * Type: <b>token</b><br>
397         * Path: <b>DiagnosticReport.identifier</b><br>
398         * </p>
399         */
400        @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token"  )
401        public static final String SP_IDENTIFIER = "identifier";
402
403        /**
404         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
405         * <p>
406         * Description: <b>An identifier for the report</b><br>
407         * Type: <b>token</b><br>
408         * Path: <b>DiagnosticReport.identifier</b><br>
409         * </p>
410         */
411        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
412
413        /**
414         * Search parameter constant for <b>category</b>
415         * <p>
416         * Description: <b>Which diagnostic discipline/department created the report</b><br>
417         * Type: <b>token</b><br>
418         * Path: <b>DiagnosticReport.category</b><br>
419         * </p>
420         */
421        @SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token"  )
422        public static final String SP_CATEGORY = "category";
423
424        /**
425         * <b>Fluent Client</b> search parameter constant for <b>category</b>
426         * <p>
427         * Description: <b>Which diagnostic discipline/department created the report</b><br>
428         * Type: <b>token</b><br>
429         * Path: <b>DiagnosticReport.category</b><br>
430         * </p>
431         */
432        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
433
434        /**
435         * Search parameter constant for <b>date</b>
436         * <p>
437         * Description: <b>The clinically relevant time of the report</b><br>
438         * Type: <b>date</b><br>
439         * Path: <b>DiagnosticReport.effective[x]</b><br>
440         * </p>
441         */
442        @SearchParamDefinition(name="date", path="DiagnosticReport.effective[x]", description="The clinically relevant time of the report", type="date"  )
443        public static final String SP_DATE = "date";
444
445        /**
446         * <b>Fluent Client</b> search parameter constant for <b>date</b>
447         * <p>
448         * Description: <b>The clinically relevant time of the report</b><br>
449         * Type: <b>date</b><br>
450         * Path: <b>DiagnosticReport.effective[x]</b><br>
451         * </p>
452         */
453        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
454
455        /**
456         * Search parameter constant for <b>specimen</b>
457         * <p>
458         * Description: <b>The specimen details</b><br>
459         * Type: <b>reference</b><br>
460         * Path: <b>DiagnosticReport.specimen</b><br>
461         * </p>
462         */
463        @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference"  )
464        public static final String SP_SPECIMEN = "specimen";
465
466        /**
467         * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
468         * <p>
469         * Description: <b>The specimen details</b><br>
470         * Type: <b>reference</b><br>
471         * Path: <b>DiagnosticReport.specimen</b><br>
472         * </p>
473         */
474        public static final ReferenceClientParam SPECIMEN = new ReferenceClientParam(SP_SPECIMEN);
475
476        /**
477         * Search parameter constant for <b>code</b>
478         * <p>
479         * 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>
480         * Type: <b>token</b><br>
481         * Path: <b>DiagnosticReport.code</b><br>
482         * </p>
483         */
484        @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"  )
485        public static final String SP_CODE = "code";
486
487        /**
488         * <b>Fluent Client</b> search parameter constant for <b>code</b>
489         * <p>
490         * 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>
491         * Type: <b>token</b><br>
492         * Path: <b>DiagnosticReport.code</b><br>
493         * </p>
494         */
495        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
496
497        /**
498         * Search parameter constant for <b>result</b>
499         * <p>
500         * Description: <b>Link to an atomic result (observation resource)</b><br>
501         * Type: <b>reference</b><br>
502         * Path: <b>DiagnosticReport.result</b><br>
503         * </p>
504         */
505        @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference"  )
506        public static final String SP_RESULT = "result";
507
508        /**
509         * <b>Fluent Client</b> search parameter constant for <b>result</b>
510         * <p>
511         * Description: <b>Link to an atomic result (observation resource)</b><br>
512         * Type: <b>reference</b><br>
513         * Path: <b>DiagnosticReport.result</b><br>
514         * </p>
515         */
516        public static final ReferenceClientParam RESULT = new ReferenceClientParam(SP_RESULT);
517
518        /**
519         * Search parameter constant for <b>diagnosis</b>
520         * <p>
521         * Description: <b>A coded diagnosis on the report</b><br>
522         * Type: <b>token</b><br>
523         * Path: <b>DiagnosticReport.codedDiagnosis</b><br>
524         * </p>
525         */
526        @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token"  )
527        public static final String SP_DIAGNOSIS = "diagnosis";
528
529        /**
530         * <b>Fluent Client</b> search parameter constant for <b>diagnosis</b>
531         * <p>
532         * Description: <b>A coded diagnosis on the report</b><br>
533         * Type: <b>token</b><br>
534         * Path: <b>DiagnosticReport.codedDiagnosis</b><br>
535         * </p>
536         */
537        public static final TokenClientParam DIAGNOSIS = new TokenClientParam(SP_DIAGNOSIS);
538
539        /**
540         * Search parameter constant for <b>image</b>
541         * <p>
542         * Description: <b>A reference to the image source.</b><br>
543         * Type: <b>reference</b><br>
544         * Path: <b>DiagnosticReport.image.link</b><br>
545         * </p>
546         */
547        @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference"  )
548        public static final String SP_IMAGE = "image";
549
550        /**
551         * <b>Fluent Client</b> search parameter constant for <b>image</b>
552         * <p>
553         * Description: <b>A reference to the image source.</b><br>
554         * Type: <b>reference</b><br>
555         * Path: <b>DiagnosticReport.image.link</b><br>
556         * </p>
557         */
558        public static final ReferenceClientParam IMAGE = new ReferenceClientParam(SP_IMAGE);
559
560        /**
561         * Search parameter constant for <b>request</b>
562         * <p>
563         * Description: <b>Reference to the test or procedure request.</b><br>
564         * Type: <b>reference</b><br>
565         * Path: <b>DiagnosticReport.request</b><br>
566         * </p>
567         */
568        @SearchParamDefinition(name="request", path="DiagnosticReport.request", description="Reference to the test or procedure request.", type="reference"  )
569        public static final String SP_REQUEST = "request";
570
571        /**
572         * <b>Fluent Client</b> search parameter constant for <b>request</b>
573         * <p>
574         * Description: <b>Reference to the test or procedure request.</b><br>
575         * Type: <b>reference</b><br>
576         * Path: <b>DiagnosticReport.request</b><br>
577         * </p>
578         */
579        public static final ReferenceClientParam REQUEST = new ReferenceClientParam(SP_REQUEST);
580
581        /**
582         * Search parameter constant for <b>patient</b>
583         * <p>
584         * Description: <b>The subject of the report if a patient</b><br>
585         * Type: <b>reference</b><br>
586         * Path: <b>DiagnosticReport.subject</b><br>
587         * </p>
588         */
589        @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" , target={
590 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
591 )
592        public static final String SP_PATIENT = "patient";
593
594        /**
595         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
596         * <p>
597         * Description: <b>The subject of the report if a patient</b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>DiagnosticReport.subject</b><br>
600         * </p>
601         */
602        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
603
604        /**
605         * Search parameter constant for <b>encounter</b>
606         * <p>
607         * Description: <b>The Encounter when the order was made</b><br>
608         * Type: <b>reference</b><br>
609         * Path: <b>DiagnosticReport.encounter</b><br>
610         * </p>
611         */
612        @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" , providesMembershipIn={
613 @Compartment(name="Encounter")         }
614 )
615        public static final String SP_ENCOUNTER = "encounter";
616
617        /**
618         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
619         * <p>
620         * Description: <b>The Encounter when the order was made</b><br>
621         * Type: <b>reference</b><br>
622         * Path: <b>DiagnosticReport.encounter</b><br>
623         * </p>
624         */
625        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
626
627
628        /**
629         * Constant for fluent queries to be used to add include statements. Specifies
630         * the path value of "<b>DiagnosticReport:encounter</b>".
631         */
632        public static final Include INCLUDE_ENCOUNTER = new Include("DiagnosticReport:encounter");
633
634        /**
635         * Constant for fluent queries to be used to add include statements. Specifies
636         * the path value of "<b>DiagnosticReport:image</b>".
637         */
638        public static final Include INCLUDE_IMAGE = new Include("DiagnosticReport:image");
639
640        /**
641         * Constant for fluent queries to be used to add include statements. Specifies
642         * the path value of "<b>DiagnosticReport:patient</b>".
643         */
644        public static final Include INCLUDE_PATIENT = new Include("DiagnosticReport:patient");
645
646        /**
647         * Constant for fluent queries to be used to add include statements. Specifies
648         * the path value of "<b>DiagnosticReport:performer</b>".
649         */
650        public static final Include INCLUDE_PERFORMER = new Include("DiagnosticReport:performer");
651
652        /**
653         * Constant for fluent queries to be used to add include statements. Specifies
654         * the path value of "<b>DiagnosticReport:request</b>".
655         */
656        public static final Include INCLUDE_REQUEST = new Include("DiagnosticReport:request");
657
658        /**
659         * Constant for fluent queries to be used to add include statements. Specifies
660         * the path value of "<b>DiagnosticReport:result</b>".
661         */
662        public static final Include INCLUDE_RESULT = new Include("DiagnosticReport:result");
663
664        /**
665         * Constant for fluent queries to be used to add include statements. Specifies
666         * the path value of "<b>DiagnosticReport:specimen</b>".
667         */
668        public static final Include INCLUDE_SPECIMEN = new Include("DiagnosticReport:specimen");
669
670        /**
671         * Constant for fluent queries to be used to add include statements. Specifies
672         * the path value of "<b>DiagnosticReport:subject</b>".
673         */
674        public static final Include INCLUDE_SUBJECT = new Include("DiagnosticReport:subject");
675
676
677        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
678        @Description(
679                shortDefinition="id",
680                formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider"
681        )
682        private java.util.List<IdentifierDt> myIdentifier;
683        
684        @Child(name="status", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=true)    
685        @Description(
686                shortDefinition="status",
687                formalDefinition="The status of the diagnostic report as a whole"
688        )
689        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/diagnostic-report-status")
690        private BoundCodeDt<DiagnosticReportStatusEnum> myStatus;
691        
692        @Child(name="category", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)      
693        @Description(
694                shortDefinition="class",
695                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."
696        )
697        private CodeableConceptDt myCategory;
698        
699        @Child(name="code", type=CodeableConceptDt.class, order=3, min=1, max=1, summary=true, modifier=false)  
700        @Description(
701                shortDefinition="what",
702                formalDefinition="A code or name that describes this diagnostic report"
703        )
704        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-report-codes")
705        private CodeableConceptDt myCode;
706        
707        @Child(name="subject", order=4, min=1, max=1, summary=true, modifier=false, type={
708                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 })
709        @Description(
710                shortDefinition="who.focus",
711                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."
712        )
713        private ResourceReferenceDt mySubject;
714        
715        @Child(name="encounter", order=5, min=0, max=1, summary=true, modifier=false, type={
716                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
717        @Description(
718                shortDefinition="context",
719                formalDefinition="The link to the health care event (encounter) when the order was made."
720        )
721        private ResourceReferenceDt myEncounter;
722        
723        @Child(name="effective", order=6, min=1, max=1, summary=true, modifier=false, type={
724                DateTimeDt.class,               PeriodDt.class  })
725        @Description(
726                shortDefinition="when.done",
727                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."
728        )
729        private IDatatype myEffective;
730        
731        @Child(name="issued", type=InstantDt.class, order=7, min=1, max=1, summary=true, modifier=false)        
732        @Description(
733                shortDefinition="when.recorded",
734                formalDefinition="The date and time that this version of the report was released from the source diagnostic service"
735        )
736        private InstantDt myIssued;
737        
738        @Child(name="performer", order=8, min=1, max=1, summary=true, modifier=false, type={
739                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.class     })
740        @Description(
741                shortDefinition="who.witness",
742                formalDefinition="The diagnostic service that is responsible for issuing the report"
743        )
744        private ResourceReferenceDt myPerformer;
745        
746        @Child(name="request", order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
747                ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder.class,                 ca.uhn.fhir.model.dstu2.resource.ProcedureRequest.class,                ca.uhn.fhir.model.dstu2.resource.ReferralRequest.class  })
748        @Description(
749                shortDefinition="",
750                formalDefinition="Details concerning a test or procedure requested."
751        )
752        private java.util.List<ResourceReferenceDt> myRequest;
753        
754        @Child(name="specimen", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
755                ca.uhn.fhir.model.dstu2.resource.Specimen.class })
756        @Description(
757                shortDefinition="",
758                formalDefinition="Details about the specimens on which this diagnostic report is based"
759        )
760        private java.util.List<ResourceReferenceDt> mySpecimen;
761        
762        @Child(name="result", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
763                ca.uhn.fhir.model.dstu2.resource.Observation.class      })
764        @Description(
765                shortDefinition="",
766                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\")."
767        )
768        private java.util.List<ResourceReferenceDt> myResult;
769        
770        @Child(name="imagingStudy", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
771                ca.uhn.fhir.model.dstu2.resource.ImagingStudy.class,            ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection.class   })
772        @Description(
773                shortDefinition="",
774                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."
775        )
776        private java.util.List<ResourceReferenceDt> myImagingStudy;
777        
778        @Child(name="image", order=13, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
779        @Description(
780                shortDefinition="",
781                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)."
782        )
783        private java.util.List<Image> myImage;
784        
785        @Child(name="conclusion", type=StringDt.class, order=14, min=0, max=1, summary=false, modifier=false)   
786        @Description(
787                shortDefinition="",
788                formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report"
789        )
790        private StringDt myConclusion;
791        
792        @Child(name="codedDiagnosis", type=CodeableConceptDt.class, order=15, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
793        @Description(
794                shortDefinition="",
795                formalDefinition=""
796        )
797        private java.util.List<CodeableConceptDt> myCodedDiagnosis;
798        
799        @Child(name="presentedForm", type=AttachmentDt.class, order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
800        @Description(
801                shortDefinition="",
802                formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent."
803        )
804        private java.util.List<AttachmentDt> myPresentedForm;
805        
806
807        @Override
808        public boolean isEmpty() {
809                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);
810        }
811        
812        @Override
813        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
814                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);
815        }
816
817        /**
818         * Gets the value(s) for <b>identifier</b> (id).
819         * creating it if it does
820         * not exist. Will not return <code>null</code>.
821         *
822     * <p>
823     * <b>Definition:</b>
824     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
825     * </p> 
826         */
827        public java.util.List<IdentifierDt> getIdentifier() {  
828                if (myIdentifier == null) {
829                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
830                }
831                return myIdentifier;
832        }
833
834        /**
835         * Sets the value(s) for <b>identifier</b> (id)
836         *
837     * <p>
838     * <b>Definition:</b>
839     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
840     * </p> 
841         */
842        public DiagnosticReport setIdentifier(java.util.List<IdentifierDt> theValue) {
843                myIdentifier = theValue;
844                return this;
845        }
846        
847        
848
849        /**
850         * Adds and returns a new value for <b>identifier</b> (id)
851         *
852     * <p>
853     * <b>Definition:</b>
854     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
855     * </p> 
856         */
857        public IdentifierDt addIdentifier() {
858                IdentifierDt newType = new IdentifierDt();
859                getIdentifier().add(newType);
860                return newType; 
861        }
862
863        /**
864         * Adds a given new value for <b>identifier</b> (id)
865         *
866         * <p>
867         * <b>Definition:</b>
868         * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
869         * </p>
870         * @param theValue The identifier to add (must not be <code>null</code>)
871         */
872        public DiagnosticReport addIdentifier(IdentifierDt theValue) {
873                if (theValue == null) {
874                        throw new NullPointerException("theValue must not be null");
875                }
876                getIdentifier().add(theValue);
877                return this;
878        }
879
880        /**
881         * Gets the first repetition for <b>identifier</b> (id),
882         * creating it if it does not already exist.
883         *
884     * <p>
885     * <b>Definition:</b>
886     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
887     * </p> 
888         */
889        public IdentifierDt getIdentifierFirstRep() {
890                if (getIdentifier().isEmpty()) {
891                        return addIdentifier();
892                }
893                return getIdentifier().get(0); 
894        }
895  
896        /**
897         * Gets the value(s) for <b>status</b> (status).
898         * creating it if it does
899         * not exist. Will not return <code>null</code>.
900         *
901     * <p>
902     * <b>Definition:</b>
903     * The status of the diagnostic report as a whole
904     * </p> 
905         */
906        public BoundCodeDt<DiagnosticReportStatusEnum> getStatusElement() {  
907                if (myStatus == null) {
908                        myStatus = new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER);
909                }
910                return myStatus;
911        }
912
913        
914        /**
915         * Gets the value(s) for <b>status</b> (status).
916         * creating it if it does
917         * not exist. This method may return <code>null</code>.
918         *
919     * <p>
920     * <b>Definition:</b>
921     * The status of the diagnostic report as a whole
922     * </p> 
923         */
924        public String getStatus() {  
925                return getStatusElement().getValue();
926        }
927
928        /**
929         * Sets the value(s) for <b>status</b> (status)
930         *
931     * <p>
932     * <b>Definition:</b>
933     * The status of the diagnostic report as a whole
934     * </p> 
935         */
936        public DiagnosticReport setStatus(BoundCodeDt<DiagnosticReportStatusEnum> theValue) {
937                myStatus = theValue;
938                return this;
939        }
940        
941        
942
943        /**
944         * Sets the value(s) for <b>status</b> (status)
945         *
946     * <p>
947     * <b>Definition:</b>
948     * The status of the diagnostic report as a whole
949     * </p> 
950         */
951        public DiagnosticReport setStatus(DiagnosticReportStatusEnum theValue) {
952                setStatus(new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER, theValue));
953                
954/*
955                getStatusElement().setValueAsEnum(theValue);
956*/
957                return this;
958        }
959
960  
961        /**
962         * Gets the value(s) for <b>category</b> (class).
963         * creating it if it does
964         * not exist. Will not return <code>null</code>.
965         *
966     * <p>
967     * <b>Definition:</b>
968     * 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.
969     * </p> 
970         */
971        public CodeableConceptDt getCategory() {  
972                if (myCategory == null) {
973                        myCategory = new CodeableConceptDt();
974                }
975                return myCategory;
976        }
977
978        /**
979         * Sets the value(s) for <b>category</b> (class)
980         *
981     * <p>
982     * <b>Definition:</b>
983     * 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.
984     * </p> 
985         */
986        public DiagnosticReport setCategory(CodeableConceptDt theValue) {
987                myCategory = theValue;
988                return this;
989        }
990        
991        
992
993  
994        /**
995         * Gets the value(s) for <b>code</b> (what).
996         * creating it if it does
997         * not exist. Will not return <code>null</code>.
998         *
999     * <p>
1000     * <b>Definition:</b>
1001     * A code or name that describes this diagnostic report
1002     * </p> 
1003         */
1004        public CodeableConceptDt getCode() {  
1005                if (myCode == null) {
1006                        myCode = new CodeableConceptDt();
1007                }
1008                return myCode;
1009        }
1010
1011        /**
1012         * Sets the value(s) for <b>code</b> (what)
1013         *
1014     * <p>
1015     * <b>Definition:</b>
1016     * A code or name that describes this diagnostic report
1017     * </p> 
1018         */
1019        public DiagnosticReport setCode(CodeableConceptDt theValue) {
1020                myCode = theValue;
1021                return this;
1022        }
1023        
1024        
1025
1026  
1027        /**
1028         * Gets the value(s) for <b>subject</b> (who.focus).
1029         * creating it if it does
1030         * not exist. Will not return <code>null</code>.
1031         *
1032     * <p>
1033     * <b>Definition:</b>
1034     * 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.
1035     * </p> 
1036         */
1037        public ResourceReferenceDt getSubject() {  
1038                if (mySubject == null) {
1039                        mySubject = new ResourceReferenceDt();
1040                }
1041                return mySubject;
1042        }
1043
1044        /**
1045         * Sets the value(s) for <b>subject</b> (who.focus)
1046         *
1047     * <p>
1048     * <b>Definition:</b>
1049     * 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.
1050     * </p> 
1051         */
1052        public DiagnosticReport setSubject(ResourceReferenceDt theValue) {
1053                mySubject = theValue;
1054                return this;
1055        }
1056        
1057        
1058
1059  
1060        /**
1061         * Gets the value(s) for <b>encounter</b> (context).
1062         * creating it if it does
1063         * not exist. Will not return <code>null</code>.
1064         *
1065     * <p>
1066     * <b>Definition:</b>
1067     * The link to the health care event (encounter) when the order was made.
1068     * </p> 
1069         */
1070        public ResourceReferenceDt getEncounter() {  
1071                if (myEncounter == null) {
1072                        myEncounter = new ResourceReferenceDt();
1073                }
1074                return myEncounter;
1075        }
1076
1077        /**
1078         * Sets the value(s) for <b>encounter</b> (context)
1079         *
1080     * <p>
1081     * <b>Definition:</b>
1082     * The link to the health care event (encounter) when the order was made.
1083     * </p> 
1084         */
1085        public DiagnosticReport setEncounter(ResourceReferenceDt theValue) {
1086                myEncounter = theValue;
1087                return this;
1088        }
1089        
1090        
1091
1092  
1093        /**
1094         * Gets the value(s) for <b>effective[x]</b> (when.done).
1095         * creating it if it does
1096         * not exist. Will not return <code>null</code>.
1097         *
1098     * <p>
1099     * <b>Definition:</b>
1100     * 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.
1101     * </p> 
1102         */
1103        public IDatatype getEffective() {  
1104                return myEffective;
1105        }
1106
1107        /**
1108         * Sets the value(s) for <b>effective[x]</b> (when.done)
1109         *
1110     * <p>
1111     * <b>Definition:</b>
1112     * 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.
1113     * </p> 
1114         */
1115        public DiagnosticReport setEffective(IDatatype theValue) {
1116                myEffective = theValue;
1117                return this;
1118        }
1119        
1120        
1121
1122  
1123        /**
1124         * Gets the value(s) for <b>issued</b> (when.recorded).
1125         * creating it if it does
1126         * not exist. Will not return <code>null</code>.
1127         *
1128     * <p>
1129     * <b>Definition:</b>
1130     * The date and time that this version of the report was released from the source diagnostic service
1131     * </p> 
1132         */
1133        public InstantDt getIssuedElement() {  
1134                if (myIssued == null) {
1135                        myIssued = new InstantDt();
1136                }
1137                return myIssued;
1138        }
1139
1140        
1141        /**
1142         * Gets the value(s) for <b>issued</b> (when.recorded).
1143         * creating it if it does
1144         * not exist. This method may return <code>null</code>.
1145         *
1146     * <p>
1147     * <b>Definition:</b>
1148     * The date and time that this version of the report was released from the source diagnostic service
1149     * </p> 
1150         */
1151        public Date getIssued() {  
1152                return getIssuedElement().getValue();
1153        }
1154
1155        /**
1156         * Sets the value(s) for <b>issued</b> (when.recorded)
1157         *
1158     * <p>
1159     * <b>Definition:</b>
1160     * The date and time that this version of the report was released from the source diagnostic service
1161     * </p> 
1162         */
1163        public DiagnosticReport setIssued(InstantDt theValue) {
1164                myIssued = theValue;
1165                return this;
1166        }
1167        
1168        
1169
1170        /**
1171         * Sets the value for <b>issued</b> (when.recorded)
1172         *
1173     * <p>
1174     * <b>Definition:</b>
1175     * The date and time that this version of the report was released from the source diagnostic service
1176     * </p> 
1177         */
1178        public DiagnosticReport setIssuedWithMillisPrecision( Date theDate) {
1179                myIssued = new InstantDt(theDate); 
1180                return this; 
1181        }
1182
1183        /**
1184         * Sets the value 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( Date theDate,  TemporalPrecisionEnum thePrecision) {
1192                myIssued = new InstantDt(theDate, thePrecision); 
1193                return this; 
1194        }
1195
1196 
1197        /**
1198         * Gets the value(s) for <b>performer</b> (who.witness).
1199         * creating it if it does
1200         * not exist. Will not return <code>null</code>.
1201         *
1202     * <p>
1203     * <b>Definition:</b>
1204     * The diagnostic service that is responsible for issuing the report
1205     * </p> 
1206         */
1207        public ResourceReferenceDt getPerformer() {  
1208                if (myPerformer == null) {
1209                        myPerformer = new ResourceReferenceDt();
1210                }
1211                return myPerformer;
1212        }
1213
1214        /**
1215         * Sets the value(s) for <b>performer</b> (who.witness)
1216         *
1217     * <p>
1218     * <b>Definition:</b>
1219     * The diagnostic service that is responsible for issuing the report
1220     * </p> 
1221         */
1222        public DiagnosticReport setPerformer(ResourceReferenceDt theValue) {
1223                myPerformer = theValue;
1224                return this;
1225        }
1226        
1227        
1228
1229  
1230        /**
1231         * Gets the value(s) for <b>request</b> ().
1232         * creating it if it does
1233         * not exist. Will not return <code>null</code>.
1234         *
1235     * <p>
1236     * <b>Definition:</b>
1237     * Details concerning a test or procedure requested.
1238     * </p> 
1239         */
1240        public java.util.List<ResourceReferenceDt> getRequest() {  
1241                if (myRequest == null) {
1242                        myRequest = new java.util.ArrayList<ResourceReferenceDt>();
1243                }
1244                return myRequest;
1245        }
1246
1247        /**
1248         * Sets the value(s) for <b>request</b> ()
1249         *
1250     * <p>
1251     * <b>Definition:</b>
1252     * Details concerning a test or procedure requested.
1253     * </p> 
1254         */
1255        public DiagnosticReport setRequest(java.util.List<ResourceReferenceDt> theValue) {
1256                myRequest = theValue;
1257                return this;
1258        }
1259        
1260        
1261
1262        /**
1263         * Adds and returns a new value for <b>request</b> ()
1264         *
1265     * <p>
1266     * <b>Definition:</b>
1267     * Details concerning a test or procedure requested.
1268     * </p> 
1269         */
1270        public ResourceReferenceDt addRequest() {
1271                ResourceReferenceDt newType = new ResourceReferenceDt();
1272                getRequest().add(newType);
1273                return newType; 
1274        }
1275  
1276        /**
1277         * Gets the value(s) for <b>specimen</b> ().
1278         * creating it if it does
1279         * not exist. Will not return <code>null</code>.
1280         *
1281     * <p>
1282     * <b>Definition:</b>
1283     * Details about the specimens on which this diagnostic report is based
1284     * </p> 
1285         */
1286        public java.util.List<ResourceReferenceDt> getSpecimen() {  
1287                if (mySpecimen == null) {
1288                        mySpecimen = new java.util.ArrayList<ResourceReferenceDt>();
1289                }
1290                return mySpecimen;
1291        }
1292
1293        /**
1294         * Sets the value(s) for <b>specimen</b> ()
1295         *
1296     * <p>
1297     * <b>Definition:</b>
1298     * Details about the specimens on which this diagnostic report is based
1299     * </p> 
1300         */
1301        public DiagnosticReport setSpecimen(java.util.List<ResourceReferenceDt> theValue) {
1302                mySpecimen = theValue;
1303                return this;
1304        }
1305        
1306        
1307
1308        /**
1309         * Adds and returns a new value for <b>specimen</b> ()
1310         *
1311     * <p>
1312     * <b>Definition:</b>
1313     * Details about the specimens on which this diagnostic report is based
1314     * </p> 
1315         */
1316        public ResourceReferenceDt addSpecimen() {
1317                ResourceReferenceDt newType = new ResourceReferenceDt();
1318                getSpecimen().add(newType);
1319                return newType; 
1320        }
1321  
1322        /**
1323         * Gets the value(s) for <b>result</b> ().
1324         * creating it if it does
1325         * not exist. Will not return <code>null</code>.
1326         *
1327     * <p>
1328     * <b>Definition:</b>
1329     * 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;).
1330     * </p> 
1331         */
1332        public java.util.List<ResourceReferenceDt> getResult() {  
1333                if (myResult == null) {
1334                        myResult = new java.util.ArrayList<ResourceReferenceDt>();
1335                }
1336                return myResult;
1337        }
1338
1339        /**
1340         * Sets the value(s) for <b>result</b> ()
1341         *
1342     * <p>
1343     * <b>Definition:</b>
1344     * 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;).
1345     * </p> 
1346         */
1347        public DiagnosticReport setResult(java.util.List<ResourceReferenceDt> theValue) {
1348                myResult = theValue;
1349                return this;
1350        }
1351        
1352        
1353
1354        /**
1355         * Adds and returns a new value for <b>result</b> ()
1356         *
1357     * <p>
1358     * <b>Definition:</b>
1359     * 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;).
1360     * </p> 
1361         */
1362        public ResourceReferenceDt addResult() {
1363                ResourceReferenceDt newType = new ResourceReferenceDt();
1364                getResult().add(newType);
1365                return newType; 
1366        }
1367  
1368        /**
1369         * Gets the value(s) for <b>imagingStudy</b> ().
1370         * creating it if it does
1371         * not exist. Will not return <code>null</code>.
1372         *
1373     * <p>
1374     * <b>Definition:</b>
1375     * 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.
1376     * </p> 
1377         */
1378        public java.util.List<ResourceReferenceDt> getImagingStudy() {  
1379                if (myImagingStudy == null) {
1380                        myImagingStudy = new java.util.ArrayList<ResourceReferenceDt>();
1381                }
1382                return myImagingStudy;
1383        }
1384
1385        /**
1386         * Sets the value(s) for <b>imagingStudy</b> ()
1387         *
1388     * <p>
1389     * <b>Definition:</b>
1390     * 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.
1391     * </p> 
1392         */
1393        public DiagnosticReport setImagingStudy(java.util.List<ResourceReferenceDt> theValue) {
1394                myImagingStudy = theValue;
1395                return this;
1396        }
1397        
1398        
1399
1400        /**
1401         * Adds and returns a new value for <b>imagingStudy</b> ()
1402         *
1403     * <p>
1404     * <b>Definition:</b>
1405     * 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.
1406     * </p> 
1407         */
1408        public ResourceReferenceDt addImagingStudy() {
1409                ResourceReferenceDt newType = new ResourceReferenceDt();
1410                getImagingStudy().add(newType);
1411                return newType; 
1412        }
1413  
1414        /**
1415         * Gets the value(s) for <b>image</b> ().
1416         * creating it if it does
1417         * not exist. Will not return <code>null</code>.
1418         *
1419     * <p>
1420     * <b>Definition:</b>
1421     * 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).
1422     * </p> 
1423         */
1424        public java.util.List<Image> getImage() {  
1425                if (myImage == null) {
1426                        myImage = new java.util.ArrayList<Image>();
1427                }
1428                return myImage;
1429        }
1430
1431        /**
1432         * Sets the value(s) for <b>image</b> ()
1433         *
1434     * <p>
1435     * <b>Definition:</b>
1436     * 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).
1437     * </p> 
1438         */
1439        public DiagnosticReport setImage(java.util.List<Image> theValue) {
1440                myImage = theValue;
1441                return this;
1442        }
1443        
1444        
1445
1446        /**
1447         * Adds and returns a new value for <b>image</b> ()
1448         *
1449     * <p>
1450     * <b>Definition:</b>
1451     * 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).
1452     * </p> 
1453         */
1454        public Image addImage() {
1455                Image newType = new Image();
1456                getImage().add(newType);
1457                return newType; 
1458        }
1459
1460        /**
1461         * Adds a given new value for <b>image</b> ()
1462         *
1463         * <p>
1464         * <b>Definition:</b>
1465         * 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).
1466         * </p>
1467         * @param theValue The image to add (must not be <code>null</code>)
1468         */
1469        public DiagnosticReport addImage(Image theValue) {
1470                if (theValue == null) {
1471                        throw new NullPointerException("theValue must not be null");
1472                }
1473                getImage().add(theValue);
1474                return this;
1475        }
1476
1477        /**
1478         * Gets the first repetition for <b>image</b> (),
1479         * creating it if it does not already exist.
1480         *
1481     * <p>
1482     * <b>Definition:</b>
1483     * 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).
1484     * </p> 
1485         */
1486        public Image getImageFirstRep() {
1487                if (getImage().isEmpty()) {
1488                        return addImage();
1489                }
1490                return getImage().get(0); 
1491        }
1492  
1493        /**
1494         * Gets the value(s) for <b>conclusion</b> ().
1495         * creating it if it does
1496         * not exist. Will not return <code>null</code>.
1497         *
1498     * <p>
1499     * <b>Definition:</b>
1500     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1501     * </p> 
1502         */
1503        public StringDt getConclusionElement() {  
1504                if (myConclusion == null) {
1505                        myConclusion = new StringDt();
1506                }
1507                return myConclusion;
1508        }
1509
1510        
1511        /**
1512         * Gets the value(s) for <b>conclusion</b> ().
1513         * creating it if it does
1514         * not exist. This method may return <code>null</code>.
1515         *
1516     * <p>
1517     * <b>Definition:</b>
1518     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1519     * </p> 
1520         */
1521        public String getConclusion() {  
1522                return getConclusionElement().getValue();
1523        }
1524
1525        /**
1526         * Sets the value(s) for <b>conclusion</b> ()
1527         *
1528     * <p>
1529     * <b>Definition:</b>
1530     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1531     * </p> 
1532         */
1533        public DiagnosticReport setConclusion(StringDt theValue) {
1534                myConclusion = theValue;
1535                return this;
1536        }
1537        
1538        
1539
1540        /**
1541         * Sets the value for <b>conclusion</b> ()
1542         *
1543     * <p>
1544     * <b>Definition:</b>
1545     * Concise and clinically contextualized narrative interpretation of the diagnostic report
1546     * </p> 
1547         */
1548        public DiagnosticReport setConclusion( String theString) {
1549                myConclusion = new StringDt(theString); 
1550                return this; 
1551        }
1552
1553 
1554        /**
1555         * Gets the value(s) for <b>codedDiagnosis</b> ().
1556         * creating it if it does
1557         * not exist. Will not return <code>null</code>.
1558         *
1559     * <p>
1560     * <b>Definition:</b>
1561     * 
1562     * </p> 
1563         */
1564        public java.util.List<CodeableConceptDt> getCodedDiagnosis() {  
1565                if (myCodedDiagnosis == null) {
1566                        myCodedDiagnosis = new java.util.ArrayList<CodeableConceptDt>();
1567                }
1568                return myCodedDiagnosis;
1569        }
1570
1571        /**
1572         * Sets the value(s) for <b>codedDiagnosis</b> ()
1573         *
1574     * <p>
1575     * <b>Definition:</b>
1576     * 
1577     * </p> 
1578         */
1579        public DiagnosticReport setCodedDiagnosis(java.util.List<CodeableConceptDt> theValue) {
1580                myCodedDiagnosis = theValue;
1581                return this;
1582        }
1583        
1584        
1585
1586        /**
1587         * Adds and returns a new value for <b>codedDiagnosis</b> ()
1588         *
1589     * <p>
1590     * <b>Definition:</b>
1591     * 
1592     * </p> 
1593         */
1594        public CodeableConceptDt addCodedDiagnosis() {
1595                CodeableConceptDt newType = new CodeableConceptDt();
1596                getCodedDiagnosis().add(newType);
1597                return newType; 
1598        }
1599
1600        /**
1601         * Adds a given new value for <b>codedDiagnosis</b> ()
1602         *
1603         * <p>
1604         * <b>Definition:</b>
1605         * 
1606         * </p>
1607         * @param theValue The codedDiagnosis to add (must not be <code>null</code>)
1608         */
1609        public DiagnosticReport addCodedDiagnosis(CodeableConceptDt theValue) {
1610                if (theValue == null) {
1611                        throw new NullPointerException("theValue must not be null");
1612                }
1613                getCodedDiagnosis().add(theValue);
1614                return this;
1615        }
1616
1617        /**
1618         * Gets the first repetition for <b>codedDiagnosis</b> (),
1619         * creating it if it does not already exist.
1620         *
1621     * <p>
1622     * <b>Definition:</b>
1623     * 
1624     * </p> 
1625         */
1626        public CodeableConceptDt getCodedDiagnosisFirstRep() {
1627                if (getCodedDiagnosis().isEmpty()) {
1628                        return addCodedDiagnosis();
1629                }
1630                return getCodedDiagnosis().get(0); 
1631        }
1632  
1633        /**
1634         * Gets the value(s) for <b>presentedForm</b> ().
1635         * creating it if it does
1636         * not exist. Will not return <code>null</code>.
1637         *
1638     * <p>
1639     * <b>Definition:</b>
1640     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1641     * </p> 
1642         */
1643        public java.util.List<AttachmentDt> getPresentedForm() {  
1644                if (myPresentedForm == null) {
1645                        myPresentedForm = new java.util.ArrayList<AttachmentDt>();
1646                }
1647                return myPresentedForm;
1648        }
1649
1650        /**
1651         * Sets the value(s) for <b>presentedForm</b> ()
1652         *
1653     * <p>
1654     * <b>Definition:</b>
1655     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1656     * </p> 
1657         */
1658        public DiagnosticReport setPresentedForm(java.util.List<AttachmentDt> theValue) {
1659                myPresentedForm = theValue;
1660                return this;
1661        }
1662        
1663        
1664
1665        /**
1666         * Adds and returns a new value for <b>presentedForm</b> ()
1667         *
1668     * <p>
1669     * <b>Definition:</b>
1670     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1671     * </p> 
1672         */
1673        public AttachmentDt addPresentedForm() {
1674                AttachmentDt newType = new AttachmentDt();
1675                getPresentedForm().add(newType);
1676                return newType; 
1677        }
1678
1679        /**
1680         * Adds a given new value for <b>presentedForm</b> ()
1681         *
1682         * <p>
1683         * <b>Definition:</b>
1684         * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1685         * </p>
1686         * @param theValue The presentedForm to add (must not be <code>null</code>)
1687         */
1688        public DiagnosticReport addPresentedForm(AttachmentDt theValue) {
1689                if (theValue == null) {
1690                        throw new NullPointerException("theValue must not be null");
1691                }
1692                getPresentedForm().add(theValue);
1693                return this;
1694        }
1695
1696        /**
1697         * Gets the first repetition for <b>presentedForm</b> (),
1698         * creating it if it does not already exist.
1699         *
1700     * <p>
1701     * <b>Definition:</b>
1702     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
1703     * </p> 
1704         */
1705        public AttachmentDt getPresentedFormFirstRep() {
1706                if (getPresentedForm().isEmpty()) {
1707                        return addPresentedForm();
1708                }
1709                return getPresentedForm().get(0); 
1710        }
1711  
1712        /**
1713         * Block class for child element: <b>DiagnosticReport.image</b> ()
1714         *
1715     * <p>
1716     * <b>Definition:</b>
1717     * 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).
1718     * </p> 
1719         */
1720        @Block()        
1721        public static class Image 
1722            extends  BaseIdentifiableElement        implements IResourceBlock {
1723        
1724        @Child(name="comment", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)       
1725        @Description(
1726                shortDefinition="",
1727                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."
1728        )
1729        private StringDt myComment;
1730        
1731        @Child(name="link", order=1, min=1, max=1, summary=true, modifier=false, type={
1732                ca.uhn.fhir.model.dstu2.resource.Media.class    })
1733        @Description(
1734                shortDefinition="",
1735                formalDefinition=""
1736        )
1737        private ResourceReferenceDt myLink;
1738        
1739
1740        @Override
1741        public boolean isEmpty() {
1742                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myComment,  myLink);
1743        }
1744        
1745        @Override
1746        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1747                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myComment, myLink);
1748        }
1749
1750        /**
1751         * Gets the value(s) for <b>comment</b> ().
1752         * creating it if it does
1753         * not exist. Will not return <code>null</code>.
1754         *
1755     * <p>
1756     * <b>Definition:</b>
1757     * 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.
1758     * </p> 
1759         */
1760        public StringDt getCommentElement() {  
1761                if (myComment == null) {
1762                        myComment = new StringDt();
1763                }
1764                return myComment;
1765        }
1766
1767        
1768        /**
1769         * Gets the value(s) for <b>comment</b> ().
1770         * creating it if it does
1771         * not exist. This method may return <code>null</code>.
1772         *
1773     * <p>
1774     * <b>Definition:</b>
1775     * 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.
1776     * </p> 
1777         */
1778        public String getComment() {  
1779                return getCommentElement().getValue();
1780        }
1781
1782        /**
1783         * Sets the value(s) for <b>comment</b> ()
1784         *
1785     * <p>
1786     * <b>Definition:</b>
1787     * 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.
1788     * </p> 
1789         */
1790        public Image setComment(StringDt theValue) {
1791                myComment = theValue;
1792                return this;
1793        }
1794        
1795        
1796
1797        /**
1798         * Sets the value for <b>comment</b> ()
1799         *
1800     * <p>
1801     * <b>Definition:</b>
1802     * 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.
1803     * </p> 
1804         */
1805        public Image setComment( String theString) {
1806                myComment = new StringDt(theString); 
1807                return this; 
1808        }
1809
1810 
1811        /**
1812         * Gets the value(s) for <b>link</b> ().
1813         * creating it if it does
1814         * not exist. Will not return <code>null</code>.
1815         *
1816     * <p>
1817     * <b>Definition:</b>
1818     * 
1819     * </p> 
1820         */
1821        public ResourceReferenceDt getLink() {  
1822                if (myLink == null) {
1823                        myLink = new ResourceReferenceDt();
1824                }
1825                return myLink;
1826        }
1827
1828        /**
1829         * Sets the value(s) for <b>link</b> ()
1830         *
1831     * <p>
1832     * <b>Definition:</b>
1833     * 
1834     * </p> 
1835         */
1836        public Image setLink(ResourceReferenceDt theValue) {
1837                myLink = theValue;
1838                return this;
1839        }
1840        
1841        
1842
1843  
1844
1845
1846        }
1847
1848
1849
1850
1851    @Override
1852    public String getResourceName() {
1853        return "DiagnosticReport";
1854    }
1855    
1856    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1857        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1858    }
1859
1860
1861}