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