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>OperationOutcome</b> Resource
282 * (infrastructure)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A collection of error, warning or information messages that result from a system action.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/OperationOutcome">http://hl7.org/fhir/profiles/OperationOutcome</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="OperationOutcome", profile="http://hl7.org/fhir/profiles/OperationOutcome", id="operationoutcome")
301public class OperationOutcome extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  ca.uhn.fhir.model.base.resource.BaseOperationOutcome 
303    {
304
305
306
307        @Child(name="issue", order=0, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
308        @Description(
309                shortDefinition="",
310                formalDefinition="An error, warning or information message that results from a system action"
311        )
312        private java.util.List<Issue> myIssue;
313        
314
315        @Override
316        public boolean isEmpty() {
317                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIssue);
318        }
319        
320        @Override
321        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
322                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIssue);
323        }
324
325        /**
326         * Gets the value(s) for <b>issue</b> ().
327         * creating it if it does
328         * not exist. Will not return <code>null</code>.
329         *
330     * <p>
331     * <b>Definition:</b>
332     * An error, warning or information message that results from a system action
333     * </p> 
334         */
335        public java.util.List<Issue> getIssue() {  
336                if (myIssue == null) {
337                        myIssue = new java.util.ArrayList<Issue>();
338                }
339                return myIssue;
340        }
341
342        /**
343         * Sets the value(s) for <b>issue</b> ()
344         *
345     * <p>
346     * <b>Definition:</b>
347     * An error, warning or information message that results from a system action
348     * </p> 
349         */
350        public OperationOutcome setIssue(java.util.List<Issue> theValue) {
351                myIssue = theValue;
352                return this;
353        }
354        
355        
356
357        /**
358         * Adds and returns a new value for <b>issue</b> ()
359         *
360     * <p>
361     * <b>Definition:</b>
362     * An error, warning or information message that results from a system action
363     * </p> 
364         */
365        public Issue addIssue() {
366                Issue newType = new Issue();
367                getIssue().add(newType);
368                return newType; 
369        }
370
371        /**
372         * Adds a given new value for <b>issue</b> ()
373         *
374         * <p>
375         * <b>Definition:</b>
376         * An error, warning or information message that results from a system action
377         * </p>
378         * @param theValue The issue to add (must not be <code>null</code>)
379         */
380        public OperationOutcome addIssue(Issue theValue) {
381                if (theValue == null) {
382                        throw new NullPointerException("theValue must not be null");
383                }
384                getIssue().add(theValue);
385                return this;
386        }
387
388        /**
389         * Gets the first repetition for <b>issue</b> (),
390         * creating it if it does not already exist.
391         *
392     * <p>
393     * <b>Definition:</b>
394     * An error, warning or information message that results from a system action
395     * </p> 
396         */
397        public Issue getIssueFirstRep() {
398                if (getIssue().isEmpty()) {
399                        return addIssue();
400                }
401                return getIssue().get(0); 
402        }
403  
404        /**
405         * Block class for child element: <b>OperationOutcome.issue</b> ()
406         *
407     * <p>
408     * <b>Definition:</b>
409     * An error, warning or information message that results from a system action
410     * </p> 
411         */
412        @Block()        
413        public static class Issue 
414            extends  BaseIssue  
415            implements IResourceBlock {
416        
417        @Child(name="severity", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=true) 
418        @Description(
419                shortDefinition="",
420                formalDefinition="Indicates whether the issue indicates a variation from successful processing"
421        )
422        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/issue-severity")
423        private BoundCodeDt<IssueSeverityEnum> mySeverity;
424        
425        @Child(name="code", type=CodeDt.class, order=1, min=1, max=1, summary=false, modifier=false)    
426        @Description(
427                shortDefinition="",
428                formalDefinition="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element"
429        )
430        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/issue-type")
431        private BoundCodeDt<IssueTypeEnum> myCode;
432        
433        @Child(name="details", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false)      
434        @Description(
435                shortDefinition="",
436                formalDefinition="Additional details about the error. This may be a text description of the error, or a system code that identifies the error"
437        )
438        private CodeableConceptDt myDetails;
439        
440        @Child(name="diagnostics", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
441        @Description(
442                shortDefinition="",
443                formalDefinition="Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue."
444        )
445        private StringDt myDiagnostics;
446        
447        @Child(name="location", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
448        @Description(
449                shortDefinition="",
450                formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised."
451        )
452        private java.util.List<StringDt> myLocation;
453        
454
455        @Override
456        public boolean isEmpty() {
457                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySeverity,  myCode,  myDetails,  myDiagnostics,  myLocation);
458        }
459        
460        @Override
461        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
462                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySeverity, myCode, myDetails, myDiagnostics, myLocation);
463        }
464
465        /**
466         * Gets the value(s) for <b>severity</b> ().
467         * creating it if it does
468         * not exist. Will not return <code>null</code>.
469         *
470     * <p>
471     * <b>Definition:</b>
472     * Indicates whether the issue indicates a variation from successful processing
473     * </p> 
474         */
475        public BoundCodeDt<IssueSeverityEnum> getSeverityElement() {  
476                if (mySeverity == null) {
477                        mySeverity = new BoundCodeDt<IssueSeverityEnum>(IssueSeverityEnum.VALUESET_BINDER);
478                }
479                return mySeverity;
480        }
481
482        
483        /**
484         * Gets the value(s) for <b>severity</b> ().
485         * creating it if it does
486         * not exist. This method may return <code>null</code>.
487         *
488     * <p>
489     * <b>Definition:</b>
490     * Indicates whether the issue indicates a variation from successful processing
491     * </p> 
492         */
493        public String getSeverity() {  
494                return getSeverityElement().getValue();
495        }
496
497        /**
498         * Sets the value(s) for <b>severity</b> ()
499         *
500     * <p>
501     * <b>Definition:</b>
502     * Indicates whether the issue indicates a variation from successful processing
503     * </p> 
504         */
505        public Issue setSeverity(BoundCodeDt<IssueSeverityEnum> theValue) {
506                mySeverity = theValue;
507                return this;
508        }
509        
510        
511
512        /**
513         * Sets the value(s) for <b>severity</b> ()
514         *
515     * <p>
516     * <b>Definition:</b>
517     * Indicates whether the issue indicates a variation from successful processing
518     * </p> 
519         */
520        public Issue setSeverity(IssueSeverityEnum theValue) {
521                setSeverity(new BoundCodeDt<IssueSeverityEnum>(IssueSeverityEnum.VALUESET_BINDER, theValue));
522                
523/*
524                getSeverityElement().setValueAsEnum(theValue);
525*/
526                return this;
527        }
528
529  
530        /**
531         * Gets the value(s) for <b>code</b> ().
532         * creating it if it does
533         * not exist. Will not return <code>null</code>.
534         *
535     * <p>
536     * <b>Definition:</b>
537     * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element
538     * </p> 
539         */
540        public BoundCodeDt<IssueTypeEnum> getCodeElement() {  
541                if (myCode == null) {
542                        myCode = new BoundCodeDt<IssueTypeEnum>(IssueTypeEnum.VALUESET_BINDER);
543                }
544                return myCode;
545        }
546
547        
548        /**
549         * Gets the value(s) for <b>code</b> ().
550         * creating it if it does
551         * not exist. This method may return <code>null</code>.
552         *
553     * <p>
554     * <b>Definition:</b>
555     * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element
556     * </p> 
557         */
558        public String getCode() {  
559                return getCodeElement().getValue();
560        }
561
562        /**
563         * Sets the value(s) for <b>code</b> ()
564         *
565     * <p>
566     * <b>Definition:</b>
567     * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element
568     * </p> 
569         */
570        public Issue setCode(BoundCodeDt<IssueTypeEnum> theValue) {
571                myCode = theValue;
572                return this;
573        }
574        
575        
576
577        /**
578         * Sets the value(s) for <b>code</b> ()
579         *
580     * <p>
581     * <b>Definition:</b>
582     * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element
583     * </p> 
584         */
585        public Issue setCode(IssueTypeEnum theValue) {
586                setCode(new BoundCodeDt<IssueTypeEnum>(IssueTypeEnum.VALUESET_BINDER, theValue));
587                
588/*
589                getCodeElement().setValueAsEnum(theValue);
590*/
591                return this;
592        }
593
594  
595        /**
596         * Gets the value(s) for <b>details</b> ().
597         * creating it if it does
598         * not exist. Will not return <code>null</code>.
599         *
600     * <p>
601     * <b>Definition:</b>
602     * Additional details about the error. This may be a text description of the error, or a system code that identifies the error
603     * </p> 
604         */
605        public CodeableConceptDt getDetails() {  
606                if (myDetails == null) {
607                        myDetails = new CodeableConceptDt();
608                }
609                return myDetails;
610        }
611
612        /**
613         * Sets the value(s) for <b>details</b> ()
614         *
615     * <p>
616     * <b>Definition:</b>
617     * Additional details about the error. This may be a text description of the error, or a system code that identifies the error
618     * </p> 
619         */
620        public Issue setDetails(CodeableConceptDt theValue) {
621                myDetails = theValue;
622                return this;
623        }
624        
625        
626
627  
628        /**
629         * Gets the value(s) for <b>diagnostics</b> ().
630         * creating it if it does
631         * not exist. Will not return <code>null</code>.
632         *
633     * <p>
634     * <b>Definition:</b>
635     * Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
636     * </p> 
637         */
638        public StringDt getDiagnosticsElement() {  
639                if (myDiagnostics == null) {
640                        myDiagnostics = new StringDt();
641                }
642                return myDiagnostics;
643        }
644
645        
646        /**
647         * Gets the value(s) for <b>diagnostics</b> ().
648         * creating it if it does
649         * not exist. This method may return <code>null</code>.
650         *
651     * <p>
652     * <b>Definition:</b>
653     * Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
654     * </p> 
655         */
656        public String getDiagnostics() {  
657                return getDiagnosticsElement().getValue();
658        }
659
660        /**
661         * Sets the value(s) for <b>diagnostics</b> ()
662         *
663     * <p>
664     * <b>Definition:</b>
665     * Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
666     * </p> 
667         */
668        public Issue setDiagnostics(StringDt theValue) {
669                myDiagnostics = theValue;
670                return this;
671        }
672        
673        
674
675        /**
676         * Sets the value for <b>diagnostics</b> ()
677         *
678     * <p>
679     * <b>Definition:</b>
680     * Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
681     * </p> 
682         */
683        public Issue setDiagnostics( String theString) {
684                myDiagnostics = new StringDt(theString); 
685                return this; 
686        }
687
688 
689        /**
690         * Gets the value(s) for <b>location</b> ().
691         * creating it if it does
692         * not exist. Will not return <code>null</code>.
693         *
694     * <p>
695     * <b>Definition:</b>
696     * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
697     * </p> 
698         */
699        public java.util.List<StringDt> getLocation() {  
700                if (myLocation == null) {
701                        myLocation = new java.util.ArrayList<StringDt>();
702                }
703                return myLocation;
704        }
705
706        /**
707         * Sets the value(s) for <b>location</b> ()
708         *
709     * <p>
710     * <b>Definition:</b>
711     * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
712     * </p> 
713         */
714        public Issue setLocation(java.util.List<StringDt> theValue) {
715                myLocation = theValue;
716                return this;
717        }
718        
719        
720
721        /**
722         * Adds and returns a new value for <b>location</b> ()
723         *
724     * <p>
725     * <b>Definition:</b>
726     * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
727     * </p> 
728         */
729        public StringDt addLocation() {
730                StringDt newType = new StringDt();
731                getLocation().add(newType);
732                return newType; 
733        }
734
735        /**
736         * Adds a given new value for <b>location</b> ()
737         *
738         * <p>
739         * <b>Definition:</b>
740         * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
741         * </p>
742         * @param theValue The location to add (must not be <code>null</code>)
743         */
744        public Issue addLocation(StringDt theValue) {
745                if (theValue == null) {
746                        throw new NullPointerException("theValue must not be null");
747                }
748                getLocation().add(theValue);
749                return this;
750        }
751
752        /**
753         * Gets the first repetition for <b>location</b> (),
754         * creating it if it does not already exist.
755         *
756     * <p>
757     * <b>Definition:</b>
758     * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
759     * </p> 
760         */
761        public StringDt getLocationFirstRep() {
762                if (getLocation().isEmpty()) {
763                        return addLocation();
764                }
765                return getLocation().get(0); 
766        }
767        /**
768         * Adds a new value for <b>location</b> ()
769         *
770     * <p>
771     * <b>Definition:</b>
772     * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
773     * </p> 
774     *
775     * @return Returns a reference to this object, to allow for simple chaining.
776         */
777        public Issue addLocation( String theString) {
778                if (myLocation == null) {
779                        myLocation = new java.util.ArrayList<StringDt>();
780                }
781                myLocation.add(new StringDt(theString));
782                return this; 
783        }
784
785 
786
787        /**
788         * @deprecated Use {@link #getDiagnosticsElement()} instead - OperationOutcome.details was renamed to OperationOutcome.diagnostics in DSTU2 and a new OperationOutcome.details codeableconcept element was introduced
789         */
790        @Deprecated
791        @Override
792        public StringDt getDetailsElement() {
793                return getDiagnosticsElement();
794        }
795
796        /**
797         * @deprecated Use {@link #setDetails(String)} instead - OperationOutcome.details was renamed to OperationOutcome.diagnostics in DSTU2 and a new OperationOutcome.details codeableconcept element was introduced
798         */
799        @Deprecated
800        @Override
801        public BaseIssue setDetails(String theString) {
802                setDiagnostics(theString);
803                return this;
804        }
805
806        }
807
808
809
810
811    @Override
812    public String getResourceName() {
813        return "OperationOutcome";
814    }
815    
816    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
817        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
818    }
819
820
821}