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