001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>Contract</b> Resource
320 * ()
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/Contract">http://hl7.org/fhir/profiles/Contract</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="Contract", profile="http://hl7.org/fhir/profiles/Contract", id="contract")
339public class Contract extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>subject</b>
344         * <p>
345         * Description: <b>The identity of the target of the contract</b><br>
346         * Type: <b>reference</b><br>
347         * Path: <b>Contract.subject</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference"  )
351        public static final String SP_SUBJECT = "subject";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
355         * <p>
356         * Description: <b>The identity of the target of the contract</b><br>
357         * Type: <b>reference</b><br>
358         * Path: <b>Contract.subject</b><br>
359         * </p>
360         */
361        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
362
363        /**
364         * Search parameter constant for <b>patient</b>
365         * <p>
366         * Description: <b>The identity of the target of the contract (if a patient)</b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>Contract.subject</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference"  )
372        public static final String SP_PATIENT = "patient";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
376         * <p>
377         * Description: <b>The identity of the target of the contract (if a patient)</b><br>
378         * Type: <b>reference</b><br>
379         * Path: <b>Contract.subject</b><br>
380         * </p>
381         */
382        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
383
384        /**
385         * Search parameter constant for <b>identifier</b>
386         * <p>
387         * Description: <b>The identity of the contract</b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>Contract.identifier</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="identifier", path="Contract.identifier", description="The identity of the contract", type="token"  )
393        public static final String SP_IDENTIFIER = "identifier";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
397         * <p>
398         * Description: <b>The identity of the contract</b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>Contract.identifier</b><br>
401         * </p>
402         */
403        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
404
405        /**
406         * Search parameter constant for <b>actor</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>Contract.actor.entity</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="actor", path="Contract.actor.entity", description="", type="reference"  )
414        public static final String SP_ACTOR = "actor";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>actor</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>Contract.actor.entity</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam ACTOR = new ReferenceClientParam(SP_ACTOR);
425
426        /**
427         * Search parameter constant for <b>signer</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>reference</b><br>
431         * Path: <b>Contract.signer.party</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="signer", path="Contract.signer.party", description="", type="reference"  )
435        public static final String SP_SIGNER = "signer";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>signer</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>reference</b><br>
442         * Path: <b>Contract.signer.party</b><br>
443         * </p>
444         */
445        public static final ReferenceClientParam SIGNER = new ReferenceClientParam(SP_SIGNER);
446
447
448        /**
449         * Constant for fluent queries to be used to add include statements. Specifies
450         * the path value of "<b>Contract:actor</b>".
451         */
452        public static final Include INCLUDE_ACTOR = new Include("Contract:actor");
453
454        /**
455         * Constant for fluent queries to be used to add include statements. Specifies
456         * the path value of "<b>Contract:patient</b>".
457         */
458        public static final Include INCLUDE_PATIENT = new Include("Contract:patient");
459
460        /**
461         * Constant for fluent queries to be used to add include statements. Specifies
462         * the path value of "<b>Contract:signer</b>".
463         */
464        public static final Include INCLUDE_SIGNER = new Include("Contract:signer");
465
466        /**
467         * Constant for fluent queries to be used to add include statements. Specifies
468         * the path value of "<b>Contract:subject</b>".
469         */
470        public static final Include INCLUDE_SUBJECT = new Include("Contract:subject");
471
472
473        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
474        @Description(
475                shortDefinition="",
476                formalDefinition="Unique identifier for this Contract."
477        )
478        private IdentifierDt myIdentifier;
479        
480        @Child(name="issued", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false)       
481        @Description(
482                shortDefinition="",
483                formalDefinition="When this  Contract was issued."
484        )
485        private DateTimeDt myIssued;
486        
487        @Child(name="applies", type=PeriodDt.class, order=2, min=0, max=1, summary=true, modifier=false)        
488        @Description(
489                shortDefinition="",
490                formalDefinition="Relevant time or time-period when this Contract is applicable"
491        )
492        private PeriodDt myApplies;
493        
494        @Child(name="subject", order=3, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
495                IResource.class })
496        @Description(
497                shortDefinition="",
498                formalDefinition="Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services."
499        )
500        private java.util.List<ResourceReferenceDt> mySubject;
501        
502        @Child(name="authority", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
503                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
504        @Description(
505                shortDefinition="",
506                formalDefinition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies."
507        )
508        private java.util.List<ResourceReferenceDt> myAuthority;
509        
510        @Child(name="domain", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
511                ca.uhn.fhir.model.dstu2.resource.Location.class })
512        @Description(
513                shortDefinition="",
514                formalDefinition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources."
515        )
516        private java.util.List<ResourceReferenceDt> myDomain;
517        
518        @Child(name="type", type=CodeableConceptDt.class, order=6, min=0, max=1, summary=true, modifier=false)  
519        @Description(
520                shortDefinition="",
521                formalDefinition="Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc."
522        )
523        private BoundCodeableConceptDt<ContractTypeCodesEnum> myType;
524        
525        @Child(name="subType", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
526        @Description(
527                shortDefinition="",
528                formalDefinition="More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent."
529        )
530        private java.util.List<BoundCodeableConceptDt<ContractSubtypeCodesEnum>> mySubType;
531        
532        @Child(name="action", type=CodeableConceptDt.class, order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
533        @Description(
534                shortDefinition="",
535                formalDefinition="Action stipulated by this Contract."
536        )
537        private java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> myAction;
538        
539        @Child(name="actionReason", type=CodeableConceptDt.class, order=9, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
540        @Description(
541                shortDefinition="",
542                formalDefinition="Reason for action stipulated by this Contract."
543        )
544        private java.util.List<CodeableConceptDt> myActionReason;
545        
546        @Child(name="actor", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
547        @Description(
548                shortDefinition="",
549                formalDefinition="List of Contract actors"
550        )
551        private java.util.List<Actor> myActor;
552        
553        @Child(name="valuedItem", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
554        @Description(
555                shortDefinition="",
556                formalDefinition="Contract Valued Item List"
557        )
558        private java.util.List<ValuedItem> myValuedItem;
559        
560        @Child(name="signer", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
561        @Description(
562                shortDefinition="",
563                formalDefinition="Party signing this Contract."
564        )
565        private java.util.List<Signer> mySigner;
566        
567        @Child(name="term", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
568        @Description(
569                shortDefinition="",
570                formalDefinition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups."
571        )
572        private java.util.List<Term> myTerm;
573        
574        @Child(name="binding", order=14, min=0, max=1, summary=false, modifier=false, type={
575                AttachmentDt.class,             Composition.class,              DocumentReference.class,                QuestionnaireResponse.class     })
576        @Description(
577                shortDefinition="",
578                formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract."
579        )
580        private IDatatype myBinding;
581        
582        @Child(name="friendly", order=15, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
583        @Description(
584                shortDefinition="",
585                formalDefinition="The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement."
586        )
587        private java.util.List<Friendly> myFriendly;
588        
589        @Child(name="legal", order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
590        @Description(
591                shortDefinition="",
592                formalDefinition="List of Legal expressions or representations of this Contract."
593        )
594        private java.util.List<Legal> myLegal;
595        
596        @Child(name="rule", order=17, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
597        @Description(
598                shortDefinition="",
599                formalDefinition="List of Computable Policy Rule Language Representations of this Contract."
600        )
601        private java.util.List<Rule> myRule;
602        
603
604        @Override
605        public boolean isEmpty() {
606                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myIssued,  myApplies,  mySubject,  myAuthority,  myDomain,  myType,  mySubType,  myAction,  myActionReason,  myActor,  myValuedItem,  mySigner,  myTerm,  myBinding,  myFriendly,  myLegal,  myRule);
607        }
608        
609        @Override
610        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
611                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myIssued, myApplies, mySubject, myAuthority, myDomain, myType, mySubType, myAction, myActionReason, myActor, myValuedItem, mySigner, myTerm, myBinding, myFriendly, myLegal, myRule);
612        }
613
614        /**
615         * Gets the value(s) for <b>identifier</b> ().
616         * creating it if it does
617         * not exist. Will not return <code>null</code>.
618         *
619     * <p>
620     * <b>Definition:</b>
621     * Unique identifier for this Contract.
622     * </p> 
623         */
624        public IdentifierDt getIdentifier() {  
625                if (myIdentifier == null) {
626                        myIdentifier = new IdentifierDt();
627                }
628                return myIdentifier;
629        }
630
631        /**
632         * Sets the value(s) for <b>identifier</b> ()
633         *
634     * <p>
635     * <b>Definition:</b>
636     * Unique identifier for this Contract.
637     * </p> 
638         */
639        public Contract setIdentifier(IdentifierDt theValue) {
640                myIdentifier = theValue;
641                return this;
642        }
643        
644        
645
646  
647        /**
648         * Gets the value(s) for <b>issued</b> ().
649         * creating it if it does
650         * not exist. Will not return <code>null</code>.
651         *
652     * <p>
653     * <b>Definition:</b>
654     * When this  Contract was issued.
655     * </p> 
656         */
657        public DateTimeDt getIssuedElement() {  
658                if (myIssued == null) {
659                        myIssued = new DateTimeDt();
660                }
661                return myIssued;
662        }
663
664        
665        /**
666         * Gets the value(s) for <b>issued</b> ().
667         * creating it if it does
668         * not exist. Will not return <code>null</code>.
669         *
670     * <p>
671     * <b>Definition:</b>
672     * When this  Contract was issued.
673     * </p> 
674         */
675        public Date getIssued() {  
676                return getIssuedElement().getValue();
677        }
678
679        /**
680         * Sets the value(s) for <b>issued</b> ()
681         *
682     * <p>
683     * <b>Definition:</b>
684     * When this  Contract was issued.
685     * </p> 
686         */
687        public Contract setIssued(DateTimeDt theValue) {
688                myIssued = theValue;
689                return this;
690        }
691        
692        
693
694        /**
695         * Sets the value for <b>issued</b> ()
696         *
697     * <p>
698     * <b>Definition:</b>
699     * When this  Contract was issued.
700     * </p> 
701         */
702        public Contract setIssued( Date theDate,  TemporalPrecisionEnum thePrecision) {
703                myIssued = new DateTimeDt(theDate, thePrecision); 
704                return this; 
705        }
706
707        /**
708         * Sets the value for <b>issued</b> ()
709         *
710     * <p>
711     * <b>Definition:</b>
712     * When this  Contract was issued.
713     * </p> 
714         */
715        public Contract setIssuedWithSecondsPrecision( Date theDate) {
716                myIssued = new DateTimeDt(theDate); 
717                return this; 
718        }
719
720 
721        /**
722         * Gets the value(s) for <b>applies</b> ().
723         * creating it if it does
724         * not exist. Will not return <code>null</code>.
725         *
726     * <p>
727     * <b>Definition:</b>
728     * Relevant time or time-period when this Contract is applicable
729     * </p> 
730         */
731        public PeriodDt getApplies() {  
732                if (myApplies == null) {
733                        myApplies = new PeriodDt();
734                }
735                return myApplies;
736        }
737
738        /**
739         * Sets the value(s) for <b>applies</b> ()
740         *
741     * <p>
742     * <b>Definition:</b>
743     * Relevant time or time-period when this Contract is applicable
744     * </p> 
745         */
746        public Contract setApplies(PeriodDt theValue) {
747                myApplies = theValue;
748                return this;
749        }
750        
751        
752
753  
754        /**
755         * Gets the value(s) for <b>subject</b> ().
756         * creating it if it does
757         * not exist. Will not return <code>null</code>.
758         *
759     * <p>
760     * <b>Definition:</b>
761     * Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.
762     * </p> 
763         */
764        public java.util.List<ResourceReferenceDt> getSubject() {  
765                if (mySubject == null) {
766                        mySubject = new java.util.ArrayList<ResourceReferenceDt>();
767                }
768                return mySubject;
769        }
770
771        /**
772         * Sets the value(s) for <b>subject</b> ()
773         *
774     * <p>
775     * <b>Definition:</b>
776     * Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.
777     * </p> 
778         */
779        public Contract setSubject(java.util.List<ResourceReferenceDt> theValue) {
780                mySubject = theValue;
781                return this;
782        }
783        
784        
785
786        /**
787         * Adds and returns a new value for <b>subject</b> ()
788         *
789     * <p>
790     * <b>Definition:</b>
791     * Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.
792     * </p> 
793         */
794        public ResourceReferenceDt addSubject() {
795                ResourceReferenceDt newType = new ResourceReferenceDt();
796                getSubject().add(newType);
797                return newType; 
798        }
799  
800        /**
801         * Gets the value(s) for <b>authority</b> ().
802         * creating it if it does
803         * not exist. Will not return <code>null</code>.
804         *
805     * <p>
806     * <b>Definition:</b>
807     * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.
808     * </p> 
809         */
810        public java.util.List<ResourceReferenceDt> getAuthority() {  
811                if (myAuthority == null) {
812                        myAuthority = new java.util.ArrayList<ResourceReferenceDt>();
813                }
814                return myAuthority;
815        }
816
817        /**
818         * Sets the value(s) for <b>authority</b> ()
819         *
820     * <p>
821     * <b>Definition:</b>
822     * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.
823     * </p> 
824         */
825        public Contract setAuthority(java.util.List<ResourceReferenceDt> theValue) {
826                myAuthority = theValue;
827                return this;
828        }
829        
830        
831
832        /**
833         * Adds and returns a new value for <b>authority</b> ()
834         *
835     * <p>
836     * <b>Definition:</b>
837     * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.
838     * </p> 
839         */
840        public ResourceReferenceDt addAuthority() {
841                ResourceReferenceDt newType = new ResourceReferenceDt();
842                getAuthority().add(newType);
843                return newType; 
844        }
845  
846        /**
847         * Gets the value(s) for <b>domain</b> ().
848         * creating it if it does
849         * not exist. Will not return <code>null</code>.
850         *
851     * <p>
852     * <b>Definition:</b>
853     * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.
854     * </p> 
855         */
856        public java.util.List<ResourceReferenceDt> getDomain() {  
857                if (myDomain == null) {
858                        myDomain = new java.util.ArrayList<ResourceReferenceDt>();
859                }
860                return myDomain;
861        }
862
863        /**
864         * Sets the value(s) for <b>domain</b> ()
865         *
866     * <p>
867     * <b>Definition:</b>
868     * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.
869     * </p> 
870         */
871        public Contract setDomain(java.util.List<ResourceReferenceDt> theValue) {
872                myDomain = theValue;
873                return this;
874        }
875        
876        
877
878        /**
879         * Adds and returns a new value for <b>domain</b> ()
880         *
881     * <p>
882     * <b>Definition:</b>
883     * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.
884     * </p> 
885         */
886        public ResourceReferenceDt addDomain() {
887                ResourceReferenceDt newType = new ResourceReferenceDt();
888                getDomain().add(newType);
889                return newType; 
890        }
891  
892        /**
893         * Gets the value(s) for <b>type</b> ().
894         * creating it if it does
895         * not exist. Will not return <code>null</code>.
896         *
897     * <p>
898     * <b>Definition:</b>
899     * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.
900     * </p> 
901         */
902        public BoundCodeableConceptDt<ContractTypeCodesEnum> getType() {  
903                if (myType == null) {
904                        myType = new BoundCodeableConceptDt<ContractTypeCodesEnum>(ContractTypeCodesEnum.VALUESET_BINDER);
905                }
906                return myType;
907        }
908
909        /**
910         * Sets the value(s) for <b>type</b> ()
911         *
912     * <p>
913     * <b>Definition:</b>
914     * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.
915     * </p> 
916         */
917        public Contract setType(BoundCodeableConceptDt<ContractTypeCodesEnum> theValue) {
918                myType = theValue;
919                return this;
920        }
921        
922        
923
924        /**
925         * Sets the value(s) for <b>type</b> ()
926         *
927     * <p>
928     * <b>Definition:</b>
929     * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.
930     * </p> 
931         */
932        public Contract setType(ContractTypeCodesEnum theValue) {
933                setType(new BoundCodeableConceptDt<ContractTypeCodesEnum>(ContractTypeCodesEnum.VALUESET_BINDER, theValue));
934                
935/*
936                getType().setValueAsEnum(theValue);
937*/
938                return this;
939        }
940
941  
942        /**
943         * Gets the value(s) for <b>subType</b> ().
944         * creating it if it does
945         * not exist. Will not return <code>null</code>.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
950     * </p> 
951         */
952        public java.util.List<BoundCodeableConceptDt<ContractSubtypeCodesEnum>> getSubType() {  
953                if (mySubType == null) {
954                        mySubType = new java.util.ArrayList<BoundCodeableConceptDt<ContractSubtypeCodesEnum>>();
955                }
956                return mySubType;
957        }
958
959        /**
960         * Sets the value(s) for <b>subType</b> ()
961         *
962     * <p>
963     * <b>Definition:</b>
964     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
965     * </p> 
966         */
967        public Contract setSubType(java.util.List<BoundCodeableConceptDt<ContractSubtypeCodesEnum>> theValue) {
968                mySubType = theValue;
969                return this;
970        }
971        
972        
973
974        /**
975         * Add a value for <b>subType</b> () using an enumerated type. This
976         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
977         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
978         * you may also use the {@link #addSubType()} method.
979         *
980     * <p>
981     * <b>Definition:</b>
982     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
983     * </p> 
984         */
985        public BoundCodeableConceptDt<ContractSubtypeCodesEnum> addSubType(ContractSubtypeCodesEnum theValue) {
986                BoundCodeableConceptDt<ContractSubtypeCodesEnum> retVal = new BoundCodeableConceptDt<ContractSubtypeCodesEnum>(ContractSubtypeCodesEnum.VALUESET_BINDER, theValue);
987                getSubType().add(retVal);
988                return retVal;
989        }
990
991        /**
992         * Gets the first repetition for <b>subType</b> (),
993         * creating it if it does not already exist.
994         *
995     * <p>
996     * <b>Definition:</b>
997     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
998     * </p> 
999         */
1000        public BoundCodeableConceptDt<ContractSubtypeCodesEnum> getSubTypeFirstRep() {
1001                if (getSubType().size() == 0) {
1002                        addSubType();
1003                }
1004                return getSubType().get(0);
1005        }
1006
1007        /**
1008         * Add a value for <b>subType</b> ()
1009         *
1010     * <p>
1011     * <b>Definition:</b>
1012     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
1013     * </p> 
1014         */
1015        public BoundCodeableConceptDt<ContractSubtypeCodesEnum> addSubType() {
1016                BoundCodeableConceptDt<ContractSubtypeCodesEnum> retVal = new BoundCodeableConceptDt<ContractSubtypeCodesEnum>(ContractSubtypeCodesEnum.VALUESET_BINDER);
1017                getSubType().add(retVal);
1018                return retVal;
1019        }
1020
1021        /**
1022         * Sets the value(s), and clears any existing value(s) for <b>subType</b> ()
1023         *
1024     * <p>
1025     * <b>Definition:</b>
1026     * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner  insurance, prenupial agreement, Advanced-Directive, or privacy consent.
1027     * </p> 
1028         */
1029        public Contract setSubType(ContractSubtypeCodesEnum theValue) {
1030                getSubType().clear();
1031                addSubType(theValue);
1032                return this;
1033        }
1034
1035  
1036        /**
1037         * Gets the value(s) for <b>action</b> ().
1038         * creating it if it does
1039         * not exist. Will not return <code>null</code>.
1040         *
1041     * <p>
1042     * <b>Definition:</b>
1043     * Action stipulated by this Contract.
1044     * </p> 
1045         */
1046        public java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> getAction() {  
1047                if (myAction == null) {
1048                        myAction = new java.util.ArrayList<BoundCodeableConceptDt<ContractActionCodesEnum>>();
1049                }
1050                return myAction;
1051        }
1052
1053        /**
1054         * Sets the value(s) for <b>action</b> ()
1055         *
1056     * <p>
1057     * <b>Definition:</b>
1058     * Action stipulated by this Contract.
1059     * </p> 
1060         */
1061        public Contract setAction(java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> theValue) {
1062                myAction = theValue;
1063                return this;
1064        }
1065        
1066        
1067
1068        /**
1069         * Add a value for <b>action</b> () using an enumerated type. This
1070         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1071         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1072         * you may also use the {@link #addAction()} method.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * Action stipulated by this Contract.
1077     * </p> 
1078         */
1079        public BoundCodeableConceptDt<ContractActionCodesEnum> addAction(ContractActionCodesEnum theValue) {
1080                BoundCodeableConceptDt<ContractActionCodesEnum> retVal = new BoundCodeableConceptDt<ContractActionCodesEnum>(ContractActionCodesEnum.VALUESET_BINDER, theValue);
1081                getAction().add(retVal);
1082                return retVal;
1083        }
1084
1085        /**
1086         * Gets the first repetition for <b>action</b> (),
1087         * creating it if it does not already exist.
1088         *
1089     * <p>
1090     * <b>Definition:</b>
1091     * Action stipulated by this Contract.
1092     * </p> 
1093         */
1094        public BoundCodeableConceptDt<ContractActionCodesEnum> getActionFirstRep() {
1095                if (getAction().size() == 0) {
1096                        addAction();
1097                }
1098                return getAction().get(0);
1099        }
1100
1101        /**
1102         * Add a value for <b>action</b> ()
1103         *
1104     * <p>
1105     * <b>Definition:</b>
1106     * Action stipulated by this Contract.
1107     * </p> 
1108         */
1109        public BoundCodeableConceptDt<ContractActionCodesEnum> addAction() {
1110                BoundCodeableConceptDt<ContractActionCodesEnum> retVal = new BoundCodeableConceptDt<ContractActionCodesEnum>(ContractActionCodesEnum.VALUESET_BINDER);
1111                getAction().add(retVal);
1112                return retVal;
1113        }
1114
1115        /**
1116         * Sets the value(s), and clears any existing value(s) for <b>action</b> ()
1117         *
1118     * <p>
1119     * <b>Definition:</b>
1120     * Action stipulated by this Contract.
1121     * </p> 
1122         */
1123        public Contract setAction(ContractActionCodesEnum theValue) {
1124                getAction().clear();
1125                addAction(theValue);
1126                return this;
1127        }
1128
1129  
1130        /**
1131         * Gets the value(s) for <b>actionReason</b> ().
1132         * creating it if it does
1133         * not exist. Will not return <code>null</code>.
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * Reason for action stipulated by this Contract.
1138     * </p> 
1139         */
1140        public java.util.List<CodeableConceptDt> getActionReason() {  
1141                if (myActionReason == null) {
1142                        myActionReason = new java.util.ArrayList<CodeableConceptDt>();
1143                }
1144                return myActionReason;
1145        }
1146
1147        /**
1148         * Sets the value(s) for <b>actionReason</b> ()
1149         *
1150     * <p>
1151     * <b>Definition:</b>
1152     * Reason for action stipulated by this Contract.
1153     * </p> 
1154         */
1155        public Contract setActionReason(java.util.List<CodeableConceptDt> theValue) {
1156                myActionReason = theValue;
1157                return this;
1158        }
1159        
1160        
1161
1162        /**
1163         * Adds and returns a new value for <b>actionReason</b> ()
1164         *
1165     * <p>
1166     * <b>Definition:</b>
1167     * Reason for action stipulated by this Contract.
1168     * </p> 
1169         */
1170        public CodeableConceptDt addActionReason() {
1171                CodeableConceptDt newType = new CodeableConceptDt();
1172                getActionReason().add(newType);
1173                return newType; 
1174        }
1175
1176        /**
1177         * Adds a given new value for <b>actionReason</b> ()
1178         *
1179         * <p>
1180         * <b>Definition:</b>
1181         * Reason for action stipulated by this Contract.
1182         * </p>
1183         * @param theValue The actionReason to add (must not be <code>null</code>)
1184         */
1185        public Contract addActionReason(CodeableConceptDt theValue) {
1186                if (theValue == null) {
1187                        throw new NullPointerException("theValue must not be null");
1188                }
1189                getActionReason().add(theValue);
1190                return this;
1191        }
1192
1193        /**
1194         * Gets the first repetition for <b>actionReason</b> (),
1195         * creating it if it does not already exist.
1196         *
1197     * <p>
1198     * <b>Definition:</b>
1199     * Reason for action stipulated by this Contract.
1200     * </p> 
1201         */
1202        public CodeableConceptDt getActionReasonFirstRep() {
1203                if (getActionReason().isEmpty()) {
1204                        return addActionReason();
1205                }
1206                return getActionReason().get(0); 
1207        }
1208  
1209        /**
1210         * Gets the value(s) for <b>actor</b> ().
1211         * creating it if it does
1212         * not exist. Will not return <code>null</code>.
1213         *
1214     * <p>
1215     * <b>Definition:</b>
1216     * List of Contract actors
1217     * </p> 
1218         */
1219        public java.util.List<Actor> getActor() {  
1220                if (myActor == null) {
1221                        myActor = new java.util.ArrayList<Actor>();
1222                }
1223                return myActor;
1224        }
1225
1226        /**
1227         * Sets the value(s) for <b>actor</b> ()
1228         *
1229     * <p>
1230     * <b>Definition:</b>
1231     * List of Contract actors
1232     * </p> 
1233         */
1234        public Contract setActor(java.util.List<Actor> theValue) {
1235                myActor = theValue;
1236                return this;
1237        }
1238        
1239        
1240
1241        /**
1242         * Adds and returns a new value for <b>actor</b> ()
1243         *
1244     * <p>
1245     * <b>Definition:</b>
1246     * List of Contract actors
1247     * </p> 
1248         */
1249        public Actor addActor() {
1250                Actor newType = new Actor();
1251                getActor().add(newType);
1252                return newType; 
1253        }
1254
1255        /**
1256         * Adds a given new value for <b>actor</b> ()
1257         *
1258         * <p>
1259         * <b>Definition:</b>
1260         * List of Contract actors
1261         * </p>
1262         * @param theValue The actor to add (must not be <code>null</code>)
1263         */
1264        public Contract addActor(Actor theValue) {
1265                if (theValue == null) {
1266                        throw new NullPointerException("theValue must not be null");
1267                }
1268                getActor().add(theValue);
1269                return this;
1270        }
1271
1272        /**
1273         * Gets the first repetition for <b>actor</b> (),
1274         * creating it if it does not already exist.
1275         *
1276     * <p>
1277     * <b>Definition:</b>
1278     * List of Contract actors
1279     * </p> 
1280         */
1281        public Actor getActorFirstRep() {
1282                if (getActor().isEmpty()) {
1283                        return addActor();
1284                }
1285                return getActor().get(0); 
1286        }
1287  
1288        /**
1289         * Gets the value(s) for <b>valuedItem</b> ().
1290         * creating it if it does
1291         * not exist. Will not return <code>null</code>.
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * Contract Valued Item List
1296     * </p> 
1297         */
1298        public java.util.List<ValuedItem> getValuedItem() {  
1299                if (myValuedItem == null) {
1300                        myValuedItem = new java.util.ArrayList<ValuedItem>();
1301                }
1302                return myValuedItem;
1303        }
1304
1305        /**
1306         * Sets the value(s) for <b>valuedItem</b> ()
1307         *
1308     * <p>
1309     * <b>Definition:</b>
1310     * Contract Valued Item List
1311     * </p> 
1312         */
1313        public Contract setValuedItem(java.util.List<ValuedItem> theValue) {
1314                myValuedItem = theValue;
1315                return this;
1316        }
1317        
1318        
1319
1320        /**
1321         * Adds and returns a new value for <b>valuedItem</b> ()
1322         *
1323     * <p>
1324     * <b>Definition:</b>
1325     * Contract Valued Item List
1326     * </p> 
1327         */
1328        public ValuedItem addValuedItem() {
1329                ValuedItem newType = new ValuedItem();
1330                getValuedItem().add(newType);
1331                return newType; 
1332        }
1333
1334        /**
1335         * Adds a given new value for <b>valuedItem</b> ()
1336         *
1337         * <p>
1338         * <b>Definition:</b>
1339         * Contract Valued Item List
1340         * </p>
1341         * @param theValue The valuedItem to add (must not be <code>null</code>)
1342         */
1343        public Contract addValuedItem(ValuedItem theValue) {
1344                if (theValue == null) {
1345                        throw new NullPointerException("theValue must not be null");
1346                }
1347                getValuedItem().add(theValue);
1348                return this;
1349        }
1350
1351        /**
1352         * Gets the first repetition for <b>valuedItem</b> (),
1353         * creating it if it does not already exist.
1354         *
1355     * <p>
1356     * <b>Definition:</b>
1357     * Contract Valued Item List
1358     * </p> 
1359         */
1360        public ValuedItem getValuedItemFirstRep() {
1361                if (getValuedItem().isEmpty()) {
1362                        return addValuedItem();
1363                }
1364                return getValuedItem().get(0); 
1365        }
1366  
1367        /**
1368         * Gets the value(s) for <b>signer</b> ().
1369         * creating it if it does
1370         * not exist. Will not return <code>null</code>.
1371         *
1372     * <p>
1373     * <b>Definition:</b>
1374     * Party signing this Contract.
1375     * </p> 
1376         */
1377        public java.util.List<Signer> getSigner() {  
1378                if (mySigner == null) {
1379                        mySigner = new java.util.ArrayList<Signer>();
1380                }
1381                return mySigner;
1382        }
1383
1384        /**
1385         * Sets the value(s) for <b>signer</b> ()
1386         *
1387     * <p>
1388     * <b>Definition:</b>
1389     * Party signing this Contract.
1390     * </p> 
1391         */
1392        public Contract setSigner(java.util.List<Signer> theValue) {
1393                mySigner = theValue;
1394                return this;
1395        }
1396        
1397        
1398
1399        /**
1400         * Adds and returns a new value for <b>signer</b> ()
1401         *
1402     * <p>
1403     * <b>Definition:</b>
1404     * Party signing this Contract.
1405     * </p> 
1406         */
1407        public Signer addSigner() {
1408                Signer newType = new Signer();
1409                getSigner().add(newType);
1410                return newType; 
1411        }
1412
1413        /**
1414         * Adds a given new value for <b>signer</b> ()
1415         *
1416         * <p>
1417         * <b>Definition:</b>
1418         * Party signing this Contract.
1419         * </p>
1420         * @param theValue The signer to add (must not be <code>null</code>)
1421         */
1422        public Contract addSigner(Signer theValue) {
1423                if (theValue == null) {
1424                        throw new NullPointerException("theValue must not be null");
1425                }
1426                getSigner().add(theValue);
1427                return this;
1428        }
1429
1430        /**
1431         * Gets the first repetition for <b>signer</b> (),
1432         * creating it if it does not already exist.
1433         *
1434     * <p>
1435     * <b>Definition:</b>
1436     * Party signing this Contract.
1437     * </p> 
1438         */
1439        public Signer getSignerFirstRep() {
1440                if (getSigner().isEmpty()) {
1441                        return addSigner();
1442                }
1443                return getSigner().get(0); 
1444        }
1445  
1446        /**
1447         * Gets the value(s) for <b>term</b> ().
1448         * creating it if it does
1449         * not exist. Will not return <code>null</code>.
1450         *
1451     * <p>
1452     * <b>Definition:</b>
1453     * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
1454     * </p> 
1455         */
1456        public java.util.List<Term> getTerm() {  
1457                if (myTerm == null) {
1458                        myTerm = new java.util.ArrayList<Term>();
1459                }
1460                return myTerm;
1461        }
1462
1463        /**
1464         * Sets the value(s) for <b>term</b> ()
1465         *
1466     * <p>
1467     * <b>Definition:</b>
1468     * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
1469     * </p> 
1470         */
1471        public Contract setTerm(java.util.List<Term> theValue) {
1472                myTerm = theValue;
1473                return this;
1474        }
1475        
1476        
1477
1478        /**
1479         * Adds and returns a new value for <b>term</b> ()
1480         *
1481     * <p>
1482     * <b>Definition:</b>
1483     * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
1484     * </p> 
1485         */
1486        public Term addTerm() {
1487                Term newType = new Term();
1488                getTerm().add(newType);
1489                return newType; 
1490        }
1491
1492        /**
1493         * Adds a given new value for <b>term</b> ()
1494         *
1495         * <p>
1496         * <b>Definition:</b>
1497         * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
1498         * </p>
1499         * @param theValue The term to add (must not be <code>null</code>)
1500         */
1501        public Contract addTerm(Term theValue) {
1502                if (theValue == null) {
1503                        throw new NullPointerException("theValue must not be null");
1504                }
1505                getTerm().add(theValue);
1506                return this;
1507        }
1508
1509        /**
1510         * Gets the first repetition for <b>term</b> (),
1511         * creating it if it does not already exist.
1512         *
1513     * <p>
1514     * <b>Definition:</b>
1515     * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
1516     * </p> 
1517         */
1518        public Term getTermFirstRep() {
1519                if (getTerm().isEmpty()) {
1520                        return addTerm();
1521                }
1522                return getTerm().get(0); 
1523        }
1524  
1525        /**
1526         * Gets the value(s) for <b>binding[x]</b> ().
1527         * creating it if it does
1528         * not exist. Will not return <code>null</code>.
1529         *
1530     * <p>
1531     * <b>Definition:</b>
1532     * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \&quot;source of truth\&quot; and which would be the basis for legal action related to enforcement of this Contract.
1533     * </p> 
1534         */
1535        public IDatatype getBinding() {  
1536                return myBinding;
1537        }
1538
1539        /**
1540         * Sets the value(s) for <b>binding[x]</b> ()
1541         *
1542     * <p>
1543     * <b>Definition:</b>
1544     * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \&quot;source of truth\&quot; and which would be the basis for legal action related to enforcement of this Contract.
1545     * </p> 
1546         */
1547        public Contract setBinding(IDatatype theValue) {
1548                myBinding = theValue;
1549                return this;
1550        }
1551        
1552        
1553
1554  
1555        /**
1556         * Gets the value(s) for <b>friendly</b> ().
1557         * creating it if it does
1558         * not exist. Will not return <code>null</code>.
1559         *
1560     * <p>
1561     * <b>Definition:</b>
1562     * The \&quot;patient friendly language\&quot; versionof the Contract in whole or in parts. \&quot;Patient friendly language\&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
1563     * </p> 
1564         */
1565        public java.util.List<Friendly> getFriendly() {  
1566                if (myFriendly == null) {
1567                        myFriendly = new java.util.ArrayList<Friendly>();
1568                }
1569                return myFriendly;
1570        }
1571
1572        /**
1573         * Sets the value(s) for <b>friendly</b> ()
1574         *
1575     * <p>
1576     * <b>Definition:</b>
1577     * The \&quot;patient friendly language\&quot; versionof the Contract in whole or in parts. \&quot;Patient friendly language\&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
1578     * </p> 
1579         */
1580        public Contract setFriendly(java.util.List<Friendly> theValue) {
1581                myFriendly = theValue;
1582                return this;
1583        }
1584        
1585        
1586
1587        /**
1588         * Adds and returns a new value for <b>friendly</b> ()
1589         *
1590     * <p>
1591     * <b>Definition:</b>
1592     * The \&quot;patient friendly language\&quot; versionof the Contract in whole or in parts. \&quot;Patient friendly language\&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
1593     * </p> 
1594         */
1595        public Friendly addFriendly() {
1596                Friendly newType = new Friendly();
1597                getFriendly().add(newType);
1598                return newType; 
1599        }
1600
1601        /**
1602         * Adds a given new value for <b>friendly</b> ()
1603         *
1604         * <p>
1605         * <b>Definition:</b>
1606         * The \&quot;patient friendly language\&quot; versionof the Contract in whole or in parts. \&quot;Patient friendly language\&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
1607         * </p>
1608         * @param theValue The friendly to add (must not be <code>null</code>)
1609         */
1610        public Contract addFriendly(Friendly theValue) {
1611                if (theValue == null) {
1612                        throw new NullPointerException("theValue must not be null");
1613                }
1614                getFriendly().add(theValue);
1615                return this;
1616        }
1617
1618        /**
1619         * Gets the first repetition for <b>friendly</b> (),
1620         * creating it if it does not already exist.
1621         *
1622     * <p>
1623     * <b>Definition:</b>
1624     * The \&quot;patient friendly language\&quot; versionof the Contract in whole or in parts. \&quot;Patient friendly language\&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
1625     * </p> 
1626         */
1627        public Friendly getFriendlyFirstRep() {
1628                if (getFriendly().isEmpty()) {
1629                        return addFriendly();
1630                }
1631                return getFriendly().get(0); 
1632        }
1633  
1634        /**
1635         * Gets the value(s) for <b>legal</b> ().
1636         * creating it if it does
1637         * not exist. Will not return <code>null</code>.
1638         *
1639     * <p>
1640     * <b>Definition:</b>
1641     * List of Legal expressions or representations of this Contract.
1642     * </p> 
1643         */
1644        public java.util.List<Legal> getLegal() {  
1645                if (myLegal == null) {
1646                        myLegal = new java.util.ArrayList<Legal>();
1647                }
1648                return myLegal;
1649        }
1650
1651        /**
1652         * Sets the value(s) for <b>legal</b> ()
1653         *
1654     * <p>
1655     * <b>Definition:</b>
1656     * List of Legal expressions or representations of this Contract.
1657     * </p> 
1658         */
1659        public Contract setLegal(java.util.List<Legal> theValue) {
1660                myLegal = theValue;
1661                return this;
1662        }
1663        
1664        
1665
1666        /**
1667         * Adds and returns a new value for <b>legal</b> ()
1668         *
1669     * <p>
1670     * <b>Definition:</b>
1671     * List of Legal expressions or representations of this Contract.
1672     * </p> 
1673         */
1674        public Legal addLegal() {
1675                Legal newType = new Legal();
1676                getLegal().add(newType);
1677                return newType; 
1678        }
1679
1680        /**
1681         * Adds a given new value for <b>legal</b> ()
1682         *
1683         * <p>
1684         * <b>Definition:</b>
1685         * List of Legal expressions or representations of this Contract.
1686         * </p>
1687         * @param theValue The legal to add (must not be <code>null</code>)
1688         */
1689        public Contract addLegal(Legal theValue) {
1690                if (theValue == null) {
1691                        throw new NullPointerException("theValue must not be null");
1692                }
1693                getLegal().add(theValue);
1694                return this;
1695        }
1696
1697        /**
1698         * Gets the first repetition for <b>legal</b> (),
1699         * creating it if it does not already exist.
1700         *
1701     * <p>
1702     * <b>Definition:</b>
1703     * List of Legal expressions or representations of this Contract.
1704     * </p> 
1705         */
1706        public Legal getLegalFirstRep() {
1707                if (getLegal().isEmpty()) {
1708                        return addLegal();
1709                }
1710                return getLegal().get(0); 
1711        }
1712  
1713        /**
1714         * Gets the value(s) for <b>rule</b> ().
1715         * creating it if it does
1716         * not exist. Will not return <code>null</code>.
1717         *
1718     * <p>
1719     * <b>Definition:</b>
1720     * List of Computable Policy Rule Language Representations of this Contract.
1721     * </p> 
1722         */
1723        public java.util.List<Rule> getRule() {  
1724                if (myRule == null) {
1725                        myRule = new java.util.ArrayList<Rule>();
1726                }
1727                return myRule;
1728        }
1729
1730        /**
1731         * Sets the value(s) for <b>rule</b> ()
1732         *
1733     * <p>
1734     * <b>Definition:</b>
1735     * List of Computable Policy Rule Language Representations of this Contract.
1736     * </p> 
1737         */
1738        public Contract setRule(java.util.List<Rule> theValue) {
1739                myRule = theValue;
1740                return this;
1741        }
1742        
1743        
1744
1745        /**
1746         * Adds and returns a new value for <b>rule</b> ()
1747         *
1748     * <p>
1749     * <b>Definition:</b>
1750     * List of Computable Policy Rule Language Representations of this Contract.
1751     * </p> 
1752         */
1753        public Rule addRule() {
1754                Rule newType = new Rule();
1755                getRule().add(newType);
1756                return newType; 
1757        }
1758
1759        /**
1760         * Adds a given new value for <b>rule</b> ()
1761         *
1762         * <p>
1763         * <b>Definition:</b>
1764         * List of Computable Policy Rule Language Representations of this Contract.
1765         * </p>
1766         * @param theValue The rule to add (must not be <code>null</code>)
1767         */
1768        public Contract addRule(Rule theValue) {
1769                if (theValue == null) {
1770                        throw new NullPointerException("theValue must not be null");
1771                }
1772                getRule().add(theValue);
1773                return this;
1774        }
1775
1776        /**
1777         * Gets the first repetition for <b>rule</b> (),
1778         * creating it if it does not already exist.
1779         *
1780     * <p>
1781     * <b>Definition:</b>
1782     * List of Computable Policy Rule Language Representations of this Contract.
1783     * </p> 
1784         */
1785        public Rule getRuleFirstRep() {
1786                if (getRule().isEmpty()) {
1787                        return addRule();
1788                }
1789                return getRule().get(0); 
1790        }
1791  
1792        /**
1793         * Block class for child element: <b>Contract.actor</b> ()
1794         *
1795     * <p>
1796     * <b>Definition:</b>
1797     * List of Contract actors
1798     * </p> 
1799         */
1800        @Block()        
1801        public static class Actor 
1802            extends  BaseIdentifiableElement        implements IResourceBlock {
1803        
1804        @Child(name="entity", order=0, min=1, max=1, summary=false, modifier=false, type={
1805                ca.uhn.fhir.model.dstu2.resource.Contract.class,                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Location.class,                ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Substance.class        })
1806        @Description(
1807                shortDefinition="",
1808                formalDefinition="Who or what actors are assigned roles in this Contract."
1809        )
1810        private ResourceReferenceDt myEntity;
1811        
1812        @Child(name="role", type=CodeableConceptDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
1813        @Description(
1814                shortDefinition="",
1815                formalDefinition="Role type of actors assigned roles in this Contract."
1816        )
1817        private java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> myRole;
1818        
1819
1820        @Override
1821        public boolean isEmpty() {
1822                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEntity,  myRole);
1823        }
1824        
1825        @Override
1826        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1827                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEntity, myRole);
1828        }
1829
1830        /**
1831         * Gets the value(s) for <b>entity</b> ().
1832         * creating it if it does
1833         * not exist. Will not return <code>null</code>.
1834         *
1835     * <p>
1836     * <b>Definition:</b>
1837     * Who or what actors are assigned roles in this Contract.
1838     * </p> 
1839         */
1840        public ResourceReferenceDt getEntity() {  
1841                if (myEntity == null) {
1842                        myEntity = new ResourceReferenceDt();
1843                }
1844                return myEntity;
1845        }
1846
1847        /**
1848         * Sets the value(s) for <b>entity</b> ()
1849         *
1850     * <p>
1851     * <b>Definition:</b>
1852     * Who or what actors are assigned roles in this Contract.
1853     * </p> 
1854         */
1855        public Actor setEntity(ResourceReferenceDt theValue) {
1856                myEntity = theValue;
1857                return this;
1858        }
1859        
1860        
1861
1862  
1863        /**
1864         * Gets the value(s) for <b>role</b> ().
1865         * creating it if it does
1866         * not exist. Will not return <code>null</code>.
1867         *
1868     * <p>
1869     * <b>Definition:</b>
1870     * Role type of actors assigned roles in this Contract.
1871     * </p> 
1872         */
1873        public java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> getRole() {  
1874                if (myRole == null) {
1875                        myRole = new java.util.ArrayList<BoundCodeableConceptDt<ContractActorRoleCodesEnum>>();
1876                }
1877                return myRole;
1878        }
1879
1880        /**
1881         * Sets the value(s) for <b>role</b> ()
1882         *
1883     * <p>
1884     * <b>Definition:</b>
1885     * Role type of actors assigned roles in this Contract.
1886     * </p> 
1887         */
1888        public Actor setRole(java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> theValue) {
1889                myRole = theValue;
1890                return this;
1891        }
1892        
1893        
1894
1895        /**
1896         * Add a value for <b>role</b> () using an enumerated type. This
1897         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1898         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1899         * you may also use the {@link #addRole()} method.
1900         *
1901     * <p>
1902     * <b>Definition:</b>
1903     * Role type of actors assigned roles in this Contract.
1904     * </p> 
1905         */
1906        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> addRole(ContractActorRoleCodesEnum theValue) {
1907                BoundCodeableConceptDt<ContractActorRoleCodesEnum> retVal = new BoundCodeableConceptDt<ContractActorRoleCodesEnum>(ContractActorRoleCodesEnum.VALUESET_BINDER, theValue);
1908                getRole().add(retVal);
1909                return retVal;
1910        }
1911
1912        /**
1913         * Gets the first repetition for <b>role</b> (),
1914         * creating it if it does not already exist.
1915         *
1916     * <p>
1917     * <b>Definition:</b>
1918     * Role type of actors assigned roles in this Contract.
1919     * </p> 
1920         */
1921        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> getRoleFirstRep() {
1922                if (getRole().size() == 0) {
1923                        addRole();
1924                }
1925                return getRole().get(0);
1926        }
1927
1928        /**
1929         * Add a value for <b>role</b> ()
1930         *
1931     * <p>
1932     * <b>Definition:</b>
1933     * Role type of actors assigned roles in this Contract.
1934     * </p> 
1935         */
1936        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> addRole() {
1937                BoundCodeableConceptDt<ContractActorRoleCodesEnum> retVal = new BoundCodeableConceptDt<ContractActorRoleCodesEnum>(ContractActorRoleCodesEnum.VALUESET_BINDER);
1938                getRole().add(retVal);
1939                return retVal;
1940        }
1941
1942        /**
1943         * Sets the value(s), and clears any existing value(s) for <b>role</b> ()
1944         *
1945     * <p>
1946     * <b>Definition:</b>
1947     * Role type of actors assigned roles in this Contract.
1948     * </p> 
1949         */
1950        public Actor setRole(ContractActorRoleCodesEnum theValue) {
1951                getRole().clear();
1952                addRole(theValue);
1953                return this;
1954        }
1955
1956  
1957
1958
1959        }
1960
1961
1962        /**
1963         * Block class for child element: <b>Contract.valuedItem</b> ()
1964         *
1965     * <p>
1966     * <b>Definition:</b>
1967     * Contract Valued Item List
1968     * </p> 
1969         */
1970        @Block()        
1971        public static class ValuedItem 
1972            extends  BaseIdentifiableElement        implements IResourceBlock {
1973        
1974        @Child(name="entity", order=0, min=0, max=1, summary=false, modifier=false, type={
1975                CodeableConceptDt.class,                IResource.class })
1976        @Description(
1977                shortDefinition="",
1978                formalDefinition="Specific type of Contract Valued Item that may be priced."
1979        )
1980        private IDatatype myEntity;
1981        
1982        @Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
1983        @Description(
1984                shortDefinition="",
1985                formalDefinition="Identifies a Contract Valued Item instance."
1986        )
1987        private IdentifierDt myIdentifier;
1988        
1989        @Child(name="effectiveTime", type=DateTimeDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
1990        @Description(
1991                shortDefinition="",
1992                formalDefinition="Indicates the time during which this Contract ValuedItem information is effective."
1993        )
1994        private DateTimeDt myEffectiveTime;
1995        
1996        @Child(name="quantity", type=SimpleQuantityDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
1997        @Description(
1998                shortDefinition="",
1999                formalDefinition="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances."
2000        )
2001        private SimpleQuantityDt myQuantity;
2002        
2003        @Child(name="unitPrice", type=MoneyDt.class, order=4, min=0, max=1, summary=false, modifier=false)      
2004        @Description(
2005                shortDefinition="",
2006                formalDefinition="A Contract Valued Item unit valuation measure."
2007        )
2008        private MoneyDt myUnitPrice;
2009        
2010        @Child(name="factor", type=DecimalDt.class, order=5, min=0, max=1, summary=false, modifier=false)       
2011        @Description(
2012                shortDefinition="",
2013                formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
2014        )
2015        private DecimalDt myFactor;
2016        
2017        @Child(name="points", type=DecimalDt.class, order=6, min=0, max=1, summary=false, modifier=false)       
2018        @Description(
2019                shortDefinition="",
2020                formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point."
2021        )
2022        private DecimalDt myPoints;
2023        
2024        @Child(name="net", type=MoneyDt.class, order=7, min=0, max=1, summary=false, modifier=false)    
2025        @Description(
2026                shortDefinition="",
2027                formalDefinition="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied."
2028        )
2029        private MoneyDt myNet;
2030        
2031
2032        @Override
2033        public boolean isEmpty() {
2034                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEntity,  myIdentifier,  myEffectiveTime,  myQuantity,  myUnitPrice,  myFactor,  myPoints,  myNet);
2035        }
2036        
2037        @Override
2038        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2039                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEntity, myIdentifier, myEffectiveTime, myQuantity, myUnitPrice, myFactor, myPoints, myNet);
2040        }
2041
2042        /**
2043         * Gets the value(s) for <b>entity[x]</b> ().
2044         * creating it if it does
2045         * not exist. Will not return <code>null</code>.
2046         *
2047     * <p>
2048     * <b>Definition:</b>
2049     * Specific type of Contract Valued Item that may be priced.
2050     * </p> 
2051         */
2052        public IDatatype getEntity() {  
2053                return myEntity;
2054        }
2055
2056        /**
2057         * Sets the value(s) for <b>entity[x]</b> ()
2058         *
2059     * <p>
2060     * <b>Definition:</b>
2061     * Specific type of Contract Valued Item that may be priced.
2062     * </p> 
2063         */
2064        public ValuedItem setEntity(IDatatype theValue) {
2065                myEntity = theValue;
2066                return this;
2067        }
2068        
2069        
2070
2071  
2072        /**
2073         * Gets the value(s) for <b>identifier</b> ().
2074         * creating it if it does
2075         * not exist. Will not return <code>null</code>.
2076         *
2077     * <p>
2078     * <b>Definition:</b>
2079     * Identifies a Contract Valued Item instance.
2080     * </p> 
2081         */
2082        public IdentifierDt getIdentifier() {  
2083                if (myIdentifier == null) {
2084                        myIdentifier = new IdentifierDt();
2085                }
2086                return myIdentifier;
2087        }
2088
2089        /**
2090         * Sets the value(s) for <b>identifier</b> ()
2091         *
2092     * <p>
2093     * <b>Definition:</b>
2094     * Identifies a Contract Valued Item instance.
2095     * </p> 
2096         */
2097        public ValuedItem setIdentifier(IdentifierDt theValue) {
2098                myIdentifier = theValue;
2099                return this;
2100        }
2101        
2102        
2103
2104  
2105        /**
2106         * Gets the value(s) for <b>effectiveTime</b> ().
2107         * creating it if it does
2108         * not exist. Will not return <code>null</code>.
2109         *
2110     * <p>
2111     * <b>Definition:</b>
2112     * Indicates the time during which this Contract ValuedItem information is effective.
2113     * </p> 
2114         */
2115        public DateTimeDt getEffectiveTimeElement() {  
2116                if (myEffectiveTime == null) {
2117                        myEffectiveTime = new DateTimeDt();
2118                }
2119                return myEffectiveTime;
2120        }
2121
2122        
2123        /**
2124         * Gets the value(s) for <b>effectiveTime</b> ().
2125         * creating it if it does
2126         * not exist. Will not return <code>null</code>.
2127         *
2128     * <p>
2129     * <b>Definition:</b>
2130     * Indicates the time during which this Contract ValuedItem information is effective.
2131     * </p> 
2132         */
2133        public Date getEffectiveTime() {  
2134                return getEffectiveTimeElement().getValue();
2135        }
2136
2137        /**
2138         * Sets the value(s) for <b>effectiveTime</b> ()
2139         *
2140     * <p>
2141     * <b>Definition:</b>
2142     * Indicates the time during which this Contract ValuedItem information is effective.
2143     * </p> 
2144         */
2145        public ValuedItem setEffectiveTime(DateTimeDt theValue) {
2146                myEffectiveTime = theValue;
2147                return this;
2148        }
2149        
2150        
2151
2152        /**
2153         * Sets the value for <b>effectiveTime</b> ()
2154         *
2155     * <p>
2156     * <b>Definition:</b>
2157     * Indicates the time during which this Contract ValuedItem information is effective.
2158     * </p> 
2159         */
2160        public ValuedItem setEffectiveTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
2161                myEffectiveTime = new DateTimeDt(theDate, thePrecision); 
2162                return this; 
2163        }
2164
2165        /**
2166         * Sets the value for <b>effectiveTime</b> ()
2167         *
2168     * <p>
2169     * <b>Definition:</b>
2170     * Indicates the time during which this Contract ValuedItem information is effective.
2171     * </p> 
2172         */
2173        public ValuedItem setEffectiveTimeWithSecondsPrecision( Date theDate) {
2174                myEffectiveTime = new DateTimeDt(theDate); 
2175                return this; 
2176        }
2177
2178 
2179        /**
2180         * Gets the value(s) for <b>quantity</b> ().
2181         * creating it if it does
2182         * not exist. Will not return <code>null</code>.
2183         *
2184     * <p>
2185     * <b>Definition:</b>
2186     * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.
2187     * </p> 
2188         */
2189        public SimpleQuantityDt getQuantity() {  
2190                if (myQuantity == null) {
2191                        myQuantity = new SimpleQuantityDt();
2192                }
2193                return myQuantity;
2194        }
2195
2196        /**
2197         * Sets the value(s) for <b>quantity</b> ()
2198         *
2199     * <p>
2200     * <b>Definition:</b>
2201     * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.
2202     * </p> 
2203         */
2204        public ValuedItem setQuantity(SimpleQuantityDt theValue) {
2205                myQuantity = theValue;
2206                return this;
2207        }
2208        
2209        
2210
2211  
2212        /**
2213         * Gets the value(s) for <b>unitPrice</b> ().
2214         * creating it if it does
2215         * not exist. Will not return <code>null</code>.
2216         *
2217     * <p>
2218     * <b>Definition:</b>
2219     * A Contract Valued Item unit valuation measure.
2220     * </p> 
2221         */
2222        public MoneyDt getUnitPrice() {  
2223                if (myUnitPrice == null) {
2224                        myUnitPrice = new MoneyDt();
2225                }
2226                return myUnitPrice;
2227        }
2228
2229        /**
2230         * Sets the value(s) for <b>unitPrice</b> ()
2231         *
2232     * <p>
2233     * <b>Definition:</b>
2234     * A Contract Valued Item unit valuation measure.
2235     * </p> 
2236         */
2237        public ValuedItem setUnitPrice(MoneyDt theValue) {
2238                myUnitPrice = theValue;
2239                return this;
2240        }
2241        
2242        
2243
2244  
2245        /**
2246         * Gets the value(s) for <b>factor</b> ().
2247         * creating it if it does
2248         * not exist. Will not return <code>null</code>.
2249         *
2250     * <p>
2251     * <b>Definition:</b>
2252     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2253     * </p> 
2254         */
2255        public DecimalDt getFactorElement() {  
2256                if (myFactor == null) {
2257                        myFactor = new DecimalDt();
2258                }
2259                return myFactor;
2260        }
2261
2262        
2263        /**
2264         * Gets the value(s) for <b>factor</b> ().
2265         * creating it if it does
2266         * not exist. Will not return <code>null</code>.
2267         *
2268     * <p>
2269     * <b>Definition:</b>
2270     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2271     * </p> 
2272         */
2273        public BigDecimal getFactor() {  
2274                return getFactorElement().getValue();
2275        }
2276
2277        /**
2278         * Sets the value(s) for <b>factor</b> ()
2279         *
2280     * <p>
2281     * <b>Definition:</b>
2282     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2283     * </p> 
2284         */
2285        public ValuedItem setFactor(DecimalDt theValue) {
2286                myFactor = theValue;
2287                return this;
2288        }
2289        
2290        
2291
2292        /**
2293         * Sets the value for <b>factor</b> ()
2294         *
2295     * <p>
2296     * <b>Definition:</b>
2297     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2298     * </p> 
2299         */
2300        public ValuedItem setFactor( long theValue) {
2301                myFactor = new DecimalDt(theValue); 
2302                return this; 
2303        }
2304
2305        /**
2306         * Sets the value for <b>factor</b> ()
2307         *
2308     * <p>
2309     * <b>Definition:</b>
2310     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2311     * </p> 
2312         */
2313        public ValuedItem setFactor( double theValue) {
2314                myFactor = new DecimalDt(theValue); 
2315                return this; 
2316        }
2317
2318        /**
2319         * Sets the value for <b>factor</b> ()
2320         *
2321     * <p>
2322     * <b>Definition:</b>
2323     * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
2324     * </p> 
2325         */
2326        public ValuedItem setFactor( java.math.BigDecimal theValue) {
2327                myFactor = new DecimalDt(theValue); 
2328                return this; 
2329        }
2330
2331 
2332        /**
2333         * Gets the value(s) for <b>points</b> ().
2334         * creating it if it does
2335         * not exist. Will not return <code>null</code>.
2336         *
2337     * <p>
2338     * <b>Definition:</b>
2339     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2340     * </p> 
2341         */
2342        public DecimalDt getPointsElement() {  
2343                if (myPoints == null) {
2344                        myPoints = new DecimalDt();
2345                }
2346                return myPoints;
2347        }
2348
2349        
2350        /**
2351         * Gets the value(s) for <b>points</b> ().
2352         * creating it if it does
2353         * not exist. Will not return <code>null</code>.
2354         *
2355     * <p>
2356     * <b>Definition:</b>
2357     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2358     * </p> 
2359         */
2360        public BigDecimal getPoints() {  
2361                return getPointsElement().getValue();
2362        }
2363
2364        /**
2365         * Sets the value(s) for <b>points</b> ()
2366         *
2367     * <p>
2368     * <b>Definition:</b>
2369     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2370     * </p> 
2371         */
2372        public ValuedItem setPoints(DecimalDt theValue) {
2373                myPoints = theValue;
2374                return this;
2375        }
2376        
2377        
2378
2379        /**
2380         * Sets the value for <b>points</b> ()
2381         *
2382     * <p>
2383     * <b>Definition:</b>
2384     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2385     * </p> 
2386         */
2387        public ValuedItem setPoints( long theValue) {
2388                myPoints = new DecimalDt(theValue); 
2389                return this; 
2390        }
2391
2392        /**
2393         * Sets the value for <b>points</b> ()
2394         *
2395     * <p>
2396     * <b>Definition:</b>
2397     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2398     * </p> 
2399         */
2400        public ValuedItem setPoints( double theValue) {
2401                myPoints = new DecimalDt(theValue); 
2402                return this; 
2403        }
2404
2405        /**
2406         * Sets the value for <b>points</b> ()
2407         *
2408     * <p>
2409     * <b>Definition:</b>
2410     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.
2411     * </p> 
2412         */
2413        public ValuedItem setPoints( java.math.BigDecimal theValue) {
2414                myPoints = new DecimalDt(theValue); 
2415                return this; 
2416        }
2417
2418 
2419        /**
2420         * Gets the value(s) for <b>net</b> ().
2421         * creating it if it does
2422         * not exist. Will not return <code>null</code>.
2423         *
2424     * <p>
2425     * <b>Definition:</b>
2426     * Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.
2427     * </p> 
2428         */
2429        public MoneyDt getNet() {  
2430                if (myNet == null) {
2431                        myNet = new MoneyDt();
2432                }
2433                return myNet;
2434        }
2435
2436        /**
2437         * Sets the value(s) for <b>net</b> ()
2438         *
2439     * <p>
2440     * <b>Definition:</b>
2441     * Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.
2442     * </p> 
2443         */
2444        public ValuedItem setNet(MoneyDt theValue) {
2445                myNet = theValue;
2446                return this;
2447        }
2448        
2449        
2450
2451  
2452
2453
2454        }
2455
2456
2457        /**
2458         * Block class for child element: <b>Contract.signer</b> ()
2459         *
2460     * <p>
2461     * <b>Definition:</b>
2462     * Party signing this Contract.
2463     * </p> 
2464         */
2465        @Block()        
2466        public static class Signer 
2467            extends  BaseIdentifiableElement        implements IResourceBlock {
2468        
2469        @Child(name="type", type=CodingDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
2470        @Description(
2471                shortDefinition="",
2472                formalDefinition="Role of this Contract signer, e.g. notary, grantee."
2473        )
2474        private CodingDt myType;
2475        
2476        @Child(name="party", order=1, min=1, max=1, summary=false, modifier=false, type={
2477                ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
2478        @Description(
2479                shortDefinition="",
2480                formalDefinition="Party which is a signator to this Contract."
2481        )
2482        private ResourceReferenceDt myParty;
2483        
2484        @Child(name="signature", type=StringDt.class, order=2, min=1, max=1, summary=false, modifier=false)     
2485        @Description(
2486                shortDefinition="",
2487                formalDefinition="Legally binding Contract DSIG signature contents in Base64."
2488        )
2489        private StringDt mySignature;
2490        
2491
2492        @Override
2493        public boolean isEmpty() {
2494                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myParty,  mySignature);
2495        }
2496        
2497        @Override
2498        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2499                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myParty, mySignature);
2500        }
2501
2502        /**
2503         * Gets the value(s) for <b>type</b> ().
2504         * creating it if it does
2505         * not exist. Will not return <code>null</code>.
2506         *
2507     * <p>
2508     * <b>Definition:</b>
2509     * Role of this Contract signer, e.g. notary, grantee.
2510     * </p> 
2511         */
2512        public CodingDt getType() {  
2513                if (myType == null) {
2514                        myType = new CodingDt();
2515                }
2516                return myType;
2517        }
2518
2519        /**
2520         * Sets the value(s) for <b>type</b> ()
2521         *
2522     * <p>
2523     * <b>Definition:</b>
2524     * Role of this Contract signer, e.g. notary, grantee.
2525     * </p> 
2526         */
2527        public Signer setType(CodingDt theValue) {
2528                myType = theValue;
2529                return this;
2530        }
2531        
2532        
2533
2534  
2535        /**
2536         * Gets the value(s) for <b>party</b> ().
2537         * creating it if it does
2538         * not exist. Will not return <code>null</code>.
2539         *
2540     * <p>
2541     * <b>Definition:</b>
2542     * Party which is a signator to this Contract.
2543     * </p> 
2544         */
2545        public ResourceReferenceDt getParty() {  
2546                if (myParty == null) {
2547                        myParty = new ResourceReferenceDt();
2548                }
2549                return myParty;
2550        }
2551
2552        /**
2553         * Sets the value(s) for <b>party</b> ()
2554         *
2555     * <p>
2556     * <b>Definition:</b>
2557     * Party which is a signator to this Contract.
2558     * </p> 
2559         */
2560        public Signer setParty(ResourceReferenceDt theValue) {
2561                myParty = theValue;
2562                return this;
2563        }
2564        
2565        
2566
2567  
2568        /**
2569         * Gets the value(s) for <b>signature</b> ().
2570         * creating it if it does
2571         * not exist. Will not return <code>null</code>.
2572         *
2573     * <p>
2574     * <b>Definition:</b>
2575     * Legally binding Contract DSIG signature contents in Base64.
2576     * </p> 
2577         */
2578        public StringDt getSignatureElement() {  
2579                if (mySignature == null) {
2580                        mySignature = new StringDt();
2581                }
2582                return mySignature;
2583        }
2584
2585        
2586        /**
2587         * Gets the value(s) for <b>signature</b> ().
2588         * creating it if it does
2589         * not exist. Will not return <code>null</code>.
2590         *
2591     * <p>
2592     * <b>Definition:</b>
2593     * Legally binding Contract DSIG signature contents in Base64.
2594     * </p> 
2595         */
2596        public String getSignature() {  
2597                return getSignatureElement().getValue();
2598        }
2599
2600        /**
2601         * Sets the value(s) for <b>signature</b> ()
2602         *
2603     * <p>
2604     * <b>Definition:</b>
2605     * Legally binding Contract DSIG signature contents in Base64.
2606     * </p> 
2607         */
2608        public Signer setSignature(StringDt theValue) {
2609                mySignature = theValue;
2610                return this;
2611        }
2612        
2613        
2614
2615        /**
2616         * Sets the value for <b>signature</b> ()
2617         *
2618     * <p>
2619     * <b>Definition:</b>
2620     * Legally binding Contract DSIG signature contents in Base64.
2621     * </p> 
2622         */
2623        public Signer setSignature( String theString) {
2624                mySignature = new StringDt(theString); 
2625                return this; 
2626        }
2627
2628 
2629
2630
2631        }
2632
2633
2634        /**
2635         * Block class for child element: <b>Contract.term</b> ()
2636         *
2637     * <p>
2638     * <b>Definition:</b>
2639     * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.
2640     * </p> 
2641         */
2642        @Block()        
2643        public static class Term 
2644            extends  BaseIdentifiableElement        implements IResourceBlock {
2645        
2646        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
2647        @Description(
2648                shortDefinition="",
2649                formalDefinition="Unique identifier for this particular Contract Provision."
2650        )
2651        private IdentifierDt myIdentifier;
2652        
2653        @Child(name="issued", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false)       
2654        @Description(
2655                shortDefinition="",
2656                formalDefinition="When this Contract Provision was issued."
2657        )
2658        private DateTimeDt myIssued;
2659        
2660        @Child(name="applies", type=PeriodDt.class, order=2, min=0, max=1, summary=true, modifier=false)        
2661        @Description(
2662                shortDefinition="",
2663                formalDefinition="Relevant time or time-period when this Contract Provision is applicable."
2664        )
2665        private PeriodDt myApplies;
2666        
2667        @Child(name="type", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=false, modifier=false) 
2668        @Description(
2669                shortDefinition="",
2670                formalDefinition="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit."
2671        )
2672        private BoundCodeableConceptDt<ContractTermTypeCodesEnum> myType;
2673        
2674        @Child(name="subType", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false)      
2675        @Description(
2676                shortDefinition="",
2677                formalDefinition="Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment."
2678        )
2679        private CodeableConceptDt mySubType;
2680        
2681        @Child(name="subject", order=5, min=0, max=1, summary=false, modifier=false, type={
2682                IResource.class })
2683        @Description(
2684                shortDefinition="",
2685                formalDefinition="Who or what this Contract Provision is about."
2686        )
2687        private ResourceReferenceDt mySubject;
2688        
2689        @Child(name="action", type=CodeableConceptDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
2690        @Description(
2691                shortDefinition="",
2692                formalDefinition="Action stipulated by this Contract Provision."
2693        )
2694        private java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> myAction;
2695        
2696        @Child(name="actionReason", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
2697        @Description(
2698                shortDefinition="",
2699                formalDefinition="Reason or purpose for the action stipulated by this Contract Provision."
2700        )
2701        private java.util.List<CodeableConceptDt> myActionReason;
2702        
2703        @Child(name="actor", order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
2704        @Description(
2705                shortDefinition="",
2706                formalDefinition="List of actors participating in this Contract Provision."
2707        )
2708        private java.util.List<TermActor> myActor;
2709        
2710        @Child(name="text", type=StringDt.class, order=9, min=0, max=1, summary=false, modifier=false)  
2711        @Description(
2712                shortDefinition="",
2713                formalDefinition="Human readable form of this Contract Provision."
2714        )
2715        private StringDt myText;
2716        
2717        @Child(name="valuedItem", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
2718        @Description(
2719                shortDefinition="",
2720                formalDefinition="Contract Provision Valued Item List"
2721        )
2722        private java.util.List<TermValuedItem> myValuedItem;
2723        
2724        @Child(name="group", type=Term.class, order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
2725        @Description(
2726                shortDefinition="",
2727                formalDefinition="Nested group of Contract Provisions."
2728        )
2729        private java.util.List<Term> myGroup;
2730        
2731
2732        @Override
2733        public boolean isEmpty() {
2734                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myIssued,  myApplies,  myType,  mySubType,  mySubject,  myAction,  myActionReason,  myActor,  myText,  myValuedItem,  myGroup);
2735        }
2736        
2737        @Override
2738        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2739                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myIssued, myApplies, myType, mySubType, mySubject, myAction, myActionReason, myActor, myText, myValuedItem, myGroup);
2740        }
2741
2742        /**
2743         * Gets the value(s) for <b>identifier</b> ().
2744         * creating it if it does
2745         * not exist. Will not return <code>null</code>.
2746         *
2747     * <p>
2748     * <b>Definition:</b>
2749     * Unique identifier for this particular Contract Provision.
2750     * </p> 
2751         */
2752        public IdentifierDt getIdentifier() {  
2753                if (myIdentifier == null) {
2754                        myIdentifier = new IdentifierDt();
2755                }
2756                return myIdentifier;
2757        }
2758
2759        /**
2760         * Sets the value(s) for <b>identifier</b> ()
2761         *
2762     * <p>
2763     * <b>Definition:</b>
2764     * Unique identifier for this particular Contract Provision.
2765     * </p> 
2766         */
2767        public Term setIdentifier(IdentifierDt theValue) {
2768                myIdentifier = theValue;
2769                return this;
2770        }
2771        
2772        
2773
2774  
2775        /**
2776         * Gets the value(s) for <b>issued</b> ().
2777         * creating it if it does
2778         * not exist. Will not return <code>null</code>.
2779         *
2780     * <p>
2781     * <b>Definition:</b>
2782     * When this Contract Provision was issued.
2783     * </p> 
2784         */
2785        public DateTimeDt getIssuedElement() {  
2786                if (myIssued == null) {
2787                        myIssued = new DateTimeDt();
2788                }
2789                return myIssued;
2790        }
2791
2792        
2793        /**
2794         * Gets the value(s) for <b>issued</b> ().
2795         * creating it if it does
2796         * not exist. Will not return <code>null</code>.
2797         *
2798     * <p>
2799     * <b>Definition:</b>
2800     * When this Contract Provision was issued.
2801     * </p> 
2802         */
2803        public Date getIssued() {  
2804                return getIssuedElement().getValue();
2805        }
2806
2807        /**
2808         * Sets the value(s) for <b>issued</b> ()
2809         *
2810     * <p>
2811     * <b>Definition:</b>
2812     * When this Contract Provision was issued.
2813     * </p> 
2814         */
2815        public Term setIssued(DateTimeDt theValue) {
2816                myIssued = theValue;
2817                return this;
2818        }
2819        
2820        
2821
2822        /**
2823         * Sets the value for <b>issued</b> ()
2824         *
2825     * <p>
2826     * <b>Definition:</b>
2827     * When this Contract Provision was issued.
2828     * </p> 
2829         */
2830        public Term setIssued( Date theDate,  TemporalPrecisionEnum thePrecision) {
2831                myIssued = new DateTimeDt(theDate, thePrecision); 
2832                return this; 
2833        }
2834
2835        /**
2836         * Sets the value for <b>issued</b> ()
2837         *
2838     * <p>
2839     * <b>Definition:</b>
2840     * When this Contract Provision was issued.
2841     * </p> 
2842         */
2843        public Term setIssuedWithSecondsPrecision( Date theDate) {
2844                myIssued = new DateTimeDt(theDate); 
2845                return this; 
2846        }
2847
2848 
2849        /**
2850         * Gets the value(s) for <b>applies</b> ().
2851         * creating it if it does
2852         * not exist. Will not return <code>null</code>.
2853         *
2854     * <p>
2855     * <b>Definition:</b>
2856     * Relevant time or time-period when this Contract Provision is applicable.
2857     * </p> 
2858         */
2859        public PeriodDt getApplies() {  
2860                if (myApplies == null) {
2861                        myApplies = new PeriodDt();
2862                }
2863                return myApplies;
2864        }
2865
2866        /**
2867         * Sets the value(s) for <b>applies</b> ()
2868         *
2869     * <p>
2870     * <b>Definition:</b>
2871     * Relevant time or time-period when this Contract Provision is applicable.
2872     * </p> 
2873         */
2874        public Term setApplies(PeriodDt theValue) {
2875                myApplies = theValue;
2876                return this;
2877        }
2878        
2879        
2880
2881  
2882        /**
2883         * Gets the value(s) for <b>type</b> ().
2884         * creating it if it does
2885         * not exist. Will not return <code>null</code>.
2886         *
2887     * <p>
2888     * <b>Definition:</b>
2889     * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.
2890     * </p> 
2891         */
2892        public BoundCodeableConceptDt<ContractTermTypeCodesEnum> getType() {  
2893                if (myType == null) {
2894                        myType = new BoundCodeableConceptDt<ContractTermTypeCodesEnum>(ContractTermTypeCodesEnum.VALUESET_BINDER);
2895                }
2896                return myType;
2897        }
2898
2899        /**
2900         * Sets the value(s) for <b>type</b> ()
2901         *
2902     * <p>
2903     * <b>Definition:</b>
2904     * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.
2905     * </p> 
2906         */
2907        public Term setType(BoundCodeableConceptDt<ContractTermTypeCodesEnum> theValue) {
2908                myType = theValue;
2909                return this;
2910        }
2911        
2912        
2913
2914        /**
2915         * Sets the value(s) for <b>type</b> ()
2916         *
2917     * <p>
2918     * <b>Definition:</b>
2919     * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.
2920     * </p> 
2921         */
2922        public Term setType(ContractTermTypeCodesEnum theValue) {
2923                setType(new BoundCodeableConceptDt<ContractTermTypeCodesEnum>(ContractTermTypeCodesEnum.VALUESET_BINDER, theValue));
2924                
2925/*
2926                getType().setValueAsEnum(theValue);
2927*/
2928                return this;
2929        }
2930
2931  
2932        /**
2933         * Gets the value(s) for <b>subType</b> ().
2934         * creating it if it does
2935         * not exist. Will not return <code>null</code>.
2936         *
2937     * <p>
2938     * <b>Definition:</b>
2939     * Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.
2940     * </p> 
2941         */
2942        public CodeableConceptDt getSubType() {  
2943                if (mySubType == null) {
2944                        mySubType = new CodeableConceptDt();
2945                }
2946                return mySubType;
2947        }
2948
2949        /**
2950         * Sets the value(s) for <b>subType</b> ()
2951         *
2952     * <p>
2953     * <b>Definition:</b>
2954     * Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.
2955     * </p> 
2956         */
2957        public Term setSubType(CodeableConceptDt theValue) {
2958                mySubType = theValue;
2959                return this;
2960        }
2961        
2962        
2963
2964  
2965        /**
2966         * Gets the value(s) for <b>subject</b> ().
2967         * creating it if it does
2968         * not exist. Will not return <code>null</code>.
2969         *
2970     * <p>
2971     * <b>Definition:</b>
2972     * Who or what this Contract Provision is about.
2973     * </p> 
2974         */
2975        public ResourceReferenceDt getSubject() {  
2976                if (mySubject == null) {
2977                        mySubject = new ResourceReferenceDt();
2978                }
2979                return mySubject;
2980        }
2981
2982        /**
2983         * Sets the value(s) for <b>subject</b> ()
2984         *
2985     * <p>
2986     * <b>Definition:</b>
2987     * Who or what this Contract Provision is about.
2988     * </p> 
2989         */
2990        public Term setSubject(ResourceReferenceDt theValue) {
2991                mySubject = theValue;
2992                return this;
2993        }
2994        
2995        
2996
2997  
2998        /**
2999         * Gets the value(s) for <b>action</b> ().
3000         * creating it if it does
3001         * not exist. Will not return <code>null</code>.
3002         *
3003     * <p>
3004     * <b>Definition:</b>
3005     * Action stipulated by this Contract Provision.
3006     * </p> 
3007         */
3008        public java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> getAction() {  
3009                if (myAction == null) {
3010                        myAction = new java.util.ArrayList<BoundCodeableConceptDt<ContractActionCodesEnum>>();
3011                }
3012                return myAction;
3013        }
3014
3015        /**
3016         * Sets the value(s) for <b>action</b> ()
3017         *
3018     * <p>
3019     * <b>Definition:</b>
3020     * Action stipulated by this Contract Provision.
3021     * </p> 
3022         */
3023        public Term setAction(java.util.List<BoundCodeableConceptDt<ContractActionCodesEnum>> theValue) {
3024                myAction = theValue;
3025                return this;
3026        }
3027        
3028        
3029
3030        /**
3031         * Add a value for <b>action</b> () using an enumerated type. This
3032         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
3033         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
3034         * you may also use the {@link #addAction()} method.
3035         *
3036     * <p>
3037     * <b>Definition:</b>
3038     * Action stipulated by this Contract Provision.
3039     * </p> 
3040         */
3041        public BoundCodeableConceptDt<ContractActionCodesEnum> addAction(ContractActionCodesEnum theValue) {
3042                BoundCodeableConceptDt<ContractActionCodesEnum> retVal = new BoundCodeableConceptDt<ContractActionCodesEnum>(ContractActionCodesEnum.VALUESET_BINDER, theValue);
3043                getAction().add(retVal);
3044                return retVal;
3045        }
3046
3047        /**
3048         * Gets the first repetition for <b>action</b> (),
3049         * creating it if it does not already exist.
3050         *
3051     * <p>
3052     * <b>Definition:</b>
3053     * Action stipulated by this Contract Provision.
3054     * </p> 
3055         */
3056        public BoundCodeableConceptDt<ContractActionCodesEnum> getActionFirstRep() {
3057                if (getAction().size() == 0) {
3058                        addAction();
3059                }
3060                return getAction().get(0);
3061        }
3062
3063        /**
3064         * Add a value for <b>action</b> ()
3065         *
3066     * <p>
3067     * <b>Definition:</b>
3068     * Action stipulated by this Contract Provision.
3069     * </p> 
3070         */
3071        public BoundCodeableConceptDt<ContractActionCodesEnum> addAction() {
3072                BoundCodeableConceptDt<ContractActionCodesEnum> retVal = new BoundCodeableConceptDt<ContractActionCodesEnum>(ContractActionCodesEnum.VALUESET_BINDER);
3073                getAction().add(retVal);
3074                return retVal;
3075        }
3076
3077        /**
3078         * Sets the value(s), and clears any existing value(s) for <b>action</b> ()
3079         *
3080     * <p>
3081     * <b>Definition:</b>
3082     * Action stipulated by this Contract Provision.
3083     * </p> 
3084         */
3085        public Term setAction(ContractActionCodesEnum theValue) {
3086                getAction().clear();
3087                addAction(theValue);
3088                return this;
3089        }
3090
3091  
3092        /**
3093         * Gets the value(s) for <b>actionReason</b> ().
3094         * creating it if it does
3095         * not exist. Will not return <code>null</code>.
3096         *
3097     * <p>
3098     * <b>Definition:</b>
3099     * Reason or purpose for the action stipulated by this Contract Provision.
3100     * </p> 
3101         */
3102        public java.util.List<CodeableConceptDt> getActionReason() {  
3103                if (myActionReason == null) {
3104                        myActionReason = new java.util.ArrayList<CodeableConceptDt>();
3105                }
3106                return myActionReason;
3107        }
3108
3109        /**
3110         * Sets the value(s) for <b>actionReason</b> ()
3111         *
3112     * <p>
3113     * <b>Definition:</b>
3114     * Reason or purpose for the action stipulated by this Contract Provision.
3115     * </p> 
3116         */
3117        public Term setActionReason(java.util.List<CodeableConceptDt> theValue) {
3118                myActionReason = theValue;
3119                return this;
3120        }
3121        
3122        
3123
3124        /**
3125         * Adds and returns a new value for <b>actionReason</b> ()
3126         *
3127     * <p>
3128     * <b>Definition:</b>
3129     * Reason or purpose for the action stipulated by this Contract Provision.
3130     * </p> 
3131         */
3132        public CodeableConceptDt addActionReason() {
3133                CodeableConceptDt newType = new CodeableConceptDt();
3134                getActionReason().add(newType);
3135                return newType; 
3136        }
3137
3138        /**
3139         * Adds a given new value for <b>actionReason</b> ()
3140         *
3141         * <p>
3142         * <b>Definition:</b>
3143         * Reason or purpose for the action stipulated by this Contract Provision.
3144         * </p>
3145         * @param theValue The actionReason to add (must not be <code>null</code>)
3146         */
3147        public Term addActionReason(CodeableConceptDt theValue) {
3148                if (theValue == null) {
3149                        throw new NullPointerException("theValue must not be null");
3150                }
3151                getActionReason().add(theValue);
3152                return this;
3153        }
3154
3155        /**
3156         * Gets the first repetition for <b>actionReason</b> (),
3157         * creating it if it does not already exist.
3158         *
3159     * <p>
3160     * <b>Definition:</b>
3161     * Reason or purpose for the action stipulated by this Contract Provision.
3162     * </p> 
3163         */
3164        public CodeableConceptDt getActionReasonFirstRep() {
3165                if (getActionReason().isEmpty()) {
3166                        return addActionReason();
3167                }
3168                return getActionReason().get(0); 
3169        }
3170  
3171        /**
3172         * Gets the value(s) for <b>actor</b> ().
3173         * creating it if it does
3174         * not exist. Will not return <code>null</code>.
3175         *
3176     * <p>
3177     * <b>Definition:</b>
3178     * List of actors participating in this Contract Provision.
3179     * </p> 
3180         */
3181        public java.util.List<TermActor> getActor() {  
3182                if (myActor == null) {
3183                        myActor = new java.util.ArrayList<TermActor>();
3184                }
3185                return myActor;
3186        }
3187
3188        /**
3189         * Sets the value(s) for <b>actor</b> ()
3190         *
3191     * <p>
3192     * <b>Definition:</b>
3193     * List of actors participating in this Contract Provision.
3194     * </p> 
3195         */
3196        public Term setActor(java.util.List<TermActor> theValue) {
3197                myActor = theValue;
3198                return this;
3199        }
3200        
3201        
3202
3203        /**
3204         * Adds and returns a new value for <b>actor</b> ()
3205         *
3206     * <p>
3207     * <b>Definition:</b>
3208     * List of actors participating in this Contract Provision.
3209     * </p> 
3210         */
3211        public TermActor addActor() {
3212                TermActor newType = new TermActor();
3213                getActor().add(newType);
3214                return newType; 
3215        }
3216
3217        /**
3218         * Adds a given new value for <b>actor</b> ()
3219         *
3220         * <p>
3221         * <b>Definition:</b>
3222         * List of actors participating in this Contract Provision.
3223         * </p>
3224         * @param theValue The actor to add (must not be <code>null</code>)
3225         */
3226        public Term addActor(TermActor theValue) {
3227                if (theValue == null) {
3228                        throw new NullPointerException("theValue must not be null");
3229                }
3230                getActor().add(theValue);
3231                return this;
3232        }
3233
3234        /**
3235         * Gets the first repetition for <b>actor</b> (),
3236         * creating it if it does not already exist.
3237         *
3238     * <p>
3239     * <b>Definition:</b>
3240     * List of actors participating in this Contract Provision.
3241     * </p> 
3242         */
3243        public TermActor getActorFirstRep() {
3244                if (getActor().isEmpty()) {
3245                        return addActor();
3246                }
3247                return getActor().get(0); 
3248        }
3249  
3250        /**
3251         * Gets the value(s) for <b>text</b> ().
3252         * creating it if it does
3253         * not exist. Will not return <code>null</code>.
3254         *
3255     * <p>
3256     * <b>Definition:</b>
3257     * Human readable form of this Contract Provision.
3258     * </p> 
3259         */
3260        public StringDt getTextElement() {  
3261                if (myText == null) {
3262                        myText = new StringDt();
3263                }
3264                return myText;
3265        }
3266
3267        
3268        /**
3269         * Gets the value(s) for <b>text</b> ().
3270         * creating it if it does
3271         * not exist. Will not return <code>null</code>.
3272         *
3273     * <p>
3274     * <b>Definition:</b>
3275     * Human readable form of this Contract Provision.
3276     * </p> 
3277         */
3278        public String getText() {  
3279                return getTextElement().getValue();
3280        }
3281
3282        /**
3283         * Sets the value(s) for <b>text</b> ()
3284         *
3285     * <p>
3286     * <b>Definition:</b>
3287     * Human readable form of this Contract Provision.
3288     * </p> 
3289         */
3290        public Term setText(StringDt theValue) {
3291                myText = theValue;
3292                return this;
3293        }
3294        
3295        
3296
3297        /**
3298         * Sets the value for <b>text</b> ()
3299         *
3300     * <p>
3301     * <b>Definition:</b>
3302     * Human readable form of this Contract Provision.
3303     * </p> 
3304         */
3305        public Term setText( String theString) {
3306                myText = new StringDt(theString); 
3307                return this; 
3308        }
3309
3310 
3311        /**
3312         * Gets the value(s) for <b>valuedItem</b> ().
3313         * creating it if it does
3314         * not exist. Will not return <code>null</code>.
3315         *
3316     * <p>
3317     * <b>Definition:</b>
3318     * Contract Provision Valued Item List
3319     * </p> 
3320         */
3321        public java.util.List<TermValuedItem> getValuedItem() {  
3322                if (myValuedItem == null) {
3323                        myValuedItem = new java.util.ArrayList<TermValuedItem>();
3324                }
3325                return myValuedItem;
3326        }
3327
3328        /**
3329         * Sets the value(s) for <b>valuedItem</b> ()
3330         *
3331     * <p>
3332     * <b>Definition:</b>
3333     * Contract Provision Valued Item List
3334     * </p> 
3335         */
3336        public Term setValuedItem(java.util.List<TermValuedItem> theValue) {
3337                myValuedItem = theValue;
3338                return this;
3339        }
3340        
3341        
3342
3343        /**
3344         * Adds and returns a new value for <b>valuedItem</b> ()
3345         *
3346     * <p>
3347     * <b>Definition:</b>
3348     * Contract Provision Valued Item List
3349     * </p> 
3350         */
3351        public TermValuedItem addValuedItem() {
3352                TermValuedItem newType = new TermValuedItem();
3353                getValuedItem().add(newType);
3354                return newType; 
3355        }
3356
3357        /**
3358         * Adds a given new value for <b>valuedItem</b> ()
3359         *
3360         * <p>
3361         * <b>Definition:</b>
3362         * Contract Provision Valued Item List
3363         * </p>
3364         * @param theValue The valuedItem to add (must not be <code>null</code>)
3365         */
3366        public Term addValuedItem(TermValuedItem theValue) {
3367                if (theValue == null) {
3368                        throw new NullPointerException("theValue must not be null");
3369                }
3370                getValuedItem().add(theValue);
3371                return this;
3372        }
3373
3374        /**
3375         * Gets the first repetition for <b>valuedItem</b> (),
3376         * creating it if it does not already exist.
3377         *
3378     * <p>
3379     * <b>Definition:</b>
3380     * Contract Provision Valued Item List
3381     * </p> 
3382         */
3383        public TermValuedItem getValuedItemFirstRep() {
3384                if (getValuedItem().isEmpty()) {
3385                        return addValuedItem();
3386                }
3387                return getValuedItem().get(0); 
3388        }
3389  
3390        /**
3391         * Gets the value(s) for <b>group</b> ().
3392         * creating it if it does
3393         * not exist. Will not return <code>null</code>.
3394         *
3395     * <p>
3396     * <b>Definition:</b>
3397     * Nested group of Contract Provisions.
3398     * </p> 
3399         */
3400        public java.util.List<Term> getGroup() {  
3401                if (myGroup == null) {
3402                        myGroup = new java.util.ArrayList<Term>();
3403                }
3404                return myGroup;
3405        }
3406
3407        /**
3408         * Sets the value(s) for <b>group</b> ()
3409         *
3410     * <p>
3411     * <b>Definition:</b>
3412     * Nested group of Contract Provisions.
3413     * </p> 
3414         */
3415        public Term setGroup(java.util.List<Term> theValue) {
3416                myGroup = theValue;
3417                return this;
3418        }
3419        
3420        
3421
3422        /**
3423         * Adds and returns a new value for <b>group</b> ()
3424         *
3425     * <p>
3426     * <b>Definition:</b>
3427     * Nested group of Contract Provisions.
3428     * </p> 
3429         */
3430        public Term addGroup() {
3431                Term newType = new Term();
3432                getGroup().add(newType);
3433                return newType; 
3434        }
3435
3436        /**
3437         * Adds a given new value for <b>group</b> ()
3438         *
3439         * <p>
3440         * <b>Definition:</b>
3441         * Nested group of Contract Provisions.
3442         * </p>
3443         * @param theValue The group to add (must not be <code>null</code>)
3444         */
3445        public Term addGroup(Term theValue) {
3446                if (theValue == null) {
3447                        throw new NullPointerException("theValue must not be null");
3448                }
3449                getGroup().add(theValue);
3450                return this;
3451        }
3452
3453        /**
3454         * Gets the first repetition for <b>group</b> (),
3455         * creating it if it does not already exist.
3456         *
3457     * <p>
3458     * <b>Definition:</b>
3459     * Nested group of Contract Provisions.
3460     * </p> 
3461         */
3462        public Term getGroupFirstRep() {
3463                if (getGroup().isEmpty()) {
3464                        return addGroup();
3465                }
3466                return getGroup().get(0); 
3467        }
3468  
3469
3470
3471        }
3472
3473        /**
3474         * Block class for child element: <b>Contract.term.actor</b> ()
3475         *
3476     * <p>
3477     * <b>Definition:</b>
3478     * List of actors participating in this Contract Provision.
3479     * </p> 
3480         */
3481        @Block()        
3482        public static class TermActor 
3483            extends  BaseIdentifiableElement        implements IResourceBlock {
3484        
3485        @Child(name="entity", order=0, min=1, max=1, summary=false, modifier=false, type={
3486                ca.uhn.fhir.model.dstu2.resource.Contract.class,                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Location.class,                ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Substance.class        })
3487        @Description(
3488                shortDefinition="",
3489                formalDefinition="The actor assigned a role in this Contract Provision."
3490        )
3491        private ResourceReferenceDt myEntity;
3492        
3493        @Child(name="role", type=CodeableConceptDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
3494        @Description(
3495                shortDefinition="",
3496                formalDefinition="Role played by the actor assigned this role in this Contract Provision."
3497        )
3498        private java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> myRole;
3499        
3500
3501        @Override
3502        public boolean isEmpty() {
3503                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEntity,  myRole);
3504        }
3505        
3506        @Override
3507        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3508                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEntity, myRole);
3509        }
3510
3511        /**
3512         * Gets the value(s) for <b>entity</b> ().
3513         * creating it if it does
3514         * not exist. Will not return <code>null</code>.
3515         *
3516     * <p>
3517     * <b>Definition:</b>
3518     * The actor assigned a role in this Contract Provision.
3519     * </p> 
3520         */
3521        public ResourceReferenceDt getEntity() {  
3522                if (myEntity == null) {
3523                        myEntity = new ResourceReferenceDt();
3524                }
3525                return myEntity;
3526        }
3527
3528        /**
3529         * Sets the value(s) for <b>entity</b> ()
3530         *
3531     * <p>
3532     * <b>Definition:</b>
3533     * The actor assigned a role in this Contract Provision.
3534     * </p> 
3535         */
3536        public TermActor setEntity(ResourceReferenceDt theValue) {
3537                myEntity = theValue;
3538                return this;
3539        }
3540        
3541        
3542
3543  
3544        /**
3545         * Gets the value(s) for <b>role</b> ().
3546         * creating it if it does
3547         * not exist. Will not return <code>null</code>.
3548         *
3549     * <p>
3550     * <b>Definition:</b>
3551     * Role played by the actor assigned this role in this Contract Provision.
3552     * </p> 
3553         */
3554        public java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> getRole() {  
3555                if (myRole == null) {
3556                        myRole = new java.util.ArrayList<BoundCodeableConceptDt<ContractActorRoleCodesEnum>>();
3557                }
3558                return myRole;
3559        }
3560
3561        /**
3562         * Sets the value(s) for <b>role</b> ()
3563         *
3564     * <p>
3565     * <b>Definition:</b>
3566     * Role played by the actor assigned this role in this Contract Provision.
3567     * </p> 
3568         */
3569        public TermActor setRole(java.util.List<BoundCodeableConceptDt<ContractActorRoleCodesEnum>> theValue) {
3570                myRole = theValue;
3571                return this;
3572        }
3573        
3574        
3575
3576        /**
3577         * Add a value for <b>role</b> () using an enumerated type. This
3578         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
3579         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
3580         * you may also use the {@link #addRole()} method.
3581         *
3582     * <p>
3583     * <b>Definition:</b>
3584     * Role played by the actor assigned this role in this Contract Provision.
3585     * </p> 
3586         */
3587        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> addRole(ContractActorRoleCodesEnum theValue) {
3588                BoundCodeableConceptDt<ContractActorRoleCodesEnum> retVal = new BoundCodeableConceptDt<ContractActorRoleCodesEnum>(ContractActorRoleCodesEnum.VALUESET_BINDER, theValue);
3589                getRole().add(retVal);
3590                return retVal;
3591        }
3592
3593        /**
3594         * Gets the first repetition for <b>role</b> (),
3595         * creating it if it does not already exist.
3596         *
3597     * <p>
3598     * <b>Definition:</b>
3599     * Role played by the actor assigned this role in this Contract Provision.
3600     * </p> 
3601         */
3602        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> getRoleFirstRep() {
3603                if (getRole().size() == 0) {
3604                        addRole();
3605                }
3606                return getRole().get(0);
3607        }
3608
3609        /**
3610         * Add a value for <b>role</b> ()
3611         *
3612     * <p>
3613     * <b>Definition:</b>
3614     * Role played by the actor assigned this role in this Contract Provision.
3615     * </p> 
3616         */
3617        public BoundCodeableConceptDt<ContractActorRoleCodesEnum> addRole() {
3618                BoundCodeableConceptDt<ContractActorRoleCodesEnum> retVal = new BoundCodeableConceptDt<ContractActorRoleCodesEnum>(ContractActorRoleCodesEnum.VALUESET_BINDER);
3619                getRole().add(retVal);
3620                return retVal;
3621        }
3622
3623        /**
3624         * Sets the value(s), and clears any existing value(s) for <b>role</b> ()
3625         *
3626     * <p>
3627     * <b>Definition:</b>
3628     * Role played by the actor assigned this role in this Contract Provision.
3629     * </p> 
3630         */
3631        public TermActor setRole(ContractActorRoleCodesEnum theValue) {
3632                getRole().clear();
3633                addRole(theValue);
3634                return this;
3635        }
3636
3637  
3638
3639
3640        }
3641
3642
3643        /**
3644         * Block class for child element: <b>Contract.term.valuedItem</b> ()
3645         *
3646     * <p>
3647     * <b>Definition:</b>
3648     * Contract Provision Valued Item List
3649     * </p> 
3650         */
3651        @Block()        
3652        public static class TermValuedItem 
3653            extends  BaseIdentifiableElement        implements IResourceBlock {
3654        
3655        @Child(name="entity", order=0, min=0, max=1, summary=false, modifier=false, type={
3656                CodeableConceptDt.class,                IResource.class })
3657        @Description(
3658                shortDefinition="",
3659                formalDefinition="Specific type of Contract Provision Valued Item that may be priced."
3660        )
3661        private IDatatype myEntity;
3662        
3663        @Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
3664        @Description(
3665                shortDefinition="",
3666                formalDefinition="Identifies a Contract Provision Valued Item instance."
3667        )
3668        private IdentifierDt myIdentifier;
3669        
3670        @Child(name="effectiveTime", type=DateTimeDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
3671        @Description(
3672                shortDefinition="",
3673                formalDefinition="Indicates the time during which this Contract Term ValuedItem information is effective."
3674        )
3675        private DateTimeDt myEffectiveTime;
3676        
3677        @Child(name="quantity", type=SimpleQuantityDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
3678        @Description(
3679                shortDefinition="",
3680                formalDefinition="Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances."
3681        )
3682        private SimpleQuantityDt myQuantity;
3683        
3684        @Child(name="unitPrice", type=MoneyDt.class, order=4, min=0, max=1, summary=false, modifier=false)      
3685        @Description(
3686                shortDefinition="",
3687                formalDefinition="A Contract Provision Valued Item unit valuation measure."
3688        )
3689        private MoneyDt myUnitPrice;
3690        
3691        @Child(name="factor", type=DecimalDt.class, order=5, min=0, max=1, summary=false, modifier=false)       
3692        @Description(
3693                shortDefinition="",
3694                formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
3695        )
3696        private DecimalDt myFactor;
3697        
3698        @Child(name="points", type=DecimalDt.class, order=6, min=0, max=1, summary=false, modifier=false)       
3699        @Description(
3700                shortDefinition="",
3701                formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point."
3702        )
3703        private DecimalDt myPoints;
3704        
3705        @Child(name="net", type=MoneyDt.class, order=7, min=0, max=1, summary=false, modifier=false)    
3706        @Description(
3707                shortDefinition="",
3708                formalDefinition="Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied."
3709        )
3710        private MoneyDt myNet;
3711        
3712
3713        @Override
3714        public boolean isEmpty() {
3715                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myEntity,  myIdentifier,  myEffectiveTime,  myQuantity,  myUnitPrice,  myFactor,  myPoints,  myNet);
3716        }
3717        
3718        @Override
3719        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3720                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEntity, myIdentifier, myEffectiveTime, myQuantity, myUnitPrice, myFactor, myPoints, myNet);
3721        }
3722
3723        /**
3724         * Gets the value(s) for <b>entity[x]</b> ().
3725         * creating it if it does
3726         * not exist. Will not return <code>null</code>.
3727         *
3728     * <p>
3729     * <b>Definition:</b>
3730     * Specific type of Contract Provision Valued Item that may be priced.
3731     * </p> 
3732         */
3733        public IDatatype getEntity() {  
3734                return myEntity;
3735        }
3736
3737        /**
3738         * Sets the value(s) for <b>entity[x]</b> ()
3739         *
3740     * <p>
3741     * <b>Definition:</b>
3742     * Specific type of Contract Provision Valued Item that may be priced.
3743     * </p> 
3744         */
3745        public TermValuedItem setEntity(IDatatype theValue) {
3746                myEntity = theValue;
3747                return this;
3748        }
3749        
3750        
3751
3752  
3753        /**
3754         * Gets the value(s) for <b>identifier</b> ().
3755         * creating it if it does
3756         * not exist. Will not return <code>null</code>.
3757         *
3758     * <p>
3759     * <b>Definition:</b>
3760     * Identifies a Contract Provision Valued Item instance.
3761     * </p> 
3762         */
3763        public IdentifierDt getIdentifier() {  
3764                if (myIdentifier == null) {
3765                        myIdentifier = new IdentifierDt();
3766                }
3767                return myIdentifier;
3768        }
3769
3770        /**
3771         * Sets the value(s) for <b>identifier</b> ()
3772         *
3773     * <p>
3774     * <b>Definition:</b>
3775     * Identifies a Contract Provision Valued Item instance.
3776     * </p> 
3777         */
3778        public TermValuedItem setIdentifier(IdentifierDt theValue) {
3779                myIdentifier = theValue;
3780                return this;
3781        }
3782        
3783        
3784
3785  
3786        /**
3787         * Gets the value(s) for <b>effectiveTime</b> ().
3788         * creating it if it does
3789         * not exist. Will not return <code>null</code>.
3790         *
3791     * <p>
3792     * <b>Definition:</b>
3793     * Indicates the time during which this Contract Term ValuedItem information is effective.
3794     * </p> 
3795         */
3796        public DateTimeDt getEffectiveTimeElement() {  
3797                if (myEffectiveTime == null) {
3798                        myEffectiveTime = new DateTimeDt();
3799                }
3800                return myEffectiveTime;
3801        }
3802
3803        
3804        /**
3805         * Gets the value(s) for <b>effectiveTime</b> ().
3806         * creating it if it does
3807         * not exist. Will not return <code>null</code>.
3808         *
3809     * <p>
3810     * <b>Definition:</b>
3811     * Indicates the time during which this Contract Term ValuedItem information is effective.
3812     * </p> 
3813         */
3814        public Date getEffectiveTime() {  
3815                return getEffectiveTimeElement().getValue();
3816        }
3817
3818        /**
3819         * Sets the value(s) for <b>effectiveTime</b> ()
3820         *
3821     * <p>
3822     * <b>Definition:</b>
3823     * Indicates the time during which this Contract Term ValuedItem information is effective.
3824     * </p> 
3825         */
3826        public TermValuedItem setEffectiveTime(DateTimeDt theValue) {
3827                myEffectiveTime = theValue;
3828                return this;
3829        }
3830        
3831        
3832
3833        /**
3834         * Sets the value for <b>effectiveTime</b> ()
3835         *
3836     * <p>
3837     * <b>Definition:</b>
3838     * Indicates the time during which this Contract Term ValuedItem information is effective.
3839     * </p> 
3840         */
3841        public TermValuedItem setEffectiveTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
3842                myEffectiveTime = new DateTimeDt(theDate, thePrecision); 
3843                return this; 
3844        }
3845
3846        /**
3847         * Sets the value for <b>effectiveTime</b> ()
3848         *
3849     * <p>
3850     * <b>Definition:</b>
3851     * Indicates the time during which this Contract Term ValuedItem information is effective.
3852     * </p> 
3853         */
3854        public TermValuedItem setEffectiveTimeWithSecondsPrecision( Date theDate) {
3855                myEffectiveTime = new DateTimeDt(theDate); 
3856                return this; 
3857        }
3858
3859 
3860        /**
3861         * Gets the value(s) for <b>quantity</b> ().
3862         * creating it if it does
3863         * not exist. Will not return <code>null</code>.
3864         *
3865     * <p>
3866     * <b>Definition:</b>
3867     * Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.
3868     * </p> 
3869         */
3870        public SimpleQuantityDt getQuantity() {  
3871                if (myQuantity == null) {
3872                        myQuantity = new SimpleQuantityDt();
3873                }
3874                return myQuantity;
3875        }
3876
3877        /**
3878         * Sets the value(s) for <b>quantity</b> ()
3879         *
3880     * <p>
3881     * <b>Definition:</b>
3882     * Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.
3883     * </p> 
3884         */
3885        public TermValuedItem setQuantity(SimpleQuantityDt theValue) {
3886                myQuantity = theValue;
3887                return this;
3888        }
3889        
3890        
3891
3892  
3893        /**
3894         * Gets the value(s) for <b>unitPrice</b> ().
3895         * creating it if it does
3896         * not exist. Will not return <code>null</code>.
3897         *
3898     * <p>
3899     * <b>Definition:</b>
3900     * A Contract Provision Valued Item unit valuation measure.
3901     * </p> 
3902         */
3903        public MoneyDt getUnitPrice() {  
3904                if (myUnitPrice == null) {
3905                        myUnitPrice = new MoneyDt();
3906                }
3907                return myUnitPrice;
3908        }
3909
3910        /**
3911         * Sets the value(s) for <b>unitPrice</b> ()
3912         *
3913     * <p>
3914     * <b>Definition:</b>
3915     * A Contract Provision Valued Item unit valuation measure.
3916     * </p> 
3917         */
3918        public TermValuedItem setUnitPrice(MoneyDt theValue) {
3919                myUnitPrice = theValue;
3920                return this;
3921        }
3922        
3923        
3924
3925  
3926        /**
3927         * Gets the value(s) for <b>factor</b> ().
3928         * creating it if it does
3929         * not exist. Will not return <code>null</code>.
3930         *
3931     * <p>
3932     * <b>Definition:</b>
3933     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
3934     * </p> 
3935         */
3936        public DecimalDt getFactorElement() {  
3937                if (myFactor == null) {
3938                        myFactor = new DecimalDt();
3939                }
3940                return myFactor;
3941        }
3942
3943        
3944        /**
3945         * Gets the value(s) for <b>factor</b> ().
3946         * creating it if it does
3947         * not exist. Will not return <code>null</code>.
3948         *
3949     * <p>
3950     * <b>Definition:</b>
3951     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
3952     * </p> 
3953         */
3954        public BigDecimal getFactor() {  
3955                return getFactorElement().getValue();
3956        }
3957
3958        /**
3959         * Sets the value(s) for <b>factor</b> ()
3960         *
3961     * <p>
3962     * <b>Definition:</b>
3963     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
3964     * </p> 
3965         */
3966        public TermValuedItem setFactor(DecimalDt theValue) {
3967                myFactor = theValue;
3968                return this;
3969        }
3970        
3971        
3972
3973        /**
3974         * Sets the value for <b>factor</b> ()
3975         *
3976     * <p>
3977     * <b>Definition:</b>
3978     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
3979     * </p> 
3980         */
3981        public TermValuedItem setFactor( long theValue) {
3982                myFactor = new DecimalDt(theValue); 
3983                return this; 
3984        }
3985
3986        /**
3987         * Sets the value for <b>factor</b> ()
3988         *
3989     * <p>
3990     * <b>Definition:</b>
3991     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
3992     * </p> 
3993         */
3994        public TermValuedItem setFactor( double theValue) {
3995                myFactor = new DecimalDt(theValue); 
3996                return this; 
3997        }
3998
3999        /**
4000         * Sets the value for <b>factor</b> ()
4001         *
4002     * <p>
4003     * <b>Definition:</b>
4004     * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
4005     * </p> 
4006         */
4007        public TermValuedItem setFactor( java.math.BigDecimal theValue) {
4008                myFactor = new DecimalDt(theValue); 
4009                return this; 
4010        }
4011
4012 
4013        /**
4014         * Gets the value(s) for <b>points</b> ().
4015         * creating it if it does
4016         * not exist. Will not return <code>null</code>.
4017         *
4018     * <p>
4019     * <b>Definition:</b>
4020     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4021     * </p> 
4022         */
4023        public DecimalDt getPointsElement() {  
4024                if (myPoints == null) {
4025                        myPoints = new DecimalDt();
4026                }
4027                return myPoints;
4028        }
4029
4030        
4031        /**
4032         * Gets the value(s) for <b>points</b> ().
4033         * creating it if it does
4034         * not exist. Will not return <code>null</code>.
4035         *
4036     * <p>
4037     * <b>Definition:</b>
4038     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4039     * </p> 
4040         */
4041        public BigDecimal getPoints() {  
4042                return getPointsElement().getValue();
4043        }
4044
4045        /**
4046         * Sets the value(s) for <b>points</b> ()
4047         *
4048     * <p>
4049     * <b>Definition:</b>
4050     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4051     * </p> 
4052         */
4053        public TermValuedItem setPoints(DecimalDt theValue) {
4054                myPoints = theValue;
4055                return this;
4056        }
4057        
4058        
4059
4060        /**
4061         * Sets the value for <b>points</b> ()
4062         *
4063     * <p>
4064     * <b>Definition:</b>
4065     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4066     * </p> 
4067         */
4068        public TermValuedItem setPoints( long theValue) {
4069                myPoints = new DecimalDt(theValue); 
4070                return this; 
4071        }
4072
4073        /**
4074         * Sets the value for <b>points</b> ()
4075         *
4076     * <p>
4077     * <b>Definition:</b>
4078     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4079     * </p> 
4080         */
4081        public TermValuedItem setPoints( double theValue) {
4082                myPoints = new DecimalDt(theValue); 
4083                return this; 
4084        }
4085
4086        /**
4087         * Sets the value for <b>points</b> ()
4088         *
4089     * <p>
4090     * <b>Definition:</b>
4091     * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.
4092     * </p> 
4093         */
4094        public TermValuedItem setPoints( java.math.BigDecimal theValue) {
4095                myPoints = new DecimalDt(theValue); 
4096                return this; 
4097        }
4098
4099 
4100        /**
4101         * Gets the value(s) for <b>net</b> ().
4102         * creating it if it does
4103         * not exist. Will not return <code>null</code>.
4104         *
4105     * <p>
4106     * <b>Definition:</b>
4107     * Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.
4108     * </p> 
4109         */
4110        public MoneyDt getNet() {  
4111                if (myNet == null) {
4112                        myNet = new MoneyDt();
4113                }
4114                return myNet;
4115        }
4116
4117        /**
4118         * Sets the value(s) for <b>net</b> ()
4119         *
4120     * <p>
4121     * <b>Definition:</b>
4122     * Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.
4123     * </p> 
4124         */
4125        public TermValuedItem setNet(MoneyDt theValue) {
4126                myNet = theValue;
4127                return this;
4128        }
4129        
4130        
4131
4132  
4133
4134
4135        }
4136
4137
4138
4139        /**
4140         * Block class for child element: <b>Contract.friendly</b> ()
4141         *
4142     * <p>
4143     * <b>Definition:</b>
4144     * The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.
4145     * </p> 
4146         */
4147        @Block()        
4148        public static class Friendly 
4149            extends  BaseIdentifiableElement        implements IResourceBlock {
4150        
4151        @Child(name="content", order=0, min=1, max=1, summary=false, modifier=false, type={
4152                AttachmentDt.class,             Composition.class,              DocumentReference.class,                QuestionnaireResponse.class     })
4153        @Description(
4154                shortDefinition="",
4155                formalDefinition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability."
4156        )
4157        private IDatatype myContent;
4158        
4159
4160        @Override
4161        public boolean isEmpty() {
4162                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myContent);
4163        }
4164        
4165        @Override
4166        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4167                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContent);
4168        }
4169
4170        /**
4171         * Gets the value(s) for <b>content[x]</b> ().
4172         * creating it if it does
4173         * not exist. Will not return <code>null</code>.
4174         *
4175     * <p>
4176     * <b>Definition:</b>
4177     * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.
4178     * </p> 
4179         */
4180        public IDatatype getContent() {  
4181                return myContent;
4182        }
4183
4184        /**
4185         * Sets the value(s) for <b>content[x]</b> ()
4186         *
4187     * <p>
4188     * <b>Definition:</b>
4189     * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.
4190     * </p> 
4191         */
4192        public Friendly setContent(IDatatype theValue) {
4193                myContent = theValue;
4194                return this;
4195        }
4196        
4197        
4198
4199  
4200
4201
4202        }
4203
4204
4205        /**
4206         * Block class for child element: <b>Contract.legal</b> ()
4207         *
4208     * <p>
4209     * <b>Definition:</b>
4210     * List of Legal expressions or representations of this Contract.
4211     * </p> 
4212         */
4213        @Block()        
4214        public static class Legal 
4215            extends  BaseIdentifiableElement        implements IResourceBlock {
4216        
4217        @Child(name="content", order=0, min=1, max=1, summary=false, modifier=false, type={
4218                AttachmentDt.class,             Composition.class,              DocumentReference.class,                QuestionnaireResponse.class     })
4219        @Description(
4220                shortDefinition="",
4221                formalDefinition="Contract legal text in human renderable form."
4222        )
4223        private IDatatype myContent;
4224        
4225
4226        @Override
4227        public boolean isEmpty() {
4228                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myContent);
4229        }
4230        
4231        @Override
4232        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4233                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContent);
4234        }
4235
4236        /**
4237         * Gets the value(s) for <b>content[x]</b> ().
4238         * creating it if it does
4239         * not exist. Will not return <code>null</code>.
4240         *
4241     * <p>
4242     * <b>Definition:</b>
4243     * Contract legal text in human renderable form.
4244     * </p> 
4245         */
4246        public IDatatype getContent() {  
4247                return myContent;
4248        }
4249
4250        /**
4251         * Sets the value(s) for <b>content[x]</b> ()
4252         *
4253     * <p>
4254     * <b>Definition:</b>
4255     * Contract legal text in human renderable form.
4256     * </p> 
4257         */
4258        public Legal setContent(IDatatype theValue) {
4259                myContent = theValue;
4260                return this;
4261        }
4262        
4263        
4264
4265  
4266
4267
4268        }
4269
4270
4271        /**
4272         * Block class for child element: <b>Contract.rule</b> ()
4273         *
4274     * <p>
4275     * <b>Definition:</b>
4276     * List of Computable Policy Rule Language Representations of this Contract.
4277     * </p> 
4278         */
4279        @Block()        
4280        public static class Rule 
4281            extends  BaseIdentifiableElement        implements IResourceBlock {
4282        
4283        @Child(name="content", order=0, min=1, max=1, summary=false, modifier=false, type={
4284                AttachmentDt.class,             DocumentReference.class })
4285        @Description(
4286                shortDefinition="",
4287                formalDefinition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal)."
4288        )
4289        private IDatatype myContent;
4290        
4291
4292        @Override
4293        public boolean isEmpty() {
4294                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myContent);
4295        }
4296        
4297        @Override
4298        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4299                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContent);
4300        }
4301
4302        /**
4303         * Gets the value(s) for <b>content[x]</b> ().
4304         * creating it if it does
4305         * not exist. Will not return <code>null</code>.
4306         *
4307     * <p>
4308     * <b>Definition:</b>
4309     * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).
4310     * </p> 
4311         */
4312        public IDatatype getContent() {  
4313                return myContent;
4314        }
4315
4316        /**
4317         * Sets the value(s) for <b>content[x]</b> ()
4318         *
4319     * <p>
4320     * <b>Definition:</b>
4321     * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).
4322     * </p> 
4323         */
4324        public Rule setContent(IDatatype theValue) {
4325                myContent = theValue;
4326                return this;
4327        }
4328        
4329        
4330
4331  
4332
4333
4334        }
4335
4336
4337
4338
4339    @Override
4340    public String getResourceName() {
4341        return "Contract";
4342    }
4343    
4344    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
4345        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
4346    }
4347
4348
4349}