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