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>Questionnaire</b> Resource
282 * (infrastructure.information)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * To support structured, hierarchical registration of data gathered using digital forms and other questionnaires.
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Questionnaire">http://hl7.org/fhir/profiles/Questionnaire</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Questionnaire", profile="http://hl7.org/fhir/profiles/Questionnaire", id="questionnaire")
301public class Questionnaire extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>status</b>
306         * <p>
307         * Description: <b>The status of the questionnaire</b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>Questionnaire.status</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token"  )
313        public static final String SP_STATUS = "status";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>status</b>
317         * <p>
318         * Description: <b>The status of the questionnaire</b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>Questionnaire.status</b><br>
321         * </p>
322         */
323        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
324
325        /**
326         * Search parameter constant for <b>date</b>
327         * <p>
328         * Description: <b>When the questionnaire was last changed</b><br>
329         * Type: <b>date</b><br>
330         * Path: <b>Questionnaire.date</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="date", path="Questionnaire.date", description="When the questionnaire was last changed", type="date"  )
334        public static final String SP_DATE = "date";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>date</b>
338         * <p>
339         * Description: <b>When the questionnaire was last changed</b><br>
340         * Type: <b>date</b><br>
341         * Path: <b>Questionnaire.date</b><br>
342         * </p>
343         */
344        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
345
346        /**
347         * Search parameter constant for <b>publisher</b>
348         * <p>
349         * Description: <b>The author of the questionnaire</b><br>
350         * Type: <b>string</b><br>
351         * Path: <b>Questionnaire.publisher</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="The author of the questionnaire", type="string"  )
355        public static final String SP_PUBLISHER = "publisher";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
359         * <p>
360         * Description: <b>The author of the questionnaire</b><br>
361         * Type: <b>string</b><br>
362         * Path: <b>Questionnaire.publisher</b><br>
363         * </p>
364         */
365        public static final StringClientParam PUBLISHER = new StringClientParam(SP_PUBLISHER);
366
367        /**
368         * Search parameter constant for <b>identifier</b>
369         * <p>
370         * Description: <b>An identifier for the questionnaire</b><br>
371         * Type: <b>token</b><br>
372         * Path: <b>Questionnaire.identifier</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire", type="token"  )
376        public static final String SP_IDENTIFIER = "identifier";
377
378        /**
379         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
380         * <p>
381         * Description: <b>An identifier for the questionnaire</b><br>
382         * Type: <b>token</b><br>
383         * Path: <b>Questionnaire.identifier</b><br>
384         * </p>
385         */
386        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
387
388        /**
389         * Search parameter constant for <b>version</b>
390         * <p>
391         * Description: <b>The business version of the questionnaire</b><br>
392         * Type: <b>string</b><br>
393         * Path: <b>Questionnaire.version</b><br>
394         * </p>
395         */
396        @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string"  )
397        public static final String SP_VERSION = "version";
398
399        /**
400         * <b>Fluent Client</b> search parameter constant for <b>version</b>
401         * <p>
402         * Description: <b>The business version of the questionnaire</b><br>
403         * Type: <b>string</b><br>
404         * Path: <b>Questionnaire.version</b><br>
405         * </p>
406         */
407        public static final StringClientParam VERSION = new StringClientParam(SP_VERSION);
408
409        /**
410         * Search parameter constant for <b>code</b>
411         * <p>
412         * Description: <b>A code that corresponds to the questionnaire or one of its groups</b><br>
413         * Type: <b>token</b><br>
414         * Path: <b>Questionnaire.group.concept</b><br>
415         * </p>
416         */
417        @SearchParamDefinition(name="code", path="Questionnaire.group.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token"  )
418        public static final String SP_CODE = "code";
419
420        /**
421         * <b>Fluent Client</b> search parameter constant for <b>code</b>
422         * <p>
423         * Description: <b>A code that corresponds to the questionnaire or one of its groups</b><br>
424         * Type: <b>token</b><br>
425         * Path: <b>Questionnaire.group.concept</b><br>
426         * </p>
427         */
428        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
429
430        /**
431         * Search parameter constant for <b>title</b>
432         * <p>
433         * Description: <b>All or part of the name of the questionnaire (title for the root group of the questionnaire)</b><br>
434         * Type: <b>string</b><br>
435         * Path: <b>Questionnaire.group.title</b><br>
436         * </p>
437         */
438        @SearchParamDefinition(name="title", path="Questionnaire.group.title", description="All or part of the name of the questionnaire (title for the root group of the questionnaire)", type="string"  )
439        public static final String SP_TITLE = "title";
440
441        /**
442         * <b>Fluent Client</b> search parameter constant for <b>title</b>
443         * <p>
444         * Description: <b>All or part of the name of the questionnaire (title for the root group of the questionnaire)</b><br>
445         * Type: <b>string</b><br>
446         * Path: <b>Questionnaire.group.title</b><br>
447         * </p>
448         */
449        public static final StringClientParam TITLE = new StringClientParam(SP_TITLE);
450
451
452
453        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
454        @Description(
455                shortDefinition="id",
456                formalDefinition="This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
457        )
458        private java.util.List<IdentifierDt> myIdentifier;
459        
460        @Child(name="version", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
461        @Description(
462                shortDefinition="id.version",
463                formalDefinition="The version number assigned by the publisher for business reasons.  It may remain the same when the resource is updated"
464        )
465        private StringDt myVersion;
466        
467        @Child(name="status", type=CodeDt.class, order=2, min=1, max=1, summary=true, modifier=true)    
468        @Description(
469                shortDefinition="status",
470                formalDefinition="The lifecycle status of the questionnaire as a whole."
471        )
472        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/questionnaire-status")
473        private BoundCodeDt<QuestionnaireStatusEnum> myStatus;
474        
475        @Child(name="date", type=DateTimeDt.class, order=3, min=0, max=1, summary=true, modifier=false) 
476        @Description(
477                shortDefinition="when.recorded",
478                formalDefinition="The date that this questionnaire was last changed"
479        )
480        private DateTimeDt myDate;
481        
482        @Child(name="publisher", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)      
483        @Description(
484                shortDefinition="who.witness",
485                formalDefinition="Organization or person responsible for developing and maintaining the questionnaire"
486        )
487        private StringDt myPublisher;
488        
489        @Child(name="telecom", type=ContactPointDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
490        @Description(
491                shortDefinition="",
492                formalDefinition="Contact details to assist a user in finding and communicating with the publisher"
493        )
494        private java.util.List<ContactPointDt> myTelecom;
495        
496        @Child(name="subjectType", type=CodeDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
497        @Description(
498                shortDefinition="",
499                formalDefinition="Identifies the types of subjects that can be the subject of the questionnaire."
500        )
501        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/resource-types")
502        private java.util.List<BoundCodeDt<ResourceTypeEnum>> mySubjectType;
503        
504        @Child(name="group", order=7, min=1, max=1, summary=true, modifier=false)       
505        @Description(
506                shortDefinition="",
507                formalDefinition="A collection of related questions (or further groupings of questions)"
508        )
509        private Group myGroup;
510        
511
512        @Override
513        public boolean isEmpty() {
514                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myVersion,  myStatus,  myDate,  myPublisher,  myTelecom,  mySubjectType,  myGroup);
515        }
516        
517        @Override
518        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
519                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myVersion, myStatus, myDate, myPublisher, myTelecom, mySubjectType, myGroup);
520        }
521
522        /**
523         * Gets the value(s) for <b>identifier</b> (id).
524         * creating it if it does
525         * not exist. Will not return <code>null</code>.
526         *
527     * <p>
528     * <b>Definition:</b>
529     * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
530     * </p> 
531         */
532        public java.util.List<IdentifierDt> getIdentifier() {  
533                if (myIdentifier == null) {
534                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
535                }
536                return myIdentifier;
537        }
538
539        /**
540         * Sets the value(s) for <b>identifier</b> (id)
541         *
542     * <p>
543     * <b>Definition:</b>
544     * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
545     * </p> 
546         */
547        public Questionnaire setIdentifier(java.util.List<IdentifierDt> theValue) {
548                myIdentifier = theValue;
549                return this;
550        }
551        
552        
553
554        /**
555         * Adds and returns a new value for <b>identifier</b> (id)
556         *
557     * <p>
558     * <b>Definition:</b>
559     * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
560     * </p> 
561         */
562        public IdentifierDt addIdentifier() {
563                IdentifierDt newType = new IdentifierDt();
564                getIdentifier().add(newType);
565                return newType; 
566        }
567
568        /**
569         * Adds a given new value for <b>identifier</b> (id)
570         *
571         * <p>
572         * <b>Definition:</b>
573         * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
574         * </p>
575         * @param theValue The identifier to add (must not be <code>null</code>)
576         */
577        public Questionnaire addIdentifier(IdentifierDt theValue) {
578                if (theValue == null) {
579                        throw new NullPointerException("theValue must not be null");
580                }
581                getIdentifier().add(theValue);
582                return this;
583        }
584
585        /**
586         * Gets the first repetition for <b>identifier</b> (id),
587         * creating it if it does not already exist.
588         *
589     * <p>
590     * <b>Definition:</b>
591     * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
592     * </p> 
593         */
594        public IdentifierDt getIdentifierFirstRep() {
595                if (getIdentifier().isEmpty()) {
596                        return addIdentifier();
597                }
598                return getIdentifier().get(0); 
599        }
600  
601        /**
602         * Gets the value(s) for <b>version</b> (id.version).
603         * creating it if it does
604         * not exist. Will not return <code>null</code>.
605         *
606     * <p>
607     * <b>Definition:</b>
608     * The version number assigned by the publisher for business reasons.  It may remain the same when the resource is updated
609     * </p> 
610         */
611        public StringDt getVersionElement() {  
612                if (myVersion == null) {
613                        myVersion = new StringDt();
614                }
615                return myVersion;
616        }
617
618        
619        /**
620         * Gets the value(s) for <b>version</b> (id.version).
621         * creating it if it does
622         * not exist. This method may return <code>null</code>.
623         *
624     * <p>
625     * <b>Definition:</b>
626     * The version number assigned by the publisher for business reasons.  It may remain the same when the resource is updated
627     * </p> 
628         */
629        public String getVersion() {  
630                return getVersionElement().getValue();
631        }
632
633        /**
634         * Sets the value(s) for <b>version</b> (id.version)
635         *
636     * <p>
637     * <b>Definition:</b>
638     * The version number assigned by the publisher for business reasons.  It may remain the same when the resource is updated
639     * </p> 
640         */
641        public Questionnaire setVersion(StringDt theValue) {
642                myVersion = theValue;
643                return this;
644        }
645        
646        
647
648        /**
649         * Sets the value for <b>version</b> (id.version)
650         *
651     * <p>
652     * <b>Definition:</b>
653     * The version number assigned by the publisher for business reasons.  It may remain the same when the resource is updated
654     * </p> 
655         */
656        public Questionnaire setVersion( String theString) {
657                myVersion = new StringDt(theString); 
658                return this; 
659        }
660
661 
662        /**
663         * Gets the value(s) for <b>status</b> (status).
664         * creating it if it does
665         * not exist. Will not return <code>null</code>.
666         *
667     * <p>
668     * <b>Definition:</b>
669     * The lifecycle status of the questionnaire as a whole.
670     * </p> 
671         */
672        public BoundCodeDt<QuestionnaireStatusEnum> getStatusElement() {  
673                if (myStatus == null) {
674                        myStatus = new BoundCodeDt<QuestionnaireStatusEnum>(QuestionnaireStatusEnum.VALUESET_BINDER);
675                }
676                return myStatus;
677        }
678
679        
680        /**
681         * Gets the value(s) for <b>status</b> (status).
682         * creating it if it does
683         * not exist. This method may return <code>null</code>.
684         *
685     * <p>
686     * <b>Definition:</b>
687     * The lifecycle status of the questionnaire as a whole.
688     * </p> 
689         */
690        public String getStatus() {  
691                return getStatusElement().getValue();
692        }
693
694        /**
695         * Sets the value(s) for <b>status</b> (status)
696         *
697     * <p>
698     * <b>Definition:</b>
699     * The lifecycle status of the questionnaire as a whole.
700     * </p> 
701         */
702        public Questionnaire setStatus(BoundCodeDt<QuestionnaireStatusEnum> theValue) {
703                myStatus = theValue;
704                return this;
705        }
706        
707        
708
709        /**
710         * Sets the value(s) for <b>status</b> (status)
711         *
712     * <p>
713     * <b>Definition:</b>
714     * The lifecycle status of the questionnaire as a whole.
715     * </p> 
716         */
717        public Questionnaire setStatus(QuestionnaireStatusEnum theValue) {
718                setStatus(new BoundCodeDt<QuestionnaireStatusEnum>(QuestionnaireStatusEnum.VALUESET_BINDER, theValue));
719                
720/*
721                getStatusElement().setValueAsEnum(theValue);
722*/
723                return this;
724        }
725
726  
727        /**
728         * Gets the value(s) for <b>date</b> (when.recorded).
729         * creating it if it does
730         * not exist. Will not return <code>null</code>.
731         *
732     * <p>
733     * <b>Definition:</b>
734     * The date that this questionnaire was last changed
735     * </p> 
736         */
737        public DateTimeDt getDateElement() {  
738                if (myDate == null) {
739                        myDate = new DateTimeDt();
740                }
741                return myDate;
742        }
743
744        
745        /**
746         * Gets the value(s) for <b>date</b> (when.recorded).
747         * creating it if it does
748         * not exist. This method may return <code>null</code>.
749         *
750     * <p>
751     * <b>Definition:</b>
752     * The date that this questionnaire was last changed
753     * </p> 
754         */
755        public Date getDate() {  
756                return getDateElement().getValue();
757        }
758
759        /**
760         * Sets the value(s) for <b>date</b> (when.recorded)
761         *
762     * <p>
763     * <b>Definition:</b>
764     * The date that this questionnaire was last changed
765     * </p> 
766         */
767        public Questionnaire setDate(DateTimeDt theValue) {
768                myDate = theValue;
769                return this;
770        }
771        
772        
773
774        /**
775         * Sets the value for <b>date</b> (when.recorded)
776         *
777     * <p>
778     * <b>Definition:</b>
779     * The date that this questionnaire was last changed
780     * </p> 
781         */
782        public Questionnaire setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
783                myDate = new DateTimeDt(theDate, thePrecision); 
784                return this; 
785        }
786
787        /**
788         * Sets the value for <b>date</b> (when.recorded)
789         *
790     * <p>
791     * <b>Definition:</b>
792     * The date that this questionnaire was last changed
793     * </p> 
794         */
795        public Questionnaire setDateWithSecondsPrecision( Date theDate) {
796                myDate = new DateTimeDt(theDate); 
797                return this; 
798        }
799
800 
801        /**
802         * Gets the value(s) for <b>publisher</b> (who.witness).
803         * creating it if it does
804         * not exist. Will not return <code>null</code>.
805         *
806     * <p>
807     * <b>Definition:</b>
808     * Organization or person responsible for developing and maintaining the questionnaire
809     * </p> 
810         */
811        public StringDt getPublisherElement() {  
812                if (myPublisher == null) {
813                        myPublisher = new StringDt();
814                }
815                return myPublisher;
816        }
817
818        
819        /**
820         * Gets the value(s) for <b>publisher</b> (who.witness).
821         * creating it if it does
822         * not exist. This method may return <code>null</code>.
823         *
824     * <p>
825     * <b>Definition:</b>
826     * Organization or person responsible for developing and maintaining the questionnaire
827     * </p> 
828         */
829        public String getPublisher() {  
830                return getPublisherElement().getValue();
831        }
832
833        /**
834         * Sets the value(s) for <b>publisher</b> (who.witness)
835         *
836     * <p>
837     * <b>Definition:</b>
838     * Organization or person responsible for developing and maintaining the questionnaire
839     * </p> 
840         */
841        public Questionnaire setPublisher(StringDt theValue) {
842                myPublisher = theValue;
843                return this;
844        }
845        
846        
847
848        /**
849         * Sets the value for <b>publisher</b> (who.witness)
850         *
851     * <p>
852     * <b>Definition:</b>
853     * Organization or person responsible for developing and maintaining the questionnaire
854     * </p> 
855         */
856        public Questionnaire setPublisher( String theString) {
857                myPublisher = new StringDt(theString); 
858                return this; 
859        }
860
861 
862        /**
863         * Gets the value(s) for <b>telecom</b> ().
864         * creating it if it does
865         * not exist. Will not return <code>null</code>.
866         *
867     * <p>
868     * <b>Definition:</b>
869     * Contact details to assist a user in finding and communicating with the publisher
870     * </p> 
871         */
872        public java.util.List<ContactPointDt> getTelecom() {  
873                if (myTelecom == null) {
874                        myTelecom = new java.util.ArrayList<ContactPointDt>();
875                }
876                return myTelecom;
877        }
878
879        /**
880         * Sets the value(s) for <b>telecom</b> ()
881         *
882     * <p>
883     * <b>Definition:</b>
884     * Contact details to assist a user in finding and communicating with the publisher
885     * </p> 
886         */
887        public Questionnaire setTelecom(java.util.List<ContactPointDt> theValue) {
888                myTelecom = theValue;
889                return this;
890        }
891        
892        
893
894        /**
895         * Adds and returns a new value for <b>telecom</b> ()
896         *
897     * <p>
898     * <b>Definition:</b>
899     * Contact details to assist a user in finding and communicating with the publisher
900     * </p> 
901         */
902        public ContactPointDt addTelecom() {
903                ContactPointDt newType = new ContactPointDt();
904                getTelecom().add(newType);
905                return newType; 
906        }
907
908        /**
909         * Adds a given new value for <b>telecom</b> ()
910         *
911         * <p>
912         * <b>Definition:</b>
913         * Contact details to assist a user in finding and communicating with the publisher
914         * </p>
915         * @param theValue The telecom to add (must not be <code>null</code>)
916         */
917        public Questionnaire addTelecom(ContactPointDt theValue) {
918                if (theValue == null) {
919                        throw new NullPointerException("theValue must not be null");
920                }
921                getTelecom().add(theValue);
922                return this;
923        }
924
925        /**
926         * Gets the first repetition for <b>telecom</b> (),
927         * creating it if it does not already exist.
928         *
929     * <p>
930     * <b>Definition:</b>
931     * Contact details to assist a user in finding and communicating with the publisher
932     * </p> 
933         */
934        public ContactPointDt getTelecomFirstRep() {
935                if (getTelecom().isEmpty()) {
936                        return addTelecom();
937                }
938                return getTelecom().get(0); 
939        }
940  
941        /**
942         * Gets the value(s) for <b>subjectType</b> ().
943         * creating it if it does
944         * not exist. Will not return <code>null</code>.
945         *
946     * <p>
947     * <b>Definition:</b>
948     * Identifies the types of subjects that can be the subject of the questionnaire.
949     * </p> 
950         */
951        public java.util.List<BoundCodeDt<ResourceTypeEnum>> getSubjectType() {  
952                if (mySubjectType == null) {
953                        mySubjectType = new java.util.ArrayList<BoundCodeDt<ResourceTypeEnum>>();
954                }
955                return mySubjectType;
956        }
957
958        /**
959         * Sets the value(s) for <b>subjectType</b> ()
960         *
961     * <p>
962     * <b>Definition:</b>
963     * Identifies the types of subjects that can be the subject of the questionnaire.
964     * </p> 
965         */
966        public Questionnaire setSubjectType(java.util.List<BoundCodeDt<ResourceTypeEnum>> theValue) {
967                mySubjectType = theValue;
968                return this;
969        }
970        
971        
972
973        /**
974         * Add a value for <b>subjectType</b> () using an enumerated type. This
975         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
976         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
977         * you may also use the {@link #addSubjectType()} method.
978         *
979     * <p>
980     * <b>Definition:</b>
981     * Identifies the types of subjects that can be the subject of the questionnaire.
982     * </p> 
983         */
984        public BoundCodeDt<ResourceTypeEnum> addSubjectType(ResourceTypeEnum theValue) {
985                BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER, theValue);
986                getSubjectType().add(retVal);
987                return retVal;
988        }
989
990        /**
991         * Gets the first repetition for <b>subjectType</b> (),
992         * creating it if it does not already exist.
993         *
994     * <p>
995     * <b>Definition:</b>
996     * Identifies the types of subjects that can be the subject of the questionnaire.
997     * </p> 
998         */
999        public BoundCodeDt<ResourceTypeEnum> getSubjectTypeFirstRep() {
1000                if (getSubjectType().size() == 0) {
1001                        addSubjectType();
1002                }
1003                return getSubjectType().get(0);
1004        }
1005
1006        /**
1007         * Add a value for <b>subjectType</b> ()
1008         *
1009     * <p>
1010     * <b>Definition:</b>
1011     * Identifies the types of subjects that can be the subject of the questionnaire.
1012     * </p> 
1013         */
1014        public BoundCodeDt<ResourceTypeEnum> addSubjectType() {
1015                BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER);
1016                getSubjectType().add(retVal);
1017                return retVal;
1018        }
1019
1020        /**
1021         * Sets the value(s), and clears any existing value(s) for <b>subjectType</b> ()
1022         *
1023     * <p>
1024     * <b>Definition:</b>
1025     * Identifies the types of subjects that can be the subject of the questionnaire.
1026     * </p> 
1027         */
1028        public Questionnaire setSubjectType(ResourceTypeEnum theValue) {
1029                getSubjectType().clear();
1030                addSubjectType(theValue);
1031                return this;
1032        }
1033
1034  
1035        /**
1036         * Gets the value(s) for <b>group</b> ().
1037         * creating it if it does
1038         * not exist. Will not return <code>null</code>.
1039         *
1040     * <p>
1041     * <b>Definition:</b>
1042     * A collection of related questions (or further groupings of questions)
1043     * </p> 
1044         */
1045        public Group getGroup() {  
1046                if (myGroup == null) {
1047                        myGroup = new Group();
1048                }
1049                return myGroup;
1050        }
1051
1052        /**
1053         * Sets the value(s) for <b>group</b> ()
1054         *
1055     * <p>
1056     * <b>Definition:</b>
1057     * A collection of related questions (or further groupings of questions)
1058     * </p> 
1059         */
1060        public Questionnaire setGroup(Group theValue) {
1061                myGroup = theValue;
1062                return this;
1063        }
1064        
1065        
1066
1067  
1068        /**
1069         * Block class for child element: <b>Questionnaire.group</b> ()
1070         *
1071     * <p>
1072     * <b>Definition:</b>
1073     * A collection of related questions (or further groupings of questions)
1074     * </p> 
1075         */
1076        @Block()        
1077        public static class Group 
1078            extends  BaseIdentifiableElement        implements IResourceBlock {
1079        
1080        @Child(name="linkId", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
1081        @Description(
1082                shortDefinition="",
1083                formalDefinition="An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource."
1084        )
1085        private StringDt myLinkId;
1086        
1087        @Child(name="title", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false)  
1088        @Description(
1089                shortDefinition="",
1090                formalDefinition="The human-readable name for this section of the questionnaire"
1091        )
1092        private StringDt myTitle;
1093        
1094        @Child(name="concept", type=CodingDt.class, order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)      
1095        @Description(
1096                shortDefinition="",
1097                formalDefinition="Identifies a how this group of questions is known in a particular terminology such as LOINC."
1098        )
1099        private java.util.List<CodingDt> myConcept;
1100        
1101        @Child(name="text", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)  
1102        @Description(
1103                shortDefinition="",
1104                formalDefinition="Additional text for the group, used for display purposes"
1105        )
1106        private StringDt myText;
1107        
1108        @Child(name="required", type=BooleanDt.class, order=4, min=0, max=1, summary=false, modifier=false)     
1109        @Description(
1110                shortDefinition="",
1111                formalDefinition="If true, indicates that the group must be present and have required questions within it answered.  If false, the group may be skipped when answering the questionnaire."
1112        )
1113        private BooleanDt myRequired;
1114        
1115        @Child(name="repeats", type=BooleanDt.class, order=5, min=0, max=1, summary=false, modifier=false)      
1116        @Description(
1117                shortDefinition="",
1118                formalDefinition="Whether the group may occur multiple times in the instance, containing multiple sets of answers"
1119        )
1120        private BooleanDt myRepeats;
1121        
1122        @Child(name="group", type=Group.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1123        @Description(
1124                shortDefinition="",
1125                formalDefinition="A sub-group within a group. The ordering of groups within this group is relevant"
1126        )
1127        private java.util.List<Group> myGroup;
1128        
1129        @Child(name="question", order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
1130        @Description(
1131                shortDefinition="",
1132                formalDefinition="Set of questions within this group. The order of questions within the group is relevant"
1133        )
1134        private java.util.List<GroupQuestion> myQuestion;
1135        
1136
1137        @Override
1138        public boolean isEmpty() {
1139                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLinkId,  myTitle,  myConcept,  myText,  myRequired,  myRepeats,  myGroup,  myQuestion);
1140        }
1141        
1142        @Override
1143        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1144                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLinkId, myTitle, myConcept, myText, myRequired, myRepeats, myGroup, myQuestion);
1145        }
1146
1147        /**
1148         * Gets the value(s) for <b>linkId</b> ().
1149         * creating it if it does
1150         * not exist. Will not return <code>null</code>.
1151         *
1152     * <p>
1153     * <b>Definition:</b>
1154     * An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.
1155     * </p> 
1156         */
1157        public StringDt getLinkIdElement() {  
1158                if (myLinkId == null) {
1159                        myLinkId = new StringDt();
1160                }
1161                return myLinkId;
1162        }
1163
1164        
1165        /**
1166         * Gets the value(s) for <b>linkId</b> ().
1167         * creating it if it does
1168         * not exist. This method may return <code>null</code>.
1169         *
1170     * <p>
1171     * <b>Definition:</b>
1172     * An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.
1173     * </p> 
1174         */
1175        public String getLinkId() {  
1176                return getLinkIdElement().getValue();
1177        }
1178
1179        /**
1180         * Sets the value(s) for <b>linkId</b> ()
1181         *
1182     * <p>
1183     * <b>Definition:</b>
1184     * An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.
1185     * </p> 
1186         */
1187        public Group setLinkId(StringDt theValue) {
1188                myLinkId = theValue;
1189                return this;
1190        }
1191        
1192        
1193
1194        /**
1195         * Sets the value for <b>linkId</b> ()
1196         *
1197     * <p>
1198     * <b>Definition:</b>
1199     * An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.
1200     * </p> 
1201         */
1202        public Group setLinkId( String theString) {
1203                myLinkId = new StringDt(theString); 
1204                return this; 
1205        }
1206
1207 
1208        /**
1209         * Gets the value(s) for <b>title</b> ().
1210         * creating it if it does
1211         * not exist. Will not return <code>null</code>.
1212         *
1213     * <p>
1214     * <b>Definition:</b>
1215     * The human-readable name for this section of the questionnaire
1216     * </p> 
1217         */
1218        public StringDt getTitleElement() {  
1219                if (myTitle == null) {
1220                        myTitle = new StringDt();
1221                }
1222                return myTitle;
1223        }
1224
1225        
1226        /**
1227         * Gets the value(s) for <b>title</b> ().
1228         * creating it if it does
1229         * not exist. This method may return <code>null</code>.
1230         *
1231     * <p>
1232     * <b>Definition:</b>
1233     * The human-readable name for this section of the questionnaire
1234     * </p> 
1235         */
1236        public String getTitle() {  
1237                return getTitleElement().getValue();
1238        }
1239
1240        /**
1241         * Sets the value(s) for <b>title</b> ()
1242         *
1243     * <p>
1244     * <b>Definition:</b>
1245     * The human-readable name for this section of the questionnaire
1246     * </p> 
1247         */
1248        public Group setTitle(StringDt theValue) {
1249                myTitle = theValue;
1250                return this;
1251        }
1252        
1253        
1254
1255        /**
1256         * Sets the value for <b>title</b> ()
1257         *
1258     * <p>
1259     * <b>Definition:</b>
1260     * The human-readable name for this section of the questionnaire
1261     * </p> 
1262         */
1263        public Group setTitle( String theString) {
1264                myTitle = new StringDt(theString); 
1265                return this; 
1266        }
1267
1268 
1269        /**
1270         * Gets the value(s) for <b>concept</b> ().
1271         * creating it if it does
1272         * not exist. Will not return <code>null</code>.
1273         *
1274     * <p>
1275     * <b>Definition:</b>
1276     * Identifies a how this group of questions is known in a particular terminology such as LOINC.
1277     * </p> 
1278         */
1279        public java.util.List<CodingDt> getConcept() {  
1280                if (myConcept == null) {
1281                        myConcept = new java.util.ArrayList<CodingDt>();
1282                }
1283                return myConcept;
1284        }
1285
1286        /**
1287         * Sets the value(s) for <b>concept</b> ()
1288         *
1289     * <p>
1290     * <b>Definition:</b>
1291     * Identifies a how this group of questions is known in a particular terminology such as LOINC.
1292     * </p> 
1293         */
1294        public Group setConcept(java.util.List<CodingDt> theValue) {
1295                myConcept = theValue;
1296                return this;
1297        }
1298        
1299        
1300
1301        /**
1302         * Adds and returns a new value for <b>concept</b> ()
1303         *
1304     * <p>
1305     * <b>Definition:</b>
1306     * Identifies a how this group of questions is known in a particular terminology such as LOINC.
1307     * </p> 
1308         */
1309        public CodingDt addConcept() {
1310                CodingDt newType = new CodingDt();
1311                getConcept().add(newType);
1312                return newType; 
1313        }
1314
1315        /**
1316         * Adds a given new value for <b>concept</b> ()
1317         *
1318         * <p>
1319         * <b>Definition:</b>
1320         * Identifies a how this group of questions is known in a particular terminology such as LOINC.
1321         * </p>
1322         * @param theValue The concept to add (must not be <code>null</code>)
1323         */
1324        public Group addConcept(CodingDt theValue) {
1325                if (theValue == null) {
1326                        throw new NullPointerException("theValue must not be null");
1327                }
1328                getConcept().add(theValue);
1329                return this;
1330        }
1331
1332        /**
1333         * Gets the first repetition for <b>concept</b> (),
1334         * creating it if it does not already exist.
1335         *
1336     * <p>
1337     * <b>Definition:</b>
1338     * Identifies a how this group of questions is known in a particular terminology such as LOINC.
1339     * </p> 
1340         */
1341        public CodingDt getConceptFirstRep() {
1342                if (getConcept().isEmpty()) {
1343                        return addConcept();
1344                }
1345                return getConcept().get(0); 
1346        }
1347  
1348        /**
1349         * Gets the value(s) for <b>text</b> ().
1350         * creating it if it does
1351         * not exist. Will not return <code>null</code>.
1352         *
1353     * <p>
1354     * <b>Definition:</b>
1355     * Additional text for the group, used for display purposes
1356     * </p> 
1357         */
1358        public StringDt getTextElement() {  
1359                if (myText == null) {
1360                        myText = new StringDt();
1361                }
1362                return myText;
1363        }
1364
1365        
1366        /**
1367         * Gets the value(s) for <b>text</b> ().
1368         * creating it if it does
1369         * not exist. This method may return <code>null</code>.
1370         *
1371     * <p>
1372     * <b>Definition:</b>
1373     * Additional text for the group, used for display purposes
1374     * </p> 
1375         */
1376        public String getText() {  
1377                return getTextElement().getValue();
1378        }
1379
1380        /**
1381         * Sets the value(s) for <b>text</b> ()
1382         *
1383     * <p>
1384     * <b>Definition:</b>
1385     * Additional text for the group, used for display purposes
1386     * </p> 
1387         */
1388        public Group setText(StringDt theValue) {
1389                myText = theValue;
1390                return this;
1391        }
1392        
1393        
1394
1395        /**
1396         * Sets the value for <b>text</b> ()
1397         *
1398     * <p>
1399     * <b>Definition:</b>
1400     * Additional text for the group, used for display purposes
1401     * </p> 
1402         */
1403        public Group setText( String theString) {
1404                myText = new StringDt(theString); 
1405                return this; 
1406        }
1407
1408 
1409        /**
1410         * Gets the value(s) for <b>required</b> ().
1411         * creating it if it does
1412         * not exist. Will not return <code>null</code>.
1413         *
1414     * <p>
1415     * <b>Definition:</b>
1416     * If true, indicates that the group must be present and have required questions within it answered.  If false, the group may be skipped when answering the questionnaire.
1417     * </p> 
1418         */
1419        public BooleanDt getRequiredElement() {  
1420                if (myRequired == null) {
1421                        myRequired = new BooleanDt();
1422                }
1423                return myRequired;
1424        }
1425
1426        
1427        /**
1428         * Gets the value(s) for <b>required</b> ().
1429         * creating it if it does
1430         * not exist. This method may return <code>null</code>.
1431         *
1432     * <p>
1433     * <b>Definition:</b>
1434     * If true, indicates that the group must be present and have required questions within it answered.  If false, the group may be skipped when answering the questionnaire.
1435     * </p> 
1436         */
1437        public Boolean getRequired() {  
1438                return getRequiredElement().getValue();
1439        }
1440
1441        /**
1442         * Sets the value(s) for <b>required</b> ()
1443         *
1444     * <p>
1445     * <b>Definition:</b>
1446     * If true, indicates that the group must be present and have required questions within it answered.  If false, the group may be skipped when answering the questionnaire.
1447     * </p> 
1448         */
1449        public Group setRequired(BooleanDt theValue) {
1450                myRequired = theValue;
1451                return this;
1452        }
1453        
1454        
1455
1456        /**
1457         * Sets the value for <b>required</b> ()
1458         *
1459     * <p>
1460     * <b>Definition:</b>
1461     * If true, indicates that the group must be present and have required questions within it answered.  If false, the group may be skipped when answering the questionnaire.
1462     * </p> 
1463         */
1464        public Group setRequired( boolean theBoolean) {
1465                myRequired = new BooleanDt(theBoolean); 
1466                return this; 
1467        }
1468
1469 
1470        /**
1471         * Gets the value(s) for <b>repeats</b> ().
1472         * creating it if it does
1473         * not exist. Will not return <code>null</code>.
1474         *
1475     * <p>
1476     * <b>Definition:</b>
1477     * Whether the group may occur multiple times in the instance, containing multiple sets of answers
1478     * </p> 
1479         */
1480        public BooleanDt getRepeatsElement() {  
1481                if (myRepeats == null) {
1482                        myRepeats = new BooleanDt();
1483                }
1484                return myRepeats;
1485        }
1486
1487        
1488        /**
1489         * Gets the value(s) for <b>repeats</b> ().
1490         * creating it if it does
1491         * not exist. This method may return <code>null</code>.
1492         *
1493     * <p>
1494     * <b>Definition:</b>
1495     * Whether the group may occur multiple times in the instance, containing multiple sets of answers
1496     * </p> 
1497         */
1498        public Boolean getRepeats() {  
1499                return getRepeatsElement().getValue();
1500        }
1501
1502        /**
1503         * Sets the value(s) for <b>repeats</b> ()
1504         *
1505     * <p>
1506     * <b>Definition:</b>
1507     * Whether the group may occur multiple times in the instance, containing multiple sets of answers
1508     * </p> 
1509         */
1510        public Group setRepeats(BooleanDt theValue) {
1511                myRepeats = theValue;
1512                return this;
1513        }
1514        
1515        
1516
1517        /**
1518         * Sets the value for <b>repeats</b> ()
1519         *
1520     * <p>
1521     * <b>Definition:</b>
1522     * Whether the group may occur multiple times in the instance, containing multiple sets of answers
1523     * </p> 
1524         */
1525        public Group setRepeats( boolean theBoolean) {
1526                myRepeats = new BooleanDt(theBoolean); 
1527                return this; 
1528        }
1529
1530 
1531        /**
1532         * Gets the value(s) for <b>group</b> ().
1533         * creating it if it does
1534         * not exist. Will not return <code>null</code>.
1535         *
1536     * <p>
1537     * <b>Definition:</b>
1538     * A sub-group within a group. The ordering of groups within this group is relevant
1539     * </p> 
1540         */
1541        public java.util.List<Group> getGroup() {  
1542                if (myGroup == null) {
1543                        myGroup = new java.util.ArrayList<Group>();
1544                }
1545                return myGroup;
1546        }
1547
1548        /**
1549         * Sets the value(s) for <b>group</b> ()
1550         *
1551     * <p>
1552     * <b>Definition:</b>
1553     * A sub-group within a group. The ordering of groups within this group is relevant
1554     * </p> 
1555         */
1556        public Group setGroup(java.util.List<Group> theValue) {
1557                myGroup = theValue;
1558                return this;
1559        }
1560        
1561        
1562
1563        /**
1564         * Adds and returns a new value for <b>group</b> ()
1565         *
1566     * <p>
1567     * <b>Definition:</b>
1568     * A sub-group within a group. The ordering of groups within this group is relevant
1569     * </p> 
1570         */
1571        public Group addGroup() {
1572                Group newType = new Group();
1573                getGroup().add(newType);
1574                return newType; 
1575        }
1576
1577        /**
1578         * Adds a given new value for <b>group</b> ()
1579         *
1580         * <p>
1581         * <b>Definition:</b>
1582         * A sub-group within a group. The ordering of groups within this group is relevant
1583         * </p>
1584         * @param theValue The group to add (must not be <code>null</code>)
1585         */
1586        public Group addGroup(Group theValue) {
1587                if (theValue == null) {
1588                        throw new NullPointerException("theValue must not be null");
1589                }
1590                getGroup().add(theValue);
1591                return this;
1592        }
1593
1594        /**
1595         * Gets the first repetition for <b>group</b> (),
1596         * creating it if it does not already exist.
1597         *
1598     * <p>
1599     * <b>Definition:</b>
1600     * A sub-group within a group. The ordering of groups within this group is relevant
1601     * </p> 
1602         */
1603        public Group getGroupFirstRep() {
1604                if (getGroup().isEmpty()) {
1605                        return addGroup();
1606                }
1607                return getGroup().get(0); 
1608        }
1609  
1610        /**
1611         * Gets the value(s) for <b>question</b> ().
1612         * creating it if it does
1613         * not exist. Will not return <code>null</code>.
1614         *
1615     * <p>
1616     * <b>Definition:</b>
1617     * Set of questions within this group. The order of questions within the group is relevant
1618     * </p> 
1619         */
1620        public java.util.List<GroupQuestion> getQuestion() {  
1621                if (myQuestion == null) {
1622                        myQuestion = new java.util.ArrayList<GroupQuestion>();
1623                }
1624                return myQuestion;
1625        }
1626
1627        /**
1628         * Sets the value(s) for <b>question</b> ()
1629         *
1630     * <p>
1631     * <b>Definition:</b>
1632     * Set of questions within this group. The order of questions within the group is relevant
1633     * </p> 
1634         */
1635        public Group setQuestion(java.util.List<GroupQuestion> theValue) {
1636                myQuestion = theValue;
1637                return this;
1638        }
1639        
1640        
1641
1642        /**
1643         * Adds and returns a new value for <b>question</b> ()
1644         *
1645     * <p>
1646     * <b>Definition:</b>
1647     * Set of questions within this group. The order of questions within the group is relevant
1648     * </p> 
1649         */
1650        public GroupQuestion addQuestion() {
1651                GroupQuestion newType = new GroupQuestion();
1652                getQuestion().add(newType);
1653                return newType; 
1654        }
1655
1656        /**
1657         * Adds a given new value for <b>question</b> ()
1658         *
1659         * <p>
1660         * <b>Definition:</b>
1661         * Set of questions within this group. The order of questions within the group is relevant
1662         * </p>
1663         * @param theValue The question to add (must not be <code>null</code>)
1664         */
1665        public Group addQuestion(GroupQuestion theValue) {
1666                if (theValue == null) {
1667                        throw new NullPointerException("theValue must not be null");
1668                }
1669                getQuestion().add(theValue);
1670                return this;
1671        }
1672
1673        /**
1674         * Gets the first repetition for <b>question</b> (),
1675         * creating it if it does not already exist.
1676         *
1677     * <p>
1678     * <b>Definition:</b>
1679     * Set of questions within this group. The order of questions within the group is relevant
1680     * </p> 
1681         */
1682        public GroupQuestion getQuestionFirstRep() {
1683                if (getQuestion().isEmpty()) {
1684                        return addQuestion();
1685                }
1686                return getQuestion().get(0); 
1687        }
1688  
1689
1690
1691        }
1692
1693        /**
1694         * Block class for child element: <b>Questionnaire.group.question</b> ()
1695         *
1696     * <p>
1697     * <b>Definition:</b>
1698     * Set of questions within this group. The order of questions within the group is relevant
1699     * </p> 
1700         */
1701        @Block()        
1702        public static class GroupQuestion 
1703            extends  BaseIdentifiableElement        implements IResourceBlock {
1704        
1705        @Child(name="linkId", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
1706        @Description(
1707                shortDefinition="",
1708                formalDefinition="An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource."
1709        )
1710        private StringDt myLinkId;
1711        
1712        @Child(name="concept", type=CodingDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
1713        @Description(
1714                shortDefinition="",
1715                formalDefinition="Identifies a how this question is known in a particular terminology such as LOINC."
1716        )
1717        private java.util.List<CodingDt> myConcept;
1718        
1719        @Child(name="text", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
1720        @Description(
1721                shortDefinition="",
1722                formalDefinition="The actual question as shown to the user to prompt them for an answer."
1723        )
1724        private StringDt myText;
1725        
1726        @Child(name="type", type=CodeDt.class, order=3, min=0, max=1, summary=false, modifier=false)    
1727        @Description(
1728                shortDefinition="",
1729                formalDefinition="The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected"
1730        )
1731        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/answer-format")
1732        private BoundCodeDt<AnswerFormatEnum> myType;
1733        
1734        @Child(name="required", type=BooleanDt.class, order=4, min=0, max=1, summary=false, modifier=false)     
1735        @Description(
1736                shortDefinition="",
1737                formalDefinition="If true, indicates that the question must be answered and have required groups within it also present.  If false, the question and any contained groups may be skipped when answering the questionnaire."
1738        )
1739        private BooleanDt myRequired;
1740        
1741        @Child(name="repeats", type=BooleanDt.class, order=5, min=0, max=1, summary=false, modifier=false)      
1742        @Description(
1743                shortDefinition="",
1744                formalDefinition="If true, the question may have more than one answer."
1745        )
1746        private BooleanDt myRepeats;
1747        
1748        @Child(name="options", order=6, min=0, max=1, summary=false, modifier=false, type={
1749                ca.uhn.fhir.model.dstu2.resource.ValueSet.class })
1750        @Description(
1751                shortDefinition="",
1752                formalDefinition="Reference to a value set containing a list of codes representing permitted answers for the question"
1753        )
1754        private ResourceReferenceDt myOptions;
1755        
1756        @Child(name="option", type=CodingDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
1757        @Description(
1758                shortDefinition="",
1759                formalDefinition="For a \"choice\" question, identifies one of the permitted answers for the question."
1760        )
1761        private java.util.List<CodingDt> myOption;
1762        
1763        @Child(name="group", type=Group.class, order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1764        @Description(
1765                shortDefinition="",
1766                formalDefinition="Nested group, containing nested question for this question. The order of groups within the question is relevant"
1767        )
1768        private java.util.List<Group> myGroup;
1769        
1770
1771        @Override
1772        public boolean isEmpty() {
1773                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLinkId,  myConcept,  myText,  myType,  myRequired,  myRepeats,  myOptions,  myOption,  myGroup);
1774        }
1775        
1776        @Override
1777        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1778                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLinkId, myConcept, myText, myType, myRequired, myRepeats, myOptions, myOption, myGroup);
1779        }
1780
1781        /**
1782         * Gets the value(s) for <b>linkId</b> ().
1783         * creating it if it does
1784         * not exist. Will not return <code>null</code>.
1785         *
1786     * <p>
1787     * <b>Definition:</b>
1788     * An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.
1789     * </p> 
1790         */
1791        public StringDt getLinkIdElement() {  
1792                if (myLinkId == null) {
1793                        myLinkId = new StringDt();
1794                }
1795                return myLinkId;
1796        }
1797
1798        
1799        /**
1800         * Gets the value(s) for <b>linkId</b> ().
1801         * creating it if it does
1802         * not exist. This method may return <code>null</code>.
1803         *
1804     * <p>
1805     * <b>Definition:</b>
1806     * An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.
1807     * </p> 
1808         */
1809        public String getLinkId() {  
1810                return getLinkIdElement().getValue();
1811        }
1812
1813        /**
1814         * Sets the value(s) for <b>linkId</b> ()
1815         *
1816     * <p>
1817     * <b>Definition:</b>
1818     * An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.
1819     * </p> 
1820         */
1821        public GroupQuestion setLinkId(StringDt theValue) {
1822                myLinkId = theValue;
1823                return this;
1824        }
1825        
1826        
1827
1828        /**
1829         * Sets the value for <b>linkId</b> ()
1830         *
1831     * <p>
1832     * <b>Definition:</b>
1833     * An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.
1834     * </p> 
1835         */
1836        public GroupQuestion setLinkId( String theString) {
1837                myLinkId = new StringDt(theString); 
1838                return this; 
1839        }
1840
1841 
1842        /**
1843         * Gets the value(s) for <b>concept</b> ().
1844         * creating it if it does
1845         * not exist. Will not return <code>null</code>.
1846         *
1847     * <p>
1848     * <b>Definition:</b>
1849     * Identifies a how this question is known in a particular terminology such as LOINC.
1850     * </p> 
1851         */
1852        public java.util.List<CodingDt> getConcept() {  
1853                if (myConcept == null) {
1854                        myConcept = new java.util.ArrayList<CodingDt>();
1855                }
1856                return myConcept;
1857        }
1858
1859        /**
1860         * Sets the value(s) for <b>concept</b> ()
1861         *
1862     * <p>
1863     * <b>Definition:</b>
1864     * Identifies a how this question is known in a particular terminology such as LOINC.
1865     * </p> 
1866         */
1867        public GroupQuestion setConcept(java.util.List<CodingDt> theValue) {
1868                myConcept = theValue;
1869                return this;
1870        }
1871        
1872        
1873
1874        /**
1875         * Adds and returns a new value for <b>concept</b> ()
1876         *
1877     * <p>
1878     * <b>Definition:</b>
1879     * Identifies a how this question is known in a particular terminology such as LOINC.
1880     * </p> 
1881         */
1882        public CodingDt addConcept() {
1883                CodingDt newType = new CodingDt();
1884                getConcept().add(newType);
1885                return newType; 
1886        }
1887
1888        /**
1889         * Adds a given new value for <b>concept</b> ()
1890         *
1891         * <p>
1892         * <b>Definition:</b>
1893         * Identifies a how this question is known in a particular terminology such as LOINC.
1894         * </p>
1895         * @param theValue The concept to add (must not be <code>null</code>)
1896         */
1897        public GroupQuestion addConcept(CodingDt theValue) {
1898                if (theValue == null) {
1899                        throw new NullPointerException("theValue must not be null");
1900                }
1901                getConcept().add(theValue);
1902                return this;
1903        }
1904
1905        /**
1906         * Gets the first repetition for <b>concept</b> (),
1907         * creating it if it does not already exist.
1908         *
1909     * <p>
1910     * <b>Definition:</b>
1911     * Identifies a how this question is known in a particular terminology such as LOINC.
1912     * </p> 
1913         */
1914        public CodingDt getConceptFirstRep() {
1915                if (getConcept().isEmpty()) {
1916                        return addConcept();
1917                }
1918                return getConcept().get(0); 
1919        }
1920  
1921        /**
1922         * Gets the value(s) for <b>text</b> ().
1923         * creating it if it does
1924         * not exist. Will not return <code>null</code>.
1925         *
1926     * <p>
1927     * <b>Definition:</b>
1928     * The actual question as shown to the user to prompt them for an answer.
1929     * </p> 
1930         */
1931        public StringDt getTextElement() {  
1932                if (myText == null) {
1933                        myText = new StringDt();
1934                }
1935                return myText;
1936        }
1937
1938        
1939        /**
1940         * Gets the value(s) for <b>text</b> ().
1941         * creating it if it does
1942         * not exist. This method may return <code>null</code>.
1943         *
1944     * <p>
1945     * <b>Definition:</b>
1946     * The actual question as shown to the user to prompt them for an answer.
1947     * </p> 
1948         */
1949        public String getText() {  
1950                return getTextElement().getValue();
1951        }
1952
1953        /**
1954         * Sets the value(s) for <b>text</b> ()
1955         *
1956     * <p>
1957     * <b>Definition:</b>
1958     * The actual question as shown to the user to prompt them for an answer.
1959     * </p> 
1960         */
1961        public GroupQuestion setText(StringDt theValue) {
1962                myText = theValue;
1963                return this;
1964        }
1965        
1966        
1967
1968        /**
1969         * Sets the value for <b>text</b> ()
1970         *
1971     * <p>
1972     * <b>Definition:</b>
1973     * The actual question as shown to the user to prompt them for an answer.
1974     * </p> 
1975         */
1976        public GroupQuestion setText( String theString) {
1977                myText = new StringDt(theString); 
1978                return this; 
1979        }
1980
1981 
1982        /**
1983         * Gets the value(s) for <b>type</b> ().
1984         * creating it if it does
1985         * not exist. Will not return <code>null</code>.
1986         *
1987     * <p>
1988     * <b>Definition:</b>
1989     * The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected
1990     * </p> 
1991         */
1992        public BoundCodeDt<AnswerFormatEnum> getTypeElement() {  
1993                if (myType == null) {
1994                        myType = new BoundCodeDt<AnswerFormatEnum>(AnswerFormatEnum.VALUESET_BINDER);
1995                }
1996                return myType;
1997        }
1998
1999        
2000        /**
2001         * Gets the value(s) for <b>type</b> ().
2002         * creating it if it does
2003         * not exist. This method may return <code>null</code>.
2004         *
2005     * <p>
2006     * <b>Definition:</b>
2007     * The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected
2008     * </p> 
2009         */
2010        public String getType() {  
2011                return getTypeElement().getValue();
2012        }
2013
2014        /**
2015         * Sets the value(s) for <b>type</b> ()
2016         *
2017     * <p>
2018     * <b>Definition:</b>
2019     * The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected
2020     * </p> 
2021         */
2022        public GroupQuestion setType(BoundCodeDt<AnswerFormatEnum> theValue) {
2023                myType = theValue;
2024                return this;
2025        }
2026        
2027        
2028
2029        /**
2030         * Sets the value(s) for <b>type</b> ()
2031         *
2032     * <p>
2033     * <b>Definition:</b>
2034     * The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected
2035     * </p> 
2036         */
2037        public GroupQuestion setType(AnswerFormatEnum theValue) {
2038                setType(new BoundCodeDt<AnswerFormatEnum>(AnswerFormatEnum.VALUESET_BINDER, theValue));
2039                
2040/*
2041                getTypeElement().setValueAsEnum(theValue);
2042*/
2043                return this;
2044        }
2045
2046  
2047        /**
2048         * Gets the value(s) for <b>required</b> ().
2049         * creating it if it does
2050         * not exist. Will not return <code>null</code>.
2051         *
2052     * <p>
2053     * <b>Definition:</b>
2054     * If true, indicates that the question must be answered and have required groups within it also present.  If false, the question and any contained groups may be skipped when answering the questionnaire.
2055     * </p> 
2056         */
2057        public BooleanDt getRequiredElement() {  
2058                if (myRequired == null) {
2059                        myRequired = new BooleanDt();
2060                }
2061                return myRequired;
2062        }
2063
2064        
2065        /**
2066         * Gets the value(s) for <b>required</b> ().
2067         * creating it if it does
2068         * not exist. This method may return <code>null</code>.
2069         *
2070     * <p>
2071     * <b>Definition:</b>
2072     * If true, indicates that the question must be answered and have required groups within it also present.  If false, the question and any contained groups may be skipped when answering the questionnaire.
2073     * </p> 
2074         */
2075        public Boolean getRequired() {  
2076                return getRequiredElement().getValue();
2077        }
2078
2079        /**
2080         * Sets the value(s) for <b>required</b> ()
2081         *
2082     * <p>
2083     * <b>Definition:</b>
2084     * If true, indicates that the question must be answered and have required groups within it also present.  If false, the question and any contained groups may be skipped when answering the questionnaire.
2085     * </p> 
2086         */
2087        public GroupQuestion setRequired(BooleanDt theValue) {
2088                myRequired = theValue;
2089                return this;
2090        }
2091        
2092        
2093
2094        /**
2095         * Sets the value for <b>required</b> ()
2096         *
2097     * <p>
2098     * <b>Definition:</b>
2099     * If true, indicates that the question must be answered and have required groups within it also present.  If false, the question and any contained groups may be skipped when answering the questionnaire.
2100     * </p> 
2101         */
2102        public GroupQuestion setRequired( boolean theBoolean) {
2103                myRequired = new BooleanDt(theBoolean); 
2104                return this; 
2105        }
2106
2107 
2108        /**
2109         * Gets the value(s) for <b>repeats</b> ().
2110         * creating it if it does
2111         * not exist. Will not return <code>null</code>.
2112         *
2113     * <p>
2114     * <b>Definition:</b>
2115     * If true, the question may have more than one answer.
2116     * </p> 
2117         */
2118        public BooleanDt getRepeatsElement() {  
2119                if (myRepeats == null) {
2120                        myRepeats = new BooleanDt();
2121                }
2122                return myRepeats;
2123        }
2124
2125        
2126        /**
2127         * Gets the value(s) for <b>repeats</b> ().
2128         * creating it if it does
2129         * not exist. This method may return <code>null</code>.
2130         *
2131     * <p>
2132     * <b>Definition:</b>
2133     * If true, the question may have more than one answer.
2134     * </p> 
2135         */
2136        public Boolean getRepeats() {  
2137                return getRepeatsElement().getValue();
2138        }
2139
2140        /**
2141         * Sets the value(s) for <b>repeats</b> ()
2142         *
2143     * <p>
2144     * <b>Definition:</b>
2145     * If true, the question may have more than one answer.
2146     * </p> 
2147         */
2148        public GroupQuestion setRepeats(BooleanDt theValue) {
2149                myRepeats = theValue;
2150                return this;
2151        }
2152        
2153        
2154
2155        /**
2156         * Sets the value for <b>repeats</b> ()
2157         *
2158     * <p>
2159     * <b>Definition:</b>
2160     * If true, the question may have more than one answer.
2161     * </p> 
2162         */
2163        public GroupQuestion setRepeats( boolean theBoolean) {
2164                myRepeats = new BooleanDt(theBoolean); 
2165                return this; 
2166        }
2167
2168 
2169        /**
2170         * Gets the value(s) for <b>options</b> ().
2171         * creating it if it does
2172         * not exist. Will not return <code>null</code>.
2173         *
2174     * <p>
2175     * <b>Definition:</b>
2176     * Reference to a value set containing a list of codes representing permitted answers for the question
2177     * </p> 
2178         */
2179        public ResourceReferenceDt getOptions() {  
2180                if (myOptions == null) {
2181                        myOptions = new ResourceReferenceDt();
2182                }
2183                return myOptions;
2184        }
2185
2186        /**
2187         * Sets the value(s) for <b>options</b> ()
2188         *
2189     * <p>
2190     * <b>Definition:</b>
2191     * Reference to a value set containing a list of codes representing permitted answers for the question
2192     * </p> 
2193         */
2194        public GroupQuestion setOptions(ResourceReferenceDt theValue) {
2195                myOptions = theValue;
2196                return this;
2197        }
2198        
2199        
2200
2201  
2202        /**
2203         * Gets the value(s) for <b>option</b> ().
2204         * creating it if it does
2205         * not exist. Will not return <code>null</code>.
2206         *
2207     * <p>
2208     * <b>Definition:</b>
2209     * For a \&quot;choice\&quot; question, identifies one of the permitted answers for the question.
2210     * </p> 
2211         */
2212        public java.util.List<CodingDt> getOption() {  
2213                if (myOption == null) {
2214                        myOption = new java.util.ArrayList<CodingDt>();
2215                }
2216                return myOption;
2217        }
2218
2219        /**
2220         * Sets the value(s) for <b>option</b> ()
2221         *
2222     * <p>
2223     * <b>Definition:</b>
2224     * For a \&quot;choice\&quot; question, identifies one of the permitted answers for the question.
2225     * </p> 
2226         */
2227        public GroupQuestion setOption(java.util.List<CodingDt> theValue) {
2228                myOption = theValue;
2229                return this;
2230        }
2231        
2232        
2233
2234        /**
2235         * Adds and returns a new value for <b>option</b> ()
2236         *
2237     * <p>
2238     * <b>Definition:</b>
2239     * For a \&quot;choice\&quot; question, identifies one of the permitted answers for the question.
2240     * </p> 
2241         */
2242        public CodingDt addOption() {
2243                CodingDt newType = new CodingDt();
2244                getOption().add(newType);
2245                return newType; 
2246        }
2247
2248        /**
2249         * Adds a given new value for <b>option</b> ()
2250         *
2251         * <p>
2252         * <b>Definition:</b>
2253         * For a \&quot;choice\&quot; question, identifies one of the permitted answers for the question.
2254         * </p>
2255         * @param theValue The option to add (must not be <code>null</code>)
2256         */
2257        public GroupQuestion addOption(CodingDt theValue) {
2258                if (theValue == null) {
2259                        throw new NullPointerException("theValue must not be null");
2260                }
2261                getOption().add(theValue);
2262                return this;
2263        }
2264
2265        /**
2266         * Gets the first repetition for <b>option</b> (),
2267         * creating it if it does not already exist.
2268         *
2269     * <p>
2270     * <b>Definition:</b>
2271     * For a \&quot;choice\&quot; question, identifies one of the permitted answers for the question.
2272     * </p> 
2273         */
2274        public CodingDt getOptionFirstRep() {
2275                if (getOption().isEmpty()) {
2276                        return addOption();
2277                }
2278                return getOption().get(0); 
2279        }
2280  
2281        /**
2282         * Gets the value(s) for <b>group</b> ().
2283         * creating it if it does
2284         * not exist. Will not return <code>null</code>.
2285         *
2286     * <p>
2287     * <b>Definition:</b>
2288     * Nested group, containing nested question for this question. The order of groups within the question is relevant
2289     * </p> 
2290         */
2291        public java.util.List<Group> getGroup() {  
2292                if (myGroup == null) {
2293                        myGroup = new java.util.ArrayList<Group>();
2294                }
2295                return myGroup;
2296        }
2297
2298        /**
2299         * Sets the value(s) for <b>group</b> ()
2300         *
2301     * <p>
2302     * <b>Definition:</b>
2303     * Nested group, containing nested question for this question. The order of groups within the question is relevant
2304     * </p> 
2305         */
2306        public GroupQuestion setGroup(java.util.List<Group> theValue) {
2307                myGroup = theValue;
2308                return this;
2309        }
2310        
2311        
2312
2313        /**
2314         * Adds and returns a new value for <b>group</b> ()
2315         *
2316     * <p>
2317     * <b>Definition:</b>
2318     * Nested group, containing nested question for this question. The order of groups within the question is relevant
2319     * </p> 
2320         */
2321        public Group addGroup() {
2322                Group newType = new Group();
2323                getGroup().add(newType);
2324                return newType; 
2325        }
2326
2327        /**
2328         * Adds a given new value for <b>group</b> ()
2329         *
2330         * <p>
2331         * <b>Definition:</b>
2332         * Nested group, containing nested question for this question. The order of groups within the question is relevant
2333         * </p>
2334         * @param theValue The group to add (must not be <code>null</code>)
2335         */
2336        public GroupQuestion addGroup(Group theValue) {
2337                if (theValue == null) {
2338                        throw new NullPointerException("theValue must not be null");
2339                }
2340                getGroup().add(theValue);
2341                return this;
2342        }
2343
2344        /**
2345         * Gets the first repetition for <b>group</b> (),
2346         * creating it if it does not already exist.
2347         *
2348     * <p>
2349     * <b>Definition:</b>
2350     * Nested group, containing nested question for this question. The order of groups within the question is relevant
2351     * </p> 
2352         */
2353        public Group getGroupFirstRep() {
2354                if (getGroup().isEmpty()) {
2355                        return addGroup();
2356                }
2357                return getGroup().get(0); 
2358        }
2359  
2360
2361
2362        }
2363
2364
2365
2366
2367
2368    @Override
2369    public String getResourceName() {
2370        return "Questionnaire";
2371    }
2372    
2373    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2374        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2375    }
2376
2377
2378}