From 2ca5d57f0dec21354dbc6c2de8921c812eb07c44 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Mon, 17 Mar 2014 08:57:57 -0400 Subject: [PATCH] Profile building complete --- .../BaseRuntimeChildDatatypeDefinition.java | 5 +- .../BaseRuntimeDeclaredChildDefinition.java | 2 + .../context/BaseRuntimeElementDefinition.java | 2 +- .../ca/uhn/fhir/context/ModelScanner.java | 66 ++++-- .../ca/uhn/fhir/context/RuntimeChildAny.java | 56 +++++ .../context/RuntimeChildChoiceDefinition.java | 11 + .../RuntimeChildContainedResources.java | 49 ++++ .../RuntimeElemContainedResources.java | 16 ++ .../context/RuntimeResourceDefinition.java | 16 +- .../ca/uhn/fhir/model/api/BaseResource.java | 16 ++ .../uhn/fhir/model/api/ICompositeElement.java | 10 + .../java/ca/uhn/fhir/model/api/IResource.java | 14 ++ .../fhir/model/dstu/composite/AddressDt.java | 38 ++- .../model/dstu/composite/AttachmentDt.java | 37 ++- .../dstu/composite/CodeableConceptDt.java | 41 +++- .../fhir/model/dstu/composite/CodingDt.java | 39 ++- .../fhir/model/dstu/composite/ContactDt.java | 37 ++- .../model/dstu/composite/ContainedDt.java | 43 ++++ .../model/dstu/composite/HumanNameDt.java | 38 ++- .../model/dstu/composite/IdentifierDt.java | 38 ++- .../model/dstu/composite/NarrativeDt.java | 8 +- .../fhir/model/dstu/composite/PeriodDt.java | 42 +++- .../fhir/model/dstu/composite/QuantityDt.java | 36 ++- .../fhir/model/dstu/composite/RangeDt.java | 42 +++- .../fhir/model/dstu/composite/RatioDt.java | 42 +++- .../dstu/composite/ResourceReferenceDt.java | 41 +++- .../model/dstu/composite/SampledDataDt.java | 39 ++- .../fhir/model/dstu/composite/ScheduleDt.java | 47 ++-- .../uhn/fhir/model/dstu/resource/Binary.java | 13 + .../fhir/model/dstu/resource/Conformance.java | 223 ++++++++++++++---- .../uhn/fhir/model/dstu/resource/Device.java | 116 ++++++++- .../model/dstu/resource/DiagnosticOrder.java | 139 +++++++++-- .../model/dstu/resource/DiagnosticReport.java | 132 +++++++++-- .../fhir/model/dstu/resource/Encounter.java | 156 ++++++++++-- .../uhn/fhir/model/dstu/resource/Group.java | 126 ++++++++-- .../model/dstu/resource/ImagingStudy.java | 133 +++++++++-- .../fhir/model/dstu/resource/Location.java | 123 ++++++++-- .../uhn/fhir/model/dstu/resource/Media.java | 115 ++++++++- .../fhir/model/dstu/resource/Medication.java | 139 +++++++++-- .../fhir/model/dstu/resource/Observation.java | 138 +++++++++-- .../model/dstu/resource/Organization.java | 127 ++++++++-- .../uhn/fhir/model/dstu/resource/Patient.java | 143 +++++++++-- .../model/dstu/resource/Practitioner.java | 126 ++++++++-- .../uhn/fhir/model/dstu/resource/Profile.java | 218 +++++++++++++---- .../model/dstu/resource/RelatedPerson.java | 116 ++++++++- .../fhir/model/dstu/resource/Specimen.java | 158 +++++++++++-- .../fhir/model/dstu/resource/Substance.java | 135 +++++++++-- .../fhir/model/dstu/resource/ValueSet.java | 180 +++++++++++--- .../model/dstu/valueset/AddressUseEnum.java | 3 +- .../AdministrativeGenderCodesEnum.java | 3 +- .../model/dstu/valueset/AdmitSourceEnum.java | 3 +- .../dstu/valueset/AggregationModeEnum.java | 3 +- .../dstu/valueset/AnimalSpeciesEnum.java | 3 +- .../dstu/valueset/BindingConformanceEnum.java | 3 +- .../valueset/ConformanceEventModeEnum.java | 3 +- .../ConformanceStatementStatusEnum.java | 3 +- .../dstu/valueset/ConstraintSeverityEnum.java | 3 +- .../dstu/valueset/ContactSystemEnum.java | 3 +- .../model/dstu/valueset/ContactUseEnum.java | 3 +- .../model/dstu/valueset/DataTypeEnum.java | 3 +- .../valueset/DiagnosticOrderPriorityEnum.java | 3 +- .../valueset/DiagnosticOrderStatusEnum.java | 3 +- .../valueset/DiagnosticReportStatusEnum.java | 3 +- .../model/dstu/valueset/DocumentModeEnum.java | 3 +- .../dstu/valueset/EncounterClassEnum.java | 3 +- .../valueset/EncounterReasonCodesEnum.java | 3 +- .../dstu/valueset/EncounterStateEnum.java | 3 +- .../dstu/valueset/EncounterTypeEnum.java | 3 +- .../model/dstu/valueset/EventTimingEnum.java | 3 +- .../dstu/valueset/ExtensionContextEnum.java | 3 +- .../dstu/valueset/FHIRDefinedTypeEnum.java | 3 +- .../dstu/valueset/FilterOperatorEnum.java | 3 +- .../model/dstu/valueset/GroupTypeEnum.java | 3 +- .../HierarchicalRelationshipTypeEnum.java | 3 +- .../dstu/valueset/IdentifierUseEnum.java | 3 +- .../dstu/valueset/ImagingModalityEnum.java | 3 +- .../valueset/InstanceAvailabilityEnum.java | 3 +- .../model/dstu/valueset/LinkTypeEnum.java | 3 +- .../model/dstu/valueset/LocationModeEnum.java | 3 +- .../dstu/valueset/LocationStatusEnum.java | 3 +- .../model/dstu/valueset/LocationTypeEnum.java | 3 +- .../dstu/valueset/MaritalStatusCodesEnum.java | 3 +- .../model/dstu/valueset/MediaTypeEnum.java | 3 +- .../dstu/valueset/MedicationKindEnum.java | 3 +- .../model/dstu/valueset/MessageEventEnum.java | 3 +- .../MessageSignificanceCategoryEnum.java | 3 +- .../dstu/valueset/MessageTransportEnum.java | 3 +- .../model/dstu/valueset/ModalityEnum.java | 3 +- .../fhir/model/dstu/valueset/NameUseEnum.java | 3 +- .../ObservationInterpretationCodesEnum.java | 3 +- .../ObservationRelationshipTypeEnum.java | 3 +- .../valueset/ObservationReliabilityEnum.java | 3 +- .../dstu/valueset/ObservationStatusEnum.java | 3 +- .../dstu/valueset/OrganizationTypeEnum.java | 3 +- .../dstu/valueset/ParticipantTypeEnum.java | 3 +- .../valueset/PatientRelationshipTypeEnum.java | 3 +- .../dstu/valueset/PractitionerRoleEnum.java | 3 +- .../valueset/PractitionerSpecialtyEnum.java | 3 +- .../valueset/PropertyRepresentationEnum.java | 3 +- .../valueset/QuantityCompararatorEnum.java | 3 +- .../valueset/ResourceProfileStatusEnum.java | 3 +- .../model/dstu/valueset/ResourceTypeEnum.java | 3 +- .../valueset/RestfulConformanceModeEnum.java | 3 +- .../valueset/RestfulOperationSystemEnum.java | 3 +- .../valueset/RestfulOperationTypeEnum.java | 3 +- .../valueset/RestfulSecurityServiceEnum.java | 3 +- .../dstu/valueset/SearchParamTypeEnum.java | 3 +- .../model/dstu/valueset/SlicingRulesEnum.java | 3 +- .../SpecimenCollectionMethodEnum.java | 3 +- .../SpecimenTreatmentProcedureEnum.java | 3 +- .../dstu/valueset/SubstanceTypeEnum.java | 3 +- .../model/dstu/valueset/UnitsOfTimeEnum.java | 3 +- .../dstu/valueset/ValueSetStatusEnum.java | 3 +- .../java/ca/uhn/fhir/parser/BaseParser.java | 37 +++ .../java/ca/uhn/fhir/parser/JsonParser.java | 43 ++-- .../java/ca/uhn/fhir/parser/ParserState.java | 36 ++- .../java/ca/uhn/fhir/parser/XmlParser.java | 8 +- .../java/ca/uhn/fhir/util/ElementUtil.java | 22 +- .../fhir/context/ResourceWithExtensionsA.java | 30 ++- .../RuntimeResourceDefinitionTest.java | 16 ++ .../fhir/rest/server/ResfulServerTest.java | 21 +- .../ca/uhn/fhir/testmodel/IdentifierDt.java | 8 +- .../java/ca/uhn/fhir/testmodel/Patient.java | 7 +- .../resources/contained-diagnosticreport.xml | 3 +- .../src/main/resources/vm/templates.vm | 11 +- 125 files changed, 3342 insertions(+), 722 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java index ef5b9f1ba60..41f5a657bf7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeChildDatatypeDefinition.java @@ -8,6 +8,7 @@ import java.util.Set; import ca.uhn.fhir.model.api.ICodeEnum; import ca.uhn.fhir.model.api.IDatatype; import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; @@ -20,7 +21,8 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class theDatatype) { super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName); - + assert theDatatype != IResource.class; // shouldn't exist + assert theDatatype != IDatatype.class; // should use RuntimeChildAny myDatatype = theDatatype; } @@ -64,6 +66,7 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl @Override void sealAndInitialize(Map, BaseRuntimeElementDefinition> theClassToElementDefinitions) { myElementDefinition = theClassToElementDefinitions.get(getDatatype()); + assert myElementDefinition != null : "Unknown type: " + getDatatype(); } public void setCodeType(Class theType) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java index 003d54d3c0d..65e5a910957 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java @@ -98,10 +98,12 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil return myField; } + @Override public int getMax() { return myMax; } + @Override public int getMin() { return myMin; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java index 01f9820fd7e..68a4b6243ca 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeElementDefinition.java @@ -123,7 +123,7 @@ public abstract class BaseRuntimeElementDefinition { public abstract ChildTypeEnum getChildType(); public enum ChildTypeEnum { - COMPOSITE_DATATYPE, PRIMITIVE_DATATYPE, RESOURCE, RESOURCE_REF, RESOURCE_BLOCK, PRIMITIVE_XHTML, UNDECL_EXT, EXTENSION_DECLARED + COMPOSITE_DATATYPE, PRIMITIVE_DATATYPE, RESOURCE, RESOURCE_REF, RESOURCE_BLOCK, PRIMITIVE_XHTML, UNDECL_EXT, EXTENSION_DECLARED, CONTAINED_RESOURCES } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index bbe1ddc6989..a6d2730204e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -35,6 +35,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Extension; import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; @@ -158,8 +159,7 @@ class ModelScanner { ResourceDef resourceDefinition = theClass.getAnnotation(ResourceDef.class); if (resourceDefinition != null) { if (!IResource.class.isAssignableFrom(theClass)) { - throw new ConfigurationException("Resource type contains a @" + ResourceDef.class.getSimpleName() + " annotation but does not implement " + IResource.class.getCanonicalName() + ": " - + theClass.getCanonicalName()); + throw new ConfigurationException("Resource type contains a @" + ResourceDef.class.getSimpleName() + " annotation but does not implement " + IResource.class.getCanonicalName() + ": " + theClass.getCanonicalName()); } @SuppressWarnings("unchecked") Class resClass = (Class) theClass; @@ -177,8 +177,7 @@ class ModelScanner { Class> resClass = (Class>) theClass; scanPrimitiveDatatype(resClass, datatypeDefinition); } else { - throw new ConfigurationException("Resource type contains a @" + DatatypeDef.class.getSimpleName() + " annotation but does not implement " + IDatatype.class.getCanonicalName() + ": " - + theClass.getCanonicalName()); + throw new ConfigurationException("Resource type contains a @" + DatatypeDef.class.getSimpleName() + " annotation but does not implement " + IDatatype.class.getCanonicalName() + ": " + theClass.getCanonicalName()); } } @@ -189,8 +188,7 @@ class ModelScanner { Class resClass = (Class) theClass; scanCodeTable(resClass, codeTableDefinition); } else { - throw new ConfigurationException("Type contains a @" + CodeTableDef.class.getSimpleName() + " annotation but does not implement " + ICodeEnum.class.getCanonicalName() + ": " - + theClass.getCanonicalName()); + throw new ConfigurationException("Type contains a @" + CodeTableDef.class.getSimpleName() + " annotation but does not implement " + ICodeEnum.class.getCanonicalName() + ": " + theClass.getCanonicalName()); } } @@ -201,8 +199,7 @@ class ModelScanner { Class blockClass = (Class) theClass; scanBlock(blockClass, blockDefinition); } else { - throw new ConfigurationException("Type contains a @" + Block.class.getSimpleName() + " annotation but does not implement " + IResourceBlock.class.getCanonicalName() + ": " - + theClass.getCanonicalName()); + throw new ConfigurationException("Type contains a @" + Block.class.getSimpleName() + " annotation but does not implement " + IResourceBlock.class.getCanonicalName() + ": " + theClass.getCanonicalName()); } } @@ -288,8 +285,8 @@ class ModelScanner { } @SuppressWarnings("unchecked") - private void scanCompositeElementForChildren(Class theClass, BaseRuntimeElementCompositeDefinition theDefinition, Set elementNames, - TreeMap theOrderToElementDef, TreeMap theOrderToExtensionDef) { + private void scanCompositeElementForChildren(Class theClass, BaseRuntimeElementCompositeDefinition theDefinition, Set elementNames, TreeMap theOrderToElementDef, + TreeMap theOrderToExtensionDef) { int baseElementOrder = theOrderToElementDef.isEmpty() ? 0 : theOrderToElementDef.lastEntry().getKey() + 1; for (Field next : theClass.getDeclaredFields()) { @@ -314,7 +311,9 @@ class ModelScanner { } /* - * Anything that's marked as unknown is given a new ID that is <0 so that it doesn't conflict wityh any given IDs and can be figured out later + * Anything that's marked as unknown is given a new ID that is <0 so + * that it doesn't conflict wityh any given IDs and can be figured + * out later */ while (order == Child.ORDER_UNKNOWN && orderMap.containsKey(order)) { order--; @@ -326,8 +325,7 @@ class ModelScanner { } if (orderMap.containsKey(order)) { - throw new ConfigurationException("Detected duplicate field order '" + childAnnotation.order() + "' for element named '" + elementName + "' in type '" + theClass.getCanonicalName() - + "'"); + throw new ConfigurationException("Detected duplicate field order '" + childAnnotation.order() + "' for element named '" + elementName + "' in type '" + theClass.getCanonicalName() + "'"); } if (elementNames.contains(elementName)) { @@ -336,7 +334,14 @@ class ModelScanner { Class nextElementType = determineElementType(next); - if (choiceTypes.size() > 1 && !ResourceReferenceDt.class.isAssignableFrom(nextElementType)) { + if (nextElementType.equals(ContainedDt.class)) { + /* + * Child is contained resources + */ + RuntimeChildContainedResources def = new RuntimeChildContainedResources(next, childAnnotation, descriptionAnnotation, elementName); + orderMap.put(order, def); + + } else if (choiceTypes.size() > 1 && !ResourceReferenceDt.class.isAssignableFrom(nextElementType)) { /* * Child is a choice element */ @@ -351,8 +356,7 @@ class ModelScanner { * Child is an extension */ Class et = (Class) nextElementType; - RuntimeChildDeclaredExtensionDefinition def = new RuntimeChildDeclaredExtensionDefinition(next, childAnnotation, descriptionAnnotation, extensionAttr, elementName, - extensionAttr.url(), et); + RuntimeChildDeclaredExtensionDefinition def = new RuntimeChildDeclaredExtensionDefinition(next, childAnnotation, descriptionAnnotation, extensionAttr, elementName, extensionAttr.url(), et); orderMap.put(order, def); if (IElement.class.isAssignableFrom(nextElementType)) { addScanAlso((Class) nextElementType); @@ -374,7 +378,8 @@ class ModelScanner { } else if (IResourceBlock.class.isAssignableFrom(nextElementType)) { /* - * Child is a resource block (i.e. a sub-tag within a resource) TODO: do these have a better name according to HL7? + * Child is a resource block (i.e. a sub-tag within a resource) + * TODO: do these have a better name according to HL7? */ Class blockDef = (Class) nextElementType; @@ -382,6 +387,11 @@ class ModelScanner { RuntimeChildResourceBlockDefinition def = new RuntimeChildResourceBlockDefinition(next, childAnnotation, descriptionAnnotation, elementName, blockDef); orderMap.put(order, def); + } else if (IDatatype.class.equals(nextElementType)) { + + RuntimeChildAny def = new RuntimeChildAny(next, elementName, childAnnotation, descriptionAnnotation); + orderMap.put(order, def); + } else if (IDatatype.class.isAssignableFrom(nextElementType)) { Class nextDatatype = (Class) nextElementType; @@ -406,8 +416,7 @@ class ModelScanner { CodeableConceptElement concept = next.getAnnotation(CodeableConceptElement.class); if (concept != null) { if (!ICodedDatatype.class.isAssignableFrom(nextDatatype)) { - throw new ConfigurationException("Field '" + elementName + "' in type '" + theClass.getCanonicalName() + "' is marked as @" + CodeableConceptElement.class.getCanonicalName() - + " but type is not a subtype of " + ICodedDatatype.class.getName()); + throw new ConfigurationException("Field '" + elementName + "' in type '" + theClass.getCanonicalName() + "' is marked as @" + CodeableConceptElement.class.getCanonicalName() + " but type is not a subtype of " + ICodedDatatype.class.getName()); } else { Class type = concept.type(); myScanAlsoCodeTable.add(type); @@ -417,7 +426,6 @@ class ModelScanner { orderMap.put(order, def); - // TODO: handle codes } else { throw new ConfigurationException("Field '" + elementName + "' in type '" + theClass.getCanonicalName() + "' is not a valid child type: " + nextElementType); } @@ -457,8 +465,13 @@ class ModelScanner { if (myNameToResourceDefinitions.containsKey(resourceName)) { if (!myNameToResourceDefinitions.get(resourceName).getImplementingClass().equals(theClass)) { -// throw new ConfigurationException("Detected duplicate element name '" + resourceName + "' in types '" + theClass.getCanonicalName() + "' and '" -// + myNameToResourceDefinitions.get(resourceName).getImplementingClass() + "'"); + // throw new + // ConfigurationException("Detected duplicate element name '" + + // resourceName + "' in types '" + theClass.getCanonicalName() + + // "' and '" + // + + // myNameToResourceDefinitions.get(resourceName).getImplementingClass() + // + "'"); } else { return resourceName; } @@ -466,11 +479,13 @@ class ModelScanner { String resourceId = resourceDefinition.id(); if (isBlank(resourceId)) { - // throw new ConfigurationException("Resource type @" + ResourceDef.class.getSimpleName() + " annotation contains no resource ID: " + theClass.getCanonicalName()); + // throw new ConfigurationException("Resource type @" + + // ResourceDef.class.getSimpleName() + + // " annotation contains no resource ID: " + + // theClass.getCanonicalName()); } else { if (myIdToResourceDefinition.containsKey(resourceId)) { - throw new ConfigurationException("The following resource types have the same ID of '" + resourceId + "' - " + theClass.getCanonicalName() + " and " - + myIdToResourceDefinition.get(resourceId).getImplementingClass().getCanonicalName()); + throw new ConfigurationException("The following resource types have the same ID of '" + resourceId + "' - " + theClass.getCanonicalName() + " and " + myIdToResourceDefinition.get(resourceId).getImplementingClass().getCanonicalName()); } } @@ -502,5 +517,4 @@ class ModelScanner { return type; } - } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java new file mode 100644 index 00000000000..22d958367a9 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java @@ -0,0 +1,56 @@ +package ca.uhn.fhir.context; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; + +import ca.uhn.fhir.model.api.IDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.primitive.XhtmlDt; + +public class RuntimeChildAny extends RuntimeChildChoiceDefinition { + + public RuntimeChildAny(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation) { + super(theField, theElementName, theChildAnnotation, theDescriptionAnnotation); + } + + @Override + void sealAndInitialize(Map, BaseRuntimeElementDefinition> theClassToElementDefinitions) { + List> choiceTypes = new ArrayList>(); + + for (Class next : theClassToElementDefinitions.keySet()) { + if (next.equals(XhtmlDt.class)) { + continue; + } + if (IResource.class.isAssignableFrom(next) || IDatatype.class.isAssignableFrom(next)) { + choiceTypes.add(next); + } + } + Collections.sort(choiceTypes,new Comparator>(){ + @Override + public int compare(Class theO1, Class theO2) { + boolean o1res = IResource.class.isAssignableFrom(theO1); + boolean o2res = IResource.class.isAssignableFrom(theO2); + if (o1res && o2res) { + return theO1.getSimpleName().compareTo(theO2.getSimpleName()); + } else if (o1res) { + return 1; + }else { + return -1; + } + }}); + + setChoiceTypes(choiceTypes); + + super.sealAndInitialize(theClassToElementDefinitions); + } + + + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java index afb8cc7b6de..113cd42758b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java @@ -28,6 +28,17 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini myChoiceTypes= Collections.unmodifiableList(theChoiceTypes); } + /** + * For extension, if myChoiceTypes will be set some other way + */ + RuntimeChildChoiceDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation) { + super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName); + } + + void setChoiceTypes(List> theChoiceTypes) { + myChoiceTypes = Collections.unmodifiableList(theChoiceTypes); + } + public List> getChoices() { return myChoiceTypes; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java new file mode 100644 index 00000000000..34a64a04a4d --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildContainedResources.java @@ -0,0 +1,49 @@ +package ca.uhn.fhir.context; + +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.Map; +import java.util.Set; + +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; + +public class RuntimeChildContainedResources extends BaseRuntimeDeclaredChildDefinition { + + private RuntimeElemContainedResources myElem; + + RuntimeChildContainedResources(Field theField, Child theChildAnnotation, Description theDescriptionAnnotation, String theElementName) throws ConfigurationException { + super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName); + } + + @Override + public BaseRuntimeElementDefinition getChildByName(String theName) { + assert theName.equals(getElementName()); + return myElem; + } + + @Override + public BaseRuntimeElementDefinition getChildElementDefinitionByDatatype(Class theType) { + assert theType.equals(ContainedDt.class); + return myElem; + } + + @Override + public String getChildNameByDatatype(Class theDatatype) { + assert theDatatype.equals(ContainedDt.class); + return getElementName(); + } + + @Override + public Set getValidChildNames() { + return Collections.singleton(getElementName()); + } + + @Override + void sealAndInitialize(Map, BaseRuntimeElementDefinition> theClassToElementDefinitions) { + myElem = new RuntimeElemContainedResources(); + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java new file mode 100644 index 00000000000..b5d3f4c6d74 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeElemContainedResources.java @@ -0,0 +1,16 @@ +package ca.uhn.fhir.context; + +import ca.uhn.fhir.model.dstu.composite.ContainedDt; + +public class RuntimeElemContainedResources extends BaseRuntimeElementDefinition { + + public RuntimeElemContainedResources() { + super("contained", ContainedDt.class); + } + + @Override + public ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum getChildType() { + return ChildTypeEnum.CONTAINED_RESOURCES; + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java index a68659bbe1b..f901348e0fa 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java @@ -123,11 +123,20 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini } } } - +private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RuntimeResourceDefinition.class); private void fillProfile(Structure theStruct, StructureElement theElement, BaseRuntimeElementDefinition def, LinkedList path, BaseRuntimeDeclaredChildDefinition theChild) { fillBasics(theElement, def, path, theChild); + String expectedPath = StringUtils.join(path, '.'); + + ourLog.info("Filling profile for: {} - Path: {}", expectedPath); + if (!expectedPath.equals(def.getName())) { + theElement.getDefinition().getNameReference().setValue(def.getName()); + return; + } + + fillExtensions(theStruct, path, def.getExtensionsNonModifier(), "extension", false); fillExtensions(theStruct, path, def.getExtensionsModifier(), "modifierExtension", true); @@ -163,11 +172,14 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini if (child instanceof RuntimeChildResourceBlockDefinition) { RuntimeResourceBlockDefinition nextDef = (RuntimeResourceBlockDefinition) child.getSingleChildOrThrow(); fillProfile(theStruct, elem, nextDef, path, child); + } else if (child instanceof RuntimeChildContainedResources) { + // ignore } else if (child instanceof RuntimeChildDeclaredExtensionDefinition) { throw new IllegalStateException("Unexpected child type: " + child.getClass().getCanonicalName()); } else if (child instanceof RuntimeChildCompositeDatatypeDefinition || child instanceof RuntimeChildPrimitiveDatatypeDefinition || child instanceof RuntimeChildChoiceDefinition || child instanceof RuntimeChildResourceDefinition) { Iterator childNamesIter = child.getValidChildNames().iterator(); - BaseRuntimeElementDefinition nextDef = child.getChildByName(childNamesIter.next()); + String nextName = childNamesIter.next(); + BaseRuntimeElementDefinition nextDef = child.getChildByName(nextName); fillBasics(elem, nextDef, path, child); fillName(elem, nextDef); while (childNamesIter.hasNext()) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java index 1d7f8ed54c3..08af71f2d16 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.model.api; import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.NarrativeDt; import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.util.ElementUtil; @@ -13,6 +14,21 @@ public abstract class BaseResource extends BaseElement implements IResource { @Child(name="text", order=1, min=0, max=1) private NarrativeDt myText; + @Child(name="contained", order=2, min=0, max=1) + private ContainedDt myContained; + + @Override + public ContainedDt getContained() { + if (myContained == null) { + myContained = new ContainedDt(); + } + return myContained; + } + + public void setContained(ContainedDt theContained) { + myContained = theContained; + } + public CodeDt getLanguage() { return myLanguage; } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java index c69a6f0d223..5d6cc993adf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java @@ -1,10 +1,20 @@ package ca.uhn.fhir.model.api; +import java.util.List; + public interface ICompositeElement extends IElement { /** * Returns a list containing all child elements */ public java.util.List getAllPopulatedChildElements(); + + /** + * Returns a list containing all child elements matching a given type + * + * @param theType The type to match. If set to null, all child elements will be returned + */ + + List getAllPopulatedChildElementsOfType(Class theType); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java index 83a0b304b3f..7325adfa60c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java @@ -1,6 +1,20 @@ package ca.uhn.fhir.model.api; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; public interface IResource extends ICompositeElement { + /** + * Returns the contained resource list for this resource. + *

