001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>NutritionOrder</b> Resource
320 * (clinical.careprovision)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/NutritionOrder">http://hl7.org/fhir/profiles/NutritionOrder</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="NutritionOrder", profile="http://hl7.org/fhir/profiles/NutritionOrder", id="nutritionorder")
339public class NutritionOrder extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>patient</b>
344         * <p>
345         * Description: <b>The identity of the person who requires the diet, formula or nutritional supplement</b><br>
346         * Type: <b>reference</b><br>
347         * Path: <b>NutritionOrder.patient</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference"  )
351        public static final String SP_PATIENT = "patient";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
355         * <p>
356         * Description: <b>The identity of the person who requires the diet, formula or nutritional supplement</b><br>
357         * Type: <b>reference</b><br>
358         * Path: <b>NutritionOrder.patient</b><br>
359         * </p>
360         */
361        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
362
363        /**
364         * Search parameter constant for <b>provider</b>
365         * <p>
366         * Description: <b>The identify of the provider who placed the nutrition order</b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>NutritionOrder.orderer</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference"  )
372        public static final String SP_PROVIDER = "provider";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>provider</b>
376         * <p>
377         * Description: <b>The identify of the provider who placed the nutrition order</b><br>
378         * Type: <b>reference</b><br>
379         * Path: <b>NutritionOrder.orderer</b><br>
380         * </p>
381         */
382        public static final ReferenceClientParam PROVIDER = new ReferenceClientParam(SP_PROVIDER);
383
384        /**
385         * Search parameter constant for <b>identifier</b>
386         * <p>
387         * Description: <b>Return nutrition orders with this external identifier</b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>NutritionOrder.identifier</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="identifier", path="NutritionOrder.identifier", description="Return nutrition orders with this external identifier", type="token"  )
393        public static final String SP_IDENTIFIER = "identifier";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
397         * <p>
398         * Description: <b>Return nutrition orders with this external identifier</b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>NutritionOrder.identifier</b><br>
401         * </p>
402         */
403        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
404
405        /**
406         * Search parameter constant for <b>encounter</b>
407         * <p>
408         * Description: <b>Return nutrition orders with this encounter identifier</b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>NutritionOrder.encounter</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identifier", type="reference"  )
414        public static final String SP_ENCOUNTER = "encounter";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
418         * <p>
419         * Description: <b>Return nutrition orders with this encounter identifier</b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>NutritionOrder.encounter</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
425
426        /**
427         * Search parameter constant for <b>datetime</b>
428         * <p>
429         * Description: <b>Return nutrition orders requested on this date</b><br>
430         * Type: <b>date</b><br>
431         * Path: <b>NutritionOrder.dateTime</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date"  )
435        public static final String SP_DATETIME = "datetime";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>datetime</b>
439         * <p>
440         * Description: <b>Return nutrition orders requested on this date</b><br>
441         * Type: <b>date</b><br>
442         * Path: <b>NutritionOrder.dateTime</b><br>
443         * </p>
444         */
445        public static final DateClientParam DATETIME = new DateClientParam(SP_DATETIME);
446
447        /**
448         * Search parameter constant for <b>status</b>
449         * <p>
450         * Description: <b>Status of the nutrition order.</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>NutritionOrder.status</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token"  )
456        public static final String SP_STATUS = "status";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>status</b>
460         * <p>
461         * Description: <b>Status of the nutrition order.</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>NutritionOrder.status</b><br>
464         * </p>
465         */
466        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
467
468        /**
469         * Search parameter constant for <b>oraldiet</b>
470         * <p>
471         * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>NutritionOrder.oralDiet.type</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token"  )
477        public static final String SP_ORALDIET = "oraldiet";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>oraldiet</b>
481         * <p>
482         * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>NutritionOrder.oralDiet.type</b><br>
485         * </p>
486         */
487        public static final TokenClientParam ORALDIET = new TokenClientParam(SP_ORALDIET);
488
489        /**
490         * Search parameter constant for <b>supplement</b>
491         * <p>
492         * Description: <b>Type of supplement product requested</b><br>
493         * Type: <b>token</b><br>
494         * Path: <b>NutritionOrder.supplement.type</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token"  )
498        public static final String SP_SUPPLEMENT = "supplement";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>supplement</b>
502         * <p>
503         * Description: <b>Type of supplement product requested</b><br>
504         * Type: <b>token</b><br>
505         * Path: <b>NutritionOrder.supplement.type</b><br>
506         * </p>
507         */
508        public static final TokenClientParam SUPPLEMENT = new TokenClientParam(SP_SUPPLEMENT);
509
510        /**
511         * Search parameter constant for <b>formula</b>
512         * <p>
513         * Description: <b>Type of enteral or infant formula</b><br>
514         * Type: <b>token</b><br>
515         * Path: <b>NutritionOrder.enteralFormula.baseFormulaType</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType", description="Type of enteral or infant formula", type="token"  )
519        public static final String SP_FORMULA = "formula";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>formula</b>
523         * <p>
524         * Description: <b>Type of enteral or infant formula</b><br>
525         * Type: <b>token</b><br>
526         * Path: <b>NutritionOrder.enteralFormula.baseFormulaType</b><br>
527         * </p>
528         */
529        public static final TokenClientParam FORMULA = new TokenClientParam(SP_FORMULA);
530
531        /**
532         * Search parameter constant for <b>additive</b>
533         * <p>
534         * Description: <b>Type of module component to add to the feeding</b><br>
535         * Type: <b>token</b><br>
536         * Path: <b>NutritionOrder.enteralFormula.additiveType</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token"  )
540        public static final String SP_ADDITIVE = "additive";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>additive</b>
544         * <p>
545         * Description: <b>Type of module component to add to the feeding</b><br>
546         * Type: <b>token</b><br>
547         * Path: <b>NutritionOrder.enteralFormula.additiveType</b><br>
548         * </p>
549         */
550        public static final TokenClientParam ADDITIVE = new TokenClientParam(SP_ADDITIVE);
551
552
553        /**
554         * Constant for fluent queries to be used to add include statements. Specifies
555         * the path value of "<b>NutritionOrder:encounter</b>".
556         */
557        public static final Include INCLUDE_ENCOUNTER = new Include("NutritionOrder:encounter");
558
559        /**
560         * Constant for fluent queries to be used to add include statements. Specifies
561         * the path value of "<b>NutritionOrder:patient</b>".
562         */
563        public static final Include INCLUDE_PATIENT = new Include("NutritionOrder:patient");
564
565        /**
566         * Constant for fluent queries to be used to add include statements. Specifies
567         * the path value of "<b>NutritionOrder:provider</b>".
568         */
569        public static final Include INCLUDE_PROVIDER = new Include("NutritionOrder:provider");
570
571
572        @Child(name="patient", order=0, min=1, max=1, summary=true, modifier=false, type={
573                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
574        @Description(
575                shortDefinition="who.focus",
576                formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding."
577        )
578        private ResourceReferenceDt myPatient;
579        
580        @Child(name="orderer", order=1, min=0, max=1, summary=true, modifier=false, type={
581                ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
582        @Description(
583                shortDefinition="who.author",
584                formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings."
585        )
586        private ResourceReferenceDt myOrderer;
587        
588        @Child(name="identifier", type=IdentifierDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
589        @Description(
590                shortDefinition="id",
591                formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver"
592        )
593        private java.util.List<IdentifierDt> myIdentifier;
594        
595        @Child(name="encounter", order=3, min=0, max=1, summary=false, modifier=false, type={
596                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
597        @Description(
598                shortDefinition="context",
599                formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made"
600        )
601        private ResourceReferenceDt myEncounter;
602        
603        @Child(name="dateTime", type=DateTimeDt.class, order=4, min=1, max=1, summary=true, modifier=false)     
604        @Description(
605                shortDefinition="when.recorded",
606                formalDefinition="The date and time that this nutrition order was requested."
607        )
608        private DateTimeDt myDateTime;
609        
610        @Child(name="status", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=true)    
611        @Description(
612                shortDefinition="status",
613                formalDefinition="The workflow status of the nutrition order/request."
614        )
615        private BoundCodeDt<NutritionOrderStatusEnum> myStatus;
616        
617        @Child(name="allergyIntolerance", order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
618                ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance.class       })
619        @Description(
620                shortDefinition="",
621                formalDefinition="A link to a record of allergies or intolerances  which should be included in the nutrition order."
622        )
623        private java.util.List<ResourceReferenceDt> myAllergyIntolerance;
624        
625        @Child(name="foodPreferenceModifier", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
626        @Description(
627                shortDefinition="",
628                formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings."
629        )
630        private java.util.List<CodeableConceptDt> myFoodPreferenceModifier;
631        
632        @Child(name="excludeFoodModifier", type=CodeableConceptDt.class, order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
633        @Description(
634                shortDefinition="",
635                formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings."
636        )
637        private java.util.List<CodeableConceptDt> myExcludeFoodModifier;
638        
639        @Child(name="oralDiet", order=9, min=0, max=1, summary=false, modifier=false)   
640        @Description(
641                shortDefinition="",
642                formalDefinition="Diet given orally in contrast to enteral (tube) feeding."
643        )
644        private OralDiet myOralDiet;
645        
646        @Child(name="supplement", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
647        @Description(
648                shortDefinition="",
649                formalDefinition="Oral nutritional products given in order to add further nutritional value to the patient's diet."
650        )
651        private java.util.List<Supplement> mySupplement;
652        
653        @Child(name="enteralFormula", order=11, min=0, max=1, summary=false, modifier=false)    
654        @Description(
655                shortDefinition="",
656                formalDefinition="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity."
657        )
658        private EnteralFormula myEnteralFormula;
659        
660
661        @Override
662        public boolean isEmpty() {
663                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myPatient,  myOrderer,  myIdentifier,  myEncounter,  myDateTime,  myStatus,  myAllergyIntolerance,  myFoodPreferenceModifier,  myExcludeFoodModifier,  myOralDiet,  mySupplement,  myEnteralFormula);
664        }
665        
666        @Override
667        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
668                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPatient, myOrderer, myIdentifier, myEncounter, myDateTime, myStatus, myAllergyIntolerance, myFoodPreferenceModifier, myExcludeFoodModifier, myOralDiet, mySupplement, myEnteralFormula);
669        }
670
671        /**
672         * Gets the value(s) for <b>patient</b> (who.focus).
673         * creating it if it does
674         * not exist. Will not return <code>null</code>.
675         *
676     * <p>
677     * <b>Definition:</b>
678     * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.
679     * </p> 
680         */
681        public ResourceReferenceDt getPatient() {  
682                if (myPatient == null) {
683                        myPatient = new ResourceReferenceDt();
684                }
685                return myPatient;
686        }
687
688        /**
689         * Sets the value(s) for <b>patient</b> (who.focus)
690         *
691     * <p>
692     * <b>Definition:</b>
693     * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.
694     * </p> 
695         */
696        public NutritionOrder setPatient(ResourceReferenceDt theValue) {
697                myPatient = theValue;
698                return this;
699        }
700        
701        
702
703  
704        /**
705         * Gets the value(s) for <b>orderer</b> (who.author).
706         * creating it if it does
707         * not exist. Will not return <code>null</code>.
708         *
709     * <p>
710     * <b>Definition:</b>
711     * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.
712     * </p> 
713         */
714        public ResourceReferenceDt getOrderer() {  
715                if (myOrderer == null) {
716                        myOrderer = new ResourceReferenceDt();
717                }
718                return myOrderer;
719        }
720
721        /**
722         * Sets the value(s) for <b>orderer</b> (who.author)
723         *
724     * <p>
725     * <b>Definition:</b>
726     * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.
727     * </p> 
728         */
729        public NutritionOrder setOrderer(ResourceReferenceDt theValue) {
730                myOrderer = theValue;
731                return this;
732        }
733        
734        
735
736  
737        /**
738         * Gets the value(s) for <b>identifier</b> (id).
739         * creating it if it does
740         * not exist. Will not return <code>null</code>.
741         *
742     * <p>
743     * <b>Definition:</b>
744     * Identifiers assigned to this order by the order sender or by the order receiver
745     * </p> 
746         */
747        public java.util.List<IdentifierDt> getIdentifier() {  
748                if (myIdentifier == null) {
749                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
750                }
751                return myIdentifier;
752        }
753
754        /**
755         * Sets the value(s) for <b>identifier</b> (id)
756         *
757     * <p>
758     * <b>Definition:</b>
759     * Identifiers assigned to this order by the order sender or by the order receiver
760     * </p> 
761         */
762        public NutritionOrder setIdentifier(java.util.List<IdentifierDt> theValue) {
763                myIdentifier = theValue;
764                return this;
765        }
766        
767        
768
769        /**
770         * Adds and returns a new value for <b>identifier</b> (id)
771         *
772     * <p>
773     * <b>Definition:</b>
774     * Identifiers assigned to this order by the order sender or by the order receiver
775     * </p> 
776         */
777        public IdentifierDt addIdentifier() {
778                IdentifierDt newType = new IdentifierDt();
779                getIdentifier().add(newType);
780                return newType; 
781        }
782
783        /**
784         * Adds a given new value for <b>identifier</b> (id)
785         *
786         * <p>
787         * <b>Definition:</b>
788         * Identifiers assigned to this order by the order sender or by the order receiver
789         * </p>
790         * @param theValue The identifier to add (must not be <code>null</code>)
791         */
792        public NutritionOrder addIdentifier(IdentifierDt theValue) {
793                if (theValue == null) {
794                        throw new NullPointerException("theValue must not be null");
795                }
796                getIdentifier().add(theValue);
797                return this;
798        }
799
800        /**
801         * Gets the first repetition for <b>identifier</b> (id),
802         * creating it if it does not already exist.
803         *
804     * <p>
805     * <b>Definition:</b>
806     * Identifiers assigned to this order by the order sender or by the order receiver
807     * </p> 
808         */
809        public IdentifierDt getIdentifierFirstRep() {
810                if (getIdentifier().isEmpty()) {
811                        return addIdentifier();
812                }
813                return getIdentifier().get(0); 
814        }
815  
816        /**
817         * Gets the value(s) for <b>encounter</b> (context).
818         * creating it if it does
819         * not exist. Will not return <code>null</code>.
820         *
821     * <p>
822     * <b>Definition:</b>
823     * An encounter that provides additional information about the healthcare context in which this request is made
824     * </p> 
825         */
826        public ResourceReferenceDt getEncounter() {  
827                if (myEncounter == null) {
828                        myEncounter = new ResourceReferenceDt();
829                }
830                return myEncounter;
831        }
832
833        /**
834         * Sets the value(s) for <b>encounter</b> (context)
835         *
836     * <p>
837     * <b>Definition:</b>
838     * An encounter that provides additional information about the healthcare context in which this request is made
839     * </p> 
840         */
841        public NutritionOrder setEncounter(ResourceReferenceDt theValue) {
842                myEncounter = theValue;
843                return this;
844        }
845        
846        
847
848  
849        /**
850         * Gets the value(s) for <b>dateTime</b> (when.recorded).
851         * creating it if it does
852         * not exist. Will not return <code>null</code>.
853         *
854     * <p>
855     * <b>Definition:</b>
856     * The date and time that this nutrition order was requested.
857     * </p> 
858         */
859        public DateTimeDt getDateTimeElement() {  
860                if (myDateTime == null) {
861                        myDateTime = new DateTimeDt();
862                }
863                return myDateTime;
864        }
865
866        
867        /**
868         * Gets the value(s) for <b>dateTime</b> (when.recorded).
869         * creating it if it does
870         * not exist. Will not return <code>null</code>.
871         *
872     * <p>
873     * <b>Definition:</b>
874     * The date and time that this nutrition order was requested.
875     * </p> 
876         */
877        public Date getDateTime() {  
878                return getDateTimeElement().getValue();
879        }
880
881        /**
882         * Sets the value(s) for <b>dateTime</b> (when.recorded)
883         *
884     * <p>
885     * <b>Definition:</b>
886     * The date and time that this nutrition order was requested.
887     * </p> 
888         */
889        public NutritionOrder setDateTime(DateTimeDt theValue) {
890                myDateTime = theValue;
891                return this;
892        }
893        
894        
895
896        /**
897         * Sets the value for <b>dateTime</b> (when.recorded)
898         *
899     * <p>
900     * <b>Definition:</b>
901     * The date and time that this nutrition order was requested.
902     * </p> 
903         */
904        public NutritionOrder setDateTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
905                myDateTime = new DateTimeDt(theDate, thePrecision); 
906                return this; 
907        }
908
909        /**
910         * Sets the value for <b>dateTime</b> (when.recorded)
911         *
912     * <p>
913     * <b>Definition:</b>
914     * The date and time that this nutrition order was requested.
915     * </p> 
916         */
917        public NutritionOrder setDateTimeWithSecondsPrecision( Date theDate) {
918                myDateTime = new DateTimeDt(theDate); 
919                return this; 
920        }
921
922 
923        /**
924         * Gets the value(s) for <b>status</b> (status).
925         * creating it if it does
926         * not exist. Will not return <code>null</code>.
927         *
928     * <p>
929     * <b>Definition:</b>
930     * The workflow status of the nutrition order/request.
931     * </p> 
932         */
933        public BoundCodeDt<NutritionOrderStatusEnum> getStatusElement() {  
934                if (myStatus == null) {
935                        myStatus = new BoundCodeDt<NutritionOrderStatusEnum>(NutritionOrderStatusEnum.VALUESET_BINDER);
936                }
937                return myStatus;
938        }
939
940        
941        /**
942         * Gets the value(s) for <b>status</b> (status).
943         * creating it if it does
944         * not exist. Will not return <code>null</code>.
945         *
946     * <p>
947     * <b>Definition:</b>
948     * The workflow status of the nutrition order/request.
949     * </p> 
950         */
951        public String getStatus() {  
952                return getStatusElement().getValue();
953        }
954
955        /**
956         * Sets the value(s) for <b>status</b> (status)
957         *
958     * <p>
959     * <b>Definition:</b>
960     * The workflow status of the nutrition order/request.
961     * </p> 
962         */
963        public NutritionOrder setStatus(BoundCodeDt<NutritionOrderStatusEnum> theValue) {
964                myStatus = theValue;
965                return this;
966        }
967        
968        
969
970        /**
971         * Sets the value(s) for <b>status</b> (status)
972         *
973     * <p>
974     * <b>Definition:</b>
975     * The workflow status of the nutrition order/request.
976     * </p> 
977         */
978        public NutritionOrder setStatus(NutritionOrderStatusEnum theValue) {
979                setStatus(new BoundCodeDt<NutritionOrderStatusEnum>(NutritionOrderStatusEnum.VALUESET_BINDER, theValue));
980                
981/*
982                getStatusElement().setValueAsEnum(theValue);
983*/
984                return this;
985        }
986
987  
988        /**
989         * Gets the value(s) for <b>allergyIntolerance</b> ().
990         * creating it if it does
991         * not exist. Will not return <code>null</code>.
992         *
993     * <p>
994     * <b>Definition:</b>
995     * A link to a record of allergies or intolerances  which should be included in the nutrition order.
996     * </p> 
997         */
998        public java.util.List<ResourceReferenceDt> getAllergyIntolerance() {  
999                if (myAllergyIntolerance == null) {
1000                        myAllergyIntolerance = new java.util.ArrayList<ResourceReferenceDt>();
1001                }
1002                return myAllergyIntolerance;
1003        }
1004
1005        /**
1006         * Sets the value(s) for <b>allergyIntolerance</b> ()
1007         *
1008     * <p>
1009     * <b>Definition:</b>
1010     * A link to a record of allergies or intolerances  which should be included in the nutrition order.
1011     * </p> 
1012         */
1013        public NutritionOrder setAllergyIntolerance(java.util.List<ResourceReferenceDt> theValue) {
1014                myAllergyIntolerance = theValue;
1015                return this;
1016        }
1017        
1018        
1019
1020        /**
1021         * Adds and returns a new value for <b>allergyIntolerance</b> ()
1022         *
1023     * <p>
1024     * <b>Definition:</b>
1025     * A link to a record of allergies or intolerances  which should be included in the nutrition order.
1026     * </p> 
1027         */
1028        public ResourceReferenceDt addAllergyIntolerance() {
1029                ResourceReferenceDt newType = new ResourceReferenceDt();
1030                getAllergyIntolerance().add(newType);
1031                return newType; 
1032        }
1033  
1034        /**
1035         * Gets the value(s) for <b>foodPreferenceModifier</b> ().
1036         * creating it if it does
1037         * not exist. Will not return <code>null</code>.
1038         *
1039     * <p>
1040     * <b>Definition:</b>
1041     * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1042     * </p> 
1043         */
1044        public java.util.List<CodeableConceptDt> getFoodPreferenceModifier() {  
1045                if (myFoodPreferenceModifier == null) {
1046                        myFoodPreferenceModifier = new java.util.ArrayList<CodeableConceptDt>();
1047                }
1048                return myFoodPreferenceModifier;
1049        }
1050
1051        /**
1052         * Sets the value(s) for <b>foodPreferenceModifier</b> ()
1053         *
1054     * <p>
1055     * <b>Definition:</b>
1056     * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1057     * </p> 
1058         */
1059        public NutritionOrder setFoodPreferenceModifier(java.util.List<CodeableConceptDt> theValue) {
1060                myFoodPreferenceModifier = theValue;
1061                return this;
1062        }
1063        
1064        
1065
1066        /**
1067         * Adds and returns a new value for <b>foodPreferenceModifier</b> ()
1068         *
1069     * <p>
1070     * <b>Definition:</b>
1071     * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1072     * </p> 
1073         */
1074        public CodeableConceptDt addFoodPreferenceModifier() {
1075                CodeableConceptDt newType = new CodeableConceptDt();
1076                getFoodPreferenceModifier().add(newType);
1077                return newType; 
1078        }
1079
1080        /**
1081         * Adds a given new value for <b>foodPreferenceModifier</b> ()
1082         *
1083         * <p>
1084         * <b>Definition:</b>
1085         * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1086         * </p>
1087         * @param theValue The foodPreferenceModifier to add (must not be <code>null</code>)
1088         */
1089        public NutritionOrder addFoodPreferenceModifier(CodeableConceptDt theValue) {
1090                if (theValue == null) {
1091                        throw new NullPointerException("theValue must not be null");
1092                }
1093                getFoodPreferenceModifier().add(theValue);
1094                return this;
1095        }
1096
1097        /**
1098         * Gets the first repetition for <b>foodPreferenceModifier</b> (),
1099         * creating it if it does not already exist.
1100         *
1101     * <p>
1102     * <b>Definition:</b>
1103     * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1104     * </p> 
1105         */
1106        public CodeableConceptDt getFoodPreferenceModifierFirstRep() {
1107                if (getFoodPreferenceModifier().isEmpty()) {
1108                        return addFoodPreferenceModifier();
1109                }
1110                return getFoodPreferenceModifier().get(0); 
1111        }
1112  
1113        /**
1114         * Gets the value(s) for <b>excludeFoodModifier</b> ().
1115         * creating it if it does
1116         * not exist. Will not return <code>null</code>.
1117         *
1118     * <p>
1119     * <b>Definition:</b>
1120     * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient&rsquo;s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1121     * </p> 
1122         */
1123        public java.util.List<CodeableConceptDt> getExcludeFoodModifier() {  
1124                if (myExcludeFoodModifier == null) {
1125                        myExcludeFoodModifier = new java.util.ArrayList<CodeableConceptDt>();
1126                }
1127                return myExcludeFoodModifier;
1128        }
1129
1130        /**
1131         * Sets the value(s) for <b>excludeFoodModifier</b> ()
1132         *
1133     * <p>
1134     * <b>Definition:</b>
1135     * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient&rsquo;s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1136     * </p> 
1137         */
1138        public NutritionOrder setExcludeFoodModifier(java.util.List<CodeableConceptDt> theValue) {
1139                myExcludeFoodModifier = theValue;
1140                return this;
1141        }
1142        
1143        
1144
1145        /**
1146         * Adds and returns a new value for <b>excludeFoodModifier</b> ()
1147         *
1148     * <p>
1149     * <b>Definition:</b>
1150     * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient&rsquo;s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1151     * </p> 
1152         */
1153        public CodeableConceptDt addExcludeFoodModifier() {
1154                CodeableConceptDt newType = new CodeableConceptDt();
1155                getExcludeFoodModifier().add(newType);
1156                return newType; 
1157        }
1158
1159        /**
1160         * Adds a given new value for <b>excludeFoodModifier</b> ()
1161         *
1162         * <p>
1163         * <b>Definition:</b>
1164         * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient&rsquo;s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1165         * </p>
1166         * @param theValue The excludeFoodModifier to add (must not be <code>null</code>)
1167         */
1168        public NutritionOrder addExcludeFoodModifier(CodeableConceptDt theValue) {
1169                if (theValue == null) {
1170                        throw new NullPointerException("theValue must not be null");
1171                }
1172                getExcludeFoodModifier().add(theValue);
1173                return this;
1174        }
1175
1176        /**
1177         * Gets the first repetition for <b>excludeFoodModifier</b> (),
1178         * creating it if it does not already exist.
1179         *
1180     * <p>
1181     * <b>Definition:</b>
1182     * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient&rsquo;s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
1183     * </p> 
1184         */
1185        public CodeableConceptDt getExcludeFoodModifierFirstRep() {
1186                if (getExcludeFoodModifier().isEmpty()) {
1187                        return addExcludeFoodModifier();
1188                }
1189                return getExcludeFoodModifier().get(0); 
1190        }
1191  
1192        /**
1193         * Gets the value(s) for <b>oralDiet</b> ().
1194         * creating it if it does
1195         * not exist. Will not return <code>null</code>.
1196         *
1197     * <p>
1198     * <b>Definition:</b>
1199     * Diet given orally in contrast to enteral (tube) feeding.
1200     * </p> 
1201         */
1202        public OralDiet getOralDiet() {  
1203                if (myOralDiet == null) {
1204                        myOralDiet = new OralDiet();
1205                }
1206                return myOralDiet;
1207        }
1208
1209        /**
1210         * Sets the value(s) for <b>oralDiet</b> ()
1211         *
1212     * <p>
1213     * <b>Definition:</b>
1214     * Diet given orally in contrast to enteral (tube) feeding.
1215     * </p> 
1216         */
1217        public NutritionOrder setOralDiet(OralDiet theValue) {
1218                myOralDiet = theValue;
1219                return this;
1220        }
1221        
1222        
1223
1224  
1225        /**
1226         * Gets the value(s) for <b>supplement</b> ().
1227         * creating it if it does
1228         * not exist. Will not return <code>null</code>.
1229         *
1230     * <p>
1231     * <b>Definition:</b>
1232     * Oral nutritional products given in order to add further nutritional value to the patient's diet.
1233     * </p> 
1234         */
1235        public java.util.List<Supplement> getSupplement() {  
1236                if (mySupplement == null) {
1237                        mySupplement = new java.util.ArrayList<Supplement>();
1238                }
1239                return mySupplement;
1240        }
1241
1242        /**
1243         * Sets the value(s) for <b>supplement</b> ()
1244         *
1245     * <p>
1246     * <b>Definition:</b>
1247     * Oral nutritional products given in order to add further nutritional value to the patient's diet.
1248     * </p> 
1249         */
1250        public NutritionOrder setSupplement(java.util.List<Supplement> theValue) {
1251                mySupplement = theValue;
1252                return this;
1253        }
1254        
1255        
1256
1257        /**
1258         * Adds and returns a new value for <b>supplement</b> ()
1259         *
1260     * <p>
1261     * <b>Definition:</b>
1262     * Oral nutritional products given in order to add further nutritional value to the patient's diet.
1263     * </p> 
1264         */
1265        public Supplement addSupplement() {
1266                Supplement newType = new Supplement();
1267                getSupplement().add(newType);
1268                return newType; 
1269        }
1270
1271        /**
1272         * Adds a given new value for <b>supplement</b> ()
1273         *
1274         * <p>
1275         * <b>Definition:</b>
1276         * Oral nutritional products given in order to add further nutritional value to the patient's diet.
1277         * </p>
1278         * @param theValue The supplement to add (must not be <code>null</code>)
1279         */
1280        public NutritionOrder addSupplement(Supplement theValue) {
1281                if (theValue == null) {
1282                        throw new NullPointerException("theValue must not be null");
1283                }
1284                getSupplement().add(theValue);
1285                return this;
1286        }
1287
1288        /**
1289         * Gets the first repetition for <b>supplement</b> (),
1290         * creating it if it does not already exist.
1291         *
1292     * <p>
1293     * <b>Definition:</b>
1294     * Oral nutritional products given in order to add further nutritional value to the patient's diet.
1295     * </p> 
1296         */
1297        public Supplement getSupplementFirstRep() {
1298                if (getSupplement().isEmpty()) {
1299                        return addSupplement();
1300                }
1301                return getSupplement().get(0); 
1302        }
1303  
1304        /**
1305         * Gets the value(s) for <b>enteralFormula</b> ().
1306         * creating it if it does
1307         * not exist. Will not return <code>null</code>.
1308         *
1309     * <p>
1310     * <b>Definition:</b>
1311     * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.
1312     * </p> 
1313         */
1314        public EnteralFormula getEnteralFormula() {  
1315                if (myEnteralFormula == null) {
1316                        myEnteralFormula = new EnteralFormula();
1317                }
1318                return myEnteralFormula;
1319        }
1320
1321        /**
1322         * Sets the value(s) for <b>enteralFormula</b> ()
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.
1327     * </p> 
1328         */
1329        public NutritionOrder setEnteralFormula(EnteralFormula theValue) {
1330                myEnteralFormula = theValue;
1331                return this;
1332        }
1333        
1334        
1335
1336  
1337        /**
1338         * Block class for child element: <b>NutritionOrder.oralDiet</b> ()
1339         *
1340     * <p>
1341     * <b>Definition:</b>
1342     * Diet given orally in contrast to enteral (tube) feeding.
1343     * </p> 
1344         */
1345        @Block()        
1346        public static class OralDiet 
1347            extends  BaseIdentifiableElement        implements IResourceBlock {
1348        
1349        @Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1350        @Description(
1351                shortDefinition="",
1352                formalDefinition="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet."
1353        )
1354        private java.util.List<CodeableConceptDt> myType;
1355        
1356        @Child(name="schedule", type=TimingDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
1357        @Description(
1358                shortDefinition="",
1359                formalDefinition="The time period and frequency at which the diet should be given"
1360        )
1361        private java.util.List<TimingDt> mySchedule;
1362        
1363        @Child(name="nutrient", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
1364        @Description(
1365                shortDefinition="",
1366                formalDefinition="Class that defines the quantity and type of nutrient modifications required for the oral diet."
1367        )
1368        private java.util.List<OralDietNutrient> myNutrient;
1369        
1370        @Child(name="texture", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1371        @Description(
1372                shortDefinition="",
1373                formalDefinition="Class that describes any texture modifications required for the patient to safely consume various types of solid foods."
1374        )
1375        private java.util.List<OralDietTexture> myTexture;
1376        
1377        @Child(name="fluidConsistencyType", type=CodeableConceptDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
1378        @Description(
1379                shortDefinition="",
1380                formalDefinition="The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient."
1381        )
1382        private java.util.List<BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>> myFluidConsistencyType;
1383        
1384        @Child(name="instruction", type=StringDt.class, order=5, min=0, max=1, summary=true, modifier=false)    
1385        @Description(
1386                shortDefinition="",
1387                formalDefinition="Free text or additional instructions or information pertaining to the oral diet."
1388        )
1389        private StringDt myInstruction;
1390        
1391
1392        @Override
1393        public boolean isEmpty() {
1394                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  mySchedule,  myNutrient,  myTexture,  myFluidConsistencyType,  myInstruction);
1395        }
1396        
1397        @Override
1398        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1399                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, mySchedule, myNutrient, myTexture, myFluidConsistencyType, myInstruction);
1400        }
1401
1402        /**
1403         * Gets the value(s) for <b>type</b> ().
1404         * creating it if it does
1405         * not exist. Will not return <code>null</code>.
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.
1410     * </p> 
1411         */
1412        public java.util.List<CodeableConceptDt> getType() {  
1413                if (myType == null) {
1414                        myType = new java.util.ArrayList<CodeableConceptDt>();
1415                }
1416                return myType;
1417        }
1418
1419        /**
1420         * Sets the value(s) for <b>type</b> ()
1421         *
1422     * <p>
1423     * <b>Definition:</b>
1424     * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.
1425     * </p> 
1426         */
1427        public OralDiet setType(java.util.List<CodeableConceptDt> theValue) {
1428                myType = theValue;
1429                return this;
1430        }
1431        
1432        
1433
1434        /**
1435         * Adds and returns a new value for <b>type</b> ()
1436         *
1437     * <p>
1438     * <b>Definition:</b>
1439     * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.
1440     * </p> 
1441         */
1442        public CodeableConceptDt addType() {
1443                CodeableConceptDt newType = new CodeableConceptDt();
1444                getType().add(newType);
1445                return newType; 
1446        }
1447
1448        /**
1449         * Adds a given new value for <b>type</b> ()
1450         *
1451         * <p>
1452         * <b>Definition:</b>
1453         * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.
1454         * </p>
1455         * @param theValue The type to add (must not be <code>null</code>)
1456         */
1457        public OralDiet addType(CodeableConceptDt theValue) {
1458                if (theValue == null) {
1459                        throw new NullPointerException("theValue must not be null");
1460                }
1461                getType().add(theValue);
1462                return this;
1463        }
1464
1465        /**
1466         * Gets the first repetition for <b>type</b> (),
1467         * creating it if it does not already exist.
1468         *
1469     * <p>
1470     * <b>Definition:</b>
1471     * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.
1472     * </p> 
1473         */
1474        public CodeableConceptDt getTypeFirstRep() {
1475                if (getType().isEmpty()) {
1476                        return addType();
1477                }
1478                return getType().get(0); 
1479        }
1480  
1481        /**
1482         * Gets the value(s) for <b>schedule</b> ().
1483         * creating it if it does
1484         * not exist. Will not return <code>null</code>.
1485         *
1486     * <p>
1487     * <b>Definition:</b>
1488     * The time period and frequency at which the diet should be given
1489     * </p> 
1490         */
1491        public java.util.List<TimingDt> getSchedule() {  
1492                if (mySchedule == null) {
1493                        mySchedule = new java.util.ArrayList<TimingDt>();
1494                }
1495                return mySchedule;
1496        }
1497
1498        /**
1499         * Sets the value(s) for <b>schedule</b> ()
1500         *
1501     * <p>
1502     * <b>Definition:</b>
1503     * The time period and frequency at which the diet should be given
1504     * </p> 
1505         */
1506        public OralDiet setSchedule(java.util.List<TimingDt> theValue) {
1507                mySchedule = theValue;
1508                return this;
1509        }
1510        
1511        
1512
1513        /**
1514         * Adds and returns a new value for <b>schedule</b> ()
1515         *
1516     * <p>
1517     * <b>Definition:</b>
1518     * The time period and frequency at which the diet should be given
1519     * </p> 
1520         */
1521        public TimingDt addSchedule() {
1522                TimingDt newType = new TimingDt();
1523                getSchedule().add(newType);
1524                return newType; 
1525        }
1526
1527        /**
1528         * Adds a given new value for <b>schedule</b> ()
1529         *
1530         * <p>
1531         * <b>Definition:</b>
1532         * The time period and frequency at which the diet should be given
1533         * </p>
1534         * @param theValue The schedule to add (must not be <code>null</code>)
1535         */
1536        public OralDiet addSchedule(TimingDt theValue) {
1537                if (theValue == null) {
1538                        throw new NullPointerException("theValue must not be null");
1539                }
1540                getSchedule().add(theValue);
1541                return this;
1542        }
1543
1544        /**
1545         * Gets the first repetition for <b>schedule</b> (),
1546         * creating it if it does not already exist.
1547         *
1548     * <p>
1549     * <b>Definition:</b>
1550     * The time period and frequency at which the diet should be given
1551     * </p> 
1552         */
1553        public TimingDt getScheduleFirstRep() {
1554                if (getSchedule().isEmpty()) {
1555                        return addSchedule();
1556                }
1557                return getSchedule().get(0); 
1558        }
1559  
1560        /**
1561         * Gets the value(s) for <b>nutrient</b> ().
1562         * creating it if it does
1563         * not exist. Will not return <code>null</code>.
1564         *
1565     * <p>
1566     * <b>Definition:</b>
1567     * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1568     * </p> 
1569         */
1570        public java.util.List<OralDietNutrient> getNutrient() {  
1571                if (myNutrient == null) {
1572                        myNutrient = new java.util.ArrayList<OralDietNutrient>();
1573                }
1574                return myNutrient;
1575        }
1576
1577        /**
1578         * Sets the value(s) for <b>nutrient</b> ()
1579         *
1580     * <p>
1581     * <b>Definition:</b>
1582     * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1583     * </p> 
1584         */
1585        public OralDiet setNutrient(java.util.List<OralDietNutrient> theValue) {
1586                myNutrient = theValue;
1587                return this;
1588        }
1589        
1590        
1591
1592        /**
1593         * Adds and returns a new value for <b>nutrient</b> ()
1594         *
1595     * <p>
1596     * <b>Definition:</b>
1597     * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1598     * </p> 
1599         */
1600        public OralDietNutrient addNutrient() {
1601                OralDietNutrient newType = new OralDietNutrient();
1602                getNutrient().add(newType);
1603                return newType; 
1604        }
1605
1606        /**
1607         * Adds a given new value for <b>nutrient</b> ()
1608         *
1609         * <p>
1610         * <b>Definition:</b>
1611         * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1612         * </p>
1613         * @param theValue The nutrient to add (must not be <code>null</code>)
1614         */
1615        public OralDiet addNutrient(OralDietNutrient theValue) {
1616                if (theValue == null) {
1617                        throw new NullPointerException("theValue must not be null");
1618                }
1619                getNutrient().add(theValue);
1620                return this;
1621        }
1622
1623        /**
1624         * Gets the first repetition for <b>nutrient</b> (),
1625         * creating it if it does not already exist.
1626         *
1627     * <p>
1628     * <b>Definition:</b>
1629     * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1630     * </p> 
1631         */
1632        public OralDietNutrient getNutrientFirstRep() {
1633                if (getNutrient().isEmpty()) {
1634                        return addNutrient();
1635                }
1636                return getNutrient().get(0); 
1637        }
1638  
1639        /**
1640         * Gets the value(s) for <b>texture</b> ().
1641         * creating it if it does
1642         * not exist. Will not return <code>null</code>.
1643         *
1644     * <p>
1645     * <b>Definition:</b>
1646     * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
1647     * </p> 
1648         */
1649        public java.util.List<OralDietTexture> getTexture() {  
1650                if (myTexture == null) {
1651                        myTexture = new java.util.ArrayList<OralDietTexture>();
1652                }
1653                return myTexture;
1654        }
1655
1656        /**
1657         * Sets the value(s) for <b>texture</b> ()
1658         *
1659     * <p>
1660     * <b>Definition:</b>
1661     * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
1662     * </p> 
1663         */
1664        public OralDiet setTexture(java.util.List<OralDietTexture> theValue) {
1665                myTexture = theValue;
1666                return this;
1667        }
1668        
1669        
1670
1671        /**
1672         * Adds and returns a new value for <b>texture</b> ()
1673         *
1674     * <p>
1675     * <b>Definition:</b>
1676     * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
1677     * </p> 
1678         */
1679        public OralDietTexture addTexture() {
1680                OralDietTexture newType = new OralDietTexture();
1681                getTexture().add(newType);
1682                return newType; 
1683        }
1684
1685        /**
1686         * Adds a given new value for <b>texture</b> ()
1687         *
1688         * <p>
1689         * <b>Definition:</b>
1690         * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
1691         * </p>
1692         * @param theValue The texture to add (must not be <code>null</code>)
1693         */
1694        public OralDiet addTexture(OralDietTexture theValue) {
1695                if (theValue == null) {
1696                        throw new NullPointerException("theValue must not be null");
1697                }
1698                getTexture().add(theValue);
1699                return this;
1700        }
1701
1702        /**
1703         * Gets the first repetition for <b>texture</b> (),
1704         * creating it if it does not already exist.
1705         *
1706     * <p>
1707     * <b>Definition:</b>
1708     * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
1709     * </p> 
1710         */
1711        public OralDietTexture getTextureFirstRep() {
1712                if (getTexture().isEmpty()) {
1713                        return addTexture();
1714                }
1715                return getTexture().get(0); 
1716        }
1717  
1718        /**
1719         * Gets the value(s) for <b>fluidConsistencyType</b> ().
1720         * creating it if it does
1721         * not exist. Will not return <code>null</code>.
1722         *
1723     * <p>
1724     * <b>Definition:</b>
1725     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1726     * </p> 
1727         */
1728        public java.util.List<BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>> getFluidConsistencyType() {  
1729                if (myFluidConsistencyType == null) {
1730                        myFluidConsistencyType = new java.util.ArrayList<BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>>();
1731                }
1732                return myFluidConsistencyType;
1733        }
1734
1735        /**
1736         * Sets the value(s) for <b>fluidConsistencyType</b> ()
1737         *
1738     * <p>
1739     * <b>Definition:</b>
1740     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1741     * </p> 
1742         */
1743        public OralDiet setFluidConsistencyType(java.util.List<BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>> theValue) {
1744                myFluidConsistencyType = theValue;
1745                return this;
1746        }
1747        
1748        
1749
1750        /**
1751         * Add a value for <b>fluidConsistencyType</b> () using an enumerated type. This
1752         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1753         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1754         * you may also use the {@link #addFluidConsistencyType()} method.
1755         *
1756     * <p>
1757     * <b>Definition:</b>
1758     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1759     * </p> 
1760         */
1761        public BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum> addFluidConsistencyType(FluidConsistencyTypeCodesEnum theValue) {
1762                BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum> retVal = new BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>(FluidConsistencyTypeCodesEnum.VALUESET_BINDER, theValue);
1763                getFluidConsistencyType().add(retVal);
1764                return retVal;
1765        }
1766
1767        /**
1768         * Gets the first repetition for <b>fluidConsistencyType</b> (),
1769         * creating it if it does not already exist.
1770         *
1771     * <p>
1772     * <b>Definition:</b>
1773     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1774     * </p> 
1775         */
1776        public BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum> getFluidConsistencyTypeFirstRep() {
1777                if (getFluidConsistencyType().size() == 0) {
1778                        addFluidConsistencyType();
1779                }
1780                return getFluidConsistencyType().get(0);
1781        }
1782
1783        /**
1784         * Add a value for <b>fluidConsistencyType</b> ()
1785         *
1786     * <p>
1787     * <b>Definition:</b>
1788     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1789     * </p> 
1790         */
1791        public BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum> addFluidConsistencyType() {
1792                BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum> retVal = new BoundCodeableConceptDt<FluidConsistencyTypeCodesEnum>(FluidConsistencyTypeCodesEnum.VALUESET_BINDER);
1793                getFluidConsistencyType().add(retVal);
1794                return retVal;
1795        }
1796
1797        /**
1798         * Sets the value(s), and clears any existing value(s) for <b>fluidConsistencyType</b> ()
1799         *
1800     * <p>
1801     * <b>Definition:</b>
1802     * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
1803     * </p> 
1804         */
1805        public OralDiet setFluidConsistencyType(FluidConsistencyTypeCodesEnum theValue) {
1806                getFluidConsistencyType().clear();
1807                addFluidConsistencyType(theValue);
1808                return this;
1809        }
1810
1811  
1812        /**
1813         * Gets the value(s) for <b>instruction</b> ().
1814         * creating it if it does
1815         * not exist. Will not return <code>null</code>.
1816         *
1817     * <p>
1818     * <b>Definition:</b>
1819     * Free text or additional instructions or information pertaining to the oral diet.
1820     * </p> 
1821         */
1822        public StringDt getInstructionElement() {  
1823                if (myInstruction == null) {
1824                        myInstruction = new StringDt();
1825                }
1826                return myInstruction;
1827        }
1828
1829        
1830        /**
1831         * Gets the value(s) for <b>instruction</b> ().
1832         * creating it if it does
1833         * not exist. Will not return <code>null</code>.
1834         *
1835     * <p>
1836     * <b>Definition:</b>
1837     * Free text or additional instructions or information pertaining to the oral diet.
1838     * </p> 
1839         */
1840        public String getInstruction() {  
1841                return getInstructionElement().getValue();
1842        }
1843
1844        /**
1845         * Sets the value(s) for <b>instruction</b> ()
1846         *
1847     * <p>
1848     * <b>Definition:</b>
1849     * Free text or additional instructions or information pertaining to the oral diet.
1850     * </p> 
1851         */
1852        public OralDiet setInstruction(StringDt theValue) {
1853                myInstruction = theValue;
1854                return this;
1855        }
1856        
1857        
1858
1859        /**
1860         * Sets the value for <b>instruction</b> ()
1861         *
1862     * <p>
1863     * <b>Definition:</b>
1864     * Free text or additional instructions or information pertaining to the oral diet.
1865     * </p> 
1866         */
1867        public OralDiet setInstruction( String theString) {
1868                myInstruction = new StringDt(theString); 
1869                return this; 
1870        }
1871
1872 
1873
1874
1875        }
1876
1877        /**
1878         * Block class for child element: <b>NutritionOrder.oralDiet.nutrient</b> ()
1879         *
1880     * <p>
1881     * <b>Definition:</b>
1882     * Class that defines the quantity and type of nutrient modifications required for the oral diet.
1883     * </p> 
1884         */
1885        @Block()        
1886        public static class OralDietNutrient 
1887            extends  BaseIdentifiableElement        implements IResourceBlock {
1888        
1889        @Child(name="modifier", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)     
1890        @Description(
1891                shortDefinition="",
1892                formalDefinition="The nutrient that is being modified such as carbohydrate or sodium."
1893        )
1894        private BoundCodeableConceptDt<NutrientModifierCodesEnum> myModifier;
1895        
1896        @Child(name="amount", type=SimpleQuantityDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
1897        @Description(
1898                shortDefinition="",
1899                formalDefinition="The quantity of the specified nutrient to include in diet."
1900        )
1901        private SimpleQuantityDt myAmount;
1902        
1903
1904        @Override
1905        public boolean isEmpty() {
1906                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myModifier,  myAmount);
1907        }
1908        
1909        @Override
1910        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1911                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myModifier, myAmount);
1912        }
1913
1914        /**
1915         * Gets the value(s) for <b>modifier</b> ().
1916         * creating it if it does
1917         * not exist. Will not return <code>null</code>.
1918         *
1919     * <p>
1920     * <b>Definition:</b>
1921     * The nutrient that is being modified such as carbohydrate or sodium.
1922     * </p> 
1923         */
1924        public BoundCodeableConceptDt<NutrientModifierCodesEnum> getModifier() {  
1925                if (myModifier == null) {
1926                        myModifier = new BoundCodeableConceptDt<NutrientModifierCodesEnum>(NutrientModifierCodesEnum.VALUESET_BINDER);
1927                }
1928                return myModifier;
1929        }
1930
1931        /**
1932         * Sets the value(s) for <b>modifier</b> ()
1933         *
1934     * <p>
1935     * <b>Definition:</b>
1936     * The nutrient that is being modified such as carbohydrate or sodium.
1937     * </p> 
1938         */
1939        public OralDietNutrient setModifier(BoundCodeableConceptDt<NutrientModifierCodesEnum> theValue) {
1940                myModifier = theValue;
1941                return this;
1942        }
1943        
1944        
1945
1946        /**
1947         * Sets the value(s) for <b>modifier</b> ()
1948         *
1949     * <p>
1950     * <b>Definition:</b>
1951     * The nutrient that is being modified such as carbohydrate or sodium.
1952     * </p> 
1953         */
1954        public OralDietNutrient setModifier(NutrientModifierCodesEnum theValue) {
1955                setModifier(new BoundCodeableConceptDt<NutrientModifierCodesEnum>(NutrientModifierCodesEnum.VALUESET_BINDER, theValue));
1956                
1957/*
1958                getModifier().setValueAsEnum(theValue);
1959*/
1960                return this;
1961        }
1962
1963  
1964        /**
1965         * Gets the value(s) for <b>amount</b> ().
1966         * creating it if it does
1967         * not exist. Will not return <code>null</code>.
1968         *
1969     * <p>
1970     * <b>Definition:</b>
1971     * The quantity of the specified nutrient to include in diet.
1972     * </p> 
1973         */
1974        public SimpleQuantityDt getAmount() {  
1975                if (myAmount == null) {
1976                        myAmount = new SimpleQuantityDt();
1977                }
1978                return myAmount;
1979        }
1980
1981        /**
1982         * Sets the value(s) for <b>amount</b> ()
1983         *
1984     * <p>
1985     * <b>Definition:</b>
1986     * The quantity of the specified nutrient to include in diet.
1987     * </p> 
1988         */
1989        public OralDietNutrient setAmount(SimpleQuantityDt theValue) {
1990                myAmount = theValue;
1991                return this;
1992        }
1993        
1994        
1995
1996  
1997
1998
1999        }
2000
2001
2002        /**
2003         * Block class for child element: <b>NutritionOrder.oralDiet.texture</b> ()
2004         *
2005     * <p>
2006     * <b>Definition:</b>
2007     * Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
2008     * </p> 
2009         */
2010        @Block()        
2011        public static class OralDietTexture 
2012            extends  BaseIdentifiableElement        implements IResourceBlock {
2013        
2014        @Child(name="modifier", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)     
2015        @Description(
2016                shortDefinition="",
2017                formalDefinition="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed."
2018        )
2019        private BoundCodeableConceptDt<TextureModifierCodesEnum> myModifier;
2020        
2021        @Child(name="foodType", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
2022        @Description(
2023                shortDefinition="",
2024                formalDefinition="The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types."
2025        )
2026        private BoundCodeableConceptDt<TextureModifiedFoodTypeCodesEnum> myFoodType;
2027        
2028
2029        @Override
2030        public boolean isEmpty() {
2031                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myModifier,  myFoodType);
2032        }
2033        
2034        @Override
2035        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2036                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myModifier, myFoodType);
2037        }
2038
2039        /**
2040         * Gets the value(s) for <b>modifier</b> ().
2041         * creating it if it does
2042         * not exist. Will not return <code>null</code>.
2043         *
2044     * <p>
2045     * <b>Definition:</b>
2046     * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.
2047     * </p> 
2048         */
2049        public BoundCodeableConceptDt<TextureModifierCodesEnum> getModifier() {  
2050                if (myModifier == null) {
2051                        myModifier = new BoundCodeableConceptDt<TextureModifierCodesEnum>(TextureModifierCodesEnum.VALUESET_BINDER);
2052                }
2053                return myModifier;
2054        }
2055
2056        /**
2057         * Sets the value(s) for <b>modifier</b> ()
2058         *
2059     * <p>
2060     * <b>Definition:</b>
2061     * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.
2062     * </p> 
2063         */
2064        public OralDietTexture setModifier(BoundCodeableConceptDt<TextureModifierCodesEnum> theValue) {
2065                myModifier = theValue;
2066                return this;
2067        }
2068        
2069        
2070
2071        /**
2072         * Sets the value(s) for <b>modifier</b> ()
2073         *
2074     * <p>
2075     * <b>Definition:</b>
2076     * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.
2077     * </p> 
2078         */
2079        public OralDietTexture setModifier(TextureModifierCodesEnum theValue) {
2080                setModifier(new BoundCodeableConceptDt<TextureModifierCodesEnum>(TextureModifierCodesEnum.VALUESET_BINDER, theValue));
2081                
2082/*
2083                getModifier().setValueAsEnum(theValue);
2084*/
2085                return this;
2086        }
2087
2088  
2089        /**
2090         * Gets the value(s) for <b>foodType</b> ().
2091         * creating it if it does
2092         * not exist. Will not return <code>null</code>.
2093         *
2094     * <p>
2095     * <b>Definition:</b>
2096     * The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types.
2097     * </p> 
2098         */
2099        public BoundCodeableConceptDt<TextureModifiedFoodTypeCodesEnum> getFoodType() {  
2100                if (myFoodType == null) {
2101                        myFoodType = new BoundCodeableConceptDt<TextureModifiedFoodTypeCodesEnum>(TextureModifiedFoodTypeCodesEnum.VALUESET_BINDER);
2102                }
2103                return myFoodType;
2104        }
2105
2106        /**
2107         * Sets the value(s) for <b>foodType</b> ()
2108         *
2109     * <p>
2110     * <b>Definition:</b>
2111     * The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types.
2112     * </p> 
2113         */
2114        public OralDietTexture setFoodType(BoundCodeableConceptDt<TextureModifiedFoodTypeCodesEnum> theValue) {
2115                myFoodType = theValue;
2116                return this;
2117        }
2118        
2119        
2120
2121        /**
2122         * Sets the value(s) for <b>foodType</b> ()
2123         *
2124     * <p>
2125     * <b>Definition:</b>
2126     * The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types.
2127     * </p> 
2128         */
2129        public OralDietTexture setFoodType(TextureModifiedFoodTypeCodesEnum theValue) {
2130                setFoodType(new BoundCodeableConceptDt<TextureModifiedFoodTypeCodesEnum>(TextureModifiedFoodTypeCodesEnum.VALUESET_BINDER, theValue));
2131                
2132/*
2133                getFoodType().setValueAsEnum(theValue);
2134*/
2135                return this;
2136        }
2137
2138  
2139
2140
2141        }
2142
2143
2144
2145        /**
2146         * Block class for child element: <b>NutritionOrder.supplement</b> ()
2147         *
2148     * <p>
2149     * <b>Definition:</b>
2150     * Oral nutritional products given in order to add further nutritional value to the patient's diet.
2151     * </p> 
2152         */
2153        @Block()        
2154        public static class Supplement 
2155            extends  BaseIdentifiableElement        implements IResourceBlock {
2156        
2157        @Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=true, modifier=false)  
2158        @Description(
2159                shortDefinition="",
2160                formalDefinition="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement"
2161        )
2162        private BoundCodeableConceptDt<SupplementTypeCodesEnum> myType;
2163        
2164        @Child(name="productName", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false)   
2165        @Description(
2166                shortDefinition="",
2167                formalDefinition="The product or brand name of the nutritional supplement such as \"Acme Protein Shake\"."
2168        )
2169        private StringDt myProductName;
2170        
2171        @Child(name="schedule", type=TimingDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
2172        @Description(
2173                shortDefinition="",
2174                formalDefinition="The time period and frequency at which the supplement(s) should be given"
2175        )
2176        private java.util.List<TimingDt> mySchedule;
2177        
2178        @Child(name="quantity", type=SimpleQuantityDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
2179        @Description(
2180                shortDefinition="",
2181                formalDefinition="The amount of the nutritional supplement to be given"
2182        )
2183        private SimpleQuantityDt myQuantity;
2184        
2185        @Child(name="instruction", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)    
2186        @Description(
2187                shortDefinition="",
2188                formalDefinition="Free text or additional instructions or information pertaining to the oral supplement."
2189        )
2190        private StringDt myInstruction;
2191        
2192
2193        @Override
2194        public boolean isEmpty() {
2195                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myProductName,  mySchedule,  myQuantity,  myInstruction);
2196        }
2197        
2198        @Override
2199        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2200                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myProductName, mySchedule, myQuantity, myInstruction);
2201        }
2202
2203        /**
2204         * Gets the value(s) for <b>type</b> ().
2205         * creating it if it does
2206         * not exist. Will not return <code>null</code>.
2207         *
2208     * <p>
2209     * <b>Definition:</b>
2210     * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement
2211     * </p> 
2212         */
2213        public BoundCodeableConceptDt<SupplementTypeCodesEnum> getType() {  
2214                if (myType == null) {
2215                        myType = new BoundCodeableConceptDt<SupplementTypeCodesEnum>(SupplementTypeCodesEnum.VALUESET_BINDER);
2216                }
2217                return myType;
2218        }
2219
2220        /**
2221         * Sets the value(s) for <b>type</b> ()
2222         *
2223     * <p>
2224     * <b>Definition:</b>
2225     * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement
2226     * </p> 
2227         */
2228        public Supplement setType(BoundCodeableConceptDt<SupplementTypeCodesEnum> theValue) {
2229                myType = theValue;
2230                return this;
2231        }
2232        
2233        
2234
2235        /**
2236         * Sets the value(s) for <b>type</b> ()
2237         *
2238     * <p>
2239     * <b>Definition:</b>
2240     * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement
2241     * </p> 
2242         */
2243        public Supplement setType(SupplementTypeCodesEnum theValue) {
2244                setType(new BoundCodeableConceptDt<SupplementTypeCodesEnum>(SupplementTypeCodesEnum.VALUESET_BINDER, theValue));
2245                
2246/*
2247                getType().setValueAsEnum(theValue);
2248*/
2249                return this;
2250        }
2251
2252  
2253        /**
2254         * Gets the value(s) for <b>productName</b> ().
2255         * creating it if it does
2256         * not exist. Will not return <code>null</code>.
2257         *
2258     * <p>
2259     * <b>Definition:</b>
2260     * The product or brand name of the nutritional supplement such as \&quot;Acme Protein Shake\&quot;.
2261     * </p> 
2262         */
2263        public StringDt getProductNameElement() {  
2264                if (myProductName == null) {
2265                        myProductName = new StringDt();
2266                }
2267                return myProductName;
2268        }
2269
2270        
2271        /**
2272         * Gets the value(s) for <b>productName</b> ().
2273         * creating it if it does
2274         * not exist. Will not return <code>null</code>.
2275         *
2276     * <p>
2277     * <b>Definition:</b>
2278     * The product or brand name of the nutritional supplement such as \&quot;Acme Protein Shake\&quot;.
2279     * </p> 
2280         */
2281        public String getProductName() {  
2282                return getProductNameElement().getValue();
2283        }
2284
2285        /**
2286         * Sets the value(s) for <b>productName</b> ()
2287         *
2288     * <p>
2289     * <b>Definition:</b>
2290     * The product or brand name of the nutritional supplement such as \&quot;Acme Protein Shake\&quot;.
2291     * </p> 
2292         */
2293        public Supplement setProductName(StringDt theValue) {
2294                myProductName = theValue;
2295                return this;
2296        }
2297        
2298        
2299
2300        /**
2301         * Sets the value for <b>productName</b> ()
2302         *
2303     * <p>
2304     * <b>Definition:</b>
2305     * The product or brand name of the nutritional supplement such as \&quot;Acme Protein Shake\&quot;.
2306     * </p> 
2307         */
2308        public Supplement setProductName( String theString) {
2309                myProductName = new StringDt(theString); 
2310                return this; 
2311        }
2312
2313 
2314        /**
2315         * Gets the value(s) for <b>schedule</b> ().
2316         * creating it if it does
2317         * not exist. Will not return <code>null</code>.
2318         *
2319     * <p>
2320     * <b>Definition:</b>
2321     * The time period and frequency at which the supplement(s) should be given
2322     * </p> 
2323         */
2324        public java.util.List<TimingDt> getSchedule() {  
2325                if (mySchedule == null) {
2326                        mySchedule = new java.util.ArrayList<TimingDt>();
2327                }
2328                return mySchedule;
2329        }
2330
2331        /**
2332         * Sets the value(s) for <b>schedule</b> ()
2333         *
2334     * <p>
2335     * <b>Definition:</b>
2336     * The time period and frequency at which the supplement(s) should be given
2337     * </p> 
2338         */
2339        public Supplement setSchedule(java.util.List<TimingDt> theValue) {
2340                mySchedule = theValue;
2341                return this;
2342        }
2343        
2344        
2345
2346        /**
2347         * Adds and returns a new value for <b>schedule</b> ()
2348         *
2349     * <p>
2350     * <b>Definition:</b>
2351     * The time period and frequency at which the supplement(s) should be given
2352     * </p> 
2353         */
2354        public TimingDt addSchedule() {
2355                TimingDt newType = new TimingDt();
2356                getSchedule().add(newType);
2357                return newType; 
2358        }
2359
2360        /**
2361         * Adds a given new value for <b>schedule</b> ()
2362         *
2363         * <p>
2364         * <b>Definition:</b>
2365         * The time period and frequency at which the supplement(s) should be given
2366         * </p>
2367         * @param theValue The schedule to add (must not be <code>null</code>)
2368         */
2369        public Supplement addSchedule(TimingDt theValue) {
2370                if (theValue == null) {
2371                        throw new NullPointerException("theValue must not be null");
2372                }
2373                getSchedule().add(theValue);
2374                return this;
2375        }
2376
2377        /**
2378         * Gets the first repetition for <b>schedule</b> (),
2379         * creating it if it does not already exist.
2380         *
2381     * <p>
2382     * <b>Definition:</b>
2383     * The time period and frequency at which the supplement(s) should be given
2384     * </p> 
2385         */
2386        public TimingDt getScheduleFirstRep() {
2387                if (getSchedule().isEmpty()) {
2388                        return addSchedule();
2389                }
2390                return getSchedule().get(0); 
2391        }
2392  
2393        /**
2394         * Gets the value(s) for <b>quantity</b> ().
2395         * creating it if it does
2396         * not exist. Will not return <code>null</code>.
2397         *
2398     * <p>
2399     * <b>Definition:</b>
2400     * The amount of the nutritional supplement to be given
2401     * </p> 
2402         */
2403        public SimpleQuantityDt getQuantity() {  
2404                if (myQuantity == null) {
2405                        myQuantity = new SimpleQuantityDt();
2406                }
2407                return myQuantity;
2408        }
2409
2410        /**
2411         * Sets the value(s) for <b>quantity</b> ()
2412         *
2413     * <p>
2414     * <b>Definition:</b>
2415     * The amount of the nutritional supplement to be given
2416     * </p> 
2417         */
2418        public Supplement setQuantity(SimpleQuantityDt theValue) {
2419                myQuantity = theValue;
2420                return this;
2421        }
2422        
2423        
2424
2425  
2426        /**
2427         * Gets the value(s) for <b>instruction</b> ().
2428         * creating it if it does
2429         * not exist. Will not return <code>null</code>.
2430         *
2431     * <p>
2432     * <b>Definition:</b>
2433     * Free text or additional instructions or information pertaining to the oral supplement.
2434     * </p> 
2435         */
2436        public StringDt getInstructionElement() {  
2437                if (myInstruction == null) {
2438                        myInstruction = new StringDt();
2439                }
2440                return myInstruction;
2441        }
2442
2443        
2444        /**
2445         * Gets the value(s) for <b>instruction</b> ().
2446         * creating it if it does
2447         * not exist. Will not return <code>null</code>.
2448         *
2449     * <p>
2450     * <b>Definition:</b>
2451     * Free text or additional instructions or information pertaining to the oral supplement.
2452     * </p> 
2453         */
2454        public String getInstruction() {  
2455                return getInstructionElement().getValue();
2456        }
2457
2458        /**
2459         * Sets the value(s) for <b>instruction</b> ()
2460         *
2461     * <p>
2462     * <b>Definition:</b>
2463     * Free text or additional instructions or information pertaining to the oral supplement.
2464     * </p> 
2465         */
2466        public Supplement setInstruction(StringDt theValue) {
2467                myInstruction = theValue;
2468                return this;
2469        }
2470        
2471        
2472
2473        /**
2474         * Sets the value for <b>instruction</b> ()
2475         *
2476     * <p>
2477     * <b>Definition:</b>
2478     * Free text or additional instructions or information pertaining to the oral supplement.
2479     * </p> 
2480         */
2481        public Supplement setInstruction( String theString) {
2482                myInstruction = new StringDt(theString); 
2483                return this; 
2484        }
2485
2486 
2487
2488
2489        }
2490
2491
2492        /**
2493         * Block class for child element: <b>NutritionOrder.enteralFormula</b> ()
2494         *
2495     * <p>
2496     * <b>Definition:</b>
2497     * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.
2498     * </p> 
2499         */
2500        @Block()        
2501        public static class EnteralFormula 
2502            extends  BaseIdentifiableElement        implements IResourceBlock {
2503        
2504        @Child(name="baseFormulaType", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=true, modifier=false)       
2505        @Description(
2506                shortDefinition="",
2507                formalDefinition="The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula."
2508        )
2509        private BoundCodeableConceptDt<EnteralFormulaTypeCodesEnum> myBaseFormulaType;
2510        
2511        @Child(name="baseFormulaProductName", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
2512        @Description(
2513                shortDefinition="",
2514                formalDefinition="The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\"."
2515        )
2516        private StringDt myBaseFormulaProductName;
2517        
2518        @Child(name="additiveType", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false) 
2519        @Description(
2520                shortDefinition="",
2521                formalDefinition="Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula."
2522        )
2523        private CodeableConceptDt myAdditiveType;
2524        
2525        @Child(name="additiveProductName", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
2526        @Description(
2527                shortDefinition="",
2528                formalDefinition="The product or brand name of the type of modular component to be added to the formula."
2529        )
2530        private StringDt myAdditiveProductName;
2531        
2532        @Child(name="caloricDensity", type=SimpleQuantityDt.class, order=4, min=0, max=1, summary=false, modifier=false)        
2533        @Description(
2534                shortDefinition="",
2535                formalDefinition="The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL."
2536        )
2537        private SimpleQuantityDt myCaloricDensity;
2538        
2539        @Child(name="routeofAdministration", type=CodeableConceptDt.class, order=5, min=0, max=1, summary=false, modifier=false)        
2540        @Description(
2541                shortDefinition="",
2542                formalDefinition="The route or physiological path of administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube."
2543        )
2544        private CodeableConceptDt myRouteofAdministration;
2545        
2546        @Child(name="administration", order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
2547        @Description(
2548                shortDefinition="",
2549                formalDefinition="Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours."
2550        )
2551        private java.util.List<EnteralFormulaAdministration> myAdministration;
2552        
2553        @Child(name="maxVolumeToDeliver", type=SimpleQuantityDt.class, order=7, min=0, max=1, summary=false, modifier=false)    
2554        @Description(
2555                shortDefinition="",
2556                formalDefinition="The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours."
2557        )
2558        private SimpleQuantityDt myMaxVolumeToDeliver;
2559        
2560        @Child(name="administrationInstruction", type=StringDt.class, order=8, min=0, max=1, summary=true, modifier=false)      
2561        @Description(
2562                shortDefinition="",
2563                formalDefinition="Free text formula administration, feeding instructions or additional instructions or information."
2564        )
2565        private StringDt myAdministrationInstruction;
2566        
2567
2568        @Override
2569        public boolean isEmpty() {
2570                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myBaseFormulaType,  myBaseFormulaProductName,  myAdditiveType,  myAdditiveProductName,  myCaloricDensity,  myRouteofAdministration,  myAdministration,  myMaxVolumeToDeliver,  myAdministrationInstruction);
2571        }
2572        
2573        @Override
2574        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2575                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myBaseFormulaType, myBaseFormulaProductName, myAdditiveType, myAdditiveProductName, myCaloricDensity, myRouteofAdministration, myAdministration, myMaxVolumeToDeliver, myAdministrationInstruction);
2576        }
2577
2578        /**
2579         * Gets the value(s) for <b>baseFormulaType</b> ().
2580         * creating it if it does
2581         * not exist. Will not return <code>null</code>.
2582         *
2583     * <p>
2584     * <b>Definition:</b>
2585     * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.
2586     * </p> 
2587         */
2588        public BoundCodeableConceptDt<EnteralFormulaTypeCodesEnum> getBaseFormulaType() {  
2589                if (myBaseFormulaType == null) {
2590                        myBaseFormulaType = new BoundCodeableConceptDt<EnteralFormulaTypeCodesEnum>(EnteralFormulaTypeCodesEnum.VALUESET_BINDER);
2591                }
2592                return myBaseFormulaType;
2593        }
2594
2595        /**
2596         * Sets the value(s) for <b>baseFormulaType</b> ()
2597         *
2598     * <p>
2599     * <b>Definition:</b>
2600     * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.
2601     * </p> 
2602         */
2603        public EnteralFormula setBaseFormulaType(BoundCodeableConceptDt<EnteralFormulaTypeCodesEnum> theValue) {
2604                myBaseFormulaType = theValue;
2605                return this;
2606        }
2607        
2608        
2609
2610        /**
2611         * Sets the value(s) for <b>baseFormulaType</b> ()
2612         *
2613     * <p>
2614     * <b>Definition:</b>
2615     * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.
2616     * </p> 
2617         */
2618        public EnteralFormula setBaseFormulaType(EnteralFormulaTypeCodesEnum theValue) {
2619                setBaseFormulaType(new BoundCodeableConceptDt<EnteralFormulaTypeCodesEnum>(EnteralFormulaTypeCodesEnum.VALUESET_BINDER, theValue));
2620                
2621/*
2622                getBaseFormulaType().setValueAsEnum(theValue);
2623*/
2624                return this;
2625        }
2626
2627  
2628        /**
2629         * Gets the value(s) for <b>baseFormulaProductName</b> ().
2630         * creating it if it does
2631         * not exist. Will not return <code>null</code>.
2632         *
2633     * <p>
2634     * <b>Definition:</b>
2635     * The product or brand name of the enteral or infant formula product such as \&quot;ACME Adult Standard Formula\&quot;.
2636     * </p> 
2637         */
2638        public StringDt getBaseFormulaProductNameElement() {  
2639                if (myBaseFormulaProductName == null) {
2640                        myBaseFormulaProductName = new StringDt();
2641                }
2642                return myBaseFormulaProductName;
2643        }
2644
2645        
2646        /**
2647         * Gets the value(s) for <b>baseFormulaProductName</b> ().
2648         * creating it if it does
2649         * not exist. Will not return <code>null</code>.
2650         *
2651     * <p>
2652     * <b>Definition:</b>
2653     * The product or brand name of the enteral or infant formula product such as \&quot;ACME Adult Standard Formula\&quot;.
2654     * </p> 
2655         */
2656        public String getBaseFormulaProductName() {  
2657                return getBaseFormulaProductNameElement().getValue();
2658        }
2659
2660        /**
2661         * Sets the value(s) for <b>baseFormulaProductName</b> ()
2662         *
2663     * <p>
2664     * <b>Definition:</b>
2665     * The product or brand name of the enteral or infant formula product such as \&quot;ACME Adult Standard Formula\&quot;.
2666     * </p> 
2667         */
2668        public EnteralFormula setBaseFormulaProductName(StringDt theValue) {
2669                myBaseFormulaProductName = theValue;
2670                return this;
2671        }
2672        
2673        
2674
2675        /**
2676         * Sets the value for <b>baseFormulaProductName</b> ()
2677         *
2678     * <p>
2679     * <b>Definition:</b>
2680     * The product or brand name of the enteral or infant formula product such as \&quot;ACME Adult Standard Formula\&quot;.
2681     * </p> 
2682         */
2683        public EnteralFormula setBaseFormulaProductName( String theString) {
2684                myBaseFormulaProductName = new StringDt(theString); 
2685                return this; 
2686        }
2687
2688 
2689        /**
2690         * Gets the value(s) for <b>additiveType</b> ().
2691         * creating it if it does
2692         * not exist. Will not return <code>null</code>.
2693         *
2694     * <p>
2695     * <b>Definition:</b>
2696     * Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.
2697     * </p> 
2698         */
2699        public CodeableConceptDt getAdditiveType() {  
2700                if (myAdditiveType == null) {
2701                        myAdditiveType = new CodeableConceptDt();
2702                }
2703                return myAdditiveType;
2704        }
2705
2706        /**
2707         * Sets the value(s) for <b>additiveType</b> ()
2708         *
2709     * <p>
2710     * <b>Definition:</b>
2711     * Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.
2712     * </p> 
2713         */
2714        public EnteralFormula setAdditiveType(CodeableConceptDt theValue) {
2715                myAdditiveType = theValue;
2716                return this;
2717        }
2718        
2719        
2720
2721  
2722        /**
2723         * Gets the value(s) for <b>additiveProductName</b> ().
2724         * creating it if it does
2725         * not exist. Will not return <code>null</code>.
2726         *
2727     * <p>
2728     * <b>Definition:</b>
2729     * The product or brand name of the type of modular component to be added to the formula.
2730     * </p> 
2731         */
2732        public StringDt getAdditiveProductNameElement() {  
2733                if (myAdditiveProductName == null) {
2734                        myAdditiveProductName = new StringDt();
2735                }
2736                return myAdditiveProductName;
2737        }
2738
2739        
2740        /**
2741         * Gets the value(s) for <b>additiveProductName</b> ().
2742         * creating it if it does
2743         * not exist. Will not return <code>null</code>.
2744         *
2745     * <p>
2746     * <b>Definition:</b>
2747     * The product or brand name of the type of modular component to be added to the formula.
2748     * </p> 
2749         */
2750        public String getAdditiveProductName() {  
2751                return getAdditiveProductNameElement().getValue();
2752        }
2753
2754        /**
2755         * Sets the value(s) for <b>additiveProductName</b> ()
2756         *
2757     * <p>
2758     * <b>Definition:</b>
2759     * The product or brand name of the type of modular component to be added to the formula.
2760     * </p> 
2761         */
2762        public EnteralFormula setAdditiveProductName(StringDt theValue) {
2763                myAdditiveProductName = theValue;
2764                return this;
2765        }
2766        
2767        
2768
2769        /**
2770         * Sets the value for <b>additiveProductName</b> ()
2771         *
2772     * <p>
2773     * <b>Definition:</b>
2774     * The product or brand name of the type of modular component to be added to the formula.
2775     * </p> 
2776         */
2777        public EnteralFormula setAdditiveProductName( String theString) {
2778                myAdditiveProductName = new StringDt(theString); 
2779                return this; 
2780        }
2781
2782 
2783        /**
2784         * Gets the value(s) for <b>caloricDensity</b> ().
2785         * creating it if it does
2786         * not exist. Will not return <code>null</code>.
2787         *
2788     * <p>
2789     * <b>Definition:</b>
2790     * The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.
2791     * </p> 
2792         */
2793        public SimpleQuantityDt getCaloricDensity() {  
2794                if (myCaloricDensity == null) {
2795                        myCaloricDensity = new SimpleQuantityDt();
2796                }
2797                return myCaloricDensity;
2798        }
2799
2800        /**
2801         * Sets the value(s) for <b>caloricDensity</b> ()
2802         *
2803     * <p>
2804     * <b>Definition:</b>
2805     * The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.
2806     * </p> 
2807         */
2808        public EnteralFormula setCaloricDensity(SimpleQuantityDt theValue) {
2809                myCaloricDensity = theValue;
2810                return this;
2811        }
2812        
2813        
2814
2815  
2816        /**
2817         * Gets the value(s) for <b>routeofAdministration</b> ().
2818         * creating it if it does
2819         * not exist. Will not return <code>null</code>.
2820         *
2821     * <p>
2822     * <b>Definition:</b>
2823     * The route or physiological path of administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube.
2824     * </p> 
2825         */
2826        public CodeableConceptDt getRouteofAdministration() {  
2827                if (myRouteofAdministration == null) {
2828                        myRouteofAdministration = new CodeableConceptDt();
2829                }
2830                return myRouteofAdministration;
2831        }
2832
2833        /**
2834         * Sets the value(s) for <b>routeofAdministration</b> ()
2835         *
2836     * <p>
2837     * <b>Definition:</b>
2838     * The route or physiological path of administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube.
2839     * </p> 
2840         */
2841        public EnteralFormula setRouteofAdministration(CodeableConceptDt theValue) {
2842                myRouteofAdministration = theValue;
2843                return this;
2844        }
2845        
2846        
2847
2848  
2849        /**
2850         * Gets the value(s) for <b>administration</b> ().
2851         * creating it if it does
2852         * not exist. Will not return <code>null</code>.
2853         *
2854     * <p>
2855     * <b>Definition:</b>
2856     * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
2857     * </p> 
2858         */
2859        public java.util.List<EnteralFormulaAdministration> getAdministration() {  
2860                if (myAdministration == null) {
2861                        myAdministration = new java.util.ArrayList<EnteralFormulaAdministration>();
2862                }
2863                return myAdministration;
2864        }
2865
2866        /**
2867         * Sets the value(s) for <b>administration</b> ()
2868         *
2869     * <p>
2870     * <b>Definition:</b>
2871     * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
2872     * </p> 
2873         */
2874        public EnteralFormula setAdministration(java.util.List<EnteralFormulaAdministration> theValue) {
2875                myAdministration = theValue;
2876                return this;
2877        }
2878        
2879        
2880
2881        /**
2882         * Adds and returns a new value for <b>administration</b> ()
2883         *
2884     * <p>
2885     * <b>Definition:</b>
2886     * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
2887     * </p> 
2888         */
2889        public EnteralFormulaAdministration addAdministration() {
2890                EnteralFormulaAdministration newType = new EnteralFormulaAdministration();
2891                getAdministration().add(newType);
2892                return newType; 
2893        }
2894
2895        /**
2896         * Adds a given new value for <b>administration</b> ()
2897         *
2898         * <p>
2899         * <b>Definition:</b>
2900         * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
2901         * </p>
2902         * @param theValue The administration to add (must not be <code>null</code>)
2903         */
2904        public EnteralFormula addAdministration(EnteralFormulaAdministration theValue) {
2905                if (theValue == null) {
2906                        throw new NullPointerException("theValue must not be null");
2907                }
2908                getAdministration().add(theValue);
2909                return this;
2910        }
2911
2912        /**
2913         * Gets the first repetition for <b>administration</b> (),
2914         * creating it if it does not already exist.
2915         *
2916     * <p>
2917     * <b>Definition:</b>
2918     * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
2919     * </p> 
2920         */
2921        public EnteralFormulaAdministration getAdministrationFirstRep() {
2922                if (getAdministration().isEmpty()) {
2923                        return addAdministration();
2924                }
2925                return getAdministration().get(0); 
2926        }
2927  
2928        /**
2929         * Gets the value(s) for <b>maxVolumeToDeliver</b> ().
2930         * creating it if it does
2931         * not exist. Will not return <code>null</code>.
2932         *
2933     * <p>
2934     * <b>Definition:</b>
2935     * The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.
2936     * </p> 
2937         */
2938        public SimpleQuantityDt getMaxVolumeToDeliver() {  
2939                if (myMaxVolumeToDeliver == null) {
2940                        myMaxVolumeToDeliver = new SimpleQuantityDt();
2941                }
2942                return myMaxVolumeToDeliver;
2943        }
2944
2945        /**
2946         * Sets the value(s) for <b>maxVolumeToDeliver</b> ()
2947         *
2948     * <p>
2949     * <b>Definition:</b>
2950     * The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.
2951     * </p> 
2952         */
2953        public EnteralFormula setMaxVolumeToDeliver(SimpleQuantityDt theValue) {
2954                myMaxVolumeToDeliver = theValue;
2955                return this;
2956        }
2957        
2958        
2959
2960  
2961        /**
2962         * Gets the value(s) for <b>administrationInstruction</b> ().
2963         * creating it if it does
2964         * not exist. Will not return <code>null</code>.
2965         *
2966     * <p>
2967     * <b>Definition:</b>
2968     * Free text formula administration, feeding instructions or additional instructions or information.
2969     * </p> 
2970         */
2971        public StringDt getAdministrationInstructionElement() {  
2972                if (myAdministrationInstruction == null) {
2973                        myAdministrationInstruction = new StringDt();
2974                }
2975                return myAdministrationInstruction;
2976        }
2977
2978        
2979        /**
2980         * Gets the value(s) for <b>administrationInstruction</b> ().
2981         * creating it if it does
2982         * not exist. Will not return <code>null</code>.
2983         *
2984     * <p>
2985     * <b>Definition:</b>
2986     * Free text formula administration, feeding instructions or additional instructions or information.
2987     * </p> 
2988         */
2989        public String getAdministrationInstruction() {  
2990                return getAdministrationInstructionElement().getValue();
2991        }
2992
2993        /**
2994         * Sets the value(s) for <b>administrationInstruction</b> ()
2995         *
2996     * <p>
2997     * <b>Definition:</b>
2998     * Free text formula administration, feeding instructions or additional instructions or information.
2999     * </p> 
3000         */
3001        public EnteralFormula setAdministrationInstruction(StringDt theValue) {
3002                myAdministrationInstruction = theValue;
3003                return this;
3004        }
3005        
3006        
3007
3008        /**
3009         * Sets the value for <b>administrationInstruction</b> ()
3010         *
3011     * <p>
3012     * <b>Definition:</b>
3013     * Free text formula administration, feeding instructions or additional instructions or information.
3014     * </p> 
3015         */
3016        public EnteralFormula setAdministrationInstruction( String theString) {
3017                myAdministrationInstruction = new StringDt(theString); 
3018                return this; 
3019        }
3020
3021 
3022
3023
3024        }
3025
3026        /**
3027         * Block class for child element: <b>NutritionOrder.enteralFormula.administration</b> ()
3028         *
3029     * <p>
3030     * <b>Definition:</b>
3031     * Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.
3032     * </p> 
3033         */
3034        @Block()        
3035        public static class EnteralFormulaAdministration 
3036            extends  BaseIdentifiableElement        implements IResourceBlock {
3037        
3038        @Child(name="schedule", type=TimingDt.class, order=0, min=0, max=1, summary=false, modifier=false)      
3039        @Description(
3040                shortDefinition="",
3041                formalDefinition="The time period and frequency at which the enteral formula should be delivered to the patient"
3042        )
3043        private TimingDt mySchedule;
3044        
3045        @Child(name="quantity", type=SimpleQuantityDt.class, order=1, min=0, max=1, summary=false, modifier=false)      
3046        @Description(
3047                shortDefinition="",
3048                formalDefinition="The volume of formula to provide to the patient per the specified administration schedule."
3049        )
3050        private SimpleQuantityDt myQuantity;
3051        
3052        @Child(name="rate", order=2, min=0, max=1, summary=false, modifier=false, type={
3053                SimpleQuantityDt.class,                 RatioDt.class   })
3054        @Description(
3055                shortDefinition="",
3056                formalDefinition="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule."
3057        )
3058        private IDatatype myRate;
3059        
3060
3061        @Override
3062        public boolean isEmpty() {
3063                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySchedule,  myQuantity,  myRate);
3064        }
3065        
3066        @Override
3067        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3068                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySchedule, myQuantity, myRate);
3069        }
3070
3071        /**
3072         * Gets the value(s) for <b>schedule</b> ().
3073         * creating it if it does
3074         * not exist. Will not return <code>null</code>.
3075         *
3076     * <p>
3077     * <b>Definition:</b>
3078     * The time period and frequency at which the enteral formula should be delivered to the patient
3079     * </p> 
3080         */
3081        public TimingDt getSchedule() {  
3082                if (mySchedule == null) {
3083                        mySchedule = new TimingDt();
3084                }
3085                return mySchedule;
3086        }
3087
3088        /**
3089         * Sets the value(s) for <b>schedule</b> ()
3090         *
3091     * <p>
3092     * <b>Definition:</b>
3093     * The time period and frequency at which the enteral formula should be delivered to the patient
3094     * </p> 
3095         */
3096        public EnteralFormulaAdministration setSchedule(TimingDt theValue) {
3097                mySchedule = theValue;
3098                return this;
3099        }
3100        
3101        
3102
3103  
3104        /**
3105         * Gets the value(s) for <b>quantity</b> ().
3106         * creating it if it does
3107         * not exist. Will not return <code>null</code>.
3108         *
3109     * <p>
3110     * <b>Definition:</b>
3111     * The volume of formula to provide to the patient per the specified administration schedule.
3112     * </p> 
3113         */
3114        public SimpleQuantityDt getQuantity() {  
3115                if (myQuantity == null) {
3116                        myQuantity = new SimpleQuantityDt();
3117                }
3118                return myQuantity;
3119        }
3120
3121        /**
3122         * Sets the value(s) for <b>quantity</b> ()
3123         *
3124     * <p>
3125     * <b>Definition:</b>
3126     * The volume of formula to provide to the patient per the specified administration schedule.
3127     * </p> 
3128         */
3129        public EnteralFormulaAdministration setQuantity(SimpleQuantityDt theValue) {
3130                myQuantity = theValue;
3131                return this;
3132        }
3133        
3134        
3135
3136  
3137        /**
3138         * Gets the value(s) for <b>rate[x]</b> ().
3139         * creating it if it does
3140         * not exist. Will not return <code>null</code>.
3141         *
3142     * <p>
3143     * <b>Definition:</b>
3144     * The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.
3145     * </p> 
3146         */
3147        public IDatatype getRate() {  
3148                return myRate;
3149        }
3150
3151        /**
3152         * Sets the value(s) for <b>rate[x]</b> ()
3153         *
3154     * <p>
3155     * <b>Definition:</b>
3156     * The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.
3157     * </p> 
3158         */
3159        public EnteralFormulaAdministration setRate(IDatatype theValue) {
3160                myRate = theValue;
3161                return this;
3162        }
3163        
3164        
3165
3166  
3167
3168
3169        }
3170
3171
3172
3173
3174
3175    @Override
3176    public String getResourceName() {
3177        return "NutritionOrder";
3178    }
3179    
3180    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
3181        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
3182    }
3183
3184
3185}