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>ClaimResponse</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * This resource provides the adjudication details from the processing of a Claim resource.
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/ClaimResponse">http://hl7.org/fhir/profiles/ClaimResponse</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="ClaimResponse", profile="http://hl7.org/fhir/profiles/ClaimResponse", id="claimresponse")
301public class ClaimResponse extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>identifier</b>
306         * <p>
307         * Description: <b>The identity of the insurer</b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>ClaimResponse.identifier</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="identifier", path="ClaimResponse.identifier", description="The identity of the insurer", type="token"  )
313        public static final String SP_IDENTIFIER = "identifier";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
317         * <p>
318         * Description: <b>The identity of the insurer</b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>ClaimResponse.identifier</b><br>
321         * </p>
322         */
323        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
324
325
326
327        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
328        @Description(
329                shortDefinition="",
330                formalDefinition="The Response business identifier"
331        )
332        private java.util.List<IdentifierDt> myIdentifier;
333        
334        @Child(name="request", order=1, min=0, max=1, summary=false, modifier=false, type={
335                ca.uhn.fhir.model.dstu2.resource.Claim.class    })
336        @Description(
337                shortDefinition="",
338                formalDefinition="Original request resource referrence"
339        )
340        private ResourceReferenceDt myRequest;
341        
342        @Child(name="ruleset", type=CodingDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
343        @Description(
344                shortDefinition="",
345                formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources."
346        )
347        private CodingDt myRuleset;
348        
349        @Child(name="originalRuleset", type=CodingDt.class, order=3, min=0, max=1, summary=false, modifier=false)       
350        @Description(
351                shortDefinition="",
352                formalDefinition="The style (standard) and version of the original material which was converted into this resource."
353        )
354        private CodingDt myOriginalRuleset;
355        
356        @Child(name="created", type=DateTimeDt.class, order=4, min=0, max=1, summary=false, modifier=false)     
357        @Description(
358                shortDefinition="",
359                formalDefinition="The date when the enclosed suite of services were performed or completed"
360        )
361        private DateTimeDt myCreated;
362        
363        @Child(name="organization", order=5, min=0, max=1, summary=false, modifier=false, type={
364                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
365        @Description(
366                shortDefinition="",
367                formalDefinition="The Insurer who produced this adjudicated response."
368        )
369        private ResourceReferenceDt myOrganization;
370        
371        @Child(name="requestProvider", order=6, min=0, max=1, summary=false, modifier=false, type={
372                ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
373        @Description(
374                shortDefinition="",
375                formalDefinition="The practitioner who is responsible for the services rendered to the patient."
376        )
377        private ResourceReferenceDt myRequestProvider;
378        
379        @Child(name="requestOrganization", order=7, min=0, max=1, summary=false, modifier=false, type={
380                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
381        @Description(
382                shortDefinition="",
383                formalDefinition="The organization which is responsible for the services rendered to the patient."
384        )
385        private ResourceReferenceDt myRequestOrganization;
386        
387        @Child(name="outcome", type=CodeDt.class, order=8, min=0, max=1, summary=false, modifier=false) 
388        @Description(
389                shortDefinition="",
390                formalDefinition="Transaction status: error, complete"
391        )
392        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/remittance-outcome")
393        private BoundCodeDt<RemittanceOutcomeEnum> myOutcome;
394        
395        @Child(name="disposition", type=StringDt.class, order=9, min=0, max=1, summary=false, modifier=false)   
396        @Description(
397                shortDefinition="",
398                formalDefinition="A description of the status of the adjudication."
399        )
400        private StringDt myDisposition;
401        
402        @Child(name="payeeType", type=CodingDt.class, order=10, min=0, max=1, summary=false, modifier=false)    
403        @Description(
404                shortDefinition="",
405                formalDefinition="Party to be reimbursed: Subscriber, provider, other."
406        )
407        private CodingDt myPayeeType;
408        
409        @Child(name="item", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
410        @Description(
411                shortDefinition="",
412                formalDefinition="The first tier service adjudications for submitted services."
413        )
414        private java.util.List<Item> myItem;
415        
416        @Child(name="addItem", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
417        @Description(
418                shortDefinition="",
419                formalDefinition="The first tier service adjudications for payor added services."
420        )
421        private java.util.List<AddItem> myAddItem;
422        
423        @Child(name="error", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
424        @Description(
425                shortDefinition="",
426                formalDefinition="Mutually exclusive with Services Provided (Item)."
427        )
428        private java.util.List<Error> myError;
429        
430        @Child(name="totalCost", type=MoneyDt.class, order=14, min=0, max=1, summary=false, modifier=false)     
431        @Description(
432                shortDefinition="",
433                formalDefinition="The total cost of the services reported."
434        )
435        private MoneyDt myTotalCost;
436        
437        @Child(name="unallocDeductable", type=MoneyDt.class, order=15, min=0, max=1, summary=false, modifier=false)     
438        @Description(
439                shortDefinition="",
440                formalDefinition="The amount of deductible applied which was not allocated to any particular service line."
441        )
442        private MoneyDt myUnallocDeductable;
443        
444        @Child(name="totalBenefit", type=MoneyDt.class, order=16, min=0, max=1, summary=false, modifier=false)  
445        @Description(
446                shortDefinition="",
447                formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible)"
448        )
449        private MoneyDt myTotalBenefit;
450        
451        @Child(name="paymentAdjustment", type=MoneyDt.class, order=17, min=0, max=1, summary=false, modifier=false)     
452        @Description(
453                shortDefinition="",
454                formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction."
455        )
456        private MoneyDt myPaymentAdjustment;
457        
458        @Child(name="paymentAdjustmentReason", type=CodingDt.class, order=18, min=0, max=1, summary=false, modifier=false)      
459        @Description(
460                shortDefinition="",
461                formalDefinition="Reason for the payment adjustment."
462        )
463        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjustment-reason")
464        private CodingDt myPaymentAdjustmentReason;
465        
466        @Child(name="paymentDate", type=DateDt.class, order=19, min=0, max=1, summary=false, modifier=false)    
467        @Description(
468                shortDefinition="",
469                formalDefinition="Estimated payment data"
470        )
471        private DateDt myPaymentDate;
472        
473        @Child(name="paymentAmount", type=MoneyDt.class, order=20, min=0, max=1, summary=false, modifier=false) 
474        @Description(
475                shortDefinition="",
476                formalDefinition="Payable less any payment adjustment."
477        )
478        private MoneyDt myPaymentAmount;
479        
480        @Child(name="paymentRef", type=IdentifierDt.class, order=21, min=0, max=1, summary=false, modifier=false)       
481        @Description(
482                shortDefinition="",
483                formalDefinition="Payment identifier"
484        )
485        private IdentifierDt myPaymentRef;
486        
487        @Child(name="reserved", type=CodingDt.class, order=22, min=0, max=1, summary=false, modifier=false)     
488        @Description(
489                shortDefinition="",
490                formalDefinition="Status of funds reservation (For provider, for Patient, None)."
491        )
492        private CodingDt myReserved;
493        
494        @Child(name="form", type=CodingDt.class, order=23, min=0, max=1, summary=false, modifier=false) 
495        @Description(
496                shortDefinition="",
497                formalDefinition="The form to be used for printing the content."
498        )
499        private CodingDt myForm;
500        
501        @Child(name="note", order=24, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
502        @Description(
503                shortDefinition="",
504                formalDefinition="Note text"
505        )
506        private java.util.List<Note> myNote;
507        
508        @Child(name="coverage", order=25, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
509        @Description(
510                shortDefinition="",
511                formalDefinition="Financial instrument by which payment information for health care"
512        )
513        private java.util.List<Coverage> myCoverage;
514        
515
516        @Override
517        public boolean isEmpty() {
518                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myRequest,  myRuleset,  myOriginalRuleset,  myCreated,  myOrganization,  myRequestProvider,  myRequestOrganization,  myOutcome,  myDisposition,  myPayeeType,  myItem,  myAddItem,  myError,  myTotalCost,  myUnallocDeductable,  myTotalBenefit,  myPaymentAdjustment,  myPaymentAdjustmentReason,  myPaymentDate,  myPaymentAmount,  myPaymentRef,  myReserved,  myForm,  myNote,  myCoverage);
519        }
520        
521        @Override
522        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
523                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myRequest, myRuleset, myOriginalRuleset, myCreated, myOrganization, myRequestProvider, myRequestOrganization, myOutcome, myDisposition, myPayeeType, myItem, myAddItem, myError, myTotalCost, myUnallocDeductable, myTotalBenefit, myPaymentAdjustment, myPaymentAdjustmentReason, myPaymentDate, myPaymentAmount, myPaymentRef, myReserved, myForm, myNote, myCoverage);
524        }
525
526        /**
527         * Gets the value(s) for <b>identifier</b> ().
528         * creating it if it does
529         * not exist. Will not return <code>null</code>.
530         *
531     * <p>
532     * <b>Definition:</b>
533     * The Response business identifier
534     * </p> 
535         */
536        public java.util.List<IdentifierDt> getIdentifier() {  
537                if (myIdentifier == null) {
538                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
539                }
540                return myIdentifier;
541        }
542
543        /**
544         * Sets the value(s) for <b>identifier</b> ()
545         *
546     * <p>
547     * <b>Definition:</b>
548     * The Response business identifier
549     * </p> 
550         */
551        public ClaimResponse setIdentifier(java.util.List<IdentifierDt> theValue) {
552                myIdentifier = theValue;
553                return this;
554        }
555        
556        
557
558        /**
559         * Adds and returns a new value for <b>identifier</b> ()
560         *
561     * <p>
562     * <b>Definition:</b>
563     * The Response business identifier
564     * </p> 
565         */
566        public IdentifierDt addIdentifier() {
567                IdentifierDt newType = new IdentifierDt();
568                getIdentifier().add(newType);
569                return newType; 
570        }
571
572        /**
573         * Adds a given new value for <b>identifier</b> ()
574         *
575         * <p>
576         * <b>Definition:</b>
577         * The Response business identifier
578         * </p>
579         * @param theValue The identifier to add (must not be <code>null</code>)
580         */
581        public ClaimResponse addIdentifier(IdentifierDt theValue) {
582                if (theValue == null) {
583                        throw new NullPointerException("theValue must not be null");
584                }
585                getIdentifier().add(theValue);
586                return this;
587        }
588
589        /**
590         * Gets the first repetition for <b>identifier</b> (),
591         * creating it if it does not already exist.
592         *
593     * <p>
594     * <b>Definition:</b>
595     * The Response business identifier
596     * </p> 
597         */
598        public IdentifierDt getIdentifierFirstRep() {
599                if (getIdentifier().isEmpty()) {
600                        return addIdentifier();
601                }
602                return getIdentifier().get(0); 
603        }
604  
605        /**
606         * Gets the value(s) for <b>request</b> ().
607         * creating it if it does
608         * not exist. Will not return <code>null</code>.
609         *
610     * <p>
611     * <b>Definition:</b>
612     * Original request resource referrence
613     * </p> 
614         */
615        public ResourceReferenceDt getRequest() {  
616                if (myRequest == null) {
617                        myRequest = new ResourceReferenceDt();
618                }
619                return myRequest;
620        }
621
622        /**
623         * Sets the value(s) for <b>request</b> ()
624         *
625     * <p>
626     * <b>Definition:</b>
627     * Original request resource referrence
628     * </p> 
629         */
630        public ClaimResponse setRequest(ResourceReferenceDt theValue) {
631                myRequest = theValue;
632                return this;
633        }
634        
635        
636
637  
638        /**
639         * Gets the value(s) for <b>ruleset</b> ().
640         * creating it if it does
641         * not exist. Will not return <code>null</code>.
642         *
643     * <p>
644     * <b>Definition:</b>
645     * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
646     * </p> 
647         */
648        public CodingDt getRuleset() {  
649                if (myRuleset == null) {
650                        myRuleset = new CodingDt();
651                }
652                return myRuleset;
653        }
654
655        /**
656         * Sets the value(s) for <b>ruleset</b> ()
657         *
658     * <p>
659     * <b>Definition:</b>
660     * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
661     * </p> 
662         */
663        public ClaimResponse setRuleset(CodingDt theValue) {
664                myRuleset = theValue;
665                return this;
666        }
667        
668        
669
670  
671        /**
672         * Gets the value(s) for <b>originalRuleset</b> ().
673         * creating it if it does
674         * not exist. Will not return <code>null</code>.
675         *
676     * <p>
677     * <b>Definition:</b>
678     * The style (standard) and version of the original material which was converted into this resource.
679     * </p> 
680         */
681        public CodingDt getOriginalRuleset() {  
682                if (myOriginalRuleset == null) {
683                        myOriginalRuleset = new CodingDt();
684                }
685                return myOriginalRuleset;
686        }
687
688        /**
689         * Sets the value(s) for <b>originalRuleset</b> ()
690         *
691     * <p>
692     * <b>Definition:</b>
693     * The style (standard) and version of the original material which was converted into this resource.
694     * </p> 
695         */
696        public ClaimResponse setOriginalRuleset(CodingDt theValue) {
697                myOriginalRuleset = theValue;
698                return this;
699        }
700        
701        
702
703  
704        /**
705         * Gets the value(s) for <b>created</b> ().
706         * creating it if it does
707         * not exist. Will not return <code>null</code>.
708         *
709     * <p>
710     * <b>Definition:</b>
711     * The date when the enclosed suite of services were performed or completed
712     * </p> 
713         */
714        public DateTimeDt getCreatedElement() {  
715                if (myCreated == null) {
716                        myCreated = new DateTimeDt();
717                }
718                return myCreated;
719        }
720
721        
722        /**
723         * Gets the value(s) for <b>created</b> ().
724         * creating it if it does
725         * not exist. This method may return <code>null</code>.
726         *
727     * <p>
728     * <b>Definition:</b>
729     * The date when the enclosed suite of services were performed or completed
730     * </p> 
731         */
732        public Date getCreated() {  
733                return getCreatedElement().getValue();
734        }
735
736        /**
737         * Sets the value(s) for <b>created</b> ()
738         *
739     * <p>
740     * <b>Definition:</b>
741     * The date when the enclosed suite of services were performed or completed
742     * </p> 
743         */
744        public ClaimResponse setCreated(DateTimeDt theValue) {
745                myCreated = theValue;
746                return this;
747        }
748        
749        
750
751        /**
752         * Sets the value for <b>created</b> ()
753         *
754     * <p>
755     * <b>Definition:</b>
756     * The date when the enclosed suite of services were performed or completed
757     * </p> 
758         */
759        public ClaimResponse setCreatedWithSecondsPrecision( Date theDate) {
760                myCreated = new DateTimeDt(theDate); 
761                return this; 
762        }
763
764        /**
765         * Sets the value for <b>created</b> ()
766         *
767     * <p>
768     * <b>Definition:</b>
769     * The date when the enclosed suite of services were performed or completed
770     * </p> 
771         */
772        public ClaimResponse setCreated( Date theDate,  TemporalPrecisionEnum thePrecision) {
773                myCreated = new DateTimeDt(theDate, thePrecision); 
774                return this; 
775        }
776
777 
778        /**
779         * Gets the value(s) for <b>organization</b> ().
780         * creating it if it does
781         * not exist. Will not return <code>null</code>.
782         *
783     * <p>
784     * <b>Definition:</b>
785     * The Insurer who produced this adjudicated response.
786     * </p> 
787         */
788        public ResourceReferenceDt getOrganization() {  
789                if (myOrganization == null) {
790                        myOrganization = new ResourceReferenceDt();
791                }
792                return myOrganization;
793        }
794
795        /**
796         * Sets the value(s) for <b>organization</b> ()
797         *
798     * <p>
799     * <b>Definition:</b>
800     * The Insurer who produced this adjudicated response.
801     * </p> 
802         */
803        public ClaimResponse setOrganization(ResourceReferenceDt theValue) {
804                myOrganization = theValue;
805                return this;
806        }
807        
808        
809
810  
811        /**
812         * Gets the value(s) for <b>requestProvider</b> ().
813         * creating it if it does
814         * not exist. Will not return <code>null</code>.
815         *
816     * <p>
817     * <b>Definition:</b>
818     * The practitioner who is responsible for the services rendered to the patient.
819     * </p> 
820         */
821        public ResourceReferenceDt getRequestProvider() {  
822                if (myRequestProvider == null) {
823                        myRequestProvider = new ResourceReferenceDt();
824                }
825                return myRequestProvider;
826        }
827
828        /**
829         * Sets the value(s) for <b>requestProvider</b> ()
830         *
831     * <p>
832     * <b>Definition:</b>
833     * The practitioner who is responsible for the services rendered to the patient.
834     * </p> 
835         */
836        public ClaimResponse setRequestProvider(ResourceReferenceDt theValue) {
837                myRequestProvider = theValue;
838                return this;
839        }
840        
841        
842
843  
844        /**
845         * Gets the value(s) for <b>requestOrganization</b> ().
846         * creating it if it does
847         * not exist. Will not return <code>null</code>.
848         *
849     * <p>
850     * <b>Definition:</b>
851     * The organization which is responsible for the services rendered to the patient.
852     * </p> 
853         */
854        public ResourceReferenceDt getRequestOrganization() {  
855                if (myRequestOrganization == null) {
856                        myRequestOrganization = new ResourceReferenceDt();
857                }
858                return myRequestOrganization;
859        }
860
861        /**
862         * Sets the value(s) for <b>requestOrganization</b> ()
863         *
864     * <p>
865     * <b>Definition:</b>
866     * The organization which is responsible for the services rendered to the patient.
867     * </p> 
868         */
869        public ClaimResponse setRequestOrganization(ResourceReferenceDt theValue) {
870                myRequestOrganization = theValue;
871                return this;
872        }
873        
874        
875
876  
877        /**
878         * Gets the value(s) for <b>outcome</b> ().
879         * creating it if it does
880         * not exist. Will not return <code>null</code>.
881         *
882     * <p>
883     * <b>Definition:</b>
884     * Transaction status: error, complete
885     * </p> 
886         */
887        public BoundCodeDt<RemittanceOutcomeEnum> getOutcomeElement() {  
888                if (myOutcome == null) {
889                        myOutcome = new BoundCodeDt<RemittanceOutcomeEnum>(RemittanceOutcomeEnum.VALUESET_BINDER);
890                }
891                return myOutcome;
892        }
893
894        
895        /**
896         * Gets the value(s) for <b>outcome</b> ().
897         * creating it if it does
898         * not exist. This method may return <code>null</code>.
899         *
900     * <p>
901     * <b>Definition:</b>
902     * Transaction status: error, complete
903     * </p> 
904         */
905        public String getOutcome() {  
906                return getOutcomeElement().getValue();
907        }
908
909        /**
910         * Sets the value(s) for <b>outcome</b> ()
911         *
912     * <p>
913     * <b>Definition:</b>
914     * Transaction status: error, complete
915     * </p> 
916         */
917        public ClaimResponse setOutcome(BoundCodeDt<RemittanceOutcomeEnum> theValue) {
918                myOutcome = theValue;
919                return this;
920        }
921        
922        
923
924        /**
925         * Sets the value(s) for <b>outcome</b> ()
926         *
927     * <p>
928     * <b>Definition:</b>
929     * Transaction status: error, complete
930     * </p> 
931         */
932        public ClaimResponse setOutcome(RemittanceOutcomeEnum theValue) {
933                setOutcome(new BoundCodeDt<RemittanceOutcomeEnum>(RemittanceOutcomeEnum.VALUESET_BINDER, theValue));
934                
935/*
936                getOutcomeElement().setValueAsEnum(theValue);
937*/
938                return this;
939        }
940
941  
942        /**
943         * Gets the value(s) for <b>disposition</b> ().
944         * creating it if it does
945         * not exist. Will not return <code>null</code>.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * A description of the status of the adjudication.
950     * </p> 
951         */
952        public StringDt getDispositionElement() {  
953                if (myDisposition == null) {
954                        myDisposition = new StringDt();
955                }
956                return myDisposition;
957        }
958
959        
960        /**
961         * Gets the value(s) for <b>disposition</b> ().
962         * creating it if it does
963         * not exist. This method may return <code>null</code>.
964         *
965     * <p>
966     * <b>Definition:</b>
967     * A description of the status of the adjudication.
968     * </p> 
969         */
970        public String getDisposition() {  
971                return getDispositionElement().getValue();
972        }
973
974        /**
975         * Sets the value(s) for <b>disposition</b> ()
976         *
977     * <p>
978     * <b>Definition:</b>
979     * A description of the status of the adjudication.
980     * </p> 
981         */
982        public ClaimResponse setDisposition(StringDt theValue) {
983                myDisposition = theValue;
984                return this;
985        }
986        
987        
988
989        /**
990         * Sets the value for <b>disposition</b> ()
991         *
992     * <p>
993     * <b>Definition:</b>
994     * A description of the status of the adjudication.
995     * </p> 
996         */
997        public ClaimResponse setDisposition( String theString) {
998                myDisposition = new StringDt(theString); 
999                return this; 
1000        }
1001
1002 
1003        /**
1004         * Gets the value(s) for <b>payeeType</b> ().
1005         * creating it if it does
1006         * not exist. Will not return <code>null</code>.
1007         *
1008     * <p>
1009     * <b>Definition:</b>
1010     * Party to be reimbursed: Subscriber, provider, other.
1011     * </p> 
1012         */
1013        public CodingDt getPayeeType() {  
1014                if (myPayeeType == null) {
1015                        myPayeeType = new CodingDt();
1016                }
1017                return myPayeeType;
1018        }
1019
1020        /**
1021         * Sets the value(s) for <b>payeeType</b> ()
1022         *
1023     * <p>
1024     * <b>Definition:</b>
1025     * Party to be reimbursed: Subscriber, provider, other.
1026     * </p> 
1027         */
1028        public ClaimResponse setPayeeType(CodingDt theValue) {
1029                myPayeeType = theValue;
1030                return this;
1031        }
1032        
1033        
1034
1035  
1036        /**
1037         * Gets the value(s) for <b>item</b> ().
1038         * creating it if it does
1039         * not exist. Will not return <code>null</code>.
1040         *
1041     * <p>
1042     * <b>Definition:</b>
1043     * The first tier service adjudications for submitted services.
1044     * </p> 
1045         */
1046        public java.util.List<Item> getItem() {  
1047                if (myItem == null) {
1048                        myItem = new java.util.ArrayList<Item>();
1049                }
1050                return myItem;
1051        }
1052
1053        /**
1054         * Sets the value(s) for <b>item</b> ()
1055         *
1056     * <p>
1057     * <b>Definition:</b>
1058     * The first tier service adjudications for submitted services.
1059     * </p> 
1060         */
1061        public ClaimResponse setItem(java.util.List<Item> theValue) {
1062                myItem = theValue;
1063                return this;
1064        }
1065        
1066        
1067
1068        /**
1069         * Adds and returns a new value for <b>item</b> ()
1070         *
1071     * <p>
1072     * <b>Definition:</b>
1073     * The first tier service adjudications for submitted services.
1074     * </p> 
1075         */
1076        public Item addItem() {
1077                Item newType = new Item();
1078                getItem().add(newType);
1079                return newType; 
1080        }
1081
1082        /**
1083         * Adds a given new value for <b>item</b> ()
1084         *
1085         * <p>
1086         * <b>Definition:</b>
1087         * The first tier service adjudications for submitted services.
1088         * </p>
1089         * @param theValue The item to add (must not be <code>null</code>)
1090         */
1091        public ClaimResponse addItem(Item theValue) {
1092                if (theValue == null) {
1093                        throw new NullPointerException("theValue must not be null");
1094                }
1095                getItem().add(theValue);
1096                return this;
1097        }
1098
1099        /**
1100         * Gets the first repetition for <b>item</b> (),
1101         * creating it if it does not already exist.
1102         *
1103     * <p>
1104     * <b>Definition:</b>
1105     * The first tier service adjudications for submitted services.
1106     * </p> 
1107         */
1108        public Item getItemFirstRep() {
1109                if (getItem().isEmpty()) {
1110                        return addItem();
1111                }
1112                return getItem().get(0); 
1113        }
1114  
1115        /**
1116         * Gets the value(s) for <b>addItem</b> ().
1117         * creating it if it does
1118         * not exist. Will not return <code>null</code>.
1119         *
1120     * <p>
1121     * <b>Definition:</b>
1122     * The first tier service adjudications for payor added services.
1123     * </p> 
1124         */
1125        public java.util.List<AddItem> getAddItem() {  
1126                if (myAddItem == null) {
1127                        myAddItem = new java.util.ArrayList<AddItem>();
1128                }
1129                return myAddItem;
1130        }
1131
1132        /**
1133         * Sets the value(s) for <b>addItem</b> ()
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * The first tier service adjudications for payor added services.
1138     * </p> 
1139         */
1140        public ClaimResponse setAddItem(java.util.List<AddItem> theValue) {
1141                myAddItem = theValue;
1142                return this;
1143        }
1144        
1145        
1146
1147        /**
1148         * Adds and returns a new value for <b>addItem</b> ()
1149         *
1150     * <p>
1151     * <b>Definition:</b>
1152     * The first tier service adjudications for payor added services.
1153     * </p> 
1154         */
1155        public AddItem addAddItem() {
1156                AddItem newType = new AddItem();
1157                getAddItem().add(newType);
1158                return newType; 
1159        }
1160
1161        /**
1162         * Adds a given new value for <b>addItem</b> ()
1163         *
1164         * <p>
1165         * <b>Definition:</b>
1166         * The first tier service adjudications for payor added services.
1167         * </p>
1168         * @param theValue The addItem to add (must not be <code>null</code>)
1169         */
1170        public ClaimResponse addAddItem(AddItem theValue) {
1171                if (theValue == null) {
1172                        throw new NullPointerException("theValue must not be null");
1173                }
1174                getAddItem().add(theValue);
1175                return this;
1176        }
1177
1178        /**
1179         * Gets the first repetition for <b>addItem</b> (),
1180         * creating it if it does not already exist.
1181         *
1182     * <p>
1183     * <b>Definition:</b>
1184     * The first tier service adjudications for payor added services.
1185     * </p> 
1186         */
1187        public AddItem getAddItemFirstRep() {
1188                if (getAddItem().isEmpty()) {
1189                        return addAddItem();
1190                }
1191                return getAddItem().get(0); 
1192        }
1193  
1194        /**
1195         * Gets the value(s) for <b>error</b> ().
1196         * creating it if it does
1197         * not exist. Will not return <code>null</code>.
1198         *
1199     * <p>
1200     * <b>Definition:</b>
1201     * Mutually exclusive with Services Provided (Item).
1202     * </p> 
1203         */
1204        public java.util.List<Error> getError() {  
1205                if (myError == null) {
1206                        myError = new java.util.ArrayList<Error>();
1207                }
1208                return myError;
1209        }
1210
1211        /**
1212         * Sets the value(s) for <b>error</b> ()
1213         *
1214     * <p>
1215     * <b>Definition:</b>
1216     * Mutually exclusive with Services Provided (Item).
1217     * </p> 
1218         */
1219        public ClaimResponse setError(java.util.List<Error> theValue) {
1220                myError = theValue;
1221                return this;
1222        }
1223        
1224        
1225
1226        /**
1227         * Adds and returns a new value for <b>error</b> ()
1228         *
1229     * <p>
1230     * <b>Definition:</b>
1231     * Mutually exclusive with Services Provided (Item).
1232     * </p> 
1233         */
1234        public Error addError() {
1235                Error newType = new Error();
1236                getError().add(newType);
1237                return newType; 
1238        }
1239
1240        /**
1241         * Adds a given new value for <b>error</b> ()
1242         *
1243         * <p>
1244         * <b>Definition:</b>
1245         * Mutually exclusive with Services Provided (Item).
1246         * </p>
1247         * @param theValue The error to add (must not be <code>null</code>)
1248         */
1249        public ClaimResponse addError(Error theValue) {
1250                if (theValue == null) {
1251                        throw new NullPointerException("theValue must not be null");
1252                }
1253                getError().add(theValue);
1254                return this;
1255        }
1256
1257        /**
1258         * Gets the first repetition for <b>error</b> (),
1259         * creating it if it does not already exist.
1260         *
1261     * <p>
1262     * <b>Definition:</b>
1263     * Mutually exclusive with Services Provided (Item).
1264     * </p> 
1265         */
1266        public Error getErrorFirstRep() {
1267                if (getError().isEmpty()) {
1268                        return addError();
1269                }
1270                return getError().get(0); 
1271        }
1272  
1273        /**
1274         * Gets the value(s) for <b>totalCost</b> ().
1275         * creating it if it does
1276         * not exist. Will not return <code>null</code>.
1277         *
1278     * <p>
1279     * <b>Definition:</b>
1280     * The total cost of the services reported.
1281     * </p> 
1282         */
1283        public MoneyDt getTotalCost() {  
1284                if (myTotalCost == null) {
1285                        myTotalCost = new MoneyDt();
1286                }
1287                return myTotalCost;
1288        }
1289
1290        /**
1291         * Sets the value(s) for <b>totalCost</b> ()
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * The total cost of the services reported.
1296     * </p> 
1297         */
1298        public ClaimResponse setTotalCost(MoneyDt theValue) {
1299                myTotalCost = theValue;
1300                return this;
1301        }
1302        
1303        
1304
1305  
1306        /**
1307         * Gets the value(s) for <b>unallocDeductable</b> ().
1308         * creating it if it does
1309         * not exist. Will not return <code>null</code>.
1310         *
1311     * <p>
1312     * <b>Definition:</b>
1313     * The amount of deductible applied which was not allocated to any particular service line.
1314     * </p> 
1315         */
1316        public MoneyDt getUnallocDeductable() {  
1317                if (myUnallocDeductable == null) {
1318                        myUnallocDeductable = new MoneyDt();
1319                }
1320                return myUnallocDeductable;
1321        }
1322
1323        /**
1324         * Sets the value(s) for <b>unallocDeductable</b> ()
1325         *
1326     * <p>
1327     * <b>Definition:</b>
1328     * The amount of deductible applied which was not allocated to any particular service line.
1329     * </p> 
1330         */
1331        public ClaimResponse setUnallocDeductable(MoneyDt theValue) {
1332                myUnallocDeductable = theValue;
1333                return this;
1334        }
1335        
1336        
1337
1338  
1339        /**
1340         * Gets the value(s) for <b>totalBenefit</b> ().
1341         * creating it if it does
1342         * not exist. Will not return <code>null</code>.
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible)
1347     * </p> 
1348         */
1349        public MoneyDt getTotalBenefit() {  
1350                if (myTotalBenefit == null) {
1351                        myTotalBenefit = new MoneyDt();
1352                }
1353                return myTotalBenefit;
1354        }
1355
1356        /**
1357         * Sets the value(s) for <b>totalBenefit</b> ()
1358         *
1359     * <p>
1360     * <b>Definition:</b>
1361     * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible)
1362     * </p> 
1363         */
1364        public ClaimResponse setTotalBenefit(MoneyDt theValue) {
1365                myTotalBenefit = theValue;
1366                return this;
1367        }
1368        
1369        
1370
1371  
1372        /**
1373         * Gets the value(s) for <b>paymentAdjustment</b> ().
1374         * creating it if it does
1375         * not exist. Will not return <code>null</code>.
1376         *
1377     * <p>
1378     * <b>Definition:</b>
1379     * Adjustment to the payment of this transaction which is not related to adjudication of this transaction.
1380     * </p> 
1381         */
1382        public MoneyDt getPaymentAdjustment() {  
1383                if (myPaymentAdjustment == null) {
1384                        myPaymentAdjustment = new MoneyDt();
1385                }
1386                return myPaymentAdjustment;
1387        }
1388
1389        /**
1390         * Sets the value(s) for <b>paymentAdjustment</b> ()
1391         *
1392     * <p>
1393     * <b>Definition:</b>
1394     * Adjustment to the payment of this transaction which is not related to adjudication of this transaction.
1395     * </p> 
1396         */
1397        public ClaimResponse setPaymentAdjustment(MoneyDt theValue) {
1398                myPaymentAdjustment = theValue;
1399                return this;
1400        }
1401        
1402        
1403
1404  
1405        /**
1406         * Gets the value(s) for <b>paymentAdjustmentReason</b> ().
1407         * creating it if it does
1408         * not exist. Will not return <code>null</code>.
1409         *
1410     * <p>
1411     * <b>Definition:</b>
1412     * Reason for the payment adjustment.
1413     * </p> 
1414         */
1415        public CodingDt getPaymentAdjustmentReason() {  
1416                if (myPaymentAdjustmentReason == null) {
1417                        myPaymentAdjustmentReason = new CodingDt();
1418                }
1419                return myPaymentAdjustmentReason;
1420        }
1421
1422        /**
1423         * Sets the value(s) for <b>paymentAdjustmentReason</b> ()
1424         *
1425     * <p>
1426     * <b>Definition:</b>
1427     * Reason for the payment adjustment.
1428     * </p> 
1429         */
1430        public ClaimResponse setPaymentAdjustmentReason(CodingDt theValue) {
1431                myPaymentAdjustmentReason = theValue;
1432                return this;
1433        }
1434        
1435        
1436
1437  
1438        /**
1439         * Gets the value(s) for <b>paymentDate</b> ().
1440         * creating it if it does
1441         * not exist. Will not return <code>null</code>.
1442         *
1443     * <p>
1444     * <b>Definition:</b>
1445     * Estimated payment data
1446     * </p> 
1447         */
1448        public DateDt getPaymentDateElement() {  
1449                if (myPaymentDate == null) {
1450                        myPaymentDate = new DateDt();
1451                }
1452                return myPaymentDate;
1453        }
1454
1455        
1456        /**
1457         * Gets the value(s) for <b>paymentDate</b> ().
1458         * creating it if it does
1459         * not exist. This method may return <code>null</code>.
1460         *
1461     * <p>
1462     * <b>Definition:</b>
1463     * Estimated payment data
1464     * </p> 
1465         */
1466        public Date getPaymentDate() {  
1467                return getPaymentDateElement().getValue();
1468        }
1469
1470        /**
1471         * Sets the value(s) for <b>paymentDate</b> ()
1472         *
1473     * <p>
1474     * <b>Definition:</b>
1475     * Estimated payment data
1476     * </p> 
1477         */
1478        public ClaimResponse setPaymentDate(DateDt theValue) {
1479                myPaymentDate = theValue;
1480                return this;
1481        }
1482        
1483        
1484
1485        /**
1486         * Sets the value for <b>paymentDate</b> ()
1487         *
1488     * <p>
1489     * <b>Definition:</b>
1490     * Estimated payment data
1491     * </p> 
1492         */
1493        public ClaimResponse setPaymentDateWithDayPrecision( Date theDate) {
1494                myPaymentDate = new DateDt(theDate); 
1495                return this; 
1496        }
1497
1498        /**
1499         * Sets the value for <b>paymentDate</b> ()
1500         *
1501     * <p>
1502     * <b>Definition:</b>
1503     * Estimated payment data
1504     * </p> 
1505         */
1506        public ClaimResponse setPaymentDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1507                myPaymentDate = new DateDt(theDate, thePrecision); 
1508                return this; 
1509        }
1510
1511 
1512        /**
1513         * Gets the value(s) for <b>paymentAmount</b> ().
1514         * creating it if it does
1515         * not exist. Will not return <code>null</code>.
1516         *
1517     * <p>
1518     * <b>Definition:</b>
1519     * Payable less any payment adjustment.
1520     * </p> 
1521         */
1522        public MoneyDt getPaymentAmount() {  
1523                if (myPaymentAmount == null) {
1524                        myPaymentAmount = new MoneyDt();
1525                }
1526                return myPaymentAmount;
1527        }
1528
1529        /**
1530         * Sets the value(s) for <b>paymentAmount</b> ()
1531         *
1532     * <p>
1533     * <b>Definition:</b>
1534     * Payable less any payment adjustment.
1535     * </p> 
1536         */
1537        public ClaimResponse setPaymentAmount(MoneyDt theValue) {
1538                myPaymentAmount = theValue;
1539                return this;
1540        }
1541        
1542        
1543
1544  
1545        /**
1546         * Gets the value(s) for <b>paymentRef</b> ().
1547         * creating it if it does
1548         * not exist. Will not return <code>null</code>.
1549         *
1550     * <p>
1551     * <b>Definition:</b>
1552     * Payment identifier
1553     * </p> 
1554         */
1555        public IdentifierDt getPaymentRef() {  
1556                if (myPaymentRef == null) {
1557                        myPaymentRef = new IdentifierDt();
1558                }
1559                return myPaymentRef;
1560        }
1561
1562        /**
1563         * Sets the value(s) for <b>paymentRef</b> ()
1564         *
1565     * <p>
1566     * <b>Definition:</b>
1567     * Payment identifier
1568     * </p> 
1569         */
1570        public ClaimResponse setPaymentRef(IdentifierDt theValue) {
1571                myPaymentRef = theValue;
1572                return this;
1573        }
1574        
1575        
1576
1577  
1578        /**
1579         * Gets the value(s) for <b>reserved</b> ().
1580         * creating it if it does
1581         * not exist. Will not return <code>null</code>.
1582         *
1583     * <p>
1584     * <b>Definition:</b>
1585     * Status of funds reservation (For provider, for Patient, None).
1586     * </p> 
1587         */
1588        public CodingDt getReserved() {  
1589                if (myReserved == null) {
1590                        myReserved = new CodingDt();
1591                }
1592                return myReserved;
1593        }
1594
1595        /**
1596         * Sets the value(s) for <b>reserved</b> ()
1597         *
1598     * <p>
1599     * <b>Definition:</b>
1600     * Status of funds reservation (For provider, for Patient, None).
1601     * </p> 
1602         */
1603        public ClaimResponse setReserved(CodingDt theValue) {
1604                myReserved = theValue;
1605                return this;
1606        }
1607        
1608        
1609
1610  
1611        /**
1612         * Gets the value(s) for <b>form</b> ().
1613         * creating it if it does
1614         * not exist. Will not return <code>null</code>.
1615         *
1616     * <p>
1617     * <b>Definition:</b>
1618     * The form to be used for printing the content.
1619     * </p> 
1620         */
1621        public CodingDt getForm() {  
1622                if (myForm == null) {
1623                        myForm = new CodingDt();
1624                }
1625                return myForm;
1626        }
1627
1628        /**
1629         * Sets the value(s) for <b>form</b> ()
1630         *
1631     * <p>
1632     * <b>Definition:</b>
1633     * The form to be used for printing the content.
1634     * </p> 
1635         */
1636        public ClaimResponse setForm(CodingDt theValue) {
1637                myForm = theValue;
1638                return this;
1639        }
1640        
1641        
1642
1643  
1644        /**
1645         * Gets the value(s) for <b>note</b> ().
1646         * creating it if it does
1647         * not exist. Will not return <code>null</code>.
1648         *
1649     * <p>
1650     * <b>Definition:</b>
1651     * Note text
1652     * </p> 
1653         */
1654        public java.util.List<Note> getNote() {  
1655                if (myNote == null) {
1656                        myNote = new java.util.ArrayList<Note>();
1657                }
1658                return myNote;
1659        }
1660
1661        /**
1662         * Sets the value(s) for <b>note</b> ()
1663         *
1664     * <p>
1665     * <b>Definition:</b>
1666     * Note text
1667     * </p> 
1668         */
1669        public ClaimResponse setNote(java.util.List<Note> theValue) {
1670                myNote = theValue;
1671                return this;
1672        }
1673        
1674        
1675
1676        /**
1677         * Adds and returns a new value for <b>note</b> ()
1678         *
1679     * <p>
1680     * <b>Definition:</b>
1681     * Note text
1682     * </p> 
1683         */
1684        public Note addNote() {
1685                Note newType = new Note();
1686                getNote().add(newType);
1687                return newType; 
1688        }
1689
1690        /**
1691         * Adds a given new value for <b>note</b> ()
1692         *
1693         * <p>
1694         * <b>Definition:</b>
1695         * Note text
1696         * </p>
1697         * @param theValue The note to add (must not be <code>null</code>)
1698         */
1699        public ClaimResponse addNote(Note theValue) {
1700                if (theValue == null) {
1701                        throw new NullPointerException("theValue must not be null");
1702                }
1703                getNote().add(theValue);
1704                return this;
1705        }
1706
1707        /**
1708         * Gets the first repetition for <b>note</b> (),
1709         * creating it if it does not already exist.
1710         *
1711     * <p>
1712     * <b>Definition:</b>
1713     * Note text
1714     * </p> 
1715         */
1716        public Note getNoteFirstRep() {
1717                if (getNote().isEmpty()) {
1718                        return addNote();
1719                }
1720                return getNote().get(0); 
1721        }
1722  
1723        /**
1724         * Gets the value(s) for <b>coverage</b> ().
1725         * creating it if it does
1726         * not exist. Will not return <code>null</code>.
1727         *
1728     * <p>
1729     * <b>Definition:</b>
1730     * Financial instrument by which payment information for health care
1731     * </p> 
1732         */
1733        public java.util.List<Coverage> getCoverage() {  
1734                if (myCoverage == null) {
1735                        myCoverage = new java.util.ArrayList<Coverage>();
1736                }
1737                return myCoverage;
1738        }
1739
1740        /**
1741         * Sets the value(s) for <b>coverage</b> ()
1742         *
1743     * <p>
1744     * <b>Definition:</b>
1745     * Financial instrument by which payment information for health care
1746     * </p> 
1747         */
1748        public ClaimResponse setCoverage(java.util.List<Coverage> theValue) {
1749                myCoverage = theValue;
1750                return this;
1751        }
1752        
1753        
1754
1755        /**
1756         * Adds and returns a new value for <b>coverage</b> ()
1757         *
1758     * <p>
1759     * <b>Definition:</b>
1760     * Financial instrument by which payment information for health care
1761     * </p> 
1762         */
1763        public Coverage addCoverage() {
1764                Coverage newType = new Coverage();
1765                getCoverage().add(newType);
1766                return newType; 
1767        }
1768
1769        /**
1770         * Adds a given new value for <b>coverage</b> ()
1771         *
1772         * <p>
1773         * <b>Definition:</b>
1774         * Financial instrument by which payment information for health care
1775         * </p>
1776         * @param theValue The coverage to add (must not be <code>null</code>)
1777         */
1778        public ClaimResponse addCoverage(Coverage theValue) {
1779                if (theValue == null) {
1780                        throw new NullPointerException("theValue must not be null");
1781                }
1782                getCoverage().add(theValue);
1783                return this;
1784        }
1785
1786        /**
1787         * Gets the first repetition for <b>coverage</b> (),
1788         * creating it if it does not already exist.
1789         *
1790     * <p>
1791     * <b>Definition:</b>
1792     * Financial instrument by which payment information for health care
1793     * </p> 
1794         */
1795        public Coverage getCoverageFirstRep() {
1796                if (getCoverage().isEmpty()) {
1797                        return addCoverage();
1798                }
1799                return getCoverage().get(0); 
1800        }
1801  
1802        /**
1803         * Block class for child element: <b>ClaimResponse.item</b> ()
1804         *
1805     * <p>
1806     * <b>Definition:</b>
1807     * The first tier service adjudications for submitted services.
1808     * </p> 
1809         */
1810        @Block()        
1811        public static class Item 
1812            extends  BaseIdentifiableElement        implements IResourceBlock {
1813        
1814        @Child(name="sequenceLinkId", type=PositiveIntDt.class, order=0, min=1, max=1, summary=false, modifier=false)   
1815        @Description(
1816                shortDefinition="",
1817                formalDefinition="A service line number."
1818        )
1819        private PositiveIntDt mySequenceLinkId;
1820        
1821        @Child(name="noteNumber", type=PositiveIntDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
1822        @Description(
1823                shortDefinition="",
1824                formalDefinition="A list of note references to the notes provided below."
1825        )
1826        private java.util.List<PositiveIntDt> myNoteNumber;
1827        
1828        @Child(name="adjudication", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
1829        @Description(
1830                shortDefinition="",
1831                formalDefinition="The adjudications results."
1832        )
1833        private java.util.List<ItemAdjudication> myAdjudication;
1834        
1835        @Child(name="detail", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
1836        @Description(
1837                shortDefinition="",
1838                formalDefinition="The second tier service adjudications for submitted services."
1839        )
1840        private java.util.List<ItemDetail> myDetail;
1841        
1842
1843        @Override
1844        public boolean isEmpty() {
1845                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequenceLinkId,  myNoteNumber,  myAdjudication,  myDetail);
1846        }
1847        
1848        @Override
1849        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1850                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequenceLinkId, myNoteNumber, myAdjudication, myDetail);
1851        }
1852
1853        /**
1854         * Gets the value(s) for <b>sequenceLinkId</b> ().
1855         * creating it if it does
1856         * not exist. Will not return <code>null</code>.
1857         *
1858     * <p>
1859     * <b>Definition:</b>
1860     * A service line number.
1861     * </p> 
1862         */
1863        public PositiveIntDt getSequenceLinkIdElement() {  
1864                if (mySequenceLinkId == null) {
1865                        mySequenceLinkId = new PositiveIntDt();
1866                }
1867                return mySequenceLinkId;
1868        }
1869
1870        
1871        /**
1872         * Gets the value(s) for <b>sequenceLinkId</b> ().
1873         * creating it if it does
1874         * not exist. This method may return <code>null</code>.
1875         *
1876     * <p>
1877     * <b>Definition:</b>
1878     * A service line number.
1879     * </p> 
1880         */
1881        public Integer getSequenceLinkId() {  
1882                return getSequenceLinkIdElement().getValue();
1883        }
1884
1885        /**
1886         * Sets the value(s) for <b>sequenceLinkId</b> ()
1887         *
1888     * <p>
1889     * <b>Definition:</b>
1890     * A service line number.
1891     * </p> 
1892         */
1893        public Item setSequenceLinkId(PositiveIntDt theValue) {
1894                mySequenceLinkId = theValue;
1895                return this;
1896        }
1897        
1898        
1899
1900        /**
1901         * Sets the value for <b>sequenceLinkId</b> ()
1902         *
1903     * <p>
1904     * <b>Definition:</b>
1905     * A service line number.
1906     * </p> 
1907         */
1908        public Item setSequenceLinkId( int theInteger) {
1909                mySequenceLinkId = new PositiveIntDt(theInteger); 
1910                return this; 
1911        }
1912
1913 
1914        /**
1915         * Gets the value(s) for <b>noteNumber</b> ().
1916         * creating it if it does
1917         * not exist. Will not return <code>null</code>.
1918         *
1919     * <p>
1920     * <b>Definition:</b>
1921     * A list of note references to the notes provided below.
1922     * </p> 
1923         */
1924        public java.util.List<PositiveIntDt> getNoteNumber() {  
1925                if (myNoteNumber == null) {
1926                        myNoteNumber = new java.util.ArrayList<PositiveIntDt>();
1927                }
1928                return myNoteNumber;
1929        }
1930
1931        /**
1932         * Sets the value(s) for <b>noteNumber</b> ()
1933         *
1934     * <p>
1935     * <b>Definition:</b>
1936     * A list of note references to the notes provided below.
1937     * </p> 
1938         */
1939        public Item setNoteNumber(java.util.List<PositiveIntDt> theValue) {
1940                myNoteNumber = theValue;
1941                return this;
1942        }
1943        
1944        
1945
1946        /**
1947         * Adds and returns a new value for <b>noteNumber</b> ()
1948         *
1949     * <p>
1950     * <b>Definition:</b>
1951     * A list of note references to the notes provided below.
1952     * </p> 
1953         */
1954        public PositiveIntDt addNoteNumber() {
1955                PositiveIntDt newType = new PositiveIntDt();
1956                getNoteNumber().add(newType);
1957                return newType; 
1958        }
1959
1960        /**
1961         * Adds a given new value for <b>noteNumber</b> ()
1962         *
1963         * <p>
1964         * <b>Definition:</b>
1965         * A list of note references to the notes provided below.
1966         * </p>
1967         * @param theValue The noteNumber to add (must not be <code>null</code>)
1968         */
1969        public Item addNoteNumber(PositiveIntDt theValue) {
1970                if (theValue == null) {
1971                        throw new NullPointerException("theValue must not be null");
1972                }
1973                getNoteNumber().add(theValue);
1974                return this;
1975        }
1976
1977        /**
1978         * Gets the first repetition for <b>noteNumber</b> (),
1979         * creating it if it does not already exist.
1980         *
1981     * <p>
1982     * <b>Definition:</b>
1983     * A list of note references to the notes provided below.
1984     * </p> 
1985         */
1986        public PositiveIntDt getNoteNumberFirstRep() {
1987                if (getNoteNumber().isEmpty()) {
1988                        return addNoteNumber();
1989                }
1990                return getNoteNumber().get(0); 
1991        }
1992        /**
1993         * Adds a new value for <b>noteNumber</b> ()
1994         *
1995     * <p>
1996     * <b>Definition:</b>
1997     * A list of note references to the notes provided below.
1998     * </p> 
1999     *
2000     * @return Returns a reference to this object, to allow for simple chaining.
2001         */
2002        public Item addNoteNumber( int theInteger) {
2003                if (myNoteNumber == null) {
2004                        myNoteNumber = new java.util.ArrayList<PositiveIntDt>();
2005                }
2006                myNoteNumber.add(new PositiveIntDt(theInteger));
2007                return this; 
2008        }
2009
2010 
2011        /**
2012         * Gets the value(s) for <b>adjudication</b> ().
2013         * creating it if it does
2014         * not exist. Will not return <code>null</code>.
2015         *
2016     * <p>
2017     * <b>Definition:</b>
2018     * The adjudications results.
2019     * </p> 
2020         */
2021        public java.util.List<ItemAdjudication> getAdjudication() {  
2022                if (myAdjudication == null) {
2023                        myAdjudication = new java.util.ArrayList<ItemAdjudication>();
2024                }
2025                return myAdjudication;
2026        }
2027
2028        /**
2029         * Sets the value(s) for <b>adjudication</b> ()
2030         *
2031     * <p>
2032     * <b>Definition:</b>
2033     * The adjudications results.
2034     * </p> 
2035         */
2036        public Item setAdjudication(java.util.List<ItemAdjudication> theValue) {
2037                myAdjudication = theValue;
2038                return this;
2039        }
2040        
2041        
2042
2043        /**
2044         * Adds and returns a new value for <b>adjudication</b> ()
2045         *
2046     * <p>
2047     * <b>Definition:</b>
2048     * The adjudications results.
2049     * </p> 
2050         */
2051        public ItemAdjudication addAdjudication() {
2052                ItemAdjudication newType = new ItemAdjudication();
2053                getAdjudication().add(newType);
2054                return newType; 
2055        }
2056
2057        /**
2058         * Adds a given new value for <b>adjudication</b> ()
2059         *
2060         * <p>
2061         * <b>Definition:</b>
2062         * The adjudications results.
2063         * </p>
2064         * @param theValue The adjudication to add (must not be <code>null</code>)
2065         */
2066        public Item addAdjudication(ItemAdjudication theValue) {
2067                if (theValue == null) {
2068                        throw new NullPointerException("theValue must not be null");
2069                }
2070                getAdjudication().add(theValue);
2071                return this;
2072        }
2073
2074        /**
2075         * Gets the first repetition for <b>adjudication</b> (),
2076         * creating it if it does not already exist.
2077         *
2078     * <p>
2079     * <b>Definition:</b>
2080     * The adjudications results.
2081     * </p> 
2082         */
2083        public ItemAdjudication getAdjudicationFirstRep() {
2084                if (getAdjudication().isEmpty()) {
2085                        return addAdjudication();
2086                }
2087                return getAdjudication().get(0); 
2088        }
2089  
2090        /**
2091         * Gets the value(s) for <b>detail</b> ().
2092         * creating it if it does
2093         * not exist. Will not return <code>null</code>.
2094         *
2095     * <p>
2096     * <b>Definition:</b>
2097     * The second tier service adjudications for submitted services.
2098     * </p> 
2099         */
2100        public java.util.List<ItemDetail> getDetail() {  
2101                if (myDetail == null) {
2102                        myDetail = new java.util.ArrayList<ItemDetail>();
2103                }
2104                return myDetail;
2105        }
2106
2107        /**
2108         * Sets the value(s) for <b>detail</b> ()
2109         *
2110     * <p>
2111     * <b>Definition:</b>
2112     * The second tier service adjudications for submitted services.
2113     * </p> 
2114         */
2115        public Item setDetail(java.util.List<ItemDetail> theValue) {
2116                myDetail = theValue;
2117                return this;
2118        }
2119        
2120        
2121
2122        /**
2123         * Adds and returns a new value for <b>detail</b> ()
2124         *
2125     * <p>
2126     * <b>Definition:</b>
2127     * The second tier service adjudications for submitted services.
2128     * </p> 
2129         */
2130        public ItemDetail addDetail() {
2131                ItemDetail newType = new ItemDetail();
2132                getDetail().add(newType);
2133                return newType; 
2134        }
2135
2136        /**
2137         * Adds a given new value for <b>detail</b> ()
2138         *
2139         * <p>
2140         * <b>Definition:</b>
2141         * The second tier service adjudications for submitted services.
2142         * </p>
2143         * @param theValue The detail to add (must not be <code>null</code>)
2144         */
2145        public Item addDetail(ItemDetail theValue) {
2146                if (theValue == null) {
2147                        throw new NullPointerException("theValue must not be null");
2148                }
2149                getDetail().add(theValue);
2150                return this;
2151        }
2152
2153        /**
2154         * Gets the first repetition for <b>detail</b> (),
2155         * creating it if it does not already exist.
2156         *
2157     * <p>
2158     * <b>Definition:</b>
2159     * The second tier service adjudications for submitted services.
2160     * </p> 
2161         */
2162        public ItemDetail getDetailFirstRep() {
2163                if (getDetail().isEmpty()) {
2164                        return addDetail();
2165                }
2166                return getDetail().get(0); 
2167        }
2168  
2169
2170
2171        }
2172
2173        /**
2174         * Block class for child element: <b>ClaimResponse.item.adjudication</b> ()
2175         *
2176     * <p>
2177     * <b>Definition:</b>
2178     * The adjudications results.
2179     * </p> 
2180         */
2181        @Block()        
2182        public static class ItemAdjudication 
2183            extends  BaseIdentifiableElement        implements IResourceBlock {
2184        
2185        @Child(name="code", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
2186        @Description(
2187                shortDefinition="",
2188                formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc."
2189        )
2190        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjudication")
2191        private CodingDt myCode;
2192        
2193        @Child(name="amount", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
2194        @Description(
2195                shortDefinition="",
2196                formalDefinition="Monetary amount associated with the code"
2197        )
2198        private MoneyDt myAmount;
2199        
2200        @Child(name="value", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
2201        @Description(
2202                shortDefinition="",
2203                formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above."
2204        )
2205        private DecimalDt myValue;
2206        
2207
2208        @Override
2209        public boolean isEmpty() {
2210                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAmount,  myValue);
2211        }
2212        
2213        @Override
2214        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2215                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAmount, myValue);
2216        }
2217
2218        /**
2219         * Gets the value(s) for <b>code</b> ().
2220         * creating it if it does
2221         * not exist. Will not return <code>null</code>.
2222         *
2223     * <p>
2224     * <b>Definition:</b>
2225     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
2226     * </p> 
2227         */
2228        public CodingDt getCode() {  
2229                if (myCode == null) {
2230                        myCode = new CodingDt();
2231                }
2232                return myCode;
2233        }
2234
2235        /**
2236         * Sets the value(s) for <b>code</b> ()
2237         *
2238     * <p>
2239     * <b>Definition:</b>
2240     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
2241     * </p> 
2242         */
2243        public ItemAdjudication setCode(CodingDt theValue) {
2244                myCode = theValue;
2245                return this;
2246        }
2247        
2248        
2249
2250  
2251        /**
2252         * Gets the value(s) for <b>amount</b> ().
2253         * creating it if it does
2254         * not exist. Will not return <code>null</code>.
2255         *
2256     * <p>
2257     * <b>Definition:</b>
2258     * Monetary amount associated with the code
2259     * </p> 
2260         */
2261        public MoneyDt getAmount() {  
2262                if (myAmount == null) {
2263                        myAmount = new MoneyDt();
2264                }
2265                return myAmount;
2266        }
2267
2268        /**
2269         * Sets the value(s) for <b>amount</b> ()
2270         *
2271     * <p>
2272     * <b>Definition:</b>
2273     * Monetary amount associated with the code
2274     * </p> 
2275         */
2276        public ItemAdjudication setAmount(MoneyDt theValue) {
2277                myAmount = theValue;
2278                return this;
2279        }
2280        
2281        
2282
2283  
2284        /**
2285         * Gets the value(s) for <b>value</b> ().
2286         * creating it if it does
2287         * not exist. Will not return <code>null</code>.
2288         *
2289     * <p>
2290     * <b>Definition:</b>
2291     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2292     * </p> 
2293         */
2294        public DecimalDt getValueElement() {  
2295                if (myValue == null) {
2296                        myValue = new DecimalDt();
2297                }
2298                return myValue;
2299        }
2300
2301        
2302        /**
2303         * Gets the value(s) for <b>value</b> ().
2304         * creating it if it does
2305         * not exist. This method may return <code>null</code>.
2306         *
2307     * <p>
2308     * <b>Definition:</b>
2309     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2310     * </p> 
2311         */
2312        public BigDecimal getValue() {  
2313                return getValueElement().getValue();
2314        }
2315
2316        /**
2317         * Sets the value(s) for <b>value</b> ()
2318         *
2319     * <p>
2320     * <b>Definition:</b>
2321     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2322     * </p> 
2323         */
2324        public ItemAdjudication setValue(DecimalDt theValue) {
2325                myValue = theValue;
2326                return this;
2327        }
2328        
2329        
2330
2331        /**
2332         * Sets the value for <b>value</b> ()
2333         *
2334     * <p>
2335     * <b>Definition:</b>
2336     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2337     * </p> 
2338         */
2339        public ItemAdjudication setValue( double theValue) {
2340                myValue = new DecimalDt(theValue); 
2341                return this; 
2342        }
2343
2344        /**
2345         * Sets the value for <b>value</b> ()
2346         *
2347     * <p>
2348     * <b>Definition:</b>
2349     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2350     * </p> 
2351         */
2352        public ItemAdjudication setValue( long theValue) {
2353                myValue = new DecimalDt(theValue); 
2354                return this; 
2355        }
2356
2357        /**
2358         * Sets the value for <b>value</b> ()
2359         *
2360     * <p>
2361     * <b>Definition:</b>
2362     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2363     * </p> 
2364         */
2365        public ItemAdjudication setValue( java.math.BigDecimal theValue) {
2366                myValue = new DecimalDt(theValue); 
2367                return this; 
2368        }
2369
2370 
2371
2372
2373        }
2374
2375
2376        /**
2377         * Block class for child element: <b>ClaimResponse.item.detail</b> ()
2378         *
2379     * <p>
2380     * <b>Definition:</b>
2381     * The second tier service adjudications for submitted services.
2382     * </p> 
2383         */
2384        @Block()        
2385        public static class ItemDetail 
2386            extends  BaseIdentifiableElement        implements IResourceBlock {
2387        
2388        @Child(name="sequenceLinkId", type=PositiveIntDt.class, order=0, min=1, max=1, summary=false, modifier=false)   
2389        @Description(
2390                shortDefinition="",
2391                formalDefinition="A service line number."
2392        )
2393        private PositiveIntDt mySequenceLinkId;
2394        
2395        @Child(name="adjudication", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
2396        @Description(
2397                shortDefinition="",
2398                formalDefinition="The adjudications results."
2399        )
2400        private java.util.List<ItemDetailAdjudication> myAdjudication;
2401        
2402        @Child(name="subDetail", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
2403        @Description(
2404                shortDefinition="",
2405                formalDefinition="The third tier service adjudications for submitted services."
2406        )
2407        private java.util.List<ItemDetailSubDetail> mySubDetail;
2408        
2409
2410        @Override
2411        public boolean isEmpty() {
2412                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequenceLinkId,  myAdjudication,  mySubDetail);
2413        }
2414        
2415        @Override
2416        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2417                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequenceLinkId, myAdjudication, mySubDetail);
2418        }
2419
2420        /**
2421         * Gets the value(s) for <b>sequenceLinkId</b> ().
2422         * creating it if it does
2423         * not exist. Will not return <code>null</code>.
2424         *
2425     * <p>
2426     * <b>Definition:</b>
2427     * A service line number.
2428     * </p> 
2429         */
2430        public PositiveIntDt getSequenceLinkIdElement() {  
2431                if (mySequenceLinkId == null) {
2432                        mySequenceLinkId = new PositiveIntDt();
2433                }
2434                return mySequenceLinkId;
2435        }
2436
2437        
2438        /**
2439         * Gets the value(s) for <b>sequenceLinkId</b> ().
2440         * creating it if it does
2441         * not exist. This method may return <code>null</code>.
2442         *
2443     * <p>
2444     * <b>Definition:</b>
2445     * A service line number.
2446     * </p> 
2447         */
2448        public Integer getSequenceLinkId() {  
2449                return getSequenceLinkIdElement().getValue();
2450        }
2451
2452        /**
2453         * Sets the value(s) for <b>sequenceLinkId</b> ()
2454         *
2455     * <p>
2456     * <b>Definition:</b>
2457     * A service line number.
2458     * </p> 
2459         */
2460        public ItemDetail setSequenceLinkId(PositiveIntDt theValue) {
2461                mySequenceLinkId = theValue;
2462                return this;
2463        }
2464        
2465        
2466
2467        /**
2468         * Sets the value for <b>sequenceLinkId</b> ()
2469         *
2470     * <p>
2471     * <b>Definition:</b>
2472     * A service line number.
2473     * </p> 
2474         */
2475        public ItemDetail setSequenceLinkId( int theInteger) {
2476                mySequenceLinkId = new PositiveIntDt(theInteger); 
2477                return this; 
2478        }
2479
2480 
2481        /**
2482         * Gets the value(s) for <b>adjudication</b> ().
2483         * creating it if it does
2484         * not exist. Will not return <code>null</code>.
2485         *
2486     * <p>
2487     * <b>Definition:</b>
2488     * The adjudications results.
2489     * </p> 
2490         */
2491        public java.util.List<ItemDetailAdjudication> getAdjudication() {  
2492                if (myAdjudication == null) {
2493                        myAdjudication = new java.util.ArrayList<ItemDetailAdjudication>();
2494                }
2495                return myAdjudication;
2496        }
2497
2498        /**
2499         * Sets the value(s) for <b>adjudication</b> ()
2500         *
2501     * <p>
2502     * <b>Definition:</b>
2503     * The adjudications results.
2504     * </p> 
2505         */
2506        public ItemDetail setAdjudication(java.util.List<ItemDetailAdjudication> theValue) {
2507                myAdjudication = theValue;
2508                return this;
2509        }
2510        
2511        
2512
2513        /**
2514         * Adds and returns a new value for <b>adjudication</b> ()
2515         *
2516     * <p>
2517     * <b>Definition:</b>
2518     * The adjudications results.
2519     * </p> 
2520         */
2521        public ItemDetailAdjudication addAdjudication() {
2522                ItemDetailAdjudication newType = new ItemDetailAdjudication();
2523                getAdjudication().add(newType);
2524                return newType; 
2525        }
2526
2527        /**
2528         * Adds a given new value for <b>adjudication</b> ()
2529         *
2530         * <p>
2531         * <b>Definition:</b>
2532         * The adjudications results.
2533         * </p>
2534         * @param theValue The adjudication to add (must not be <code>null</code>)
2535         */
2536        public ItemDetail addAdjudication(ItemDetailAdjudication theValue) {
2537                if (theValue == null) {
2538                        throw new NullPointerException("theValue must not be null");
2539                }
2540                getAdjudication().add(theValue);
2541                return this;
2542        }
2543
2544        /**
2545         * Gets the first repetition for <b>adjudication</b> (),
2546         * creating it if it does not already exist.
2547         *
2548     * <p>
2549     * <b>Definition:</b>
2550     * The adjudications results.
2551     * </p> 
2552         */
2553        public ItemDetailAdjudication getAdjudicationFirstRep() {
2554                if (getAdjudication().isEmpty()) {
2555                        return addAdjudication();
2556                }
2557                return getAdjudication().get(0); 
2558        }
2559  
2560        /**
2561         * Gets the value(s) for <b>subDetail</b> ().
2562         * creating it if it does
2563         * not exist. Will not return <code>null</code>.
2564         *
2565     * <p>
2566     * <b>Definition:</b>
2567     * The third tier service adjudications for submitted services.
2568     * </p> 
2569         */
2570        public java.util.List<ItemDetailSubDetail> getSubDetail() {  
2571                if (mySubDetail == null) {
2572                        mySubDetail = new java.util.ArrayList<ItemDetailSubDetail>();
2573                }
2574                return mySubDetail;
2575        }
2576
2577        /**
2578         * Sets the value(s) for <b>subDetail</b> ()
2579         *
2580     * <p>
2581     * <b>Definition:</b>
2582     * The third tier service adjudications for submitted services.
2583     * </p> 
2584         */
2585        public ItemDetail setSubDetail(java.util.List<ItemDetailSubDetail> theValue) {
2586                mySubDetail = theValue;
2587                return this;
2588        }
2589        
2590        
2591
2592        /**
2593         * Adds and returns a new value for <b>subDetail</b> ()
2594         *
2595     * <p>
2596     * <b>Definition:</b>
2597     * The third tier service adjudications for submitted services.
2598     * </p> 
2599         */
2600        public ItemDetailSubDetail addSubDetail() {
2601                ItemDetailSubDetail newType = new ItemDetailSubDetail();
2602                getSubDetail().add(newType);
2603                return newType; 
2604        }
2605
2606        /**
2607         * Adds a given new value for <b>subDetail</b> ()
2608         *
2609         * <p>
2610         * <b>Definition:</b>
2611         * The third tier service adjudications for submitted services.
2612         * </p>
2613         * @param theValue The subDetail to add (must not be <code>null</code>)
2614         */
2615        public ItemDetail addSubDetail(ItemDetailSubDetail theValue) {
2616                if (theValue == null) {
2617                        throw new NullPointerException("theValue must not be null");
2618                }
2619                getSubDetail().add(theValue);
2620                return this;
2621        }
2622
2623        /**
2624         * Gets the first repetition for <b>subDetail</b> (),
2625         * creating it if it does not already exist.
2626         *
2627     * <p>
2628     * <b>Definition:</b>
2629     * The third tier service adjudications for submitted services.
2630     * </p> 
2631         */
2632        public ItemDetailSubDetail getSubDetailFirstRep() {
2633                if (getSubDetail().isEmpty()) {
2634                        return addSubDetail();
2635                }
2636                return getSubDetail().get(0); 
2637        }
2638  
2639
2640
2641        }
2642
2643        /**
2644         * Block class for child element: <b>ClaimResponse.item.detail.adjudication</b> ()
2645         *
2646     * <p>
2647     * <b>Definition:</b>
2648     * The adjudications results.
2649     * </p> 
2650         */
2651        @Block()        
2652        public static class ItemDetailAdjudication 
2653            extends  BaseIdentifiableElement        implements IResourceBlock {
2654        
2655        @Child(name="code", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
2656        @Description(
2657                shortDefinition="",
2658                formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc."
2659        )
2660        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjudication")
2661        private CodingDt myCode;
2662        
2663        @Child(name="amount", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
2664        @Description(
2665                shortDefinition="",
2666                formalDefinition="Monetary amount associated with the code."
2667        )
2668        private MoneyDt myAmount;
2669        
2670        @Child(name="value", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
2671        @Description(
2672                shortDefinition="",
2673                formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above."
2674        )
2675        private DecimalDt myValue;
2676        
2677
2678        @Override
2679        public boolean isEmpty() {
2680                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAmount,  myValue);
2681        }
2682        
2683        @Override
2684        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2685                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAmount, myValue);
2686        }
2687
2688        /**
2689         * Gets the value(s) for <b>code</b> ().
2690         * creating it if it does
2691         * not exist. Will not return <code>null</code>.
2692         *
2693     * <p>
2694     * <b>Definition:</b>
2695     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
2696     * </p> 
2697         */
2698        public CodingDt getCode() {  
2699                if (myCode == null) {
2700                        myCode = new CodingDt();
2701                }
2702                return myCode;
2703        }
2704
2705        /**
2706         * Sets the value(s) for <b>code</b> ()
2707         *
2708     * <p>
2709     * <b>Definition:</b>
2710     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
2711     * </p> 
2712         */
2713        public ItemDetailAdjudication setCode(CodingDt theValue) {
2714                myCode = theValue;
2715                return this;
2716        }
2717        
2718        
2719
2720  
2721        /**
2722         * Gets the value(s) for <b>amount</b> ().
2723         * creating it if it does
2724         * not exist. Will not return <code>null</code>.
2725         *
2726     * <p>
2727     * <b>Definition:</b>
2728     * Monetary amount associated with the code.
2729     * </p> 
2730         */
2731        public MoneyDt getAmount() {  
2732                if (myAmount == null) {
2733                        myAmount = new MoneyDt();
2734                }
2735                return myAmount;
2736        }
2737
2738        /**
2739         * Sets the value(s) for <b>amount</b> ()
2740         *
2741     * <p>
2742     * <b>Definition:</b>
2743     * Monetary amount associated with the code.
2744     * </p> 
2745         */
2746        public ItemDetailAdjudication setAmount(MoneyDt theValue) {
2747                myAmount = theValue;
2748                return this;
2749        }
2750        
2751        
2752
2753  
2754        /**
2755         * Gets the value(s) for <b>value</b> ().
2756         * creating it if it does
2757         * not exist. Will not return <code>null</code>.
2758         *
2759     * <p>
2760     * <b>Definition:</b>
2761     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2762     * </p> 
2763         */
2764        public DecimalDt getValueElement() {  
2765                if (myValue == null) {
2766                        myValue = new DecimalDt();
2767                }
2768                return myValue;
2769        }
2770
2771        
2772        /**
2773         * Gets the value(s) for <b>value</b> ().
2774         * creating it if it does
2775         * not exist. This method may return <code>null</code>.
2776         *
2777     * <p>
2778     * <b>Definition:</b>
2779     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2780     * </p> 
2781         */
2782        public BigDecimal getValue() {  
2783                return getValueElement().getValue();
2784        }
2785
2786        /**
2787         * Sets the value(s) for <b>value</b> ()
2788         *
2789     * <p>
2790     * <b>Definition:</b>
2791     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2792     * </p> 
2793         */
2794        public ItemDetailAdjudication setValue(DecimalDt theValue) {
2795                myValue = theValue;
2796                return this;
2797        }
2798        
2799        
2800
2801        /**
2802         * Sets the value for <b>value</b> ()
2803         *
2804     * <p>
2805     * <b>Definition:</b>
2806     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2807     * </p> 
2808         */
2809        public ItemDetailAdjudication setValue( double theValue) {
2810                myValue = new DecimalDt(theValue); 
2811                return this; 
2812        }
2813
2814        /**
2815         * Sets the value for <b>value</b> ()
2816         *
2817     * <p>
2818     * <b>Definition:</b>
2819     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2820     * </p> 
2821         */
2822        public ItemDetailAdjudication setValue( long theValue) {
2823                myValue = new DecimalDt(theValue); 
2824                return this; 
2825        }
2826
2827        /**
2828         * Sets the value for <b>value</b> ()
2829         *
2830     * <p>
2831     * <b>Definition:</b>
2832     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
2833     * </p> 
2834         */
2835        public ItemDetailAdjudication setValue( java.math.BigDecimal theValue) {
2836                myValue = new DecimalDt(theValue); 
2837                return this; 
2838        }
2839
2840 
2841
2842
2843        }
2844
2845
2846        /**
2847         * Block class for child element: <b>ClaimResponse.item.detail.subDetail</b> ()
2848         *
2849     * <p>
2850     * <b>Definition:</b>
2851     * The third tier service adjudications for submitted services.
2852     * </p> 
2853         */
2854        @Block()        
2855        public static class ItemDetailSubDetail 
2856            extends  BaseIdentifiableElement        implements IResourceBlock {
2857        
2858        @Child(name="sequenceLinkId", type=PositiveIntDt.class, order=0, min=1, max=1, summary=false, modifier=false)   
2859        @Description(
2860                shortDefinition="",
2861                formalDefinition="A service line number."
2862        )
2863        private PositiveIntDt mySequenceLinkId;
2864        
2865        @Child(name="adjudication", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
2866        @Description(
2867                shortDefinition="",
2868                formalDefinition="The adjudications results."
2869        )
2870        private java.util.List<ItemDetailSubDetailAdjudication> myAdjudication;
2871        
2872
2873        @Override
2874        public boolean isEmpty() {
2875                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequenceLinkId,  myAdjudication);
2876        }
2877        
2878        @Override
2879        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2880                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequenceLinkId, myAdjudication);
2881        }
2882
2883        /**
2884         * Gets the value(s) for <b>sequenceLinkId</b> ().
2885         * creating it if it does
2886         * not exist. Will not return <code>null</code>.
2887         *
2888     * <p>
2889     * <b>Definition:</b>
2890     * A service line number.
2891     * </p> 
2892         */
2893        public PositiveIntDt getSequenceLinkIdElement() {  
2894                if (mySequenceLinkId == null) {
2895                        mySequenceLinkId = new PositiveIntDt();
2896                }
2897                return mySequenceLinkId;
2898        }
2899
2900        
2901        /**
2902         * Gets the value(s) for <b>sequenceLinkId</b> ().
2903         * creating it if it does
2904         * not exist. This method may return <code>null</code>.
2905         *
2906     * <p>
2907     * <b>Definition:</b>
2908     * A service line number.
2909     * </p> 
2910         */
2911        public Integer getSequenceLinkId() {  
2912                return getSequenceLinkIdElement().getValue();
2913        }
2914
2915        /**
2916         * Sets the value(s) for <b>sequenceLinkId</b> ()
2917         *
2918     * <p>
2919     * <b>Definition:</b>
2920     * A service line number.
2921     * </p> 
2922         */
2923        public ItemDetailSubDetail setSequenceLinkId(PositiveIntDt theValue) {
2924                mySequenceLinkId = theValue;
2925                return this;
2926        }
2927        
2928        
2929
2930        /**
2931         * Sets the value for <b>sequenceLinkId</b> ()
2932         *
2933     * <p>
2934     * <b>Definition:</b>
2935     * A service line number.
2936     * </p> 
2937         */
2938        public ItemDetailSubDetail setSequenceLinkId( int theInteger) {
2939                mySequenceLinkId = new PositiveIntDt(theInteger); 
2940                return this; 
2941        }
2942
2943 
2944        /**
2945         * Gets the value(s) for <b>adjudication</b> ().
2946         * creating it if it does
2947         * not exist. Will not return <code>null</code>.
2948         *
2949     * <p>
2950     * <b>Definition:</b>
2951     * The adjudications results.
2952     * </p> 
2953         */
2954        public java.util.List<ItemDetailSubDetailAdjudication> getAdjudication() {  
2955                if (myAdjudication == null) {
2956                        myAdjudication = new java.util.ArrayList<ItemDetailSubDetailAdjudication>();
2957                }
2958                return myAdjudication;
2959        }
2960
2961        /**
2962         * Sets the value(s) for <b>adjudication</b> ()
2963         *
2964     * <p>
2965     * <b>Definition:</b>
2966     * The adjudications results.
2967     * </p> 
2968         */
2969        public ItemDetailSubDetail setAdjudication(java.util.List<ItemDetailSubDetailAdjudication> theValue) {
2970                myAdjudication = theValue;
2971                return this;
2972        }
2973        
2974        
2975
2976        /**
2977         * Adds and returns a new value for <b>adjudication</b> ()
2978         *
2979     * <p>
2980     * <b>Definition:</b>
2981     * The adjudications results.
2982     * </p> 
2983         */
2984        public ItemDetailSubDetailAdjudication addAdjudication() {
2985                ItemDetailSubDetailAdjudication newType = new ItemDetailSubDetailAdjudication();
2986                getAdjudication().add(newType);
2987                return newType; 
2988        }
2989
2990        /**
2991         * Adds a given new value for <b>adjudication</b> ()
2992         *
2993         * <p>
2994         * <b>Definition:</b>
2995         * The adjudications results.
2996         * </p>
2997         * @param theValue The adjudication to add (must not be <code>null</code>)
2998         */
2999        public ItemDetailSubDetail addAdjudication(ItemDetailSubDetailAdjudication theValue) {
3000                if (theValue == null) {
3001                        throw new NullPointerException("theValue must not be null");
3002                }
3003                getAdjudication().add(theValue);
3004                return this;
3005        }
3006
3007        /**
3008         * Gets the first repetition for <b>adjudication</b> (),
3009         * creating it if it does not already exist.
3010         *
3011     * <p>
3012     * <b>Definition:</b>
3013     * The adjudications results.
3014     * </p> 
3015         */
3016        public ItemDetailSubDetailAdjudication getAdjudicationFirstRep() {
3017                if (getAdjudication().isEmpty()) {
3018                        return addAdjudication();
3019                }
3020                return getAdjudication().get(0); 
3021        }
3022  
3023
3024
3025        }
3026
3027        /**
3028         * Block class for child element: <b>ClaimResponse.item.detail.subDetail.adjudication</b> ()
3029         *
3030     * <p>
3031     * <b>Definition:</b>
3032     * The adjudications results.
3033     * </p> 
3034         */
3035        @Block()        
3036        public static class ItemDetailSubDetailAdjudication 
3037            extends  BaseIdentifiableElement        implements IResourceBlock {
3038        
3039        @Child(name="code", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
3040        @Description(
3041                shortDefinition="",
3042                formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc."
3043        )
3044        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjudication")
3045        private CodingDt myCode;
3046        
3047        @Child(name="amount", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
3048        @Description(
3049                shortDefinition="",
3050                formalDefinition="Monetary amount associated with the code."
3051        )
3052        private MoneyDt myAmount;
3053        
3054        @Child(name="value", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
3055        @Description(
3056                shortDefinition="",
3057                formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above."
3058        )
3059        private DecimalDt myValue;
3060        
3061
3062        @Override
3063        public boolean isEmpty() {
3064                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAmount,  myValue);
3065        }
3066        
3067        @Override
3068        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3069                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAmount, myValue);
3070        }
3071
3072        /**
3073         * Gets the value(s) for <b>code</b> ().
3074         * creating it if it does
3075         * not exist. Will not return <code>null</code>.
3076         *
3077     * <p>
3078     * <b>Definition:</b>
3079     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
3080     * </p> 
3081         */
3082        public CodingDt getCode() {  
3083                if (myCode == null) {
3084                        myCode = new CodingDt();
3085                }
3086                return myCode;
3087        }
3088
3089        /**
3090         * Sets the value(s) for <b>code</b> ()
3091         *
3092     * <p>
3093     * <b>Definition:</b>
3094     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
3095     * </p> 
3096         */
3097        public ItemDetailSubDetailAdjudication setCode(CodingDt theValue) {
3098                myCode = theValue;
3099                return this;
3100        }
3101        
3102        
3103
3104  
3105        /**
3106         * Gets the value(s) for <b>amount</b> ().
3107         * creating it if it does
3108         * not exist. Will not return <code>null</code>.
3109         *
3110     * <p>
3111     * <b>Definition:</b>
3112     * Monetary amount associated with the code.
3113     * </p> 
3114         */
3115        public MoneyDt getAmount() {  
3116                if (myAmount == null) {
3117                        myAmount = new MoneyDt();
3118                }
3119                return myAmount;
3120        }
3121
3122        /**
3123         * Sets the value(s) for <b>amount</b> ()
3124         *
3125     * <p>
3126     * <b>Definition:</b>
3127     * Monetary amount associated with the code.
3128     * </p> 
3129         */
3130        public ItemDetailSubDetailAdjudication setAmount(MoneyDt theValue) {
3131                myAmount = theValue;
3132                return this;
3133        }
3134        
3135        
3136
3137  
3138        /**
3139         * Gets the value(s) for <b>value</b> ().
3140         * creating it if it does
3141         * not exist. Will not return <code>null</code>.
3142         *
3143     * <p>
3144     * <b>Definition:</b>
3145     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3146     * </p> 
3147         */
3148        public DecimalDt getValueElement() {  
3149                if (myValue == null) {
3150                        myValue = new DecimalDt();
3151                }
3152                return myValue;
3153        }
3154
3155        
3156        /**
3157         * Gets the value(s) for <b>value</b> ().
3158         * creating it if it does
3159         * not exist. This method may return <code>null</code>.
3160         *
3161     * <p>
3162     * <b>Definition:</b>
3163     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3164     * </p> 
3165         */
3166        public BigDecimal getValue() {  
3167                return getValueElement().getValue();
3168        }
3169
3170        /**
3171         * Sets the value(s) for <b>value</b> ()
3172         *
3173     * <p>
3174     * <b>Definition:</b>
3175     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3176     * </p> 
3177         */
3178        public ItemDetailSubDetailAdjudication setValue(DecimalDt theValue) {
3179                myValue = theValue;
3180                return this;
3181        }
3182        
3183        
3184
3185        /**
3186         * Sets the value for <b>value</b> ()
3187         *
3188     * <p>
3189     * <b>Definition:</b>
3190     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3191     * </p> 
3192         */
3193        public ItemDetailSubDetailAdjudication setValue( double theValue) {
3194                myValue = new DecimalDt(theValue); 
3195                return this; 
3196        }
3197
3198        /**
3199         * Sets the value for <b>value</b> ()
3200         *
3201     * <p>
3202     * <b>Definition:</b>
3203     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3204     * </p> 
3205         */
3206        public ItemDetailSubDetailAdjudication setValue( long theValue) {
3207                myValue = new DecimalDt(theValue); 
3208                return this; 
3209        }
3210
3211        /**
3212         * Sets the value for <b>value</b> ()
3213         *
3214     * <p>
3215     * <b>Definition:</b>
3216     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3217     * </p> 
3218         */
3219        public ItemDetailSubDetailAdjudication setValue( java.math.BigDecimal theValue) {
3220                myValue = new DecimalDt(theValue); 
3221                return this; 
3222        }
3223
3224 
3225
3226
3227        }
3228
3229
3230
3231
3232
3233        /**
3234         * Block class for child element: <b>ClaimResponse.addItem</b> ()
3235         *
3236     * <p>
3237     * <b>Definition:</b>
3238     * The first tier service adjudications for payor added services.
3239     * </p> 
3240         */
3241        @Block()        
3242        public static class AddItem 
3243            extends  BaseIdentifiableElement        implements IResourceBlock {
3244        
3245        @Child(name="sequenceLinkId", type=PositiveIntDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
3246        @Description(
3247                shortDefinition="",
3248                formalDefinition="List of input service items which this service line is intended to replace."
3249        )
3250        private java.util.List<PositiveIntDt> mySequenceLinkId;
3251        
3252        @Child(name="service", type=CodingDt.class, order=1, min=1, max=1, summary=false, modifier=false)       
3253        @Description(
3254                shortDefinition="",
3255                formalDefinition="A code to indicate the Professional Service or Product supplied."
3256        )
3257        private CodingDt myService;
3258        
3259        @Child(name="fee", type=MoneyDt.class, order=2, min=0, max=1, summary=false, modifier=false)    
3260        @Description(
3261                shortDefinition="",
3262                formalDefinition="The fee charged for the professional service or product.."
3263        )
3264        private MoneyDt myFee;
3265        
3266        @Child(name="noteNumberLinkId", type=PositiveIntDt.class, order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
3267        @Description(
3268                shortDefinition="",
3269                formalDefinition="A list of note references to the notes provided below."
3270        )
3271        private java.util.List<PositiveIntDt> myNoteNumberLinkId;
3272        
3273        @Child(name="adjudication", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
3274        @Description(
3275                shortDefinition="",
3276                formalDefinition="The adjudications results."
3277        )
3278        private java.util.List<AddItemAdjudication> myAdjudication;
3279        
3280        @Child(name="detail", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
3281        @Description(
3282                shortDefinition="",
3283                formalDefinition="The second tier service adjudications for payor added services."
3284        )
3285        private java.util.List<AddItemDetail> myDetail;
3286        
3287
3288        @Override
3289        public boolean isEmpty() {
3290                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequenceLinkId,  myService,  myFee,  myNoteNumberLinkId,  myAdjudication,  myDetail);
3291        }
3292        
3293        @Override
3294        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3295                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequenceLinkId, myService, myFee, myNoteNumberLinkId, myAdjudication, myDetail);
3296        }
3297
3298        /**
3299         * Gets the value(s) for <b>sequenceLinkId</b> ().
3300         * creating it if it does
3301         * not exist. Will not return <code>null</code>.
3302         *
3303     * <p>
3304     * <b>Definition:</b>
3305     * List of input service items which this service line is intended to replace.
3306     * </p> 
3307         */
3308        public java.util.List<PositiveIntDt> getSequenceLinkId() {  
3309                if (mySequenceLinkId == null) {
3310                        mySequenceLinkId = new java.util.ArrayList<PositiveIntDt>();
3311                }
3312                return mySequenceLinkId;
3313        }
3314
3315        /**
3316         * Sets the value(s) for <b>sequenceLinkId</b> ()
3317         *
3318     * <p>
3319     * <b>Definition:</b>
3320     * List of input service items which this service line is intended to replace.
3321     * </p> 
3322         */
3323        public AddItem setSequenceLinkId(java.util.List<PositiveIntDt> theValue) {
3324                mySequenceLinkId = theValue;
3325                return this;
3326        }
3327        
3328        
3329
3330        /**
3331         * Adds and returns a new value for <b>sequenceLinkId</b> ()
3332         *
3333     * <p>
3334     * <b>Definition:</b>
3335     * List of input service items which this service line is intended to replace.
3336     * </p> 
3337         */
3338        public PositiveIntDt addSequenceLinkId() {
3339                PositiveIntDt newType = new PositiveIntDt();
3340                getSequenceLinkId().add(newType);
3341                return newType; 
3342        }
3343
3344        /**
3345         * Adds a given new value for <b>sequenceLinkId</b> ()
3346         *
3347         * <p>
3348         * <b>Definition:</b>
3349         * List of input service items which this service line is intended to replace.
3350         * </p>
3351         * @param theValue The sequenceLinkId to add (must not be <code>null</code>)
3352         */
3353        public AddItem addSequenceLinkId(PositiveIntDt theValue) {
3354                if (theValue == null) {
3355                        throw new NullPointerException("theValue must not be null");
3356                }
3357                getSequenceLinkId().add(theValue);
3358                return this;
3359        }
3360
3361        /**
3362         * Gets the first repetition for <b>sequenceLinkId</b> (),
3363         * creating it if it does not already exist.
3364         *
3365     * <p>
3366     * <b>Definition:</b>
3367     * List of input service items which this service line is intended to replace.
3368     * </p> 
3369         */
3370        public PositiveIntDt getSequenceLinkIdFirstRep() {
3371                if (getSequenceLinkId().isEmpty()) {
3372                        return addSequenceLinkId();
3373                }
3374                return getSequenceLinkId().get(0); 
3375        }
3376        /**
3377         * Adds a new value for <b>sequenceLinkId</b> ()
3378         *
3379     * <p>
3380     * <b>Definition:</b>
3381     * List of input service items which this service line is intended to replace.
3382     * </p> 
3383     *
3384     * @return Returns a reference to this object, to allow for simple chaining.
3385         */
3386        public AddItem addSequenceLinkId( int theInteger) {
3387                if (mySequenceLinkId == null) {
3388                        mySequenceLinkId = new java.util.ArrayList<PositiveIntDt>();
3389                }
3390                mySequenceLinkId.add(new PositiveIntDt(theInteger));
3391                return this; 
3392        }
3393
3394 
3395        /**
3396         * Gets the value(s) for <b>service</b> ().
3397         * creating it if it does
3398         * not exist. Will not return <code>null</code>.
3399         *
3400     * <p>
3401     * <b>Definition:</b>
3402     * A code to indicate the Professional Service or Product supplied.
3403     * </p> 
3404         */
3405        public CodingDt getService() {  
3406                if (myService == null) {
3407                        myService = new CodingDt();
3408                }
3409                return myService;
3410        }
3411
3412        /**
3413         * Sets the value(s) for <b>service</b> ()
3414         *
3415     * <p>
3416     * <b>Definition:</b>
3417     * A code to indicate the Professional Service or Product supplied.
3418     * </p> 
3419         */
3420        public AddItem setService(CodingDt theValue) {
3421                myService = theValue;
3422                return this;
3423        }
3424        
3425        
3426
3427  
3428        /**
3429         * Gets the value(s) for <b>fee</b> ().
3430         * creating it if it does
3431         * not exist. Will not return <code>null</code>.
3432         *
3433     * <p>
3434     * <b>Definition:</b>
3435     * The fee charged for the professional service or product..
3436     * </p> 
3437         */
3438        public MoneyDt getFee() {  
3439                if (myFee == null) {
3440                        myFee = new MoneyDt();
3441                }
3442                return myFee;
3443        }
3444
3445        /**
3446         * Sets the value(s) for <b>fee</b> ()
3447         *
3448     * <p>
3449     * <b>Definition:</b>
3450     * The fee charged for the professional service or product..
3451     * </p> 
3452         */
3453        public AddItem setFee(MoneyDt theValue) {
3454                myFee = theValue;
3455                return this;
3456        }
3457        
3458        
3459
3460  
3461        /**
3462         * Gets the value(s) for <b>noteNumberLinkId</b> ().
3463         * creating it if it does
3464         * not exist. Will not return <code>null</code>.
3465         *
3466     * <p>
3467     * <b>Definition:</b>
3468     * A list of note references to the notes provided below.
3469     * </p> 
3470         */
3471        public java.util.List<PositiveIntDt> getNoteNumberLinkId() {  
3472                if (myNoteNumberLinkId == null) {
3473                        myNoteNumberLinkId = new java.util.ArrayList<PositiveIntDt>();
3474                }
3475                return myNoteNumberLinkId;
3476        }
3477
3478        /**
3479         * Sets the value(s) for <b>noteNumberLinkId</b> ()
3480         *
3481     * <p>
3482     * <b>Definition:</b>
3483     * A list of note references to the notes provided below.
3484     * </p> 
3485         */
3486        public AddItem setNoteNumberLinkId(java.util.List<PositiveIntDt> theValue) {
3487                myNoteNumberLinkId = theValue;
3488                return this;
3489        }
3490        
3491        
3492
3493        /**
3494         * Adds and returns a new value for <b>noteNumberLinkId</b> ()
3495         *
3496     * <p>
3497     * <b>Definition:</b>
3498     * A list of note references to the notes provided below.
3499     * </p> 
3500         */
3501        public PositiveIntDt addNoteNumberLinkId() {
3502                PositiveIntDt newType = new PositiveIntDt();
3503                getNoteNumberLinkId().add(newType);
3504                return newType; 
3505        }
3506
3507        /**
3508         * Adds a given new value for <b>noteNumberLinkId</b> ()
3509         *
3510         * <p>
3511         * <b>Definition:</b>
3512         * A list of note references to the notes provided below.
3513         * </p>
3514         * @param theValue The noteNumberLinkId to add (must not be <code>null</code>)
3515         */
3516        public AddItem addNoteNumberLinkId(PositiveIntDt theValue) {
3517                if (theValue == null) {
3518                        throw new NullPointerException("theValue must not be null");
3519                }
3520                getNoteNumberLinkId().add(theValue);
3521                return this;
3522        }
3523
3524        /**
3525         * Gets the first repetition for <b>noteNumberLinkId</b> (),
3526         * creating it if it does not already exist.
3527         *
3528     * <p>
3529     * <b>Definition:</b>
3530     * A list of note references to the notes provided below.
3531     * </p> 
3532         */
3533        public PositiveIntDt getNoteNumberLinkIdFirstRep() {
3534                if (getNoteNumberLinkId().isEmpty()) {
3535                        return addNoteNumberLinkId();
3536                }
3537                return getNoteNumberLinkId().get(0); 
3538        }
3539        /**
3540         * Adds a new value for <b>noteNumberLinkId</b> ()
3541         *
3542     * <p>
3543     * <b>Definition:</b>
3544     * A list of note references to the notes provided below.
3545     * </p> 
3546     *
3547     * @return Returns a reference to this object, to allow for simple chaining.
3548         */
3549        public AddItem addNoteNumberLinkId( int theInteger) {
3550                if (myNoteNumberLinkId == null) {
3551                        myNoteNumberLinkId = new java.util.ArrayList<PositiveIntDt>();
3552                }
3553                myNoteNumberLinkId.add(new PositiveIntDt(theInteger));
3554                return this; 
3555        }
3556
3557 
3558        /**
3559         * Gets the value(s) for <b>adjudication</b> ().
3560         * creating it if it does
3561         * not exist. Will not return <code>null</code>.
3562         *
3563     * <p>
3564     * <b>Definition:</b>
3565     * The adjudications results.
3566     * </p> 
3567         */
3568        public java.util.List<AddItemAdjudication> getAdjudication() {  
3569                if (myAdjudication == null) {
3570                        myAdjudication = new java.util.ArrayList<AddItemAdjudication>();
3571                }
3572                return myAdjudication;
3573        }
3574
3575        /**
3576         * Sets the value(s) for <b>adjudication</b> ()
3577         *
3578     * <p>
3579     * <b>Definition:</b>
3580     * The adjudications results.
3581     * </p> 
3582         */
3583        public AddItem setAdjudication(java.util.List<AddItemAdjudication> theValue) {
3584                myAdjudication = theValue;
3585                return this;
3586        }
3587        
3588        
3589
3590        /**
3591         * Adds and returns a new value for <b>adjudication</b> ()
3592         *
3593     * <p>
3594     * <b>Definition:</b>
3595     * The adjudications results.
3596     * </p> 
3597         */
3598        public AddItemAdjudication addAdjudication() {
3599                AddItemAdjudication newType = new AddItemAdjudication();
3600                getAdjudication().add(newType);
3601                return newType; 
3602        }
3603
3604        /**
3605         * Adds a given new value for <b>adjudication</b> ()
3606         *
3607         * <p>
3608         * <b>Definition:</b>
3609         * The adjudications results.
3610         * </p>
3611         * @param theValue The adjudication to add (must not be <code>null</code>)
3612         */
3613        public AddItem addAdjudication(AddItemAdjudication theValue) {
3614                if (theValue == null) {
3615                        throw new NullPointerException("theValue must not be null");
3616                }
3617                getAdjudication().add(theValue);
3618                return this;
3619        }
3620
3621        /**
3622         * Gets the first repetition for <b>adjudication</b> (),
3623         * creating it if it does not already exist.
3624         *
3625     * <p>
3626     * <b>Definition:</b>
3627     * The adjudications results.
3628     * </p> 
3629         */
3630        public AddItemAdjudication getAdjudicationFirstRep() {
3631                if (getAdjudication().isEmpty()) {
3632                        return addAdjudication();
3633                }
3634                return getAdjudication().get(0); 
3635        }
3636  
3637        /**
3638         * Gets the value(s) for <b>detail</b> ().
3639         * creating it if it does
3640         * not exist. Will not return <code>null</code>.
3641         *
3642     * <p>
3643     * <b>Definition:</b>
3644     * The second tier service adjudications for payor added services.
3645     * </p> 
3646         */
3647        public java.util.List<AddItemDetail> getDetail() {  
3648                if (myDetail == null) {
3649                        myDetail = new java.util.ArrayList<AddItemDetail>();
3650                }
3651                return myDetail;
3652        }
3653
3654        /**
3655         * Sets the value(s) for <b>detail</b> ()
3656         *
3657     * <p>
3658     * <b>Definition:</b>
3659     * The second tier service adjudications for payor added services.
3660     * </p> 
3661         */
3662        public AddItem setDetail(java.util.List<AddItemDetail> theValue) {
3663                myDetail = theValue;
3664                return this;
3665        }
3666        
3667        
3668
3669        /**
3670         * Adds and returns a new value for <b>detail</b> ()
3671         *
3672     * <p>
3673     * <b>Definition:</b>
3674     * The second tier service adjudications for payor added services.
3675     * </p> 
3676         */
3677        public AddItemDetail addDetail() {
3678                AddItemDetail newType = new AddItemDetail();
3679                getDetail().add(newType);
3680                return newType; 
3681        }
3682
3683        /**
3684         * Adds a given new value for <b>detail</b> ()
3685         *
3686         * <p>
3687         * <b>Definition:</b>
3688         * The second tier service adjudications for payor added services.
3689         * </p>
3690         * @param theValue The detail to add (must not be <code>null</code>)
3691         */
3692        public AddItem addDetail(AddItemDetail theValue) {
3693                if (theValue == null) {
3694                        throw new NullPointerException("theValue must not be null");
3695                }
3696                getDetail().add(theValue);
3697                return this;
3698        }
3699
3700        /**
3701         * Gets the first repetition for <b>detail</b> (),
3702         * creating it if it does not already exist.
3703         *
3704     * <p>
3705     * <b>Definition:</b>
3706     * The second tier service adjudications for payor added services.
3707     * </p> 
3708         */
3709        public AddItemDetail getDetailFirstRep() {
3710                if (getDetail().isEmpty()) {
3711                        return addDetail();
3712                }
3713                return getDetail().get(0); 
3714        }
3715  
3716
3717
3718        }
3719
3720        /**
3721         * Block class for child element: <b>ClaimResponse.addItem.adjudication</b> ()
3722         *
3723     * <p>
3724     * <b>Definition:</b>
3725     * The adjudications results.
3726     * </p> 
3727         */
3728        @Block()        
3729        public static class AddItemAdjudication 
3730            extends  BaseIdentifiableElement        implements IResourceBlock {
3731        
3732        @Child(name="code", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
3733        @Description(
3734                shortDefinition="",
3735                formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc."
3736        )
3737        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjudication")
3738        private CodingDt myCode;
3739        
3740        @Child(name="amount", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
3741        @Description(
3742                shortDefinition="",
3743                formalDefinition="Monetary amount associated with the code"
3744        )
3745        private MoneyDt myAmount;
3746        
3747        @Child(name="value", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
3748        @Description(
3749                shortDefinition="",
3750                formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above."
3751        )
3752        private DecimalDt myValue;
3753        
3754
3755        @Override
3756        public boolean isEmpty() {
3757                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAmount,  myValue);
3758        }
3759        
3760        @Override
3761        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3762                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAmount, myValue);
3763        }
3764
3765        /**
3766         * Gets the value(s) for <b>code</b> ().
3767         * creating it if it does
3768         * not exist. Will not return <code>null</code>.
3769         *
3770     * <p>
3771     * <b>Definition:</b>
3772     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
3773     * </p> 
3774         */
3775        public CodingDt getCode() {  
3776                if (myCode == null) {
3777                        myCode = new CodingDt();
3778                }
3779                return myCode;
3780        }
3781
3782        /**
3783         * Sets the value(s) for <b>code</b> ()
3784         *
3785     * <p>
3786     * <b>Definition:</b>
3787     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
3788     * </p> 
3789         */
3790        public AddItemAdjudication setCode(CodingDt theValue) {
3791                myCode = theValue;
3792                return this;
3793        }
3794        
3795        
3796
3797  
3798        /**
3799         * Gets the value(s) for <b>amount</b> ().
3800         * creating it if it does
3801         * not exist. Will not return <code>null</code>.
3802         *
3803     * <p>
3804     * <b>Definition:</b>
3805     * Monetary amount associated with the code
3806     * </p> 
3807         */
3808        public MoneyDt getAmount() {  
3809                if (myAmount == null) {
3810                        myAmount = new MoneyDt();
3811                }
3812                return myAmount;
3813        }
3814
3815        /**
3816         * Sets the value(s) for <b>amount</b> ()
3817         *
3818     * <p>
3819     * <b>Definition:</b>
3820     * Monetary amount associated with the code
3821     * </p> 
3822         */
3823        public AddItemAdjudication setAmount(MoneyDt theValue) {
3824                myAmount = theValue;
3825                return this;
3826        }
3827        
3828        
3829
3830  
3831        /**
3832         * Gets the value(s) for <b>value</b> ().
3833         * creating it if it does
3834         * not exist. Will not return <code>null</code>.
3835         *
3836     * <p>
3837     * <b>Definition:</b>
3838     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3839     * </p> 
3840         */
3841        public DecimalDt getValueElement() {  
3842                if (myValue == null) {
3843                        myValue = new DecimalDt();
3844                }
3845                return myValue;
3846        }
3847
3848        
3849        /**
3850         * Gets the value(s) for <b>value</b> ().
3851         * creating it if it does
3852         * not exist. This method may return <code>null</code>.
3853         *
3854     * <p>
3855     * <b>Definition:</b>
3856     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3857     * </p> 
3858         */
3859        public BigDecimal getValue() {  
3860                return getValueElement().getValue();
3861        }
3862
3863        /**
3864         * Sets the value(s) for <b>value</b> ()
3865         *
3866     * <p>
3867     * <b>Definition:</b>
3868     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3869     * </p> 
3870         */
3871        public AddItemAdjudication setValue(DecimalDt theValue) {
3872                myValue = theValue;
3873                return this;
3874        }
3875        
3876        
3877
3878        /**
3879         * Sets the value for <b>value</b> ()
3880         *
3881     * <p>
3882     * <b>Definition:</b>
3883     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3884     * </p> 
3885         */
3886        public AddItemAdjudication setValue( double theValue) {
3887                myValue = new DecimalDt(theValue); 
3888                return this; 
3889        }
3890
3891        /**
3892         * Sets the value for <b>value</b> ()
3893         *
3894     * <p>
3895     * <b>Definition:</b>
3896     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3897     * </p> 
3898         */
3899        public AddItemAdjudication setValue( long theValue) {
3900                myValue = new DecimalDt(theValue); 
3901                return this; 
3902        }
3903
3904        /**
3905         * Sets the value for <b>value</b> ()
3906         *
3907     * <p>
3908     * <b>Definition:</b>
3909     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
3910     * </p> 
3911         */
3912        public AddItemAdjudication setValue( java.math.BigDecimal theValue) {
3913                myValue = new DecimalDt(theValue); 
3914                return this; 
3915        }
3916
3917 
3918
3919
3920        }
3921
3922
3923        /**
3924         * Block class for child element: <b>ClaimResponse.addItem.detail</b> ()
3925         *
3926     * <p>
3927     * <b>Definition:</b>
3928     * The second tier service adjudications for payor added services.
3929     * </p> 
3930         */
3931        @Block()        
3932        public static class AddItemDetail 
3933            extends  BaseIdentifiableElement        implements IResourceBlock {
3934        
3935        @Child(name="service", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)       
3936        @Description(
3937                shortDefinition="",
3938                formalDefinition="A code to indicate the Professional Service or Product supplied."
3939        )
3940        private CodingDt myService;
3941        
3942        @Child(name="fee", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false)    
3943        @Description(
3944                shortDefinition="",
3945                formalDefinition="The fee charged for the professional service or product.."
3946        )
3947        private MoneyDt myFee;
3948        
3949        @Child(name="adjudication", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
3950        @Description(
3951                shortDefinition="",
3952                formalDefinition="The adjudications results."
3953        )
3954        private java.util.List<AddItemDetailAdjudication> myAdjudication;
3955        
3956
3957        @Override
3958        public boolean isEmpty() {
3959                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myService,  myFee,  myAdjudication);
3960        }
3961        
3962        @Override
3963        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3964                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myService, myFee, myAdjudication);
3965        }
3966
3967        /**
3968         * Gets the value(s) for <b>service</b> ().
3969         * creating it if it does
3970         * not exist. Will not return <code>null</code>.
3971         *
3972     * <p>
3973     * <b>Definition:</b>
3974     * A code to indicate the Professional Service or Product supplied.
3975     * </p> 
3976         */
3977        public CodingDt getService() {  
3978                if (myService == null) {
3979                        myService = new CodingDt();
3980                }
3981                return myService;
3982        }
3983
3984        /**
3985         * Sets the value(s) for <b>service</b> ()
3986         *
3987     * <p>
3988     * <b>Definition:</b>
3989     * A code to indicate the Professional Service or Product supplied.
3990     * </p> 
3991         */
3992        public AddItemDetail setService(CodingDt theValue) {
3993                myService = theValue;
3994                return this;
3995        }
3996        
3997        
3998
3999  
4000        /**
4001         * Gets the value(s) for <b>fee</b> ().
4002         * creating it if it does
4003         * not exist. Will not return <code>null</code>.
4004         *
4005     * <p>
4006     * <b>Definition:</b>
4007     * The fee charged for the professional service or product..
4008     * </p> 
4009         */
4010        public MoneyDt getFee() {  
4011                if (myFee == null) {
4012                        myFee = new MoneyDt();
4013                }
4014                return myFee;
4015        }
4016
4017        /**
4018         * Sets the value(s) for <b>fee</b> ()
4019         *
4020     * <p>
4021     * <b>Definition:</b>
4022     * The fee charged for the professional service or product..
4023     * </p> 
4024         */
4025        public AddItemDetail setFee(MoneyDt theValue) {
4026                myFee = theValue;
4027                return this;
4028        }
4029        
4030        
4031
4032  
4033        /**
4034         * Gets the value(s) for <b>adjudication</b> ().
4035         * creating it if it does
4036         * not exist. Will not return <code>null</code>.
4037         *
4038     * <p>
4039     * <b>Definition:</b>
4040     * The adjudications results.
4041     * </p> 
4042         */
4043        public java.util.List<AddItemDetailAdjudication> getAdjudication() {  
4044                if (myAdjudication == null) {
4045                        myAdjudication = new java.util.ArrayList<AddItemDetailAdjudication>();
4046                }
4047                return myAdjudication;
4048        }
4049
4050        /**
4051         * Sets the value(s) for <b>adjudication</b> ()
4052         *
4053     * <p>
4054     * <b>Definition:</b>
4055     * The adjudications results.
4056     * </p> 
4057         */
4058        public AddItemDetail setAdjudication(java.util.List<AddItemDetailAdjudication> theValue) {
4059                myAdjudication = theValue;
4060                return this;
4061        }
4062        
4063        
4064
4065        /**
4066         * Adds and returns a new value for <b>adjudication</b> ()
4067         *
4068     * <p>
4069     * <b>Definition:</b>
4070     * The adjudications results.
4071     * </p> 
4072         */
4073        public AddItemDetailAdjudication addAdjudication() {
4074                AddItemDetailAdjudication newType = new AddItemDetailAdjudication();
4075                getAdjudication().add(newType);
4076                return newType; 
4077        }
4078
4079        /**
4080         * Adds a given new value for <b>adjudication</b> ()
4081         *
4082         * <p>
4083         * <b>Definition:</b>
4084         * The adjudications results.
4085         * </p>
4086         * @param theValue The adjudication to add (must not be <code>null</code>)
4087         */
4088        public AddItemDetail addAdjudication(AddItemDetailAdjudication theValue) {
4089                if (theValue == null) {
4090                        throw new NullPointerException("theValue must not be null");
4091                }
4092                getAdjudication().add(theValue);
4093                return this;
4094        }
4095
4096        /**
4097         * Gets the first repetition for <b>adjudication</b> (),
4098         * creating it if it does not already exist.
4099         *
4100     * <p>
4101     * <b>Definition:</b>
4102     * The adjudications results.
4103     * </p> 
4104         */
4105        public AddItemDetailAdjudication getAdjudicationFirstRep() {
4106                if (getAdjudication().isEmpty()) {
4107                        return addAdjudication();
4108                }
4109                return getAdjudication().get(0); 
4110        }
4111  
4112
4113
4114        }
4115
4116        /**
4117         * Block class for child element: <b>ClaimResponse.addItem.detail.adjudication</b> ()
4118         *
4119     * <p>
4120     * <b>Definition:</b>
4121     * The adjudications results.
4122     * </p> 
4123         */
4124        @Block()        
4125        public static class AddItemDetailAdjudication 
4126            extends  BaseIdentifiableElement        implements IResourceBlock {
4127        
4128        @Child(name="code", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
4129        @Description(
4130                shortDefinition="",
4131                formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc."
4132        )
4133        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-adjudication")
4134        private CodingDt myCode;
4135        
4136        @Child(name="amount", type=MoneyDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
4137        @Description(
4138                shortDefinition="",
4139                formalDefinition="Monetary amount associated with the code"
4140        )
4141        private MoneyDt myAmount;
4142        
4143        @Child(name="value", type=DecimalDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
4144        @Description(
4145                shortDefinition="",
4146                formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above."
4147        )
4148        private DecimalDt myValue;
4149        
4150
4151        @Override
4152        public boolean isEmpty() {
4153                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myAmount,  myValue);
4154        }
4155        
4156        @Override
4157        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4158                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAmount, myValue);
4159        }
4160
4161        /**
4162         * Gets the value(s) for <b>code</b> ().
4163         * creating it if it does
4164         * not exist. Will not return <code>null</code>.
4165         *
4166     * <p>
4167     * <b>Definition:</b>
4168     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
4169     * </p> 
4170         */
4171        public CodingDt getCode() {  
4172                if (myCode == null) {
4173                        myCode = new CodingDt();
4174                }
4175                return myCode;
4176        }
4177
4178        /**
4179         * Sets the value(s) for <b>code</b> ()
4180         *
4181     * <p>
4182     * <b>Definition:</b>
4183     * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.
4184     * </p> 
4185         */
4186        public AddItemDetailAdjudication setCode(CodingDt theValue) {
4187                myCode = theValue;
4188                return this;
4189        }
4190        
4191        
4192
4193  
4194        /**
4195         * Gets the value(s) for <b>amount</b> ().
4196         * creating it if it does
4197         * not exist. Will not return <code>null</code>.
4198         *
4199     * <p>
4200     * <b>Definition:</b>
4201     * Monetary amount associated with the code
4202     * </p> 
4203         */
4204        public MoneyDt getAmount() {  
4205                if (myAmount == null) {
4206                        myAmount = new MoneyDt();
4207                }
4208                return myAmount;
4209        }
4210
4211        /**
4212         * Sets the value(s) for <b>amount</b> ()
4213         *
4214     * <p>
4215     * <b>Definition:</b>
4216     * Monetary amount associated with the code
4217     * </p> 
4218         */
4219        public AddItemDetailAdjudication setAmount(MoneyDt theValue) {
4220                myAmount = theValue;
4221                return this;
4222        }
4223        
4224        
4225
4226  
4227        /**
4228         * Gets the value(s) for <b>value</b> ().
4229         * creating it if it does
4230         * not exist. Will not return <code>null</code>.
4231         *
4232     * <p>
4233     * <b>Definition:</b>
4234     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4235     * </p> 
4236         */
4237        public DecimalDt getValueElement() {  
4238                if (myValue == null) {
4239                        myValue = new DecimalDt();
4240                }
4241                return myValue;
4242        }
4243
4244        
4245        /**
4246         * Gets the value(s) for <b>value</b> ().
4247         * creating it if it does
4248         * not exist. This method may return <code>null</code>.
4249         *
4250     * <p>
4251     * <b>Definition:</b>
4252     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4253     * </p> 
4254         */
4255        public BigDecimal getValue() {  
4256                return getValueElement().getValue();
4257        }
4258
4259        /**
4260         * Sets the value(s) for <b>value</b> ()
4261         *
4262     * <p>
4263     * <b>Definition:</b>
4264     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4265     * </p> 
4266         */
4267        public AddItemDetailAdjudication setValue(DecimalDt theValue) {
4268                myValue = theValue;
4269                return this;
4270        }
4271        
4272        
4273
4274        /**
4275         * Sets the value for <b>value</b> ()
4276         *
4277     * <p>
4278     * <b>Definition:</b>
4279     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4280     * </p> 
4281         */
4282        public AddItemDetailAdjudication setValue( double theValue) {
4283                myValue = new DecimalDt(theValue); 
4284                return this; 
4285        }
4286
4287        /**
4288         * Sets the value for <b>value</b> ()
4289         *
4290     * <p>
4291     * <b>Definition:</b>
4292     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4293     * </p> 
4294         */
4295        public AddItemDetailAdjudication setValue( long theValue) {
4296                myValue = new DecimalDt(theValue); 
4297                return this; 
4298        }
4299
4300        /**
4301         * Sets the value for <b>value</b> ()
4302         *
4303     * <p>
4304     * <b>Definition:</b>
4305     * A non-monetary value for example a percentage. Mutually exclusive to the amount element above.
4306     * </p> 
4307         */
4308        public AddItemDetailAdjudication setValue( java.math.BigDecimal theValue) {
4309                myValue = new DecimalDt(theValue); 
4310                return this; 
4311        }
4312
4313 
4314
4315
4316        }
4317
4318
4319
4320
4321        /**
4322         * Block class for child element: <b>ClaimResponse.error</b> ()
4323         *
4324     * <p>
4325     * <b>Definition:</b>
4326     * Mutually exclusive with Services Provided (Item).
4327     * </p> 
4328         */
4329        @Block()        
4330        public static class Error 
4331            extends  BaseIdentifiableElement        implements IResourceBlock {
4332        
4333        @Child(name="sequenceLinkId", type=PositiveIntDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
4334        @Description(
4335                shortDefinition="",
4336                formalDefinition="The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere."
4337        )
4338        private PositiveIntDt mySequenceLinkId;
4339        
4340        @Child(name="detailSequenceLinkId", type=PositiveIntDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
4341        @Description(
4342                shortDefinition="",
4343                formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition."
4344        )
4345        private PositiveIntDt myDetailSequenceLinkId;
4346        
4347        @Child(name="subdetailSequenceLinkId", type=PositiveIntDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
4348        @Description(
4349                shortDefinition="",
4350                formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition."
4351        )
4352        private PositiveIntDt mySubdetailSequenceLinkId;
4353        
4354        @Child(name="code", type=CodingDt.class, order=3, min=1, max=1, summary=false, modifier=false)  
4355        @Description(
4356                shortDefinition="",
4357                formalDefinition="An error code,froma specified code system, which details why the claim could not be adjudicated."
4358        )
4359        private CodingDt myCode;
4360        
4361
4362        @Override
4363        public boolean isEmpty() {
4364                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequenceLinkId,  myDetailSequenceLinkId,  mySubdetailSequenceLinkId,  myCode);
4365        }
4366        
4367        @Override
4368        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4369                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequenceLinkId, myDetailSequenceLinkId, mySubdetailSequenceLinkId, myCode);
4370        }
4371
4372        /**
4373         * Gets the value(s) for <b>sequenceLinkId</b> ().
4374         * creating it if it does
4375         * not exist. Will not return <code>null</code>.
4376         *
4377     * <p>
4378     * <b>Definition:</b>
4379     * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.
4380     * </p> 
4381         */
4382        public PositiveIntDt getSequenceLinkIdElement() {  
4383                if (mySequenceLinkId == null) {
4384                        mySequenceLinkId = new PositiveIntDt();
4385                }
4386                return mySequenceLinkId;
4387        }
4388
4389        
4390        /**
4391         * Gets the value(s) for <b>sequenceLinkId</b> ().
4392         * creating it if it does
4393         * not exist. This method may return <code>null</code>.
4394         *
4395     * <p>
4396     * <b>Definition:</b>
4397     * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.
4398     * </p> 
4399         */
4400        public Integer getSequenceLinkId() {  
4401                return getSequenceLinkIdElement().getValue();
4402        }
4403
4404        /**
4405         * Sets the value(s) for <b>sequenceLinkId</b> ()
4406         *
4407     * <p>
4408     * <b>Definition:</b>
4409     * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.
4410     * </p> 
4411         */
4412        public Error setSequenceLinkId(PositiveIntDt theValue) {
4413                mySequenceLinkId = theValue;
4414                return this;
4415        }
4416        
4417        
4418
4419        /**
4420         * Sets the value for <b>sequenceLinkId</b> ()
4421         *
4422     * <p>
4423     * <b>Definition:</b>
4424     * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.
4425     * </p> 
4426         */
4427        public Error setSequenceLinkId( int theInteger) {
4428                mySequenceLinkId = new PositiveIntDt(theInteger); 
4429                return this; 
4430        }
4431
4432 
4433        /**
4434         * Gets the value(s) for <b>detailSequenceLinkId</b> ().
4435         * creating it if it does
4436         * not exist. Will not return <code>null</code>.
4437         *
4438     * <p>
4439     * <b>Definition:</b>
4440     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4441     * </p> 
4442         */
4443        public PositiveIntDt getDetailSequenceLinkIdElement() {  
4444                if (myDetailSequenceLinkId == null) {
4445                        myDetailSequenceLinkId = new PositiveIntDt();
4446                }
4447                return myDetailSequenceLinkId;
4448        }
4449
4450        
4451        /**
4452         * Gets the value(s) for <b>detailSequenceLinkId</b> ().
4453         * creating it if it does
4454         * not exist. This method may return <code>null</code>.
4455         *
4456     * <p>
4457     * <b>Definition:</b>
4458     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4459     * </p> 
4460         */
4461        public Integer getDetailSequenceLinkId() {  
4462                return getDetailSequenceLinkIdElement().getValue();
4463        }
4464
4465        /**
4466         * Sets the value(s) for <b>detailSequenceLinkId</b> ()
4467         *
4468     * <p>
4469     * <b>Definition:</b>
4470     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4471     * </p> 
4472         */
4473        public Error setDetailSequenceLinkId(PositiveIntDt theValue) {
4474                myDetailSequenceLinkId = theValue;
4475                return this;
4476        }
4477        
4478        
4479
4480        /**
4481         * Sets the value for <b>detailSequenceLinkId</b> ()
4482         *
4483     * <p>
4484     * <b>Definition:</b>
4485     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4486     * </p> 
4487         */
4488        public Error setDetailSequenceLinkId( int theInteger) {
4489                myDetailSequenceLinkId = new PositiveIntDt(theInteger); 
4490                return this; 
4491        }
4492
4493 
4494        /**
4495         * Gets the value(s) for <b>subdetailSequenceLinkId</b> ().
4496         * creating it if it does
4497         * not exist. Will not return <code>null</code>.
4498         *
4499     * <p>
4500     * <b>Definition:</b>
4501     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4502     * </p> 
4503         */
4504        public PositiveIntDt getSubdetailSequenceLinkIdElement() {  
4505                if (mySubdetailSequenceLinkId == null) {
4506                        mySubdetailSequenceLinkId = new PositiveIntDt();
4507                }
4508                return mySubdetailSequenceLinkId;
4509        }
4510
4511        
4512        /**
4513         * Gets the value(s) for <b>subdetailSequenceLinkId</b> ().
4514         * creating it if it does
4515         * not exist. This method may return <code>null</code>.
4516         *
4517     * <p>
4518     * <b>Definition:</b>
4519     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4520     * </p> 
4521         */
4522        public Integer getSubdetailSequenceLinkId() {  
4523                return getSubdetailSequenceLinkIdElement().getValue();
4524        }
4525
4526        /**
4527         * Sets the value(s) for <b>subdetailSequenceLinkId</b> ()
4528         *
4529     * <p>
4530     * <b>Definition:</b>
4531     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4532     * </p> 
4533         */
4534        public Error setSubdetailSequenceLinkId(PositiveIntDt theValue) {
4535                mySubdetailSequenceLinkId = theValue;
4536                return this;
4537        }
4538        
4539        
4540
4541        /**
4542         * Sets the value for <b>subdetailSequenceLinkId</b> ()
4543         *
4544     * <p>
4545     * <b>Definition:</b>
4546     * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.
4547     * </p> 
4548         */
4549        public Error setSubdetailSequenceLinkId( int theInteger) {
4550                mySubdetailSequenceLinkId = new PositiveIntDt(theInteger); 
4551                return this; 
4552        }
4553
4554 
4555        /**
4556         * Gets the value(s) for <b>code</b> ().
4557         * creating it if it does
4558         * not exist. Will not return <code>null</code>.
4559         *
4560     * <p>
4561     * <b>Definition:</b>
4562     * An error code,froma specified code system, which details why the claim could not be adjudicated.
4563     * </p> 
4564         */
4565        public CodingDt getCode() {  
4566                if (myCode == null) {
4567                        myCode = new CodingDt();
4568                }
4569                return myCode;
4570        }
4571
4572        /**
4573         * Sets the value(s) for <b>code</b> ()
4574         *
4575     * <p>
4576     * <b>Definition:</b>
4577     * An error code,froma specified code system, which details why the claim could not be adjudicated.
4578     * </p> 
4579         */
4580        public Error setCode(CodingDt theValue) {
4581                myCode = theValue;
4582                return this;
4583        }
4584        
4585        
4586
4587  
4588
4589
4590        }
4591
4592
4593        /**
4594         * Block class for child element: <b>ClaimResponse.note</b> ()
4595         *
4596     * <p>
4597     * <b>Definition:</b>
4598     * Note text
4599     * </p> 
4600         */
4601        @Block()        
4602        public static class Note 
4603            extends  BaseIdentifiableElement        implements IResourceBlock {
4604        
4605        @Child(name="number", type=PositiveIntDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
4606        @Description(
4607                shortDefinition="",
4608                formalDefinition="An integer associated with each note which may be referred to from each service line item."
4609        )
4610        private PositiveIntDt myNumber;
4611        
4612        @Child(name="type", type=CodingDt.class, order=1, min=0, max=1, summary=false, modifier=false)  
4613        @Description(
4614                shortDefinition="",
4615                formalDefinition="The note purpose: Print/Display."
4616        )
4617        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/note-type")
4618        private CodingDt myType;
4619        
4620        @Child(name="text", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
4621        @Description(
4622                shortDefinition="",
4623                formalDefinition="The note text."
4624        )
4625        private StringDt myText;
4626        
4627
4628        @Override
4629        public boolean isEmpty() {
4630                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myNumber,  myType,  myText);
4631        }
4632        
4633        @Override
4634        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4635                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumber, myType, myText);
4636        }
4637
4638        /**
4639         * Gets the value(s) for <b>number</b> ().
4640         * creating it if it does
4641         * not exist. Will not return <code>null</code>.
4642         *
4643     * <p>
4644     * <b>Definition:</b>
4645     * An integer associated with each note which may be referred to from each service line item.
4646     * </p> 
4647         */
4648        public PositiveIntDt getNumberElement() {  
4649                if (myNumber == null) {
4650                        myNumber = new PositiveIntDt();
4651                }
4652                return myNumber;
4653        }
4654
4655        
4656        /**
4657         * Gets the value(s) for <b>number</b> ().
4658         * creating it if it does
4659         * not exist. This method may return <code>null</code>.
4660         *
4661     * <p>
4662     * <b>Definition:</b>
4663     * An integer associated with each note which may be referred to from each service line item.
4664     * </p> 
4665         */
4666        public Integer getNumber() {  
4667                return getNumberElement().getValue();
4668        }
4669
4670        /**
4671         * Sets the value(s) for <b>number</b> ()
4672         *
4673     * <p>
4674     * <b>Definition:</b>
4675     * An integer associated with each note which may be referred to from each service line item.
4676     * </p> 
4677         */
4678        public Note setNumber(PositiveIntDt theValue) {
4679                myNumber = theValue;
4680                return this;
4681        }
4682        
4683        
4684
4685        /**
4686         * Sets the value for <b>number</b> ()
4687         *
4688     * <p>
4689     * <b>Definition:</b>
4690     * An integer associated with each note which may be referred to from each service line item.
4691     * </p> 
4692         */
4693        public Note setNumber( int theInteger) {
4694                myNumber = new PositiveIntDt(theInteger); 
4695                return this; 
4696        }
4697
4698 
4699        /**
4700         * Gets the value(s) for <b>type</b> ().
4701         * creating it if it does
4702         * not exist. Will not return <code>null</code>.
4703         *
4704     * <p>
4705     * <b>Definition:</b>
4706     * The note purpose: Print/Display.
4707     * </p> 
4708         */
4709        public CodingDt getType() {  
4710                if (myType == null) {
4711                        myType = new CodingDt();
4712                }
4713                return myType;
4714        }
4715
4716        /**
4717         * Sets the value(s) for <b>type</b> ()
4718         *
4719     * <p>
4720     * <b>Definition:</b>
4721     * The note purpose: Print/Display.
4722     * </p> 
4723         */
4724        public Note setType(CodingDt theValue) {
4725                myType = theValue;
4726                return this;
4727        }
4728        
4729        
4730
4731  
4732        /**
4733         * Gets the value(s) for <b>text</b> ().
4734         * creating it if it does
4735         * not exist. Will not return <code>null</code>.
4736         *
4737     * <p>
4738     * <b>Definition:</b>
4739     * The note text.
4740     * </p> 
4741         */
4742        public StringDt getTextElement() {  
4743                if (myText == null) {
4744                        myText = new StringDt();
4745                }
4746                return myText;
4747        }
4748
4749        
4750        /**
4751         * Gets the value(s) for <b>text</b> ().
4752         * creating it if it does
4753         * not exist. This method may return <code>null</code>.
4754         *
4755     * <p>
4756     * <b>Definition:</b>
4757     * The note text.
4758     * </p> 
4759         */
4760        public String getText() {  
4761                return getTextElement().getValue();
4762        }
4763
4764        /**
4765         * Sets the value(s) for <b>text</b> ()
4766         *
4767     * <p>
4768     * <b>Definition:</b>
4769     * The note text.
4770     * </p> 
4771         */
4772        public Note setText(StringDt theValue) {
4773                myText = theValue;
4774                return this;
4775        }
4776        
4777        
4778
4779        /**
4780         * Sets the value for <b>text</b> ()
4781         *
4782     * <p>
4783     * <b>Definition:</b>
4784     * The note text.
4785     * </p> 
4786         */
4787        public Note setText( String theString) {
4788                myText = new StringDt(theString); 
4789                return this; 
4790        }
4791
4792 
4793
4794
4795        }
4796
4797
4798        /**
4799         * Block class for child element: <b>ClaimResponse.coverage</b> ()
4800         *
4801     * <p>
4802     * <b>Definition:</b>
4803     * Financial instrument by which payment information for health care
4804     * </p> 
4805         */
4806        @Block()        
4807        public static class Coverage 
4808            extends  BaseIdentifiableElement        implements IResourceBlock {
4809        
4810        @Child(name="sequence", type=PositiveIntDt.class, order=0, min=1, max=1, summary=false, modifier=false) 
4811        @Description(
4812                shortDefinition="",
4813                formalDefinition="A service line item."
4814        )
4815        private PositiveIntDt mySequence;
4816        
4817        @Child(name="focal", type=BooleanDt.class, order=1, min=1, max=1, summary=false, modifier=false)        
4818        @Description(
4819                shortDefinition="",
4820                formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated."
4821        )
4822        private BooleanDt myFocal;
4823        
4824        @Child(name="coverage", order=2, min=1, max=1, summary=false, modifier=false, type={
4825                ca.uhn.fhir.model.dstu2.resource.Coverage.class })
4826        @Description(
4827                shortDefinition="",
4828                formalDefinition="Reference to the program or plan identification, underwriter or payor."
4829        )
4830        private ResourceReferenceDt myCoverage;
4831        
4832        @Child(name="businessArrangement", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
4833        @Description(
4834                shortDefinition="",
4835                formalDefinition="The contract number of a business agreement which describes the terms and conditions."
4836        )
4837        private StringDt myBusinessArrangement;
4838        
4839        @Child(name="relationship", type=CodingDt.class, order=4, min=1, max=1, summary=false, modifier=false)  
4840        @Description(
4841                shortDefinition="",
4842                formalDefinition="The relationship of the patient to the subscriber"
4843        )
4844        private CodingDt myRelationship;
4845        
4846        @Child(name="preAuthRef", type=StringDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
4847        @Description(
4848                shortDefinition="",
4849                formalDefinition="A list of references from the Insurer to which these services pertain."
4850        )
4851        private java.util.List<StringDt> myPreAuthRef;
4852        
4853        @Child(name="claimResponse", order=6, min=0, max=1, summary=false, modifier=false, type={
4854                ca.uhn.fhir.model.dstu2.resource.ClaimResponse.class    })
4855        @Description(
4856                shortDefinition="",
4857                formalDefinition="The Coverages adjudication details."
4858        )
4859        private ResourceReferenceDt myClaimResponse;
4860        
4861        @Child(name="originalRuleset", type=CodingDt.class, order=7, min=0, max=1, summary=false, modifier=false)       
4862        @Description(
4863                shortDefinition="",
4864                formalDefinition="The style (standard) and version of the original material which was converted into this resource."
4865        )
4866        private CodingDt myOriginalRuleset;
4867        
4868
4869        @Override
4870        public boolean isEmpty() {
4871                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySequence,  myFocal,  myCoverage,  myBusinessArrangement,  myRelationship,  myPreAuthRef,  myClaimResponse,  myOriginalRuleset);
4872        }
4873        
4874        @Override
4875        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4876                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySequence, myFocal, myCoverage, myBusinessArrangement, myRelationship, myPreAuthRef, myClaimResponse, myOriginalRuleset);
4877        }
4878
4879        /**
4880         * Gets the value(s) for <b>sequence</b> ().
4881         * creating it if it does
4882         * not exist. Will not return <code>null</code>.
4883         *
4884     * <p>
4885     * <b>Definition:</b>
4886     * A service line item.
4887     * </p> 
4888         */
4889        public PositiveIntDt getSequenceElement() {  
4890                if (mySequence == null) {
4891                        mySequence = new PositiveIntDt();
4892                }
4893                return mySequence;
4894        }
4895
4896        
4897        /**
4898         * Gets the value(s) for <b>sequence</b> ().
4899         * creating it if it does
4900         * not exist. This method may return <code>null</code>.
4901         *
4902     * <p>
4903     * <b>Definition:</b>
4904     * A service line item.
4905     * </p> 
4906         */
4907        public Integer getSequence() {  
4908                return getSequenceElement().getValue();
4909        }
4910
4911        /**
4912         * Sets the value(s) for <b>sequence</b> ()
4913         *
4914     * <p>
4915     * <b>Definition:</b>
4916     * A service line item.
4917     * </p> 
4918         */
4919        public Coverage setSequence(PositiveIntDt theValue) {
4920                mySequence = theValue;
4921                return this;
4922        }
4923        
4924        
4925
4926        /**
4927         * Sets the value for <b>sequence</b> ()
4928         *
4929     * <p>
4930     * <b>Definition:</b>
4931     * A service line item.
4932     * </p> 
4933         */
4934        public Coverage setSequence( int theInteger) {
4935                mySequence = new PositiveIntDt(theInteger); 
4936                return this; 
4937        }
4938
4939 
4940        /**
4941         * Gets the value(s) for <b>focal</b> ().
4942         * creating it if it does
4943         * not exist. Will not return <code>null</code>.
4944         *
4945     * <p>
4946     * <b>Definition:</b>
4947     * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.
4948     * </p> 
4949         */
4950        public BooleanDt getFocalElement() {  
4951                if (myFocal == null) {
4952                        myFocal = new BooleanDt();
4953                }
4954                return myFocal;
4955        }
4956
4957        
4958        /**
4959         * Gets the value(s) for <b>focal</b> ().
4960         * creating it if it does
4961         * not exist. This method may return <code>null</code>.
4962         *
4963     * <p>
4964     * <b>Definition:</b>
4965     * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.
4966     * </p> 
4967         */
4968        public Boolean getFocal() {  
4969                return getFocalElement().getValue();
4970        }
4971
4972        /**
4973         * Sets the value(s) for <b>focal</b> ()
4974         *
4975     * <p>
4976     * <b>Definition:</b>
4977     * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.
4978     * </p> 
4979         */
4980        public Coverage setFocal(BooleanDt theValue) {
4981                myFocal = theValue;
4982                return this;
4983        }
4984        
4985        
4986
4987        /**
4988         * Sets the value for <b>focal</b> ()
4989         *
4990     * <p>
4991     * <b>Definition:</b>
4992     * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.
4993     * </p> 
4994         */
4995        public Coverage setFocal( boolean theBoolean) {
4996                myFocal = new BooleanDt(theBoolean); 
4997                return this; 
4998        }
4999
5000 
5001        /**
5002         * Gets the value(s) for <b>coverage</b> ().
5003         * creating it if it does
5004         * not exist. Will not return <code>null</code>.
5005         *
5006     * <p>
5007     * <b>Definition:</b>
5008     * Reference to the program or plan identification, underwriter or payor.
5009     * </p> 
5010         */
5011        public ResourceReferenceDt getCoverage() {  
5012                if (myCoverage == null) {
5013                        myCoverage = new ResourceReferenceDt();
5014                }
5015                return myCoverage;
5016        }
5017
5018        /**
5019         * Sets the value(s) for <b>coverage</b> ()
5020         *
5021     * <p>
5022     * <b>Definition:</b>
5023     * Reference to the program or plan identification, underwriter or payor.
5024     * </p> 
5025         */
5026        public Coverage setCoverage(ResourceReferenceDt theValue) {
5027                myCoverage = theValue;
5028                return this;
5029        }
5030        
5031        
5032
5033  
5034        /**
5035         * Gets the value(s) for <b>businessArrangement</b> ().
5036         * creating it if it does
5037         * not exist. Will not return <code>null</code>.
5038         *
5039     * <p>
5040     * <b>Definition:</b>
5041     * The contract number of a business agreement which describes the terms and conditions.
5042     * </p> 
5043         */
5044        public StringDt getBusinessArrangementElement() {  
5045                if (myBusinessArrangement == null) {
5046                        myBusinessArrangement = new StringDt();
5047                }
5048                return myBusinessArrangement;
5049        }
5050
5051        
5052        /**
5053         * Gets the value(s) for <b>businessArrangement</b> ().
5054         * creating it if it does
5055         * not exist. This method may return <code>null</code>.
5056         *
5057     * <p>
5058     * <b>Definition:</b>
5059     * The contract number of a business agreement which describes the terms and conditions.
5060     * </p> 
5061         */
5062        public String getBusinessArrangement() {  
5063                return getBusinessArrangementElement().getValue();
5064        }
5065
5066        /**
5067         * Sets the value(s) for <b>businessArrangement</b> ()
5068         *
5069     * <p>
5070     * <b>Definition:</b>
5071     * The contract number of a business agreement which describes the terms and conditions.
5072     * </p> 
5073         */
5074        public Coverage setBusinessArrangement(StringDt theValue) {
5075                myBusinessArrangement = theValue;
5076                return this;
5077        }
5078        
5079        
5080
5081        /**
5082         * Sets the value for <b>businessArrangement</b> ()
5083         *
5084     * <p>
5085     * <b>Definition:</b>
5086     * The contract number of a business agreement which describes the terms and conditions.
5087     * </p> 
5088         */
5089        public Coverage setBusinessArrangement( String theString) {
5090                myBusinessArrangement = new StringDt(theString); 
5091                return this; 
5092        }
5093
5094 
5095        /**
5096         * Gets the value(s) for <b>relationship</b> ().
5097         * creating it if it does
5098         * not exist. Will not return <code>null</code>.
5099         *
5100     * <p>
5101     * <b>Definition:</b>
5102     * The relationship of the patient to the subscriber
5103     * </p> 
5104         */
5105        public CodingDt getRelationship() {  
5106                if (myRelationship == null) {
5107                        myRelationship = new CodingDt();
5108                }
5109                return myRelationship;
5110        }
5111
5112        /**
5113         * Sets the value(s) for <b>relationship</b> ()
5114         *
5115     * <p>
5116     * <b>Definition:</b>
5117     * The relationship of the patient to the subscriber
5118     * </p> 
5119         */
5120        public Coverage setRelationship(CodingDt theValue) {
5121                myRelationship = theValue;
5122                return this;
5123        }
5124        
5125        
5126
5127  
5128        /**
5129         * Gets the value(s) for <b>preAuthRef</b> ().
5130         * creating it if it does
5131         * not exist. Will not return <code>null</code>.
5132         *
5133     * <p>
5134     * <b>Definition:</b>
5135     * A list of references from the Insurer to which these services pertain.
5136     * </p> 
5137         */
5138        public java.util.List<StringDt> getPreAuthRef() {  
5139                if (myPreAuthRef == null) {
5140                        myPreAuthRef = new java.util.ArrayList<StringDt>();
5141                }
5142                return myPreAuthRef;
5143        }
5144
5145        /**
5146         * Sets the value(s) for <b>preAuthRef</b> ()
5147         *
5148     * <p>
5149     * <b>Definition:</b>
5150     * A list of references from the Insurer to which these services pertain.
5151     * </p> 
5152         */
5153        public Coverage setPreAuthRef(java.util.List<StringDt> theValue) {
5154                myPreAuthRef = theValue;
5155                return this;
5156        }
5157        
5158        
5159
5160        /**
5161         * Adds and returns a new value for <b>preAuthRef</b> ()
5162         *
5163     * <p>
5164     * <b>Definition:</b>
5165     * A list of references from the Insurer to which these services pertain.
5166     * </p> 
5167         */
5168        public StringDt addPreAuthRef() {
5169                StringDt newType = new StringDt();
5170                getPreAuthRef().add(newType);
5171                return newType; 
5172        }
5173
5174        /**
5175         * Adds a given new value for <b>preAuthRef</b> ()
5176         *
5177         * <p>
5178         * <b>Definition:</b>
5179         * A list of references from the Insurer to which these services pertain.
5180         * </p>
5181         * @param theValue The preAuthRef to add (must not be <code>null</code>)
5182         */
5183        public Coverage addPreAuthRef(StringDt theValue) {
5184                if (theValue == null) {
5185                        throw new NullPointerException("theValue must not be null");
5186                }
5187                getPreAuthRef().add(theValue);
5188                return this;
5189        }
5190
5191        /**
5192         * Gets the first repetition for <b>preAuthRef</b> (),
5193         * creating it if it does not already exist.
5194         *
5195     * <p>
5196     * <b>Definition:</b>
5197     * A list of references from the Insurer to which these services pertain.
5198     * </p> 
5199         */
5200        public StringDt getPreAuthRefFirstRep() {
5201                if (getPreAuthRef().isEmpty()) {
5202                        return addPreAuthRef();
5203                }
5204                return getPreAuthRef().get(0); 
5205        }
5206        /**
5207         * Adds a new value for <b>preAuthRef</b> ()
5208         *
5209     * <p>
5210     * <b>Definition:</b>
5211     * A list of references from the Insurer to which these services pertain.
5212     * </p> 
5213     *
5214     * @return Returns a reference to this object, to allow for simple chaining.
5215         */
5216        public Coverage addPreAuthRef( String theString) {
5217                if (myPreAuthRef == null) {
5218                        myPreAuthRef = new java.util.ArrayList<StringDt>();
5219                }
5220                myPreAuthRef.add(new StringDt(theString));
5221                return this; 
5222        }
5223
5224 
5225        /**
5226         * Gets the value(s) for <b>claimResponse</b> ().
5227         * creating it if it does
5228         * not exist. Will not return <code>null</code>.
5229         *
5230     * <p>
5231     * <b>Definition:</b>
5232     * The Coverages adjudication details.
5233     * </p> 
5234         */
5235        public ResourceReferenceDt getClaimResponse() {  
5236                if (myClaimResponse == null) {
5237                        myClaimResponse = new ResourceReferenceDt();
5238                }
5239                return myClaimResponse;
5240        }
5241
5242        /**
5243         * Sets the value(s) for <b>claimResponse</b> ()
5244         *
5245     * <p>
5246     * <b>Definition:</b>
5247     * The Coverages adjudication details.
5248     * </p> 
5249         */
5250        public Coverage setClaimResponse(ResourceReferenceDt theValue) {
5251                myClaimResponse = theValue;
5252                return this;
5253        }
5254        
5255        
5256
5257  
5258        /**
5259         * Gets the value(s) for <b>originalRuleset</b> ().
5260         * creating it if it does
5261         * not exist. Will not return <code>null</code>.
5262         *
5263     * <p>
5264     * <b>Definition:</b>
5265     * The style (standard) and version of the original material which was converted into this resource.
5266     * </p> 
5267         */
5268        public CodingDt getOriginalRuleset() {  
5269                if (myOriginalRuleset == null) {
5270                        myOriginalRuleset = new CodingDt();
5271                }
5272                return myOriginalRuleset;
5273        }
5274
5275        /**
5276         * Sets the value(s) for <b>originalRuleset</b> ()
5277         *
5278     * <p>
5279     * <b>Definition:</b>
5280     * The style (standard) and version of the original material which was converted into this resource.
5281     * </p> 
5282         */
5283        public Coverage setOriginalRuleset(CodingDt theValue) {
5284                myOriginalRuleset = theValue;
5285                return this;
5286        }
5287        
5288        
5289
5290  
5291
5292
5293        }
5294
5295
5296
5297
5298    @Override
5299    public String getResourceName() {
5300        return "ClaimResponse";
5301    }
5302    
5303    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
5304        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
5305    }
5306
5307
5308}