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