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