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