+ * Usage note: HAPI will generally populate and use the resources from this + * list automatically (placing inline resources in the contained list when + * encoding, and copying contained resources from this list to their + * appropriate references when parsing) so it is generally not neccesary to + * interact with this list directly. + *

+ * TODO: document contained resources and link there + */ + public ContainedDt getContained(); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java index e9f886d3335..1f7b751a044 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java @@ -16,16 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Address Datatype @@ -108,10 +125,15 @@ public class AddressDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myLine, myCity, myState, myZip, myCountry, myPeriod); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myUse, myText, myLine, myCity, myState, myZip, myCountry, myPeriod); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myLine, myCity, myState, myZip, myCountry, myPeriod); } - /** * Gets the value(s) for use (home | work | temp | old - purpose of this address). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java index a15a11ec18c..56ca77ae96e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java @@ -16,14 +16,30 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -102,10 +118,15 @@ public class AttachmentDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle); } - /** * Gets the value(s) for contentType (Mime type of the content, with charset etc.). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java index 6e9fb6fc982..2206bbdd41a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java @@ -16,13 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR CodeableConcept Datatype @@ -63,10 +83,15 @@ public class CodeableConceptDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCoding, myText); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCoding, myText); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCoding, myText); } - /** * Gets the value(s) for coding (Code defined by a terminology system). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java index d4a27762547..d3a58ee2b86 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java @@ -16,15 +16,31 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IQueryParameterType; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -111,10 +127,15 @@ public class CodingDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet); } - /** * Gets the value(s) for system (Identity of the terminology system). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java index ec562036f6f..e5cc6f7a0df 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java @@ -16,17 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Contact Datatype @@ -81,10 +97,15 @@ public class ContactDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myValue, myUse, myPeriod); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySystem, myValue, myUse, myPeriod); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myValue, myUse, myPeriod); } - /** * Gets the value(s) for system (phone | fax | email | url). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java new file mode 100644 index 00000000000..736e1bb9499 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java @@ -0,0 +1,43 @@ +package ca.uhn.fhir.model.dstu.composite; + +import java.util.ArrayList; +import java.util.List; + +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.primitive.IdDt; + +@DatatypeDef(name = "duration") +public class ContainedDt implements IElement { + + @Child(name = "resource", type = IResource.class, order = 0, min = 0, max = Child.MAX_UNLIMITED) + private List myContainedResources; + + public List getContainedResources() { + if (myContainedResources == null) { + myContainedResources = new ArrayList(); + } + return myContainedResources; + } + + public void setContainedResources(List theContainedResources) { + myContainedResources = theContainedResources; + } + + @Override + public boolean isEmpty() { + return myContainedResources == null || myContainedResources.size() == 0; + } + + @Override + public void setId(IdDt theId) { + throw new UnsupportedOperationException(); + } + + @Override + public IdDt getId() { + throw new UnsupportedOperationException(); + } +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java index b55ecab1ce9..f40fab876a5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java @@ -16,16 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR HumanName Datatype @@ -101,10 +118,15 @@ public class HumanNameDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod); } - /** * Gets the value(s) for use (usual | official | temp | nickname | anonymous | old | maiden). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java index 56155881895..6ed993021e8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java @@ -16,16 +16,31 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IQueryParameterType; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -112,10 +127,15 @@ public class IdentifierDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myLabel, mySystem, myValue, myPeriod, myAssigner); } - /** * Gets the value(s) for use (usual | official | temp | secondary (If known)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java index 29eaf8b01b6..f58eab85710 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java @@ -58,7 +58,12 @@ public class NarrativeDt extends BaseElement implements ICompositeDatatype { @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myStatus, myDiv ); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( theType, myStatus, myDiv ); } /** @@ -132,6 +137,7 @@ public class NarrativeDt extends BaseElement implements ICompositeDatatype { myDiv = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java index 3ee4b5cbfcc..9f2c8509688 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java @@ -16,16 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Period Datatype @@ -66,10 +83,15 @@ public class PeriodDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStart, myEnd); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myStart, myEnd); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStart, myEnd); } - /** * Gets the value(s) for start (Starting time with inclusive boundary). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java index 4b07f34090a..c8dcb567716 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java @@ -16,16 +16,31 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -89,10 +104,15 @@ public class QuantityDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myValue, myComparator, myUnits, mySystem, myCode); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode); } - /** * Gets the value(s) for value (Numerical value (with implicit precision)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java index 1cd873d6364..6cc6db2e5a1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java @@ -16,12 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Range Datatype @@ -62,10 +83,15 @@ public class RangeDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myLow, myHigh); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLow, myHigh); } - /** * Gets the value(s) for low (Low limit). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java index e689cd42a60..08e920a2614 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java @@ -16,12 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Ratio Datatype @@ -62,10 +83,15 @@ public class RatioDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumerator, myDenominator); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myNumerator, myDenominator); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumerator, myDenominator); } - /** * Gets the value(s) for numerator (Numerator value). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java index f38352de498..a79fb9317c8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java @@ -16,13 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseResourceReference; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR ResourceReference Datatype @@ -63,10 +83,15 @@ public class ResourceReferenceDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myReference, myDisplay); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myReference, myDisplay); } - /** * Gets the value(s) for reference (Relative, internal or absolute URL reference). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java index 870a6531c07..82d0e59d55c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java @@ -16,15 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR SampledData Datatype @@ -100,10 +118,15 @@ public class SampledDataDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData); } - /** * Gets the value(s) for origin (Zero value and units). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java index 76fe3e56519..23f838a835a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java @@ -16,24 +16,33 @@ package ca.uhn.fhir.model.dstu.composite; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.ICompositeDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.dstu.valueset.NameUseEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** * HAPI/FHIR Schedule Datatype @@ -74,10 +83,15 @@ public class ScheduleDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myEvent, myRepeat); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myEvent, myRepeat); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEvent, myRepeat); } - /** * Gets the value(s) for event (When the event occurs). @@ -213,10 +227,15 @@ public class ScheduleDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myFrequency, myWhen, myDuration, myUnits, myCount, myEnd); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myFrequency, myWhen, myDuration, myUnits, myCount, myEnd); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myFrequency, myWhen, myDuration, myUnits, myCount, myEnd); } - /** * Gets the value(s) for frequency (Event occurs frequency times per duration). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java index 381903341d8..b42a341bf97 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java @@ -6,6 +6,7 @@ import ca.uhn.fhir.model.api.BaseElement; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; @ResourceDef(name="Binary", profile="http://hl7.org/fhir/profiles/Binary", id="binary") public class Binary extends BaseElement implements IResource { @@ -23,4 +24,16 @@ public class Binary extends BaseElement implements IResource { return null; } + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ContainedDt getContained() { + // TODO Auto-generated method stub + return null; + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java index 38a86b27c19..83885f986d8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java @@ -17,40 +17,111 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu.composite.CodingDt; -import ca.uhn.fhir.model.dstu.composite.ContactDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -367,10 +438,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myStatus, myExperimental, myDate, mySoftware, myImplementation, myFhirVersion, myAcceptUnknown, myFormat, myProfile, myRest, myMessaging, myDocument); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myStatus, myExperimental, myDate, mySoftware, myImplementation, myFhirVersion, myAcceptUnknown, myFormat, myProfile, myRest, myMessaging, myDocument); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myStatus, myExperimental, myDate, mySoftware, myImplementation, myFhirVersion, myAcceptUnknown, myFormat, myProfile, myRest, myMessaging, myDocument); } - /** * Gets the value(s) for identifier (Logical id to reference this statement). @@ -1180,10 +1256,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myVersion, myReleaseDate); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myVersion, myReleaseDate); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myVersion, myReleaseDate); } - /** * Gets the value(s) for name (A name the software is known by). @@ -1361,10 +1442,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDescription, myUrl); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myDescription, myUrl); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDescription, myUrl); } - /** * Gets the value(s) for description (Describes this specific instance). @@ -1522,10 +1608,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myMode, myDocumentation, mySecurity, myResource, myOperation, myQuery, myDocumentMailbox); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myMode, myDocumentation, mySecurity, myResource, myOperation, myQuery, myDocumentMailbox); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMode, myDocumentation, mySecurity, myResource, myOperation, myQuery, myDocumentMailbox); } - /** * Gets the value(s) for mode (client | server). @@ -1883,10 +1974,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCors, myService, myDescription, myCertificate); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCors, myService, myDescription, myCertificate); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCors, myService, myDescription, myCertificate); } - /** * Gets the value(s) for cors (Adds CORS Headers (http://enable-cors.org/)). @@ -2108,10 +2204,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myBlob); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myBlob); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myBlob); } - /** * Gets the value(s) for type (Mime type for certificate). @@ -2272,10 +2373,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myProfile, myOperation, myReadHistory, myUpdateCreate, mySearchInclude, mySearchParam); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myProfile, myOperation, myReadHistory, myUpdateCreate, mySearchInclude, mySearchParam); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myProfile, myOperation, myReadHistory, myUpdateCreate, mySearchInclude, mySearchParam); } - /** * Gets the value(s) for type (A resource type that is supported). @@ -2618,10 +2724,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myDocumentation); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myDocumentation); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myDocumentation); } - /** * Gets the value(s) for code (read | vread | update | delete | history-instance | validate | history-type | create | search-type). @@ -2772,10 +2883,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myDefinition, myType, myDocumentation, myTarget, myChain); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myDefinition, myType, myDocumentation, myTarget, myChain); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myDefinition, myType, myDocumentation, myTarget, myChain); } - /** * Gets the value(s) for name (Name of search parameter). @@ -3100,10 +3216,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myDocumentation); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myDocumentation); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myDocumentation); } - /** * Gets the value(s) for code (transaction | search-system | history-system). @@ -3240,10 +3361,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myDefinition, myDocumentation, myParameter); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myDefinition, myDocumentation, myParameter); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myDefinition, myDocumentation, myParameter); } - /** * Gets the value(s) for name (Special named queries (_query=)). @@ -3468,10 +3594,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myEndpoint, myReliableCache, myDocumentation, myEvent); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myEndpoint, myReliableCache, myDocumentation, myEvent); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEndpoint, myReliableCache, myDocumentation, myEvent); } - /** * Gets the value(s) for endpoint (Actual endpoint being described). @@ -3726,10 +3857,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myCategory, myMode, myProtocol, myFocus, myRequest, myResponse, myDocumentation); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myCategory, myMode, myProtocol, myFocus, myRequest, myResponse, myDocumentation); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myCategory, myMode, myProtocol, myFocus, myRequest, myResponse, myDocumentation); } - /** * Gets the value(s) for code (Event type). @@ -4085,10 +4221,15 @@ public class Conformance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myMode, myDocumentation, myProfile); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myMode, myDocumentation, myProfile); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMode, myDocumentation, myProfile); } - /** * Gets the value(s) for mode (producer | consumer). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java index 8f9c646509e..613fdaa9313 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java @@ -17,20 +17,111 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; +import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -236,10 +327,15 @@ public class Device extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myManufacturer, myModel, myVersion, myExpiry, myUdi, myLotNumber, myOwner, myLocation, myPatient, myContact, myUrl); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myType, myManufacturer, myModel, myVersion, myExpiry, myUdi, myLotNumber, myOwner, myLocation, myPatient, myContact, myUrl); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myManufacturer, myModel, myVersion, myExpiry, myUdi, myLotNumber, myOwner, myLocation, myPatient, myContact, myUrl); } - /** * Gets the value(s) for identifier (Instance id from manufacturer, owner and others). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java index 90dcca69e96..39a1c923e4c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java @@ -17,27 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -305,10 +391,15 @@ public class DiagnosticOrder extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySubject, myOrderer, myIdentifier, myEncounter, myClinicalNotes, mySpecimen, myStatus, myPriority, myEvent, myItem); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySubject, myOrderer, myIdentifier, myEncounter, myClinicalNotes, mySpecimen, myStatus, myPriority, myEvent, myItem); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySubject, myOrderer, myIdentifier, myEncounter, myClinicalNotes, mySpecimen, myStatus, myPriority, myEvent, myItem); } - /** * Gets the value(s) for subject (Who and/or what test is about). @@ -740,10 +831,15 @@ public class DiagnosticOrder extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStatus, myDescription, myDateTime, myActor); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myStatus, myDescription, myDateTime, myActor); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStatus, myDescription, myDateTime, myActor); } - /** * Gets the value(s) for status (requested | received | accepted | in progress | review | completed | suspended | rejected | failed). @@ -960,10 +1056,15 @@ public class DiagnosticOrder extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, mySpecimen, myBodySite, myStatus, myEvent); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, mySpecimen, myBodySite, myStatus, myEvent); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, mySpecimen, myBodySite, myStatus, myEvent); } - /** * Gets the value(s) for code (Code to indicate the item (test or panel) being ordered). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java index 33bfc23b235..24bf9f71786 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java @@ -17,29 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.PeriodDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -327,10 +411,15 @@ public class DiagnosticReport extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myStatus, myIssued, mySubject, myPerformer, myIdentifier, myRequestDetail, myServiceCategory, myDiagnostic, mySpecimen, myResult, myImagingStudy, myImage, myConclusion, myCodedDiagnosis, myPresentedForm); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myStatus, myIssued, mySubject, myPerformer, myIdentifier, myRequestDetail, myServiceCategory, myDiagnostic, mySpecimen, myResult, myImagingStudy, myImage, myConclusion, myCodedDiagnosis, myPresentedForm); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myStatus, myIssued, mySubject, myPerformer, myIdentifier, myRequestDetail, myServiceCategory, myDiagnostic, mySpecimen, myResult, myImagingStudy, myImage, myConclusion, myCodedDiagnosis, myPresentedForm); } - /** * Gets the value(s) for name (Name/Code for this diagnostic report). @@ -939,10 +1028,15 @@ public class DiagnosticReport extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myComment, myLink); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myComment, myLink); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myComment, myLink); } - /** * Gets the value(s) for comment (Comment about the image (e.g. explanation)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java index 969dea70674..acdb57ef498 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java @@ -17,30 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.DurationDt; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.PeriodDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; +import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -270,10 +353,15 @@ public class Encounter extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myStatus, myClassElement, myType, mySubject, myParticipant, myPeriod, myLength, myReason, myIndication, myPriority, myHospitalization, myLocation, myServiceProvider, myPartOf); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myStatus, myClassElement, myType, mySubject, myParticipant, myPeriod, myLength, myReason, myIndication, myPriority, myHospitalization, myLocation, myServiceProvider, myPartOf); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myClassElement, myType, mySubject, myParticipant, myPeriod, myLength, myReason, myIndication, myPriority, myHospitalization, myLocation, myServiceProvider, myPartOf); } - /** * Gets the value(s) for identifier (Identifier(s) by which this encounter is known). @@ -874,10 +962,15 @@ public class Encounter extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myIndividual); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myIndividual); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myIndividual); } - /** * Gets the value(s) for type (Role of participant in encounter). @@ -1074,10 +1167,15 @@ public class Encounter extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myPreAdmissionIdentifier, myOrigin, myAdmitSource, myPeriod, myAccomodation, myDiet, mySpecialCourtesy, mySpecialArrangement, myDestination, myDischargeDisposition, myDischargeDiagnosis, myReAdmission); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myPreAdmissionIdentifier, myOrigin, myAdmitSource, myPeriod, myAccomodation, myDiet, mySpecialCourtesy, mySpecialArrangement, myDestination, myDischargeDisposition, myDischargeDiagnosis, myReAdmission); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPreAdmissionIdentifier, myOrigin, myAdmitSource, myPeriod, myAccomodation, myDiet, mySpecialCourtesy, mySpecialArrangement, myDestination, myDischargeDisposition, myDischargeDiagnosis, myReAdmission); } - /** * Gets the value(s) for preAdmissionIdentifier (Pre-admission identifier). @@ -1550,10 +1648,15 @@ public class Encounter extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myBed, myPeriod); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myBed, myPeriod); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myBed, myPeriod); } - /** * Gets the value(s) for bed (The bed that is assigned to the patient). @@ -1655,10 +1758,15 @@ public class Encounter extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLocation, myPeriod); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myLocation, myPeriod); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLocation, myPeriod); } - /** * Gets the value(s) for location (Location the encounter takes place). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java index 2be8a30602d..3f4dbfc4710 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java @@ -17,27 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; import ca.uhn.fhir.model.dstu.composite.QuantityDt; import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -216,10 +302,15 @@ public class Group extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember); } - /** * Gets the value(s) for identifier (Unique id). @@ -570,10 +661,15 @@ public class Group extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myValue, myExclude); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myValue, myExclude); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myValue, myExclude); } - /** * Gets the value(s) for code (Kind of characteristic). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java index aefca051e1c..6aa07ceba9c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java @@ -17,27 +17,109 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; +import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; @@ -295,10 +377,15 @@ public class ImagingStudy extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDateTime, mySubject, myUid, myAccessionNo, myIdentifier, myOrder, myModality, myReferrer, myAvailability, myUrl, myNumberOfSeries, myNumberOfInstances, myClinicalInformation, myProcedure, myInterpreter, myDescription, mySeries); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myDateTime, mySubject, myUid, myAccessionNo, myIdentifier, myOrder, myModality, myReferrer, myAvailability, myUrl, myNumberOfSeries, myNumberOfInstances, myClinicalInformation, myProcedure, myInterpreter, myDescription, mySeries); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDateTime, mySubject, myUid, myAccessionNo, myIdentifier, myOrder, myModality, myReferrer, myAvailability, myUrl, myNumberOfSeries, myNumberOfInstances, myClinicalInformation, myProcedure, myInterpreter, myDescription, mySeries); } - /** * Gets the value(s) for dateTime (When the study was performed). @@ -1074,10 +1161,15 @@ public class ImagingStudy extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumber, myModality, myUid, myDescription, myNumberOfInstances, myAvailability, myUrl, myBodySite, myDateTime, myInstance); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myNumber, myModality, myUid, myDescription, myNumberOfInstances, myAvailability, myUrl, myBodySite, myDateTime, myInstance); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumber, myModality, myUid, myDescription, myNumberOfInstances, myAvailability, myUrl, myBodySite, myDateTime, myInstance); } - /** * Gets the value(s) for number (Number of this series in overall sequence (0020,0011)). @@ -1569,10 +1661,15 @@ public class ImagingStudy extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumber, myUid, mySopclass, myType, myTitle, myUrl, myAttachment); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myNumber, myUid, mySopclass, myType, myTitle, myUrl, myAttachment); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumber, myUid, mySopclass, myType, myTitle, myUrl, myAttachment); } - /** * Gets the value(s) for number (The number of this instance in the series (0020,0013)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java index 4b30d07b3ee..b51a3276ce8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java @@ -17,28 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -233,10 +318,15 @@ public class Location extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myName, myDescription, myType, myTelecom, myAddress, myPhysicalType, myPosition, myManagingOrganization, myStatus, myPartOf, myMode); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myName, myDescription, myType, myTelecom, myAddress, myPhysicalType, myPosition, myManagingOrganization, myStatus, myPartOf, myMode); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myName, myDescription, myType, myTelecom, myAddress, myPhysicalType, myPosition, myManagingOrganization, myStatus, myPartOf, myMode); } - /** * Gets the value(s) for identifier (Unique code or number identifying the location to its users). @@ -721,10 +811,15 @@ public class Location extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLongitude, myLatitude, myAltitude); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myLongitude, myLatitude, myAltitude); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLongitude, myLatitude, myAltitude); } - /** * Gets the value(s) for longitude (Longitude as expressed in KML). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java index f7362cf0cb0..2a571086e1d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java @@ -17,25 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -231,10 +319,15 @@ public class Media extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, mySubtype, myIdentifier, myDateTime, mySubject, myOperator, myView, myDeviceName, myHeight, myWidth, myFrames, myLength, myContent); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, mySubtype, myIdentifier, myDateTime, mySubject, myOperator, myView, myDeviceName, myHeight, myWidth, myFrames, myLength, myContent); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, mySubtype, myIdentifier, myDateTime, mySubject, myOperator, myView, myDeviceName, myHeight, myWidth, myFrames, myLength, myContent); } - /** * Gets the value(s) for type (photo | video | audio). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java index 029c58b63ff..7936df955aa 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java @@ -17,23 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.RatioDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -181,10 +271,15 @@ public class Medication extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage); } - /** * Gets the value(s) for name (Common / Commercial name). @@ -482,10 +577,15 @@ public class Medication extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myForm, myIngredient); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myForm, myIngredient); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myForm, myIngredient); } - /** * Gets the value(s) for form (powder | tablets | carton +). @@ -599,10 +699,15 @@ public class Medication extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myItem, myAmount); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount); } - /** * Gets the value(s) for item (The product contained). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java index 4e8f93dfc8b..951c8489bd9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java @@ -17,38 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.PeriodDt; -import ca.uhn.fhir.model.dstu.composite.QuantityDt; -import ca.uhn.fhir.model.dstu.composite.RangeDt; -import ca.uhn.fhir.model.dstu.composite.RatioDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -359,10 +434,15 @@ public class Observation extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myValue, myInterpretation, myComments, myApplies, myIssued, myStatus, myReliability, myBodySite, myMethod, myIdentifier, mySubject, mySpecimen, myPerformer, myReferenceRange, myRelated); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myValue, myInterpretation, myComments, myApplies, myIssued, myStatus, myReliability, myBodySite, myMethod, myIdentifier, mySubject, mySpecimen, myPerformer, myReferenceRange, myRelated); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myValue, myInterpretation, myComments, myApplies, myIssued, myStatus, myReliability, myBodySite, myMethod, myIdentifier, mySubject, mySpecimen, myPerformer, myReferenceRange, myRelated); } - /** * Gets the value(s) for name (Type of observation (code / type)). @@ -991,10 +1071,15 @@ public class Observation extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh, myMeaning, myAge); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myLow, myHigh, myMeaning, myAge); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLow, myHigh, myMeaning, myAge); } - /** * Gets the value(s) for low (Low Range, if relevant). @@ -1157,10 +1242,15 @@ public class Observation extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myTarget); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myTarget); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myTarget); } - /** * Gets the value(s) for type (has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java index 796d73983db..46ab8c67c82 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java @@ -17,26 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -200,10 +287,15 @@ public class Organization extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myName, myType, myTelecom, myAddress, myPartOf, myContact, myLocation, myActive); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myName, myType, myTelecom, myAddress, myPartOf, myContact, myLocation, myActive); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myName, myType, myTelecom, myAddress, myPartOf, myContact, myLocation, myActive); } - /** * Gets the value(s) for identifier (Identifies this organization across multiple systems). @@ -624,10 +716,15 @@ public class Organization extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myPurpose, myName, myTelecom, myAddress, myGender); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myPurpose, myName, myTelecom, myAddress, myGender); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPurpose, myName, myTelecom, myAddress, myGender); } - /** * Gets the value(s) for purpose (The type of contact). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java index cc0ca24de99..9b8c5d02126 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java @@ -17,36 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; -import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -353,10 +430,15 @@ public class Patient extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myName, myTelecom, myGender, myBirthDate, myDeceased, myAddress, myMaritalStatus, myMultipleBirth, myPhoto, myContact, myAnimal, myCommunication, myCareProvider, myManagingOrganization, myLink, myActive); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myName, myTelecom, myGender, myBirthDate, myDeceased, myAddress, myMaritalStatus, myMultipleBirth, myPhoto, myContact, myAnimal, myCommunication, myCareProvider, myManagingOrganization, myLink, myActive); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myName, myTelecom, myGender, myBirthDate, myDeceased, myAddress, myMaritalStatus, myMultipleBirth, myPhoto, myContact, myAnimal, myCommunication, myCareProvider, myManagingOrganization, myLink, myActive); } - /** * Gets the value(s) for identifier (An identifier for the person as this patient). @@ -1101,10 +1183,15 @@ public class Patient extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myRelationship, myName, myTelecom, myAddress, myGender, myOrganization); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myRelationship, myName, myTelecom, myAddress, myGender, myOrganization); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myRelationship, myName, myTelecom, myAddress, myGender, myOrganization); } - /** * Gets the value(s) for relationship (The kind of relationship). @@ -1372,10 +1459,15 @@ public class Patient extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySpecies, myBreed, myGenderStatus); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySpecies, myBreed, myGenderStatus); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySpecies, myBreed, myGenderStatus); } - /** * Gets the value(s) for species (E.g. Dog, Cow). @@ -1519,10 +1611,15 @@ public class Patient extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOther, myType); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myOther, myType); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myOther, myType); } - /** * Gets the value(s) for other (The other patient resource that the link refers to). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java index 1ab2a0efb31..ec21a253ce7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java @@ -17,31 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.composite.PeriodDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Practitioner; import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -260,10 +342,15 @@ public class Practitioner extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myName, myTelecom, myAddress, myGender, myBirthDate, myPhoto, myOrganization, myRole, mySpecialty, myPeriod, myLocation, myQualification, myCommunication); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myName, myTelecom, myAddress, myGender, myBirthDate, myPhoto, myOrganization, myRole, mySpecialty, myPeriod, myLocation, myQualification, myCommunication); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myName, myTelecom, myAddress, myGender, myBirthDate, myPhoto, myOrganization, myRole, mySpecialty, myPeriod, myLocation, myQualification, myCommunication); } - /** * Gets the value(s) for identifier (A identifier for the person as this agent). @@ -890,10 +977,15 @@ public class Practitioner extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myPeriod, myIssuer); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myPeriod, myIssuer); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myPeriod, myIssuer); } - /** * Gets the value(s) for code (Coded representation of the qualification). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java index d5302ac4533..29e1e821d05 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java @@ -17,38 +17,111 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.dstu.composite.CodingDt; -import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; +import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -299,10 +372,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCode, myStatus, myExperimental, myDate, myRequirements, myFhirVersion, myMapping, myStructure, myExtensionDefn, myQuery); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCode, myStatus, myExperimental, myDate, myRequirements, myFhirVersion, myMapping, myStructure, myExtensionDefn, myQuery); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCode, myStatus, myExperimental, myDate, myRequirements, myFhirVersion, myMapping, myStructure, myExtensionDefn, myQuery); } - /** * Gets the value(s) for identifier (Logical id to reference this profile). @@ -1055,10 +1133,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentity, myUri, myName, myComments); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentity, myUri, myName, myComments); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentity, myUri, myName, myComments); } - /** * Gets the value(s) for identity (Internal id when this mapping is used). @@ -1295,10 +1378,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myName, myPublish, myPurpose, myElement, mySearchParam); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myName, myPublish, myPurpose, myElement, mySearchParam); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myName, myPublish, myPurpose, myElement, mySearchParam); } - /** * Gets the value(s) for type (The Resource or Data Type being described). @@ -1615,10 +1703,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myPath, myRepresentation, myName, mySlicing, myDefinition); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myPath, myRepresentation, myName, mySlicing, myDefinition); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPath, myRepresentation, myName, mySlicing, myDefinition); } - /** * Gets the value(s) for path (The path of the element (see the formal definitions)). @@ -1865,10 +1958,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDiscriminator, myOrdered, myRules); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myDiscriminator, myOrdered, myRules); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDiscriminator, myOrdered, myRules); } - /** * Gets the value(s) for discriminator (Element that used to distinguish the slices). @@ -2146,10 +2244,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myShort, myFormal, myComments, myRequirements, mySynonym, myMin, myMax, myType, myNameReference, myValue, myExample, myMaxLength, myCondition, myConstraint, myMustSupport, myIsModifier, myBinding, myMapping); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myShort, myFormal, myComments, myRequirements, mySynonym, myMin, myMax, myType, myNameReference, myValue, myExample, myMaxLength, myCondition, myConstraint, myMustSupport, myIsModifier, myBinding, myMapping); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myShort, myFormal, myComments, myRequirements, mySynonym, myMin, myMax, myType, myNameReference, myValue, myExample, myMaxLength, myCondition, myConstraint, myMustSupport, myIsModifier, myBinding, myMapping); } - /** * Gets the value(s) for short (Concise definition for xml presentation). @@ -2959,10 +3062,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myProfile, myAggregation); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myProfile, myAggregation); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myProfile, myAggregation); } - /** * Gets the value(s) for code (Name of Data type or Resource). @@ -3162,10 +3270,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myKey, myName, mySeverity, myHuman, myXpath); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myKey, myName, mySeverity, myHuman, myXpath); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myKey, myName, mySeverity, myHuman, myXpath); } - /** * Gets the value(s) for key (Target of 'condition' reference above). @@ -3441,10 +3554,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myIsExtensible, myConformance, myDescription, myReference); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myIsExtensible, myConformance, myDescription, myReference); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myIsExtensible, myConformance, myDescription, myReference); } - /** * Gets the value(s) for name (Descriptive Name). @@ -3681,10 +3799,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentity, myMap); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentity, myMap); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentity, myMap); } - /** * Gets the value(s) for identity (Reference to mapping declaration). @@ -3830,10 +3953,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myType, myDocumentation, myXpath, myTarget); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myType, myDocumentation, myXpath, myTarget); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myType, myDocumentation, myXpath, myTarget); } - /** * Gets the value(s) for name (Name of search parameter). @@ -4120,10 +4248,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myDisplay, myContextType, myContext, myDefinition); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myDisplay, myContextType, myContext, myDefinition); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myDisplay, myContextType, myContext, myDefinition); } - /** * Gets the value(s) for code (Identifies the extension in this profile). @@ -4386,10 +4519,15 @@ public class Profile extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myDocumentation, myParameter); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myName, myDocumentation, myParameter); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myDocumentation, myParameter); } - /** * Gets the value(s) for name (Special named queries (_query=)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java index 5bbae658b94..f86169a0699 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java @@ -17,22 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; + import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -187,10 +278,15 @@ public class RelatedPerson extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myAddress, myPhoto); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myAddress, myPhoto); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myAddress, myPhoto); } - /** * Gets the value(s) for identifier (A Human identifier for this person). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java index 8a5dcda25a4..9ec29c545d0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java @@ -17,32 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; -import ca.uhn.fhir.model.dstu.composite.PeriodDt; -import ca.uhn.fhir.model.dstu.composite.QuantityDt; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -147,10 +228,15 @@ public class Specimen extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, mySource, mySubject, myAccessionIdentifier, myReceivedTime, myCollection, myTreatment, myContainer); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myType, mySource, mySubject, myAccessionIdentifier, myReceivedTime, myCollection, myTreatment, myContainer); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, mySource, mySubject, myAccessionIdentifier, myReceivedTime, myCollection, myTreatment, myContainer); } - /** * Gets the value(s) for identifier (External Identifier). @@ -537,10 +623,15 @@ public class Specimen extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myRelationship, myTarget); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myRelationship, myTarget); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myRelationship, myTarget); } - /** * Gets the value(s) for relationship (parent | child). @@ -684,10 +775,15 @@ public class Specimen extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCollector, myComment, myCollected, myQuantity, myMethod, mySourceSite); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCollector, myComment, myCollected, myQuantity, myMethod, mySourceSite); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCollector, myComment, myCollected, myQuantity, myMethod, mySourceSite); } - /** * Gets the value(s) for collector (Who collected the specimen). @@ -956,10 +1052,15 @@ public class Specimen extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDescription, myProcedure, myAdditive); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myDescription, myProcedure, myAdditive); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDescription, myProcedure, myAdditive); } - /** * Gets the value(s) for description (Textual description of procedure). @@ -1143,10 +1244,15 @@ public class Specimen extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myDescription, myType, myCapacity, mySpecimenQuantity, myAdditive); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myDescription, myType, myCapacity, mySpecimenQuantity, myAdditive); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDescription, myType, myCapacity, mySpecimenQuantity, myAdditive); } - /** * Gets the value(s) for identifier (Id for the container). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java index bf926ddcd8d..d67964bf758 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java @@ -17,27 +17,113 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; +import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; /** @@ -142,10 +228,15 @@ public class Substance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myDescription, myInstance, myIngredient); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myType, myDescription, myInstance, myIngredient); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myDescription, myInstance, myIngredient); } - /** * Gets the value(s) for type (What kind of substance this is). @@ -346,10 +437,15 @@ public class Substance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myExpiry, myQuantity); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myExpiry, myQuantity); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myExpiry, myQuantity); } - /** * Gets the value(s) for identifier (Identifier of the package/container). @@ -505,10 +601,15 @@ public class Substance extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myQuantity, mySubstance); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myQuantity, mySubstance); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myQuantity, mySubstance); } - /** * Gets the value(s) for quantity (Optional amount (concentration)). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java index 70dfe0b83d6..bc125ee6435 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java @@ -17,27 +17,111 @@ package ca.uhn.fhir.model.dstu.resource; -import java.util.Date; +import java.util.*; +import ca.uhn.fhir.model.api.*; +import ca.uhn.fhir.model.api.annotation.*; -import ca.uhn.fhir.model.api.BaseElement; -import ca.uhn.fhir.model.api.BaseResource; -import ca.uhn.fhir.model.api.IElement; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.IResourceBlock; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.Block; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.AddressDt; +import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum; +import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum; +import ca.uhn.fhir.model.dstu.composite.AttachmentDt; +import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum; +import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum; import ca.uhn.fhir.model.dstu.composite.ContactDt; -import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Device; +import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.resource.Encounter; +import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum; +import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum; +import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum; import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum; +import ca.uhn.fhir.model.dstu.resource.Group; +import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.HumanNameDt; +import ca.uhn.fhir.model.dstu.composite.IdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum; +import ca.uhn.fhir.model.dstu.resource.ImagingStudy; +import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Location; +import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum; +import ca.uhn.fhir.model.dstu.resource.Media; +import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Medication; +import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum; +import ca.uhn.fhir.model.dstu.valueset.ModalityEnum; +import ca.uhn.fhir.model.dstu.resource.Observation; +import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum; +import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum; +import ca.uhn.fhir.model.dstu.resource.Organization; +import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum; +import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum; +import ca.uhn.fhir.model.dstu.composite.PeriodDt; +import ca.uhn.fhir.model.dstu.resource.Practitioner; +import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum; +import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum; +import ca.uhn.fhir.model.dstu.composite.QuantityDt; +import ca.uhn.fhir.model.dstu.composite.RangeDt; +import ca.uhn.fhir.model.dstu.composite.RatioDt; +import ca.uhn.fhir.model.dstu.resource.RelatedPerson; +import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.composite.SampledDataDt; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum; +import ca.uhn.fhir.model.dstu.resource.Specimen; +import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum; +import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum; +import ca.uhn.fhir.model.dstu.resource.Substance; +import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum; +import ca.uhn.fhir.model.dstu.resource.ValueSet; import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.DurationDt; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.OidDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; @@ -274,10 +358,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCopyright, myStatus, myExperimental, myExtensible, myDate, myDefine, myCompose, myExpansion); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCopyright, myStatus, myExperimental, myExtensible, myDate, myDefine, myCompose, myExpansion); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCopyright, myStatus, myExperimental, myExtensible, myDate, myDefine, myCompose, myExpansion); } - /** * Gets the value(s) for identifier (Logical id to reference this value set). @@ -903,10 +992,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCaseSensitive, myConcept); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySystem, myVersion, myCaseSensitive, myConcept); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCaseSensitive, myConcept); } - /** * Gets the value(s) for system (URI to identify the code system). @@ -1136,10 +1230,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myAbstract, myDisplay, myDefinition, myConcept); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myCode, myAbstract, myDisplay, myDefinition, myConcept); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myAbstract, myDisplay, myDefinition, myConcept); } - /** * Gets the value(s) for code (Code that identifies concept). @@ -1400,10 +1499,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myImport, myInclude, myExclude); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myImport, myInclude, myExclude); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myImport, myInclude, myExclude); } - /** * Gets the value(s) for import (Import the contents of another value set). @@ -1600,10 +1704,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myFilter); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySystem, myVersion, myCode, myFilter); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myFilter); } - /** * Gets the value(s) for system (The system the codes come from). @@ -1835,10 +1944,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myProperty, myOp, myValue); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myProperty, myOp, myValue); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myProperty, myOp, myValue); } - /** * Gets the value(s) for property (). @@ -2013,10 +2127,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myTimestamp, myContains); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier, myTimestamp, myContains); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myTimestamp, myContains); } - /** * Gets the value(s) for identifier (Uniquely identifies this expansion). @@ -2196,10 +2315,15 @@ public class ValueSet extends BaseResource implements IResource { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myCode, myDisplay, myContains); } + @Override public java.util.List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( mySystem, myCode, myDisplay, myContains); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myCode, myDisplay, myContains); } - /** * Gets the value(s) for system (System value for the code). diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java index 0834efea35f..8e7af0aba04 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum AddressUseEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java index fc3bef06312..9080c017d06 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum AdministrativeGenderCodesEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java index 86f29801d5f..859ad8aa42b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum AdmitSourceEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java index 64b208d74db..60d0a0d6bb4 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum AggregationModeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java index 0740810ba43..75dc85669f5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum AnimalSpeciesEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java index 9128cb487b3..f8f7dd220ab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum BindingConformanceEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java index 6ead45fbbf4..40cfac3382e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ConformanceEventModeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java index 5fdddf75797..bba1cda2887 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ConformanceStatementStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java index 077dd54c2df..4dae5072625 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ConstraintSeverityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java index 0bedabfba0a..eb09b1d6f61 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ContactSystemEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java index f59a28e331f..8ccb4c42632 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ContactUseEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java index 4ef67d9de00..b53c53d1e79 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum DataTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java index d53c7028f5a..9da01597c09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum DiagnosticOrderPriorityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java index a3dbc077753..43f53331bf8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum DiagnosticOrderStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java index 4bb7463eec2..ad53c670914 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum DiagnosticReportStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java index fb5fd1b334d..e88daa8965a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum DocumentModeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java index 4e52815649b..9c88e7daa42 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum EncounterClassEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java index 8ab5bc911cc..d68deff262a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum EncounterReasonCodesEnum { ; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java index fe6f0a1a450..8ac2ca18a63 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum EncounterStateEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java index eb70fb3d125..557df59e194 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum EncounterTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java index 95fbd017cf4..422ea762ea6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum EventTimingEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java index 7dfd5430776..d305d45efa9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ExtensionContextEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java index af1537a7835..78e5a82b1e1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum FHIRDefinedTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java index 415fdf9fca3..2b4cf2f4967 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum FilterOperatorEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java index 4865bb27967..bef28a9632b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum GroupTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java index 7a54c31f335..8168a3f69e7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum HierarchicalRelationshipTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java index cb730f54b38..86fb510814f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum IdentifierUseEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java index fb2368b86a2..01d51f84112 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ImagingModalityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java index 5b8579c9ded..024f9135273 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum InstanceAvailabilityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java index 58b5f80b3b3..1df57d15599 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum LinkTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java index fe6e00442bd..3e1535b47b0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum LocationModeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java index 36392e12c30..9b245f0d755 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum LocationStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java index 32e1a356b38..43da18f818f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum LocationTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java index 7a503e89fb2..2729305d903 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MaritalStatusCodesEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java index bb045f98431..79e0b761a25 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MediaTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java index a3595d62ab3..883793555dc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MedicationKindEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java index 8f77d5c7373..4bd88417417 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MessageEventEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java index e257e23d8ab..5c91d621019 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MessageSignificanceCategoryEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java index 1fcee4235ee..919a5cdec09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum MessageTransportEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java index 5b0d4adff18..89d6408f84a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ModalityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java index 1cbd699f1db..a840d79ac8a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum NameUseEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java index 756f6ff8111..43091629456 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ObservationInterpretationCodesEnum { ; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java index 43e8fc0f10f..12935223067 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ObservationRelationshipTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java index 914a7057416..c29efbf2119 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ObservationReliabilityEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java index 1ef8c76a570..981f2269cad 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ObservationStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java index 0b9bb93d0d4..e8554e05dfe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum OrganizationTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java index 6847e614d9f..c81375118a5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ParticipantTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java index 7eb44b5e137..ab090d5cd47 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum PatientRelationshipTypeEnum { ; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java index 55cd0aad5e7..8ec4108092d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum PractitionerRoleEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java index 91baf569041..99ae1802ea8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum PractitionerSpecialtyEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java index 45ee8117ea3..9b211757d28 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum PropertyRepresentationEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java index cfa2ee82347..343c2fa347f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum QuantityCompararatorEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java index b4f91cd6f79..82473d28661 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ResourceProfileStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java index 4f0d6f841e6..e97a97fa098 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ResourceTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java index cb523a892a3..3c052f5d238 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum RestfulConformanceModeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java index cca87aff1c7..4194c55fe53 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum RestfulOperationSystemEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java index 965a78ae9f7..e5b0acd85c0 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum RestfulOperationTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java index 97eb12f8ad7..582964e9484 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum RestfulSecurityServiceEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java index 84b3b44ca98..954f60aab09 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum SearchParamTypeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java index 2c5c28e73c1..607578e31f2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum SlicingRulesEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java index abc18b1e836..8bfd477920e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum SpecimenCollectionMethodEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java index 453cf400f8a..c5c217ecf94 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum SpecimenTreatmentProcedureEnum { ; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java index 5389284dd28..d393c5f887a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum SubstanceTypeEnum { ; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java index 8bde3e0a832..32c60720c24 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum UnitsOfTimeEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java index 4a8c5ba1b62..51b011acaac 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java @@ -1,11 +1,10 @@ package ca.uhn.fhir.model.dstu.valueset; +import ca.uhn.fhir.model.api.*; import java.util.HashMap; import java.util.Map; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; - public enum ValueSetStatusEnum { /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java new file mode 100644 index 00000000000..4a3abb03615 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java @@ -0,0 +1,37 @@ +package ca.uhn.fhir.parser; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; + +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.primitive.IdDt; + +public class BaseParser { + + public void containResourcesForEncoding(IResource theResource) { + List allElements = theResource.getAllPopulatedChildElementsOfType(ResourceReferenceDt.class); + + Set allIds = new HashSet(); + + for (ResourceReferenceDt next : allElements) { + IResource resource = next.getResource(); + if (resource != null) { + if (resource.getId().isEmpty()) { + resource.setId(new IdDt(UUID.randomUUID().toString())); + } + + if (!allIds.contains(resource.getId().getValue())) { + theResource.getContained().getContainedResources().add(resource); + allIds.add(resource.getId().getValue()); + } + + next.setReference("#" + resource.getId().getValue()); + } + } + + } + +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index c8f36e7720d..4ad21268c58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -34,6 +34,7 @@ import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; import ca.uhn.fhir.model.api.UndeclaredExtension; import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.DecimalDt; @@ -41,7 +42,7 @@ import ca.uhn.fhir.model.primitive.IntegerDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.XhtmlDt; -public class JsonParser implements IParser { +public class JsonParser extends BaseParser implements IParser { private FhirContext myContext; private boolean myPrettyPrint; @@ -60,16 +61,16 @@ public class JsonParser implements IParser { private void writeTagWithTextNode(JsonGenerator theEventWriter, String theElementName, StringDt theStringDt) { if (StringUtils.isNotBlank(theStringDt.getValue())) { - theEventWriter.write(theElementName,theStringDt.getValue()); - }else { + theEventWriter.write(theElementName, theStringDt.getValue()); + } else { theEventWriter.writeNull(theElementName); } } - + private void writeOptionalTagWithTextNode(JsonGenerator theEventWriter, String theElementName, IPrimitiveDatatype theInstantDt) { String str = theInstantDt.getValueAsString(); if (StringUtils.isNotBlank(str)) { - theEventWriter.write(theElementName,theInstantDt.getValueAsString()); + theEventWriter.write(theElementName, theInstantDt.getValueAsString()); } } @@ -77,7 +78,7 @@ public class JsonParser implements IParser { public void encodeBundleToWriter(Bundle theBundle, Writer theWriter) throws IOException { JsonGenerator eventWriter = createJsonGenerator(theWriter); eventWriter.writeStartObject(); - + eventWriter.write("resourceType", "Bundle"); writeTagWithTextNode(eventWriter, "title", theBundle.getTitle()); @@ -93,7 +94,7 @@ public class JsonParser implements IParser { writeAtomLink(eventWriter, "last", theBundle.getLinkLast()); writeAtomLink(eventWriter, "fhir-base", theBundle.getLinkBase()); eventWriter.writeEnd(); - + writeOptionalTagWithTextNode(eventWriter, "totalResults", theBundle.getTotalResults()); writeAuthor(theBundle, eventWriter); @@ -101,7 +102,7 @@ public class JsonParser implements IParser { eventWriter.writeStartArray("entry"); for (BundleEntry nextEntry : theBundle.getEntries()) { eventWriter.writeStartObject(); - + writeTagWithTextNode(eventWriter, "title", nextEntry.getTitle()); writeTagWithTextNode(eventWriter, "id", nextEntry.getEntryId()); @@ -111,13 +112,13 @@ public class JsonParser implements IParser { writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated()); writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished()); - + writeAuthor(nextEntry, eventWriter); IResource resource = nextEntry.getResource(); encodeResourceToJsonStreamWriter(resource, eventWriter, "content"); - eventWriter.writeEnd(); //entry object + eventWriter.writeEnd(); // entry object } eventWriter.writeEnd(); // entry array @@ -157,7 +158,7 @@ public class JsonParser implements IParser { JsonGenerator eventWriter = createJsonGenerator(theWriter); // try { - encodeResourceToJsonStreamWriter(theResource, eventWriter,null); + encodeResourceToJsonStreamWriter(theResource, eventWriter, null); eventWriter.flush(); // } catch (XMLStreamException e) { // throw new @@ -293,6 +294,15 @@ public class JsonParser implements IParser { theWriter.writeEnd(); break; } + case CONTAINED_RESOURCES: { + theWriter.writeStartArray(theChildName); + ContainedDt value = (ContainedDt) theValue; + for (IResource next : value.getContainedResources()) { + encodeResourceToJsonStreamWriter(next, theWriter, null); + } + theWriter.writeEnd(); + break; + } case PRIMITIVE_XHTML: { XhtmlDt dt = (XhtmlDt) theValue; if (theChildName != null) { @@ -448,15 +458,20 @@ public class JsonParser implements IParser { } private void encodeResourceToJsonStreamWriter(IResource theResource, JsonGenerator theEventWriter, String theObjectNameOrNull) throws IOException { + super.containResourcesForEncoding(theResource); + RuntimeResourceDefinition resDef = myContext.getResourceDefinition(theResource); - if(theObjectNameOrNull==null) { - theEventWriter.writeStartObject(); - }else { + if (theObjectNameOrNull == null) { + theEventWriter.writeStartObject(); + } else { theEventWriter.writeStartObject(theObjectNameOrNull); } theEventWriter.write("resourceType", resDef.getName()); + if (theResource.getId() !=null && isNotBlank(theResource.getId().getValue())) { + theEventWriter.write("id", theResource.getId().getValue()); + } encodeCompositeElementToStreamWriter(theResource, theEventWriter, resDef); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 3b8e3b2bfc9..1de50c13d35 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -20,6 +20,7 @@ import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition; +import ca.uhn.fhir.context.RuntimeElemContainedResources; import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition; import ca.uhn.fhir.context.RuntimePrimitiveDatatypeNarrativeDefinition; import ca.uhn.fhir.context.RuntimeResourceBlockDefinition; @@ -37,6 +38,7 @@ import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResourceBlock; import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; import ca.uhn.fhir.model.api.UndeclaredExtension; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.XhtmlDt; @@ -447,13 +449,14 @@ class ParserState { @Override public void wereBack() { - IResource res = (IResource) getCurrentElement(); + IResource res = getCurrentElement(); assert res != null; if (res.getId()==null || res.getId().isEmpty()) { - ourLog.warn("Discarding contained resource with no ID!"); + ourLog.debug("Discarding contained resource with no ID!"); } else { getPreResourceState().getContainedResources().put(res.getId().getValueAsString(), res); } + getPreResourceState().getCurrentElement().getContained().getContainedResources().add(res); } @@ -620,6 +623,14 @@ class ParserState { push(state); return; } + case CONTAINED_RESOURCES: { + RuntimeElemContainedResources targetElem = (RuntimeElemContainedResources) target; + ContainedDt newDt = targetElem.newInstance(); + child.getMutator().addValue(myInstance, newDt); + ContainedResourcesState state = new ContainedResourcesState(getPreResourceState()); + push(state); + return; + } case UNDECL_EXT: case RESOURCE: { // Throw an exception because this shouldn't happen here @@ -804,7 +815,7 @@ class ParserState { myEntry.setResource(myInstance); } - push(new ResourceState(this, def, myInstance)); + push(new ElementCompositeState(this, def, myInstance)); } public Map getContainedResources() { @@ -839,7 +850,7 @@ class ParserState { } @Override - protected IElement getCurrentElement() { + protected IResource getCurrentElement() { return myInstance; } @@ -960,23 +971,6 @@ class ParserState { DISPLAY, INITIAL, REFERENCE } - private class ResourceState extends ElementCompositeState { - - public ResourceState(PreResourceState thePreResourceState, RuntimeResourceDefinition theDef, IResource theInstance) { - super(thePreResourceState, theDef, theInstance); - } - - @Override - public void enteringNewElement(String theNamespace, String theChildName) throws DataFormatException { - if ("contained".equals(theChildName)) { - push(new ContainedResourcesState(getPreResourceState())); - }else { - super.enteringNewElement(theNamespace, theChildName); - } - } - - - } private class XhtmlState extends BaseState { private int myDepth; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index f335cc48b21..6f546186350 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -49,7 +49,7 @@ import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.util.PrettyPrintWriterWrapper; -public class XmlParser implements IParser { +public class XmlParser extends BaseParser implements IParser { static final String ATOM_NS = "http://www.w3.org/2005/Atom"; static final String FHIR_NS = "http://hl7.org/fhir"; static final String OPENSEARCH_NS = "http://a9.com/-/spec/opensearch/1.1/"; @@ -381,7 +381,13 @@ public class XmlParser implements IParser { } private void encodeResourceToXmlStreamWriter(IResource theResource, XMLStreamWriter eventWriter) throws XMLStreamException, DataFormatException { + super.containResourcesForEncoding(theResource); + RuntimeResourceDefinition resDef = myContext.getResourceDefinition(theResource); + if (resDef == null) { + throw new ConfigurationException("Unknown resource type: " + theResource.getClass()); + } + eventWriter.writeStartElement(resDef.getName()); eventWriter.writeDefaultNamespace(FHIR_NS); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java index 6c2883fe840..7fdcf3b636a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java @@ -3,6 +3,7 @@ package ca.uhn.fhir.util; import java.util.ArrayList; import java.util.List; +import ca.uhn.fhir.model.api.ICompositeElement; import ca.uhn.fhir.model.api.IElement; public class ElementUtil { @@ -51,19 +52,22 @@ public class ElementUtil { return true; } - public static List allPopulatedChildElements(Object... theElements) { - ArrayList retVal = new ArrayList(); + /** + * @param theType Can be null + */ + public static List allPopulatedChildElements(Class theType, Object... theElements) { + ArrayList retVal = new ArrayList(); for (Object next : theElements) { if (next == null) { continue; }else if (next instanceof IElement) { - retVal.add((IElement) next); + addElement(retVal, (IElement) next, theType); } else if (next instanceof List) { for (Object nextElement : ((List)next)) { if (!(nextElement instanceof IElement)) { throw new IllegalArgumentException("Found element of "+nextElement.getClass()); } - retVal.add((IElement) nextElement); + addElement(retVal, (IElement) nextElement, theType); } } else { throw new IllegalArgumentException("Found element of "+next.getClass()); @@ -72,5 +76,15 @@ public class ElementUtil { } return retVal; } + + @SuppressWarnings("unchecked") + private static void addElement(ArrayList retVal, IElement next, Class theType) { + if (theType == null|| theType.isAssignableFrom(next.getClass())) { + retVal.add((T) next); + } + if (next instanceof ICompositeElement) { + retVal.addAll(((ICompositeElement) next).getAllPopulatedChildElementsOfType(theType)); + } + } } diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java index 9087302b1a9..f626345ac64 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java @@ -9,6 +9,7 @@ import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Extension; import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.IdentifierDt; import ca.uhn.fhir.model.primitive.DateDt; import ca.uhn.fhir.model.primitive.IdDt; @@ -104,9 +105,15 @@ public class ResourceWithExtensionsA implements IResource { public boolean isEmpty() { return false; // TODO: implement } + @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( ); // TODO: implement + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // TODO: implement } @@ -157,9 +164,15 @@ public class ResourceWithExtensionsA implements IResource { public boolean isEmpty() { return false; // TODO: implement } + @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( ); // TODO: implement + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // TODO: implement } @@ -199,7 +212,12 @@ public class ResourceWithExtensionsA implements IResource { @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( ); // TODO: implement + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // TODO: implement } @Override @@ -212,4 +230,10 @@ public class ResourceWithExtensionsA implements IResource { return myId; } + @Override + public ContainedDt getContained() { + // TODO Auto-generated method stub + return null; + } + } \ No newline at end of file diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/RuntimeResourceDefinitionTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/RuntimeResourceDefinitionTest.java index e09329e8458..662a66f7afc 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/RuntimeResourceDefinitionTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/RuntimeResourceDefinitionTest.java @@ -8,6 +8,7 @@ import ca.uhn.fhir.model.dstu.resource.Patient; import ca.uhn.fhir.model.dstu.resource.Profile; import ca.uhn.fhir.model.dstu.resource.Profile.ExtensionDefn; import ca.uhn.fhir.model.dstu.resource.Profile.Structure; +import ca.uhn.fhir.model.dstu.resource.ValueSet; import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; public class RuntimeResourceDefinitionTest { @@ -32,6 +33,21 @@ public class RuntimeResourceDefinitionTest { } + @Test + public void testToProfileValueSet() throws Exception { + FhirContext ctx = new FhirContext(ValueSet.class, Profile.class); + RuntimeResourceDefinition def = ctx.getResourceDefinition(ValueSet.class); + + Profile profile = def.toProfile(); + + String encoded = ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(profile); + ourLog.info(encoded); + + assertTrue(encoded.contains("")); + + } + + @Test public void testToProfileExtensions() throws Exception { FhirContext ctx = new FhirContext(ResourceWithExtensionsA.class, Profile.class); diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerTest.java index cc6eec94e81..0b7814cf2be 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/server/ResfulServerTest.java @@ -21,6 +21,8 @@ import org.junit.Test; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.dstu.resource.Patient; +import ca.uhn.fhir.model.dstu.resource.Profile; +import ca.uhn.fhir.rest.server.provider.ProfileProvider; import ca.uhn.fhir.testutil.RandomServerPortProvider; /** @@ -38,11 +40,13 @@ public class ResfulServerTest { public static void beforeClass() throws Exception { ourPort = RandomServerPortProvider.findFreePort(); ourServer = new Server(ourPort); + ourCtx = new FhirContext(Patient.class, Profile.class); DummyPatientResourceProvider patientProvider = new DummyPatientResourceProvider(); + ProfileProvider profProvider=new ProfileProvider(ourCtx); ServletHandler proxyHandler = new ServletHandler(); - ServletHolder servletHolder = new ServletHolder(new DummyRestfulServer(patientProvider)); + ServletHolder servletHolder = new ServletHolder(new DummyRestfulServer(patientProvider,profProvider)); proxyHandler.addServletWithMapping(servletHolder, "/"); ourServer.setHandler(proxyHandler); ourServer.start(); @@ -52,7 +56,6 @@ public class ResfulServerTest { builder.setConnectionManager(connectionManager); ourClient = builder.build(); - ourCtx = new FhirContext(Patient.class); } @@ -61,6 +64,20 @@ public class ResfulServerTest { ourServer.stop(); } + @Test + public void testSearchAllProfiles() throws Exception { + + HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Profile?"); + HttpResponse status = ourClient.execute(httpGet); + + String responseContent = IOUtils.toString(status.getEntity().getContent()); + ourLog.info("Response was:\n{}", responseContent); + + assertEquals(200, status.getStatusLine().getStatusCode()); + Bundle bundle = ourCtx.newXmlParser().parseBundle(responseContent); + + } + @Test public void testSearchWithOptionalParam() throws Exception { diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/IdentifierDt.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/IdentifierDt.java index e0b71a4e5de..dcfb9674770 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/IdentifierDt.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/IdentifierDt.java @@ -117,9 +117,15 @@ public class IdentifierDt return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner); } + @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myLabel, mySystem, myValue, myPeriod, myAssigner ); } diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/Patient.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/Patient.java index c762404cd49..78334efc9bc 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/Patient.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/testmodel/Patient.java @@ -53,7 +53,12 @@ public class Patient extends BaseResource implements IResource { @Override public List getAllPopulatedChildElements() { - return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( myIdentifier ); + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier ); } diff --git a/hapi-fhir-base/src/test/resources/contained-diagnosticreport.xml b/hapi-fhir-base/src/test/resources/contained-diagnosticreport.xml index fd9fb10defd..4b46e4f1c9f 100644 --- a/hapi-fhir-base/src/test/resources/contained-diagnosticreport.xml +++ b/hapi-fhir-base/src/test/resources/contained-diagnosticreport.xml @@ -1,5 +1,6 @@ - +
diff --git a/hapi-tinder-plugin/src/main/resources/vm/templates.vm b/hapi-tinder-plugin/src/main/resources/vm/templates.vm index 29dc5af38f4..92a39229ec5 100644 --- a/hapi-tinder-plugin/src/main/resources/vm/templates.vm +++ b/hapi-tinder-plugin/src/main/resources/vm/templates.vm @@ -45,10 +45,15 @@ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( #{foreach}($child in $childElements) ${child.variableName}#{if}($foreach.hasNext), #{end}#{end}); } - public java.util.List getAllChildElements() { - return ca.uhn.fhir.util.ElementUtil.allChildElements( #{foreach}($child in $childElements) ${child.variableName}#{if}($foreach.hasNext), #{end}#{end}); + @Override + public java.util.List getAllPopulatedChildElements() { + return getAllPopulatedChildElementsOfType(null); + } + + @Override + public List getAllPopulatedChildElementsOfType(Class theType) { + return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, #{foreach}($child in $childElements)${child.variableName}#{if}($foreach.hasNext), #{end}#{end}); } - #foreach ( $child in $childElements ) /**