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>QuestionnaireResponse</b> Resource
282 * (infrastructure.information)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A structured set of questions and their 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/QuestionnaireResponse">http://hl7.org/fhir/profiles/QuestionnaireResponse</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="QuestionnaireResponse", profile="http://hl7.org/fhir/profiles/QuestionnaireResponse", id="questionnaireresponse")
301public class QuestionnaireResponse extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>status</b>
307         * <p>
308         * Description: <b>The status of the questionnaire response</b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>QuestionnaireResponse.status</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="status", path="QuestionnaireResponse.status", description="The status of the questionnaire response", type="token" 
314 )
315        public static final String SP_STATUS = "status";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>status</b>
319         * <p>
320         * Description: <b>The status of the questionnaire response</b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>QuestionnaireResponse.status</b><br>
323         * </p>
324         */
325        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
326
327        /**
328         * Search parameter constant for <b>authored</b>
329         * <p>
330         * Description: <b>When the questionnaire was authored</b><br>
331         * Type: <b>date</b><br>
332         * Path: <b>QuestionnaireResponse.authored</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="authored", path="QuestionnaireResponse.authored", description="When the questionnaire was authored", type="date" 
336 )
337        public static final String SP_AUTHORED = "authored";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>authored</b>
341         * <p>
342         * Description: <b>When the questionnaire was authored</b><br>
343         * Type: <b>date</b><br>
344         * Path: <b>QuestionnaireResponse.authored</b><br>
345         * </p>
346         */
347        public static final DateClientParam AUTHORED = new DateClientParam(SP_AUTHORED);
348
349        /**
350         * Search parameter constant for <b>subject</b>
351         * <p>
352         * Description: <b>The subject of the questionnaire</b><br>
353         * Type: <b>reference</b><br>
354         * Path: <b>QuestionnaireResponse.subject</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire", type="reference" 
358, providesMembershipIn={
359 @Compartment(name="Patient")   }
360 )
361        public static final String SP_SUBJECT = "subject";
362
363        /**
364         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
365         * <p>
366         * Description: <b>The subject of the questionnaire</b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>QuestionnaireResponse.subject</b><br>
369         * </p>
370         */
371        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
372
373        /**
374         * Search parameter constant for <b>author</b>
375         * <p>
376         * Description: <b>The author of the questionnaire</b><br>
377         * Type: <b>reference</b><br>
378         * Path: <b>QuestionnaireResponse.author</b><br>
379         * </p>
380         */
381        @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire", type="reference" 
382, providesMembershipIn={
383 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner") ,  @Compartment(name="Device")         }
384 )
385        public static final String SP_AUTHOR = "author";
386
387        /**
388         * <b>Fluent Client</b> search parameter constant for <b>author</b>
389         * <p>
390         * Description: <b>The author of the questionnaire</b><br>
391         * Type: <b>reference</b><br>
392         * Path: <b>QuestionnaireResponse.author</b><br>
393         * </p>
394         */
395        public static final ReferenceClientParam AUTHOR = new ReferenceClientParam(SP_AUTHOR);
396
397        /**
398         * Search parameter constant for <b>questionnaire</b>
399         * <p>
400         * Description: <b>The questionnaire the answers are provided for</b><br>
401         * Type: <b>reference</b><br>
402         * Path: <b>QuestionnaireResponse.questionnaire</b><br>
403         * </p>
404         */
405        @SearchParamDefinition(name="questionnaire", path="QuestionnaireResponse.questionnaire", description="The questionnaire the answers are provided for", type="reference" 
406 )
407        public static final String SP_QUESTIONNAIRE = "questionnaire";
408
409        /**
410         * <b>Fluent Client</b> search parameter constant for <b>questionnaire</b>
411         * <p>
412         * Description: <b>The questionnaire the answers are provided for</b><br>
413         * Type: <b>reference</b><br>
414         * Path: <b>QuestionnaireResponse.questionnaire</b><br>
415         * </p>
416         */
417        public static final ReferenceClientParam QUESTIONNAIRE = new ReferenceClientParam(SP_QUESTIONNAIRE);
418
419        /**
420         * Search parameter constant for <b>encounter</b>
421         * <p>
422         * Description: <b>Encounter during which questionnaire was authored</b><br>
423         * Type: <b>reference</b><br>
424         * Path: <b>QuestionnaireResponse.encounter</b><br>
425         * </p>
426         */
427        @SearchParamDefinition(name="encounter", path="QuestionnaireResponse.encounter", description="Encounter during which questionnaire was authored", type="reference" 
428, providesMembershipIn={
429 @Compartment(name="Encounter")         }
430 )
431        public static final String SP_ENCOUNTER = "encounter";
432
433        /**
434         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
435         * <p>
436         * Description: <b>Encounter during which questionnaire was authored</b><br>
437         * Type: <b>reference</b><br>
438         * Path: <b>QuestionnaireResponse.encounter</b><br>
439         * </p>
440         */
441        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
442
443        /**
444         * Search parameter constant for <b>patient</b>
445         * <p>
446         * Description: <b>The patient that is the subject of the questionnaire</b><br>
447         * Type: <b>reference</b><br>
448         * Path: <b>QuestionnaireResponse.subject</b><br>
449         * </p>
450         */
451        @SearchParamDefinition(name="patient", path="QuestionnaireResponse.subject", description="The patient that is the subject of the questionnaire", type="reference" 
452, target={
453 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
454 )
455        public static final String SP_PATIENT = "patient";
456
457        /**
458         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
459         * <p>
460         * Description: <b>The patient that is the subject of the questionnaire</b><br>
461         * Type: <b>reference</b><br>
462         * Path: <b>QuestionnaireResponse.subject</b><br>
463         * </p>
464         */
465        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
466
467        /**
468         * Search parameter constant for <b>source</b>
469         * <p>
470         * Description: <b></b><br>
471         * Type: <b>reference</b><br>
472         * Path: <b>QuestionnaireResponse.source</b><br>
473         * </p>
474         */
475        @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="", type="reference" 
476, providesMembershipIn={
477 @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner")        }
478 )
479        public static final String SP_SOURCE = "source";
480
481        /**
482         * <b>Fluent Client</b> search parameter constant for <b>source</b>
483         * <p>
484         * Description: <b></b><br>
485         * Type: <b>reference</b><br>
486         * Path: <b>QuestionnaireResponse.source</b><br>
487         * </p>
488         */
489        public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
490
491
492        /**
493         * Constant for fluent queries to be used to add include statements. Specifies
494         * the path value of "<b>QuestionnaireResponse:author</b>".
495         */
496        public static final Include INCLUDE_AUTHOR = new Include("QuestionnaireResponse:author");
497
498        /**
499         * Constant for fluent queries to be used to add include statements. Specifies
500         * the path value of "<b>QuestionnaireResponse:encounter</b>".
501         */
502        public static final Include INCLUDE_ENCOUNTER = new Include("QuestionnaireResponse:encounter");
503
504        /**
505         * Constant for fluent queries to be used to add include statements. Specifies
506         * the path value of "<b>QuestionnaireResponse:patient</b>".
507         */
508        public static final Include INCLUDE_PATIENT = new Include("QuestionnaireResponse:patient");
509
510        /**
511         * Constant for fluent queries to be used to add include statements. Specifies
512         * the path value of "<b>QuestionnaireResponse:questionnaire</b>".
513         */
514        public static final Include INCLUDE_QUESTIONNAIRE = new Include("QuestionnaireResponse:questionnaire");
515
516        /**
517         * Constant for fluent queries to be used to add include statements. Specifies
518         * the path value of "<b>QuestionnaireResponse:source</b>".
519         */
520        public static final Include INCLUDE_SOURCE = new Include("QuestionnaireResponse:source");
521
522        /**
523         * Constant for fluent queries to be used to add include statements. Specifies
524         * the path value of "<b>QuestionnaireResponse:subject</b>".
525         */
526        public static final Include INCLUDE_SUBJECT = new Include("QuestionnaireResponse:subject");
527
528
529        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
530        @Description(
531                shortDefinition="id",
532                formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire"
533        )
534        private IdentifierDt myIdentifier;
535        
536        @Child(name="questionnaire", order=1, min=0, max=1, summary=true, modifier=false, type={
537                ca.uhn.fhir.model.dstu2.resource.Questionnaire.class
538        })
539        @Description(
540                shortDefinition="",
541                formalDefinition="Indicates the Questionnaire resource that defines the form for which answers are being provided"
542        )
543        private ResourceReferenceDt myQuestionnaire;
544        
545        @Child(name="status", type=CodeDt.class, order=2, min=1, max=1, summary=true, modifier=true)    
546        @Description(
547                shortDefinition="status",
548                formalDefinition="The lifecycle status of the questionnaire response as a whole."
549        )
550        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/questionnaire-answers-status")
551        private BoundCodeDt<QuestionnaireResponseStatusEnum> myStatus;
552        
553        @Child(name="subject", order=3, min=0, max=1, summary=true, modifier=false, type={
554                IResource.class
555        })
556        @Description(
557                shortDefinition="who.focus",
558                formalDefinition="The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information"
559        )
560        private ResourceReferenceDt mySubject;
561        
562        @Child(name="author", order=4, min=0, max=1, summary=true, modifier=false, type={
563                ca.uhn.fhir.model.dstu2.resource.Device.class, 
564                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
565                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
566                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
567        })
568        @Description(
569                shortDefinition="who.author",
570                formalDefinition="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system"
571        )
572        private ResourceReferenceDt myAuthor;
573        
574        @Child(name="authored", type=DateTimeDt.class, order=5, min=0, max=1, summary=true, modifier=false)     
575        @Description(
576                shortDefinition="when.recorded",
577                formalDefinition="The date and/or time that this version of the questionnaire response was authored"
578        )
579        private DateTimeDt myAuthored;
580        
581        @Child(name="source", order=6, min=0, max=1, summary=true, modifier=false, type={
582                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
583                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
584                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
585        })
586        @Description(
587                shortDefinition="who.source",
588                formalDefinition="The person who answered the questions about the subject."
589        )
590        private ResourceReferenceDt mySource;
591        
592        @Child(name="encounter", order=7, min=0, max=1, summary=true, modifier=false, type={
593                ca.uhn.fhir.model.dstu2.resource.Encounter.class
594        })
595        @Description(
596                shortDefinition="context",
597                formalDefinition="Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers."
598        )
599        private ResourceReferenceDt myEncounter;
600        
601        @Child(name="group", order=8, min=0, max=1, summary=false, modifier=false)      
602        @Description(
603                shortDefinition="",
604                formalDefinition="A group of questions to a possibly similarly grouped set of questions in the questionnaire response"
605        )
606        private Group myGroup;
607        
608
609        @Override
610        public boolean isEmpty() {
611                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myQuestionnaire,  myStatus,  mySubject,  myAuthor,  myAuthored,  mySource,  myEncounter,  myGroup);
612        }
613        
614        @Override
615        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
616                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myQuestionnaire, myStatus, mySubject, myAuthor, myAuthored, mySource, myEncounter, myGroup);
617        }
618
619        /**
620         * Gets the value(s) for <b>identifier</b> (id).
621         * creating it if it does
622         * not exist. Will not return <code>null</code>.
623         *
624     * <p>
625     * <b>Definition:</b>
626     * A business identifier assigned to a particular completed (or partially completed) questionnaire
627     * </p> 
628         */
629        public IdentifierDt getIdentifier() {  
630                if (myIdentifier == null) {
631                        myIdentifier = new IdentifierDt();
632                }
633                return myIdentifier;
634        }
635
636        /**
637         * Sets the value(s) for <b>identifier</b> (id)
638         *
639     * <p>
640     * <b>Definition:</b>
641     * A business identifier assigned to a particular completed (or partially completed) questionnaire
642     * </p> 
643         */
644        public QuestionnaireResponse setIdentifier(IdentifierDt theValue) {
645                myIdentifier = theValue;
646                return this;
647        }
648        
649        
650
651  
652        /**
653         * Gets the value(s) for <b>questionnaire</b> ().
654         * creating it if it does
655         * not exist. Will not return <code>null</code>.
656         *
657     * <p>
658     * <b>Definition:</b>
659     * Indicates the Questionnaire resource that defines the form for which answers are being provided
660     * </p> 
661         */
662        public ResourceReferenceDt getQuestionnaire() {  
663                if (myQuestionnaire == null) {
664                        myQuestionnaire = new ResourceReferenceDt();
665                }
666                return myQuestionnaire;
667        }
668
669        /**
670         * Sets the value(s) for <b>questionnaire</b> ()
671         *
672     * <p>
673     * <b>Definition:</b>
674     * Indicates the Questionnaire resource that defines the form for which answers are being provided
675     * </p> 
676         */
677        public QuestionnaireResponse setQuestionnaire(ResourceReferenceDt theValue) {
678                myQuestionnaire = theValue;
679                return this;
680        }
681        
682        
683
684  
685        /**
686         * Gets the value(s) for <b>status</b> (status).
687         * creating it if it does
688         * not exist. Will not return <code>null</code>.
689         *
690     * <p>
691     * <b>Definition:</b>
692     * The lifecycle status of the questionnaire response as a whole.
693     * </p> 
694         */
695        public BoundCodeDt<QuestionnaireResponseStatusEnum> getStatusElement() {  
696                if (myStatus == null) {
697                        myStatus = new BoundCodeDt<QuestionnaireResponseStatusEnum>(QuestionnaireResponseStatusEnum.VALUESET_BINDER);
698                }
699                return myStatus;
700        }
701
702        
703        /**
704         * Gets the value(s) for <b>status</b> (status).
705         * creating it if it does
706         * not exist. This method may return <code>null</code>.
707         *
708     * <p>
709     * <b>Definition:</b>
710     * The lifecycle status of the questionnaire response as a whole.
711     * </p> 
712         */
713        public String getStatus() {  
714                return getStatusElement().getValue();
715        }
716
717        /**
718         * Sets the value(s) for <b>status</b> (status)
719         *
720     * <p>
721     * <b>Definition:</b>
722     * The lifecycle status of the questionnaire response as a whole.
723     * </p> 
724         */
725        public QuestionnaireResponse setStatus(BoundCodeDt<QuestionnaireResponseStatusEnum> theValue) {
726                myStatus = theValue;
727                return this;
728        }
729        
730        
731
732        /**
733         * Sets the value(s) for <b>status</b> (status)
734         *
735     * <p>
736     * <b>Definition:</b>
737     * The lifecycle status of the questionnaire response as a whole.
738     * </p> 
739         */
740        public QuestionnaireResponse setStatus(QuestionnaireResponseStatusEnum theValue) {
741                setStatus(new BoundCodeDt<QuestionnaireResponseStatusEnum>(QuestionnaireResponseStatusEnum.VALUESET_BINDER, theValue));
742                
743/*
744                getStatusElement().setValueAsEnum(theValue);
745*/
746                return this;
747        }
748
749  
750        /**
751         * Gets the value(s) for <b>subject</b> (who.focus).
752         * creating it if it does
753         * not exist. Will not return <code>null</code>.
754         *
755     * <p>
756     * <b>Definition:</b>
757     * The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information
758     * </p> 
759         */
760        public ResourceReferenceDt getSubject() {  
761                if (mySubject == null) {
762                        mySubject = new ResourceReferenceDt();
763                }
764                return mySubject;
765        }
766
767        /**
768         * Sets the value(s) for <b>subject</b> (who.focus)
769         *
770     * <p>
771     * <b>Definition:</b>
772     * The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information
773     * </p> 
774         */
775        public QuestionnaireResponse setSubject(ResourceReferenceDt theValue) {
776                mySubject = theValue;
777                return this;
778        }
779        
780        
781
782  
783        /**
784         * Gets the value(s) for <b>author</b> (who.author).
785         * creating it if it does
786         * not exist. Will not return <code>null</code>.
787         *
788     * <p>
789     * <b>Definition:</b>
790     * Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system
791     * </p> 
792         */
793        public ResourceReferenceDt getAuthor() {  
794                if (myAuthor == null) {
795                        myAuthor = new ResourceReferenceDt();
796                }
797                return myAuthor;
798        }
799
800        /**
801         * Sets the value(s) for <b>author</b> (who.author)
802         *
803     * <p>
804     * <b>Definition:</b>
805     * Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system
806     * </p> 
807         */
808        public QuestionnaireResponse setAuthor(ResourceReferenceDt theValue) {
809                myAuthor = theValue;
810                return this;
811        }
812        
813        
814
815  
816        /**
817         * Gets the value(s) for <b>authored</b> (when.recorded).
818         * creating it if it does
819         * not exist. Will not return <code>null</code>.
820         *
821     * <p>
822     * <b>Definition:</b>
823     * The date and/or time that this version of the questionnaire response was authored
824     * </p> 
825         */
826        public DateTimeDt getAuthoredElement() {  
827                if (myAuthored == null) {
828                        myAuthored = new DateTimeDt();
829                }
830                return myAuthored;
831        }
832
833        
834        /**
835         * Gets the value(s) for <b>authored</b> (when.recorded).
836         * creating it if it does
837         * not exist. This method may return <code>null</code>.
838         *
839     * <p>
840     * <b>Definition:</b>
841     * The date and/or time that this version of the questionnaire response was authored
842     * </p> 
843         */
844        public Date getAuthored() {  
845                return getAuthoredElement().getValue();
846        }
847
848        /**
849         * Sets the value(s) for <b>authored</b> (when.recorded)
850         *
851     * <p>
852     * <b>Definition:</b>
853     * The date and/or time that this version of the questionnaire response was authored
854     * </p> 
855         */
856        public QuestionnaireResponse setAuthored(DateTimeDt theValue) {
857                myAuthored = theValue;
858                return this;
859        }
860        
861        
862
863        /**
864         * Sets the value for <b>authored</b> (when.recorded)
865         *
866     * <p>
867     * <b>Definition:</b>
868     * The date and/or time that this version of the questionnaire response was authored
869     * </p> 
870         */
871        public QuestionnaireResponse setAuthored( Date theDate,  TemporalPrecisionEnum thePrecision) {
872                myAuthored = new DateTimeDt(theDate, thePrecision); 
873                return this; 
874        }
875
876        /**
877         * Sets the value for <b>authored</b> (when.recorded)
878         *
879     * <p>
880     * <b>Definition:</b>
881     * The date and/or time that this version of the questionnaire response was authored
882     * </p> 
883         */
884        public QuestionnaireResponse setAuthoredWithSecondsPrecision( Date theDate) {
885                myAuthored = new DateTimeDt(theDate); 
886                return this; 
887        }
888
889 
890        /**
891         * Gets the value(s) for <b>source</b> (who.source).
892         * creating it if it does
893         * not exist. Will not return <code>null</code>.
894         *
895     * <p>
896     * <b>Definition:</b>
897     * The person who answered the questions about the subject.
898     * </p> 
899         */
900        public ResourceReferenceDt getSource() {  
901                if (mySource == null) {
902                        mySource = new ResourceReferenceDt();
903                }
904                return mySource;
905        }
906
907        /**
908         * Sets the value(s) for <b>source</b> (who.source)
909         *
910     * <p>
911     * <b>Definition:</b>
912     * The person who answered the questions about the subject.
913     * </p> 
914         */
915        public QuestionnaireResponse setSource(ResourceReferenceDt theValue) {
916                mySource = theValue;
917                return this;
918        }
919        
920        
921
922  
923        /**
924         * Gets the value(s) for <b>encounter</b> (context).
925         * creating it if it does
926         * not exist. Will not return <code>null</code>.
927         *
928     * <p>
929     * <b>Definition:</b>
930     * Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.
931     * </p> 
932         */
933        public ResourceReferenceDt getEncounter() {  
934                if (myEncounter == null) {
935                        myEncounter = new ResourceReferenceDt();
936                }
937                return myEncounter;
938        }
939
940        /**
941         * Sets the value(s) for <b>encounter</b> (context)
942         *
943     * <p>
944     * <b>Definition:</b>
945     * Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.
946     * </p> 
947         */
948        public QuestionnaireResponse setEncounter(ResourceReferenceDt theValue) {
949                myEncounter = theValue;
950                return this;
951        }
952        
953        
954
955  
956        /**
957         * Gets the value(s) for <b>group</b> ().
958         * creating it if it does
959         * not exist. Will not return <code>null</code>.
960         *
961     * <p>
962     * <b>Definition:</b>
963     * A group of questions to a possibly similarly grouped set of questions in the questionnaire response
964     * </p> 
965         */
966        public Group getGroup() {  
967                if (myGroup == null) {
968                        myGroup = new Group();
969                }
970                return myGroup;
971        }
972
973        /**
974         * Sets the value(s) for <b>group</b> ()
975         *
976     * <p>
977     * <b>Definition:</b>
978     * A group of questions to a possibly similarly grouped set of questions in the questionnaire response
979     * </p> 
980         */
981        public QuestionnaireResponse setGroup(Group theValue) {
982                myGroup = theValue;
983                return this;
984        }
985        
986        
987
988  
989        /**
990         * Block class for child element: <b>QuestionnaireResponse.group</b> ()
991         *
992     * <p>
993     * <b>Definition:</b>
994     * A group of questions to a possibly similarly grouped set of questions in the questionnaire response
995     * </p> 
996         */
997        @Block()        
998        public static class Group 
999            extends  BaseIdentifiableElement  
1000            implements IResourceBlock {
1001        
1002        @Child(name="linkId", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
1003        @Description(
1004                shortDefinition="",
1005                formalDefinition="Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource."
1006        )
1007        private StringDt myLinkId;
1008        
1009        @Child(name="title", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
1010        @Description(
1011                shortDefinition="",
1012                formalDefinition="Text that is displayed above the contents of the group"
1013        )
1014        private StringDt myTitle;
1015        
1016        @Child(name="text", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
1017        @Description(
1018                shortDefinition="",
1019                formalDefinition="Additional text for the group, used for display purposes"
1020        )
1021        private StringDt myText;
1022        
1023        @Child(name="subject", order=3, min=0, max=1, summary=false, modifier=false, type={
1024                IResource.class
1025        })
1026        @Description(
1027                shortDefinition="",
1028                formalDefinition="More specific subject this section's answers are about, details the subject given in QuestionnaireResponse"
1029        )
1030        private ResourceReferenceDt mySubject;
1031        
1032        @Child(name="group", type=Group.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1033        @Description(
1034                shortDefinition="",
1035                formalDefinition="A sub-group within a group. The ordering of groups within this group is relevant"
1036        )
1037        private java.util.List<Group> myGroup;
1038        
1039        @Child(name="question", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
1040        @Description(
1041                shortDefinition="",
1042                formalDefinition="Set of questions within this group. The order of questions within the group is relevant"
1043        )
1044        private java.util.List<GroupQuestion> myQuestion;
1045        
1046
1047        @Override
1048        public boolean isEmpty() {
1049                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLinkId,  myTitle,  myText,  mySubject,  myGroup,  myQuestion);
1050        }
1051        
1052        @Override
1053        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1054                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLinkId, myTitle, myText, mySubject, myGroup, myQuestion);
1055        }
1056
1057        /**
1058         * Gets the value(s) for <b>linkId</b> ().
1059         * creating it if it does
1060         * not exist. Will not return <code>null</code>.
1061         *
1062     * <p>
1063     * <b>Definition:</b>
1064     * Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.
1065     * </p> 
1066         */
1067        public StringDt getLinkIdElement() {  
1068                if (myLinkId == null) {
1069                        myLinkId = new StringDt();
1070                }
1071                return myLinkId;
1072        }
1073
1074        
1075        /**
1076         * Gets the value(s) for <b>linkId</b> ().
1077         * creating it if it does
1078         * not exist. This method may return <code>null</code>.
1079         *
1080     * <p>
1081     * <b>Definition:</b>
1082     * Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.
1083     * </p> 
1084         */
1085        public String getLinkId() {  
1086                return getLinkIdElement().getValue();
1087        }
1088
1089        /**
1090         * Sets the value(s) for <b>linkId</b> ()
1091         *
1092     * <p>
1093     * <b>Definition:</b>
1094     * Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.
1095     * </p> 
1096         */
1097        public Group setLinkId(StringDt theValue) {
1098                myLinkId = theValue;
1099                return this;
1100        }
1101        
1102        
1103
1104        /**
1105         * Sets the value for <b>linkId</b> ()
1106         *
1107     * <p>
1108     * <b>Definition:</b>
1109     * Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.
1110     * </p> 
1111         */
1112        public Group setLinkId( String theString) {
1113                myLinkId = new StringDt(theString); 
1114                return this; 
1115        }
1116
1117 
1118        /**
1119         * Gets the value(s) for <b>title</b> ().
1120         * creating it if it does
1121         * not exist. Will not return <code>null</code>.
1122         *
1123     * <p>
1124     * <b>Definition:</b>
1125     * Text that is displayed above the contents of the group
1126     * </p> 
1127         */
1128        public StringDt getTitleElement() {  
1129                if (myTitle == null) {
1130                        myTitle = new StringDt();
1131                }
1132                return myTitle;
1133        }
1134
1135        
1136        /**
1137         * Gets the value(s) for <b>title</b> ().
1138         * creating it if it does
1139         * not exist. This method may return <code>null</code>.
1140         *
1141     * <p>
1142     * <b>Definition:</b>
1143     * Text that is displayed above the contents of the group
1144     * </p> 
1145         */
1146        public String getTitle() {  
1147                return getTitleElement().getValue();
1148        }
1149
1150        /**
1151         * Sets the value(s) for <b>title</b> ()
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * Text that is displayed above the contents of the group
1156     * </p> 
1157         */
1158        public Group setTitle(StringDt theValue) {
1159                myTitle = theValue;
1160                return this;
1161        }
1162        
1163        
1164
1165        /**
1166         * Sets the value for <b>title</b> ()
1167         *
1168     * <p>
1169     * <b>Definition:</b>
1170     * Text that is displayed above the contents of the group
1171     * </p> 
1172         */
1173        public Group setTitle( String theString) {
1174                myTitle = new StringDt(theString); 
1175                return this; 
1176        }
1177
1178 
1179        /**
1180         * Gets the value(s) for <b>text</b> ().
1181         * creating it if it does
1182         * not exist. Will not return <code>null</code>.
1183         *
1184     * <p>
1185     * <b>Definition:</b>
1186     * Additional text for the group, used for display purposes
1187     * </p> 
1188         */
1189        public StringDt getTextElement() {  
1190                if (myText == null) {
1191                        myText = new StringDt();
1192                }
1193                return myText;
1194        }
1195
1196        
1197        /**
1198         * Gets the value(s) for <b>text</b> ().
1199         * creating it if it does
1200         * not exist. This method may return <code>null</code>.
1201         *
1202     * <p>
1203     * <b>Definition:</b>
1204     * Additional text for the group, used for display purposes
1205     * </p> 
1206         */
1207        public String getText() {  
1208                return getTextElement().getValue();
1209        }
1210
1211        /**
1212         * Sets the value(s) for <b>text</b> ()
1213         *
1214     * <p>
1215     * <b>Definition:</b>
1216     * Additional text for the group, used for display purposes
1217     * </p> 
1218         */
1219        public Group setText(StringDt theValue) {
1220                myText = theValue;
1221                return this;
1222        }
1223        
1224        
1225
1226        /**
1227         * Sets the value for <b>text</b> ()
1228         *
1229     * <p>
1230     * <b>Definition:</b>
1231     * Additional text for the group, used for display purposes
1232     * </p> 
1233         */
1234        public Group setText( String theString) {
1235                myText = new StringDt(theString); 
1236                return this; 
1237        }
1238
1239 
1240        /**
1241         * Gets the value(s) for <b>subject</b> ().
1242         * creating it if it does
1243         * not exist. Will not return <code>null</code>.
1244         *
1245     * <p>
1246     * <b>Definition:</b>
1247     * More specific subject this section's answers are about, details the subject given in QuestionnaireResponse
1248     * </p> 
1249         */
1250        public ResourceReferenceDt getSubject() {  
1251                if (mySubject == null) {
1252                        mySubject = new ResourceReferenceDt();
1253                }
1254                return mySubject;
1255        }
1256
1257        /**
1258         * Sets the value(s) for <b>subject</b> ()
1259         *
1260     * <p>
1261     * <b>Definition:</b>
1262     * More specific subject this section's answers are about, details the subject given in QuestionnaireResponse
1263     * </p> 
1264         */
1265        public Group setSubject(ResourceReferenceDt theValue) {
1266                mySubject = theValue;
1267                return this;
1268        }
1269        
1270        
1271
1272  
1273        /**
1274         * Gets the value(s) for <b>group</b> ().
1275         * creating it if it does
1276         * not exist. Will not return <code>null</code>.
1277         *
1278     * <p>
1279     * <b>Definition:</b>
1280     * A sub-group within a group. The ordering of groups within this group is relevant
1281     * </p> 
1282         */
1283        public java.util.List<Group> getGroup() {  
1284                if (myGroup == null) {
1285                        myGroup = new java.util.ArrayList<Group>();
1286                }
1287                return myGroup;
1288        }
1289
1290        /**
1291         * Sets the value(s) for <b>group</b> ()
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * A sub-group within a group. The ordering of groups within this group is relevant
1296     * </p> 
1297         */
1298        public Group setGroup(java.util.List<Group> theValue) {
1299                myGroup = theValue;
1300                return this;
1301        }
1302        
1303        
1304
1305        /**
1306         * Adds and returns a new value for <b>group</b> ()
1307         *
1308     * <p>
1309     * <b>Definition:</b>
1310     * A sub-group within a group. The ordering of groups within this group is relevant
1311     * </p> 
1312         */
1313        public Group addGroup() {
1314                Group newType = new Group();
1315                getGroup().add(newType);
1316                return newType; 
1317        }
1318
1319        /**
1320         * Adds a given new value for <b>group</b> ()
1321         *
1322         * <p>
1323         * <b>Definition:</b>
1324         * A sub-group within a group. The ordering of groups within this group is relevant
1325         * </p>
1326         * @param theValue The group to add (must not be <code>null</code>)
1327         */
1328        public Group addGroup(Group theValue) {
1329                if (theValue == null) {
1330                        throw new NullPointerException("theValue must not be null");
1331                }
1332                getGroup().add(theValue);
1333                return this;
1334        }
1335
1336        /**
1337         * Gets the first repetition for <b>group</b> (),
1338         * creating it if it does not already exist.
1339         *
1340     * <p>
1341     * <b>Definition:</b>
1342     * A sub-group within a group. The ordering of groups within this group is relevant
1343     * </p> 
1344         */
1345        public Group getGroupFirstRep() {
1346                if (getGroup().isEmpty()) {
1347                        return addGroup();
1348                }
1349                return getGroup().get(0); 
1350        }
1351  
1352        /**
1353         * Gets the value(s) for <b>question</b> ().
1354         * creating it if it does
1355         * not exist. Will not return <code>null</code>.
1356         *
1357     * <p>
1358     * <b>Definition:</b>
1359     * Set of questions within this group. The order of questions within the group is relevant
1360     * </p> 
1361         */
1362        public java.util.List<GroupQuestion> getQuestion() {  
1363                if (myQuestion == null) {
1364                        myQuestion = new java.util.ArrayList<GroupQuestion>();
1365                }
1366                return myQuestion;
1367        }
1368
1369        /**
1370         * Sets the value(s) for <b>question</b> ()
1371         *
1372     * <p>
1373     * <b>Definition:</b>
1374     * Set of questions within this group. The order of questions within the group is relevant
1375     * </p> 
1376         */
1377        public Group setQuestion(java.util.List<GroupQuestion> theValue) {
1378                myQuestion = theValue;
1379                return this;
1380        }
1381        
1382        
1383
1384        /**
1385         * Adds and returns a new value for <b>question</b> ()
1386         *
1387     * <p>
1388     * <b>Definition:</b>
1389     * Set of questions within this group. The order of questions within the group is relevant
1390     * </p> 
1391         */
1392        public GroupQuestion addQuestion() {
1393                GroupQuestion newType = new GroupQuestion();
1394                getQuestion().add(newType);
1395                return newType; 
1396        }
1397
1398        /**
1399         * Adds a given new value for <b>question</b> ()
1400         *
1401         * <p>
1402         * <b>Definition:</b>
1403         * Set of questions within this group. The order of questions within the group is relevant
1404         * </p>
1405         * @param theValue The question to add (must not be <code>null</code>)
1406         */
1407        public Group addQuestion(GroupQuestion theValue) {
1408                if (theValue == null) {
1409                        throw new NullPointerException("theValue must not be null");
1410                }
1411                getQuestion().add(theValue);
1412                return this;
1413        }
1414
1415        /**
1416         * Gets the first repetition for <b>question</b> (),
1417         * creating it if it does not already exist.
1418         *
1419     * <p>
1420     * <b>Definition:</b>
1421     * Set of questions within this group. The order of questions within the group is relevant
1422     * </p> 
1423         */
1424        public GroupQuestion getQuestionFirstRep() {
1425                if (getQuestion().isEmpty()) {
1426                        return addQuestion();
1427                }
1428                return getQuestion().get(0); 
1429        }
1430  
1431
1432
1433        }
1434
1435        /**
1436         * Block class for child element: <b>QuestionnaireResponse.group.question</b> ()
1437         *
1438     * <p>
1439     * <b>Definition:</b>
1440     * Set of questions within this group. The order of questions within the group is relevant
1441     * </p> 
1442         */
1443        @Block()        
1444        public static class GroupQuestion 
1445            extends  BaseIdentifiableElement  
1446            implements IResourceBlock {
1447        
1448        @Child(name="linkId", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
1449        @Description(
1450                shortDefinition="",
1451                formalDefinition="Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource."
1452        )
1453        private StringDt myLinkId;
1454        
1455        @Child(name="text", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false)  
1456        @Description(
1457                shortDefinition="",
1458                formalDefinition="The actual question as shown to the user to prompt them for an answer."
1459        )
1460        private StringDt myText;
1461        
1462        @Child(name="answer", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
1463        @Description(
1464                shortDefinition="",
1465                formalDefinition="The respondent's answer(s) to the question"
1466        )
1467        private java.util.List<GroupQuestionAnswer> myAnswer;
1468        
1469
1470        @Override
1471        public boolean isEmpty() {
1472                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLinkId,  myText,  myAnswer);
1473        }
1474        
1475        @Override
1476        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1477                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLinkId, myText, myAnswer);
1478        }
1479
1480        /**
1481         * Gets the value(s) for <b>linkId</b> ().
1482         * creating it if it does
1483         * not exist. Will not return <code>null</code>.
1484         *
1485     * <p>
1486     * <b>Definition:</b>
1487     * Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.
1488     * </p> 
1489         */
1490        public StringDt getLinkIdElement() {  
1491                if (myLinkId == null) {
1492                        myLinkId = new StringDt();
1493                }
1494                return myLinkId;
1495        }
1496
1497        
1498        /**
1499         * Gets the value(s) for <b>linkId</b> ().
1500         * creating it if it does
1501         * not exist. This method may return <code>null</code>.
1502         *
1503     * <p>
1504     * <b>Definition:</b>
1505     * Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.
1506     * </p> 
1507         */
1508        public String getLinkId() {  
1509                return getLinkIdElement().getValue();
1510        }
1511
1512        /**
1513         * Sets the value(s) for <b>linkId</b> ()
1514         *
1515     * <p>
1516     * <b>Definition:</b>
1517     * Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.
1518     * </p> 
1519         */
1520        public GroupQuestion setLinkId(StringDt theValue) {
1521                myLinkId = theValue;
1522                return this;
1523        }
1524        
1525        
1526
1527        /**
1528         * Sets the value for <b>linkId</b> ()
1529         *
1530     * <p>
1531     * <b>Definition:</b>
1532     * Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.
1533     * </p> 
1534         */
1535        public GroupQuestion setLinkId( String theString) {
1536                myLinkId = new StringDt(theString); 
1537                return this; 
1538        }
1539
1540 
1541        /**
1542         * Gets the value(s) for <b>text</b> ().
1543         * creating it if it does
1544         * not exist. Will not return <code>null</code>.
1545         *
1546     * <p>
1547     * <b>Definition:</b>
1548     * The actual question as shown to the user to prompt them for an answer.
1549     * </p> 
1550         */
1551        public StringDt getTextElement() {  
1552                if (myText == null) {
1553                        myText = new StringDt();
1554                }
1555                return myText;
1556        }
1557
1558        
1559        /**
1560         * Gets the value(s) for <b>text</b> ().
1561         * creating it if it does
1562         * not exist. This method may return <code>null</code>.
1563         *
1564     * <p>
1565     * <b>Definition:</b>
1566     * The actual question as shown to the user to prompt them for an answer.
1567     * </p> 
1568         */
1569        public String getText() {  
1570                return getTextElement().getValue();
1571        }
1572
1573        /**
1574         * Sets the value(s) for <b>text</b> ()
1575         *
1576     * <p>
1577     * <b>Definition:</b>
1578     * The actual question as shown to the user to prompt them for an answer.
1579     * </p> 
1580         */
1581        public GroupQuestion setText(StringDt theValue) {
1582                myText = theValue;
1583                return this;
1584        }
1585        
1586        
1587
1588        /**
1589         * Sets the value for <b>text</b> ()
1590         *
1591     * <p>
1592     * <b>Definition:</b>
1593     * The actual question as shown to the user to prompt them for an answer.
1594     * </p> 
1595         */
1596        public GroupQuestion setText( String theString) {
1597                myText = new StringDt(theString); 
1598                return this; 
1599        }
1600
1601 
1602        /**
1603         * Gets the value(s) for <b>answer</b> ().
1604         * creating it if it does
1605         * not exist. Will not return <code>null</code>.
1606         *
1607     * <p>
1608     * <b>Definition:</b>
1609     * The respondent's answer(s) to the question
1610     * </p> 
1611         */
1612        public java.util.List<GroupQuestionAnswer> getAnswer() {  
1613                if (myAnswer == null) {
1614                        myAnswer = new java.util.ArrayList<GroupQuestionAnswer>();
1615                }
1616                return myAnswer;
1617        }
1618
1619        /**
1620         * Sets the value(s) for <b>answer</b> ()
1621         *
1622     * <p>
1623     * <b>Definition:</b>
1624     * The respondent's answer(s) to the question
1625     * </p> 
1626         */
1627        public GroupQuestion setAnswer(java.util.List<GroupQuestionAnswer> theValue) {
1628                myAnswer = theValue;
1629                return this;
1630        }
1631        
1632        
1633
1634        /**
1635         * Adds and returns a new value for <b>answer</b> ()
1636         *
1637     * <p>
1638     * <b>Definition:</b>
1639     * The respondent's answer(s) to the question
1640     * </p> 
1641         */
1642        public GroupQuestionAnswer addAnswer() {
1643                GroupQuestionAnswer newType = new GroupQuestionAnswer();
1644                getAnswer().add(newType);
1645                return newType; 
1646        }
1647
1648        /**
1649         * Adds a given new value for <b>answer</b> ()
1650         *
1651         * <p>
1652         * <b>Definition:</b>
1653         * The respondent's answer(s) to the question
1654         * </p>
1655         * @param theValue The answer to add (must not be <code>null</code>)
1656         */
1657        public GroupQuestion addAnswer(GroupQuestionAnswer theValue) {
1658                if (theValue == null) {
1659                        throw new NullPointerException("theValue must not be null");
1660                }
1661                getAnswer().add(theValue);
1662                return this;
1663        }
1664
1665        /**
1666         * Gets the first repetition for <b>answer</b> (),
1667         * creating it if it does not already exist.
1668         *
1669     * <p>
1670     * <b>Definition:</b>
1671     * The respondent's answer(s) to the question
1672     * </p> 
1673         */
1674        public GroupQuestionAnswer getAnswerFirstRep() {
1675                if (getAnswer().isEmpty()) {
1676                        return addAnswer();
1677                }
1678                return getAnswer().get(0); 
1679        }
1680  
1681
1682
1683        }
1684
1685        /**
1686         * Block class for child element: <b>QuestionnaireResponse.group.question.answer</b> ()
1687         *
1688     * <p>
1689     * <b>Definition:</b>
1690     * The respondent's answer(s) to the question
1691     * </p> 
1692         */
1693        @Block()        
1694        public static class GroupQuestionAnswer 
1695            extends  BaseIdentifiableElement  
1696            implements IResourceBlock {
1697        
1698        @Child(name="value", order=0, min=0, max=1, summary=false, modifier=false, type={
1699                BooleanDt.class, 
1700                DecimalDt.class, 
1701                IntegerDt.class, 
1702                DateDt.class, 
1703                DateTimeDt.class, 
1704                InstantDt.class, 
1705                TimeDt.class, 
1706                StringDt.class, 
1707                UriDt.class, 
1708                AttachmentDt.class, 
1709                CodingDt.class, 
1710                QuantityDt.class, 
1711                IResource.class
1712        })
1713        @Description(
1714                shortDefinition="",
1715                formalDefinition="The answer (or one of the answers) provided by the respondent to the question"
1716        )
1717        private IDatatype myValue;
1718        
1719        @Child(name="group", type=Group.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1720        @Description(
1721                shortDefinition="",
1722                formalDefinition="Nested group, containing nested question for this question. The order of groups within the question is relevant"
1723        )
1724        private java.util.List<Group> myGroup;
1725        
1726
1727        @Override
1728        public boolean isEmpty() {
1729                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myValue,  myGroup);
1730        }
1731        
1732        @Override
1733        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1734                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myGroup);
1735        }
1736
1737        /**
1738         * Gets the value(s) for <b>value[x]</b> ().
1739         * creating it if it does
1740         * not exist. Will not return <code>null</code>.
1741         *
1742     * <p>
1743     * <b>Definition:</b>
1744     * The answer (or one of the answers) provided by the respondent to the question
1745     * </p> 
1746         */
1747        public IDatatype getValue() {  
1748                return myValue;
1749        }
1750
1751        /**
1752         * Sets the value(s) for <b>value[x]</b> ()
1753         *
1754     * <p>
1755     * <b>Definition:</b>
1756     * The answer (or one of the answers) provided by the respondent to the question
1757     * </p> 
1758         */
1759        public GroupQuestionAnswer setValue(IDatatype theValue) {
1760                myValue = theValue;
1761                return this;
1762        }
1763        
1764        
1765
1766  
1767        /**
1768         * Gets the value(s) for <b>group</b> ().
1769         * creating it if it does
1770         * not exist. Will not return <code>null</code>.
1771         *
1772     * <p>
1773     * <b>Definition:</b>
1774     * Nested group, containing nested question for this question. The order of groups within the question is relevant
1775     * </p> 
1776         */
1777        public java.util.List<Group> getGroup() {  
1778                if (myGroup == null) {
1779                        myGroup = new java.util.ArrayList<Group>();
1780                }
1781                return myGroup;
1782        }
1783
1784        /**
1785         * Sets the value(s) for <b>group</b> ()
1786         *
1787     * <p>
1788     * <b>Definition:</b>
1789     * Nested group, containing nested question for this question. The order of groups within the question is relevant
1790     * </p> 
1791         */
1792        public GroupQuestionAnswer setGroup(java.util.List<Group> theValue) {
1793                myGroup = theValue;
1794                return this;
1795        }
1796        
1797        
1798
1799        /**
1800         * Adds and returns a new value for <b>group</b> ()
1801         *
1802     * <p>
1803     * <b>Definition:</b>
1804     * Nested group, containing nested question for this question. The order of groups within the question is relevant
1805     * </p> 
1806         */
1807        public Group addGroup() {
1808                Group newType = new Group();
1809                getGroup().add(newType);
1810                return newType; 
1811        }
1812
1813        /**
1814         * Adds a given new value for <b>group</b> ()
1815         *
1816         * <p>
1817         * <b>Definition:</b>
1818         * Nested group, containing nested question for this question. The order of groups within the question is relevant
1819         * </p>
1820         * @param theValue The group to add (must not be <code>null</code>)
1821         */
1822        public GroupQuestionAnswer addGroup(Group theValue) {
1823                if (theValue == null) {
1824                        throw new NullPointerException("theValue must not be null");
1825                }
1826                getGroup().add(theValue);
1827                return this;
1828        }
1829
1830        /**
1831         * Gets the first repetition for <b>group</b> (),
1832         * creating it if it does not already exist.
1833         *
1834     * <p>
1835     * <b>Definition:</b>
1836     * Nested group, containing nested question for this question. The order of groups within the question is relevant
1837     * </p> 
1838         */
1839        public Group getGroupFirstRep() {
1840                if (getGroup().isEmpty()) {
1841                        return addGroup();
1842                }
1843                return getGroup().get(0); 
1844        }
1845  
1846
1847
1848        }
1849
1850
1851
1852
1853
1854
1855    @Override
1856    public String getResourceName() {
1857        return "QuestionnaireResponse";
1858    }
1859    
1860    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1861        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1862    }
1863
1864
1865}