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