Update to latest structure defs and validator

This commit is contained in:
jamesagnew 2016-05-01 21:31:14 -04:00
parent 4f717661ad
commit 27ec35338a
195 changed files with 9138 additions and 4780 deletions

View File

@ -25,14 +25,15 @@ import java.util.List;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.method.BaseMethodBinding;
import ca.uhn.fhir.util.VersionUtil;
public class RestulfulServerConfiguration {
private Collection<ResourceBinding> resourceBindings;
private List<BaseMethodBinding<?>> serverBindings;
private String implementationDescription;
private String serverVersion;
private String serverName;
private String serverVersion = VersionUtil.getVersion();
private String serverName = "HAPI FHIR";
private FhirContext fhirContext;
private IServerAddressStrategy serverAddressStrategy;
private String conformanceDate;

View File

@ -38,6 +38,7 @@ public abstract class FormatUtilities {
public static final String ID_REGEX = "[A-Za-z0-9\\-\\.]{1,64}";
public static final String FHIR_NS = "http://hl7.org/fhir";
public static final String XHTML_NS = "http://www.w3.org/1999/xhtml";
public static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance";
protected String toString(String value) {
return value;

View File

@ -0,0 +1,38 @@
package org.hl7.fhir.dstu3.formats;
import java.io.IOException;
import java.math.BigDecimal;
/**
* Facade to GSON writer, or something that imposes property ordering first
*
* @author Grahame
*
*/
public interface JsonCreator {
void setIndent(String string);
void beginObject() throws IOException;
void endObject() throws IOException;
void nullValue() throws IOException;
void name(String name) throws IOException;
void value(String value) throws IOException;
void value(Boolean value) throws IOException;
void value(BigDecimal value) throws IOException;
void value(Integer value) throws IOException;
void beginArray() throws IOException;
void endArray() throws IOException;
void finish() throws IOException;
}

View File

@ -0,0 +1,227 @@
package org.hl7.fhir.dstu3.formats;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Stack;
import com.google.gson.stream.JsonWriter;
public class JsonCreatorCanonical implements JsonCreator {
public class JsonCanValue {
String name;
private JsonCanValue(String name) {
this.name = name;
}
}
private class JsonCanNumberValue extends JsonCanValue {
private BigDecimal value;
private JsonCanNumberValue(String name, BigDecimal value) {
super(name);
this.value = value;
}
}
private class JsonCanIntegerValue extends JsonCanValue {
private Integer value;
private JsonCanIntegerValue(String name, Integer value) {
super(name);
this.value = value;
}
}
private class JsonCanBooleanValue extends JsonCanValue {
private Boolean value;
private JsonCanBooleanValue(String name, Boolean value) {
super(name);
this.value = value;
}
}
private class JsonCanStringValue extends JsonCanValue {
private String value;
private JsonCanStringValue(String name, String value) {
super(name);
this.value = value;
}
}
private class JsonCanNullValue extends JsonCanValue {
private JsonCanNullValue(String name) {
super(name);
}
}
public class JsonCanObject extends JsonCanValue {
boolean array;
List<JsonCanValue> children = new ArrayList<JsonCanValue>();
public JsonCanObject(String name, boolean array) {
super(name);
this.array = array;
}
public void addProp(JsonCanValue obj) {
children.add(obj);
}
}
Stack<JsonCanObject> stack;
JsonCanObject root;
JsonWriter gson;
String name;
public JsonCreatorCanonical(OutputStreamWriter osw) {
stack = new Stack<JsonCreatorCanonical.JsonCanObject>();
gson = new JsonWriter(osw);
name = null;
}
private String takeName() {
String res = name;
name = null;
return res;
}
@Override
public void setIndent(String indent) {
if (!indent.equals(""))
throw new Error("do not use pretty when canonical is set");
gson.setIndent(indent);
}
@Override
public void beginObject() throws IOException {
JsonCanObject obj = new JsonCanObject(takeName(), false);
if (stack.isEmpty())
root = obj;
else
stack.peek().addProp(obj);
stack.push(obj);
}
@Override
public void endObject() throws IOException {
stack.pop();
}
@Override
public void nullValue() throws IOException {
stack.peek().addProp(new JsonCanNullValue(takeName()));
}
@Override
public void name(String name) throws IOException {
this.name = name;
}
@Override
public void value(String value) throws IOException {
stack.peek().addProp(new JsonCanStringValue(takeName(), value));
}
@Override
public void value(Boolean value) throws IOException {
stack.peek().addProp(new JsonCanBooleanValue(takeName(), value));
}
@Override
public void value(BigDecimal value) throws IOException {
stack.peek().addProp(new JsonCanNumberValue(takeName(), value));
}
@Override
public void value(Integer value) throws IOException {
stack.peek().addProp(new JsonCanIntegerValue(takeName(), value));
}
@Override
public void beginArray() throws IOException {
JsonCanObject obj = new JsonCanObject(takeName(), true);
if (!stack.isEmpty())
stack.peek().addProp(obj);
stack.push(obj);
}
@Override
public void endArray() throws IOException {
stack.pop();
}
@Override
public void finish() throws IOException {
writeObject(root);
}
private void writeObject(JsonCanObject obj) throws IOException {
gson.beginObject();
List<String> names = new ArrayList<String>();
for (JsonCanValue v : obj.children)
names.add(v.name);
Collections.sort(names);
for (String n : names) {
gson.name(n);
JsonCanValue v = getPropForName(n, obj.children);
if (v instanceof JsonCanNumberValue)
gson.value(((JsonCanNumberValue) v).value);
else if (v instanceof JsonCanIntegerValue)
gson.value(((JsonCanIntegerValue) v).value);
else if (v instanceof JsonCanBooleanValue)
gson.value(((JsonCanBooleanValue) v).value);
else if (v instanceof JsonCanStringValue)
gson.value(((JsonCanStringValue) v).value);
else if (v instanceof JsonCanNullValue)
gson.nullValue();
else if (v instanceof JsonCanObject) {
JsonCanObject o = (JsonCanObject) v;
if (o.array)
writeArray(o);
else
writeObject(o);
} else
throw new Error("not possible");
}
gson.endObject();
}
private JsonCanValue getPropForName(String name, List<JsonCanValue> children) {
for (JsonCanValue child : children)
if (child.name.equals(name))
return child;
return null;
}
private void writeArray(JsonCanObject arr) throws IOException {
gson.beginArray();
for (JsonCanValue v : arr.children) {
if (v instanceof JsonCanNumberValue)
gson.value(((JsonCanNumberValue) v).value);
else if (v instanceof JsonCanIntegerValue)
gson.value(((JsonCanIntegerValue) v).value);
else if (v instanceof JsonCanBooleanValue)
gson.value(((JsonCanBooleanValue) v).value);
else if (v instanceof JsonCanStringValue)
gson.value(((JsonCanStringValue) v).value);
else if (v instanceof JsonCanNullValue)
gson.nullValue();
else if (v instanceof JsonCanObject) {
JsonCanObject o = (JsonCanObject) v;
if (o.array)
writeArray(o);
else
writeObject(o);
} else
throw new Error("not possible");
}
gson.endArray();
}
}

View File

@ -0,0 +1,78 @@
package org.hl7.fhir.dstu3.formats;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import com.google.gson.stream.JsonWriter;
public class JsonCreatorGson implements JsonCreator {
JsonWriter gson;
public JsonCreatorGson(OutputStreamWriter osw) {
gson = new JsonWriter(osw);
}
@Override
public void setIndent(String indent) {
gson.setIndent(indent);
}
@Override
public void beginObject() throws IOException {
gson.beginObject();
}
@Override
public void endObject() throws IOException {
gson.endObject();
}
@Override
public void nullValue() throws IOException {
gson.nullValue();
}
@Override
public void name(String name) throws IOException {
gson.name(name);
}
@Override
public void value(String value) throws IOException {
gson.value(value);
}
@Override
public void value(Boolean value) throws IOException {
gson.value(value);
}
@Override
public void value(BigDecimal value) throws IOException {
gson.value(value);
}
@Override
public void value(Integer value) throws IOException {
gson.value(value);
}
@Override
public void beginArray() throws IOException {
gson.beginArray();
}
@Override
public void endArray() throws IOException {
gson.endArray();
}
@Override
public void finish() {
// nothing to do here
}
}

View File

@ -4,8 +4,10 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -53,12 +55,13 @@ public class DefaultProfileValidationSupport implements IValidationSupport {
}
@Override
public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) {
return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true);
public List<StructureDefinition> fetchAllStructureDefinitions(FhirContext theContext) {
return new ArrayList<StructureDefinition>(provideStructureDefinitionMap(theContext).values());
}
ValueSet fetchValueSet(FhirContext theContext, String theSystem) {
return (ValueSet) fetchCodeSystemOrValueSet(theContext, theSystem, false);
@Override
public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) {
return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true);
}
private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) {
@ -128,6 +131,20 @@ public class DefaultProfileValidationSupport implements IValidationSupport {
return null;
}
@Override
public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) {
return provideStructureDefinitionMap(theContext).get(theUrl);
}
ValueSet fetchValueSet(FhirContext theContext, String theSystem) {
return (ValueSet) fetchCodeSystemOrValueSet(theContext, theSystem, false);
}
public void flush() {
myCodeSystems = null;
myStructureDefinitions = null;
}
@Override
public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) {
CodeSystem cs = fetchCodeSystem(theContext, theSystem);
@ -185,6 +202,20 @@ public class DefaultProfileValidationSupport implements IValidationSupport {
}
}
private Map<String, StructureDefinition> provideStructureDefinitionMap(FhirContext theContext) {
Map<String, StructureDefinition> structureDefinitions = myStructureDefinitions;
if (structureDefinitions == null) {
structureDefinitions = new HashMap<String, StructureDefinition>();
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-resources.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-types.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-others.xml");
myStructureDefinitions = structureDefinitions;
}
return structureDefinitions;
}
@Override
public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {
CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem);
@ -199,25 +230,4 @@ public class DefaultProfileValidationSupport implements IValidationSupport {
return new CodeValidationResult(IssueSeverity.INFORMATION, "Unknown code: " + theCodeSystem + " / " + theCode);
}
public void flush() {
myCodeSystems = null;
myStructureDefinitions = null;
}
@Override
public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) {
Map<String, StructureDefinition> structureDefinitions = myStructureDefinitions;
if (structureDefinitions == null) {
structureDefinitions = new HashMap<String, StructureDefinition>();
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-resources.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-types.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-others.xml");
myStructureDefinitions = structureDefinitions;
}
return structureDefinitions.get(theUrl);
}
}

View File

@ -21,6 +21,7 @@ import org.hl7.fhir.dstu3.model.ConceptMap;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.ResourceType;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
@ -38,19 +39,44 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory {
private final FhirContext myCtx;
private IValidationSupport myValidationSupport;
private Map<String, Resource> myFetchedResourceCache = new HashMap<String, Resource>();
private IValidationSupport myValidationSupport;
public HapiWorkerContext(FhirContext theCtx, IValidationSupport theValidationSupport) {
myCtx = theCtx;
myValidationSupport = theValidationSupport;
}
@Override
public List<StructureDefinition> allStructures() {
return myValidationSupport.fetchAllStructureDefinitions(myCtx);
}
@Override
public ValueSetExpansionOutcome expand(ValueSet theSource) {
ValueSetExpansionOutcome vso;
try {
vso = getExpander().expand(theSource);
} catch (Exception e) {
throw new InternalErrorException(e);
}
if (vso.getError() != null) {
throw new InvalidRequestException(vso.getError());
} else {
return vso;
}
}
@Override
public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc) {
return myValidationSupport.expandValueSet(myCtx, theInc);
}
@Override
public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk) {
throw new UnsupportedOperationException();
}
@Override
public CodeSystem fetchCodeSystem(String theSystem) {
if (myValidationSupport == null) {
@ -77,6 +103,21 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
}
}
@Override
public List<ConceptMap> findMapsForSource(String theUrl) {
throw new UnsupportedOperationException();
}
@Override
public String getAbbreviation(String theName) {
throw new UnsupportedOperationException();
}
@Override
public ValueSetExpander getExpander() {
return new ValueSetExpanderSimple(this, this);
}
@Override
public INarrativeGenerator getNarrativeGenerator(String thePrefix, String theBasePath) {
throw new UnsupportedOperationException();
@ -92,6 +133,16 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
throw new UnsupportedOperationException();
}
@Override
public List<String> getResourceNames() {
List<String> result = new ArrayList<String>();
for (ResourceType next : ResourceType.values()) {
result.add(next.name());
}
Collections.sort(result);
return result;
}
@Override
public <T extends Resource> boolean hasResource(Class<T> theClass_, String theUri) {
throw new UnsupportedOperationException();
@ -112,6 +163,11 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
throw new UnsupportedOperationException();
}
@Override
public String oid2Uri(String theCode) {
throw new UnsupportedOperationException();
}
@Override
public boolean supportsSystem(String theSystem) {
if (myValidationSupport == null) {
@ -121,6 +177,32 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
}
}
@Override
public Set<String> typeTails() {
return new HashSet<String>(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", "Markdown", "Base64Binary", "Coding", "CodeableConcept", "Attachment", "Identifier", "Quantity",
"SampledData", "Range", "Period", "Ratio", "HumanName", "Address", "ContactPoint", "Timing", "Reference", "Annotation", "Signature", "Meta"));
}
@Override
public ValidationResult validateCode(CodeableConcept theCode, ValueSet theVs) {
for (Coding next : theCode.getCoding()) {
ValidationResult retVal = validateCode(next, theVs);
if (retVal != null && retVal.isOk()) {
return retVal;
}
}
return new ValidationResult(null, null);
}
@Override
public ValidationResult validateCode(Coding theCode, ValueSet theVs) {
String system = theCode.getSystem();
String code = theCode.getCode();
String display = theCode.getDisplay();
return validateCode(system, code, display, theVs);
}
@Override
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) {
CodeValidationResult result = myValidationSupport.validateCode(myCtx, theSystem, theCode, theDisplay);
@ -173,75 +255,4 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
return null;
}
}
@Override
public ValueSetExpansionOutcome expand(ValueSet theSource) {
ValueSetExpansionOutcome vso;
try {
vso = getExpander().expand(theSource);
} catch (Exception e) {
throw new InternalErrorException(e);
}
if (vso.getError() != null) {
throw new InvalidRequestException(vso.getError());
} else {
return vso;
}
}
@Override
public List<ConceptMap> findMapsForSource(String theUrl) {
throw new UnsupportedOperationException();
}
@Override
public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk) {
throw new UnsupportedOperationException();
}
@Override
public ValidationResult validateCode(Coding theCode, ValueSet theVs) {
String system = theCode.getSystem();
String code = theCode.getCode();
String display = theCode.getDisplay();
return validateCode(system, code, display, theVs);
}
@Override
public ValidationResult validateCode(CodeableConcept theCode, ValueSet theVs) {
for (Coding next : theCode.getCoding()) {
ValidationResult retVal = validateCode(next, theVs);
if (retVal != null && retVal.isOk()) {
return retVal;
}
}
return new ValidationResult(null, null);
}
@Override
public List<String> getResourceNames() {
List<String> result = new ArrayList<String>();
for (ResourceType next : ResourceType.values()) {
result.add(next.name());
}
Collections.sort(result);
return result;
}
@Override
public String getAbbreviation(String theName) {
throw new UnsupportedOperationException();
}
@Override
public ValueSetExpander getExpander() {
return new ValueSetExpanderSimple(this, this);
}
@Override
public Set<String> typeTails() {
return new HashSet<String>(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", "Markdown", "Base64Binary", "Coding", "CodeableConcept", "Attachment", "Identifier", "Quantity",
"SampledData", "Range", "Period", "Ratio", "HumanName", "Address", "ContactPoint", "Timing", "Reference", "Annotation", "Signature", "Meta"));
}
}

View File

@ -1,5 +1,7 @@
package org.hl7.fhir.dstu3.hapi.validation;
import java.util.List;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
@ -21,6 +23,12 @@ public interface IValidationSupport {
*/
ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude);
/**
* Load and return all possible structure definitions
*/
List<StructureDefinition> fetchAllStructureDefinitions(FhirContext theContext);
/**
* Fetch a code system by ID
*
@ -30,7 +38,6 @@ public interface IValidationSupport {
*/
CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem);
/**
* Loads a resource needed by the validation (a StructureDefinition, or a
* ValueSet)
@ -59,7 +66,7 @@ public interface IValidationSupport {
*/
boolean isCodeSystemSupported(FhirContext theContext, String theSystem);
/**
/**
* Validates that the given code exists and if possible returns a display
* name. This method is called to check codes which are found in "example"
* binding fields (e.g. <code>Observation.code</code> in the default profile.
@ -74,46 +81,46 @@ public interface IValidationSupport {
*/
CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay);
public class CodeValidationResult {
private ConceptDefinitionComponent definition;
private String message;
private IssueSeverity severity;
public CodeValidationResult(ConceptDefinitionComponent theNext) {
this.definition = theNext;
}
public CodeValidationResult(IssueSeverity severity, String message) {
this.severity = severity;
this.message = message;
}
public CodeValidationResult(IssueSeverity severity, String message, ConceptDefinitionComponent definition) {
this.severity = severity;
this.message = message;
this.definition = definition;
}
public ConceptDefinitionComponent asConceptDefinition() {
return definition;
}
public String getDisplay() {
return definition == null ? "??" : definition.getDisplay();
}
public String getMessage() {
return message;
}
public IssueSeverity getSeverity() {
return severity;
}
public boolean isOk() {
return definition != null;
}
}
public class CodeValidationResult {
private ConceptDefinitionComponent definition;
private String message;
private IssueSeverity severity;
public CodeValidationResult(ConceptDefinitionComponent theNext) {
this.definition = theNext;
}
public CodeValidationResult(IssueSeverity severity, String message) {
this.severity = severity;
this.message = message;
}
public CodeValidationResult(IssueSeverity severity, String message, ConceptDefinitionComponent definition) {
this.severity = severity;
this.message = message;
this.definition = definition;
}
public ConceptDefinitionComponent asConceptDefinition() {
return definition;
}
public String getDisplay() {
return definition == null ? "??" : definition.getDisplay();
}
public String getMessage() {
return message;
}
public IssueSeverity getSeverity() {
return severity;
}
public boolean isOk() {
return definition != null;
}
}
}

View File

@ -1,7 +1,11 @@
package org.hl7.fhir.dstu3.hapi.validation;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.StructureDefinition;
@ -102,4 +106,18 @@ public class ValidationSupportChain implements IValidationSupport {
return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay);
}
@Override
public List<StructureDefinition> fetchAllStructureDefinitions(FhirContext theContext) {
ArrayList<StructureDefinition> retVal = new ArrayList<StructureDefinition>();
Set<String> urls= new HashSet<String>();
for (IValidationSupport nextSupport : myChain) {
for (StructureDefinition next : nextSupport.fetchAllStructureDefinitions(theContext)) {
if (isBlank(next.getUrl()) || urls.add(next.getUrl())) {
retVal.add(next);
}
}
}
return retVal;
}
}

View File

@ -0,0 +1,325 @@
package org.hl7.fhir.dstu3.metamodel;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
import org.hl7.fhir.dstu3.metamodel.Element.SpecialElement;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.ElementDefinition;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
/**
* This class represents the reference model of FHIR
*
* A resource is nothing but a set of elements, where every element has a
* name, maybe a stated type, maybe an id, and either a value or child elements
* (one or the other, but not both or neither)
*
* @author Grahame Grieve
*
*/
public class Element extends Base {
public enum SpecialElement {
CONTAINED, BUNDLE_ENTRY;
}
private List<String> comments;// not relevant for production, but useful in documentation
private String name;
private String type;
private String value;
private int index = -1;
private List<Element> children;
private Property property;
private int line;
private int col;
private ElementDefinition validatorDefinition;
private StructureDefinition validatorProfile;
private SpecialElement special;
private XhtmlNode xhtml; // if this is populated, then value will also hold the string representation
public Element(String name) {
super();
this.name = name;
}
public Element(String name, Property property) {
super();
this.name = name;
this.property = property;
}
public Element(String name, Property property, String type, String value) {
super();
this.name = name;
this.property = property;
this.type = type;
this.value = value;
}
public void updateProperty(Property property, SpecialElement special) {
this.property = property;
this.special = special;
}
public SpecialElement getSpecial() {
return special;
}
public String getName() {
return name;
}
public String getType() {
if (type == null)
return property.getType(name);
else
return type;
}
public String getValue() {
return value;
}
public boolean hasChildren() {
return !(children == null || children.isEmpty());
}
public List<Element> getChildren() {
if (children == null)
children = new ArrayList<Element>();
return children;
}
public boolean hasComments() {
return !(comments == null || comments.isEmpty());
}
public List<String> getComments() {
if (comments == null)
comments = new ArrayList<String>();
return comments;
}
public Property getProperty() {
return property;
}
public void setValue(String value) {
this.value = value;
}
public void setType(String type) {
this.type = type;
}
public boolean hasValue() {
return value != null;
}
public List<Element> getChildrenByName(String name) {
List<Element> res = new ArrayList<Element>();
if (hasChildren()) {
for (Element child : children)
if (name.equals(child.getName()))
res.add(child);
}
return res;
}
public void numberChildren() {
if (children == null)
return;
String last = "";
int index = 0;
for (Element child : children) {
if (child.getProperty().isList()) {
if (last.equals(child.getName())) {
index++;
} else {
last = child.getName();
index = 0;
}
child.index = index;
} else {
child.index = -1;
}
child.numberChildren();
}
}
public int getIndex() {
return index;
}
public boolean hasIndex() {
return index > -1;
}
public void setIndex(int index) {
this.index = index;
}
public String getChildValue(String name) {
if (children == null)
return null;
for (Element child : children) {
if (name.equals(child.getName()))
return child.getValue();
}
return null;
}
public List<Element> getChildren(String name) {
List<Element> res = new ArrayList<Element>();
for (Element child : children) {
if (name.equals(child.getName()))
res.add(child);
}
return res;
}
public boolean hasType() {
if (type == null)
return property.hasType(name);
else
return true;
}
@Override
public String fhirType() {
return getType();
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
if (isPrimitive() && (hash == "value".hashCode()) && !Utilities.noString(value)) {
String tn = getType();
throw new Error("not done yet");
}
List<Base> result = new ArrayList<Base>();
for (Element child : children) {
if (child.getName().equals(name))
result.add(child);
if (child.getName().startsWith(name) && child.getProperty().isChoice() && child.getProperty().getName().equals(name+"[x]"))
result.add(child);
}
if (result.isEmpty() && checkValid) {
// throw new FHIRException("not determined yet");
}
return result.toArray(new Base[result.size()]);
}
@Override
protected void listChildren(
List<org.hl7.fhir.dstu3.model.Property> result) {
// TODO Auto-generated method stub
}
@Override
public boolean isPrimitive() {
return type != null ? ParserBase.isPrimitive(type) : property.isPrimitive(name);
}
@Override
public boolean hasPrimitiveValue() {
return property.isPrimitive(name) || property.IsLogicalAndHasPrimitiveValue(name);
}
@Override
public String primitiveValue() {
if (isPrimitive())
return value;
else {
if (hasPrimitiveValue()) {
for (Element c : children) {
if (c.getName().equals("value"))
return c.primitiveValue();
}
}
return null;
}
}
// for the validator
public int line() {
return line;
}
public int col() {
return col;
}
public Element markLocation(int line, int col) {
this.line = line;
this.col = col;
return this;
}
public void markValidation(StructureDefinition profile, ElementDefinition definition) {
validatorProfile = profile;
validatorDefinition = definition;
}
public Element getNamedChild(String name) {
if (children == null)
return null;
Element result = null;
for (Element child : children) {
if (child.getName().equals(name)) {
if (result == null)
result = child;
else
throw new Error("Attempt to read a single element when there is more than one present ("+name+")");
}
}
return result;
}
public void getNamedChildren(String name, List<Element> list) {
if (children != null)
for (Element child : children)
if (child.getName().equals(name))
list.add(child);
}
public String getNamedChildValue(String name) {
Element child = getNamedChild(name);
return child == null ? null : child.value;
}
public void getNamedChildrenWithWildcard(String string, List<Element> values) {
Validate.isTrue(string.endsWith("[x]"));
String start = string.substring(0, string.length() - 3);
if (children != null) {
for (Element child : children) {
if (child.getName().startsWith(start)) {
values.add(child);
}
}
}
}
public XhtmlNode getXhtml() {
return xhtml;
}
public Element setXhtml(XhtmlNode xhtml) {
this.xhtml = xhtml;
return this;
}
}

View File

@ -0,0 +1,428 @@
package org.hl7.fhir.dstu3.metamodel;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.lang3.NotImplementedException;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.metamodel.Element.SpecialElement;
import org.hl7.fhir.dstu3.metamodel.ParserBase.ValidationPolicy;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueType;
import org.hl7.fhir.dstu3.exceptions.DefinitionException;
import org.hl7.fhir.dstu3.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu3.formats.FormatUtilities;
import org.hl7.fhir.dstu3.formats.JsonCreator;
import org.hl7.fhir.dstu3.formats.JsonCreatorCanonical;
import org.hl7.fhir.dstu3.formats.JsonCreatorGson;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.utils.JsonTrackingParser;
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
import org.hl7.fhir.dstu3.utils.JsonTrackingParser.LocationData;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.XhtmlComposer;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
import org.hl7.fhir.utilities.xhtml.XhtmlParser;
import org.hl7.fhir.utilities.xml.XMLUtil;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
public class JsonParser extends ParserBase {
private JsonCreator json;
private Map<JsonElement, LocationData> map;
public JsonParser(IWorkerContext context) {
super(context);
}
@Override
public Element parse(InputStream stream) throws Exception {
// if we're parsing at this point, then we're going to use the custom parser
map = new HashMap<JsonElement, LocationData>();
String source = TextFile.streamToString(stream);
if (policy == ValidationPolicy.EVERYTHING) {
JsonObject obj = null;
try {
obj = JsonTrackingParser.parse(source, map);
} catch (Exception e) {
logError(-1, -1, "(document)", IssueType.INVALID, "Error parsing JSON: "+e.getMessage(), IssueSeverity.FATAL);
return null;
}
assert (map.containsKey(obj));
return parse(obj);
} else {
JsonObject obj = (JsonObject) new com.google.gson.JsonParser().parse(source);
assert (map.containsKey(obj));
return parse(obj);
}
}
public Element parse(JsonObject object, Map<JsonElement, LocationData> map) throws Exception {
this.map = map;
return parse(object);
}
public Element parse(JsonObject object) throws Exception {
JsonElement rt = object.get("resourceType");
if (rt == null) {
logError(line(object), col(object), "$", IssueType.INVALID, "Unable to find resourceType property", IssueSeverity.FATAL);
return null;
} else {
String name = rt.getAsString();
String path = "/"+name;
StructureDefinition sd = getDefinition(line(object), col(object), name);
if (sd == null)
return null;
Element result = new Element(name, new Property(context, sd.getSnapshot().getElement().get(0), sd));
checkObject(object, path);
result.markLocation(line(object), col(object));
result.setType(name);
parseChildren(path, object, result, true);
result.numberChildren();
return result;
}
}
private void checkObject(JsonObject object, String path) throws FHIRFormatError {
if (policy == ValidationPolicy.EVERYTHING) {
boolean found = false;
for (Entry<String, JsonElement> e : object.entrySet()) {
// if (!e.getKey().equals("fhir_comments")) {
found = true;
break;
// }
}
if (!found)
logError(line(object), col(object), path, IssueType.INVALID, "Object must have some content", IssueSeverity.ERROR);
}
}
private void parseChildren(String path, JsonObject object, Element context, boolean hasResourceType) throws DefinitionException, FHIRFormatError {
reapComments(object, context);
List<Property> properties = getChildProperties(context.getProperty(), context.getName(), null);
Set<String> processed = new HashSet<String>();
if (hasResourceType)
processed.add("resourceType");
processed.add("fhir_comments");
// note that we do not trouble ourselves to maintain the wire format order here - we don't even know what it was anyway
// first pass: process the properties
for (Property property : properties) {
if (property.isChoice()) {
for (TypeRefComponent type : property.getDefinition().getType()) {
String eName = property.getName().substring(0, property.getName().length()-3) + Utilities.capitalize(type.getCode());
if (!ParserBase.isPrimitive(type.getCode()) && object.has(eName)) {
parseChildComplex(path, object, context, processed, property, eName);
break;
} else if (ParserBase.isPrimitive(type.getCode()) && (object.has(eName) || object.has("_"+eName))) {
parseChildPrimitive(object, context, processed, property, path, eName);
break;
}
}
} else if (property.isPrimitive(null)) {
parseChildPrimitive(object, context, processed, property, path, property.getName());
} else if (object.has(property.getName())) {
parseChildComplex(path, object, context, processed, property, property.getName());
}
}
// second pass: check for things not processed
if (policy != ValidationPolicy.NONE) {
for (Entry<String, JsonElement> e : object.entrySet()) {
if (!processed.contains(e.getKey())) {
logError(line(e.getValue()), col(e.getValue()), path, IssueType.STRUCTURE, "Unrecognised property '@"+e.getKey()+"'", IssueSeverity.ERROR);
}
}
}
}
private void parseChildComplex(String path, JsonObject object, Element context, Set<String> processed, Property property, String name) throws FHIRFormatError, DefinitionException {
processed.add(name);
String npath = path+"/"+property.getName();
JsonElement e = object.get(name);
if (property.isList() && (e instanceof JsonArray)) {
JsonArray arr = (JsonArray) e;
for (JsonElement am : arr) {
parseChildComplexInstance(npath, object, context, property, name, am);
}
} else {
parseChildComplexInstance(npath, object, context, property, name, e);
}
}
private void parseChildComplexInstance(String npath, JsonObject object, Element context, Property property, String name, JsonElement e) throws FHIRFormatError, DefinitionException {
if (e instanceof JsonObject) {
JsonObject child = (JsonObject) e;
Element n = new Element(name, property).markLocation(line(child), col(child));
checkObject(child, npath);
context.getChildren().add(n);
if (property.isResource())
parseResource(npath, child, n);
else
parseChildren(npath, child, n, false);
} else
logError(line(e), col(e), npath, IssueType.INVALID, "This property must be "+(property.isList() ? "an Array" : "an Object")+", not a "+e.getClass().getName(), IssueSeverity.ERROR);
}
private void parseChildPrimitive(JsonObject object, Element context, Set<String> processed, Property property, String path, String name) throws FHIRFormatError, DefinitionException {
String npath = path+"/"+property.getName();
processed.add(name);
processed.add("_"+name);
JsonElement main = object.has(name) ? object.get(name) : null;
JsonElement fork = object.has("_"+name) ? object.get("_"+name) : null;
if (main != null || fork != null) {
if (property.isList() && ((main == null) || (main instanceof JsonArray)) &&((fork == null) || (fork instanceof JsonArray)) ) {
JsonArray arr1 = (JsonArray) main;
JsonArray arr2 = (JsonArray) fork;
for (int i = 0; i < Math.max(arrC(arr1), arrC(arr2)); i++) {
JsonElement m = arrI(arr1, i);
JsonElement f = arrI(arr2, i);
parseChildPrimitiveInstance(context, property, name, npath, m, f);
}
} else
parseChildPrimitiveInstance(context, property, name, npath, main, fork);
}
}
private JsonElement arrI(JsonArray arr, int i) {
return arr == null || i >= arr.size() || arr.get(i) instanceof JsonNull ? null : arr.get(i);
}
private int arrC(JsonArray arr) {
return arr == null ? 0 : arr.size();
}
private void parseChildPrimitiveInstance(Element context, Property property, String name, String npath,
JsonElement main, JsonElement fork) throws FHIRFormatError, DefinitionException {
if (main != null && !(main instanceof JsonPrimitive))
logError(line(main), col(main), npath, IssueType.INVALID, "This property must be an simple value, not a "+main.getClass().getName(), IssueSeverity.ERROR);
else if (fork != null && !(fork instanceof JsonObject))
logError(line(fork), col(fork), npath, IssueType.INVALID, "This property must be an object, not a "+fork.getClass().getName(), IssueSeverity.ERROR);
else {
Element n = new Element(name, property).markLocation(line(main != null ? main : fork), col(main != null ? main : fork));
context.getChildren().add(n);
if (main != null) {
JsonPrimitive p = (JsonPrimitive) main;
n.setValue(p.getAsString());
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) {
try {
n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement());
} catch (Exception e) {
logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing XHTML: "+e.getMessage(), IssueSeverity.ERROR);
}
}
if (policy == ValidationPolicy.EVERYTHING) {
// now we cross-check the primitive format against the stated type
if (Utilities.existsInList(n.getType(), "boolean")) {
if (!p.isBoolean())
logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing JSON: the primitive value must be a boolean", IssueSeverity.ERROR);
} else if (Utilities.existsInList(n.getType(), "integer", "unsignedInt", "positiveInt", "decimal")) {
if (!p.isNumber())
logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing JSON: the primitive value must be a number", IssueSeverity.ERROR);
} else if (!p.isString())
logError(line(main), col(main), npath, IssueType.INVALID, "Error parsing JSON: the primitive value must be a string", IssueSeverity.ERROR);
}
}
if (fork != null) {
JsonObject child = (JsonObject) fork;
checkObject(child, npath);
parseChildren(npath, child, n, false);
}
}
}
private void parseResource(String npath, JsonObject res, Element parent) throws DefinitionException, FHIRFormatError {
JsonElement rt = res.get("resourceType");
if (rt == null) {
logError(line(res), col(res), npath, IssueType.INVALID, "Unable to find resourceType property", IssueSeverity.FATAL);
} else {
String name = rt.getAsString();
StructureDefinition sd = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+name);
if (sd == null)
throw new FHIRFormatError("Contained resource does not appear to be a FHIR resource (unknown name '"+name+"')");
parent.updateProperty(new Property(context, sd.getSnapshot().getElement().get(0), sd), parent.getProperty().getName().equals("contained") ? SpecialElement.CONTAINED : SpecialElement.BUNDLE_ENTRY);
parent.setType(name);
parseChildren(npath, res, parent, true);
}
}
private void reapComments(JsonObject object, Element context) {
if (object.has("fhir_comments")) {
JsonArray arr = object.getAsJsonArray("fhir_comments");
for (JsonElement e : arr) {
context.getComments().add(e.getAsString());
}
}
}
private int line(JsonElement e) {
if (map == null|| !map.containsKey(e))
return -1;
else
return map.get(e).getLine();
}
private int col(JsonElement e) {
if (map == null|| !map.containsKey(e))
return -1;
else
return map.get(e).getCol();
}
protected void prop(String name, String value) throws IOException {
if (name != null)
json.name(name);
json.value(value);
}
protected void open(String name) throws IOException {
if (name != null)
json.name(name);
json.beginObject();
}
protected void close() throws IOException {
json.endObject();
}
protected void openArray(String name) throws IOException {
if (name != null)
json.name(name);
json.beginArray();
}
protected void closeArray() throws IOException {
json.endArray();
}
@Override
public void compose(Element e, OutputStream stream, OutputStyle style, String identity) throws Exception {
OutputStreamWriter osw = new OutputStreamWriter(stream, "UTF-8");
if (style == OutputStyle.CANONICAL)
json = new JsonCreatorCanonical(osw);
else
json = new JsonCreatorGson(osw);
json.setIndent(style == OutputStyle.PRETTY ? " " : "");
json.beginObject();
prop("resourceType", e.getType());
Set<String> done = new HashSet<String>();
for (Element child : e.getChildren()) {
compose(e.getName(), e, done, child);
}
json.endObject();
json.finish();
osw.flush();
}
private void compose(String path, Element e, Set<String> done, Element child) throws IOException {
if (child.getSpecial() == SpecialElement.BUNDLE_ENTRY || !child.getProperty().isList()) {// for specials, ignore the cardinality of the stated type
compose(path, child);
} else if (!done.contains(child.getName())) {
done.add(child.getName());
List<Element> list = e.getChildrenByName(child.getName());
composeList(path, list);
}
}
private void composeList(String path, List<Element> list) throws IOException {
// there will be at least one element
String name = list.get(0).getName();
boolean complex = true;
if (list.get(0).isPrimitive()) {
boolean prim = false;
complex = false;
for (Element item : list) {
if (item.hasValue())
prim = true;
if (item.hasChildren())
complex = true;
}
if (prim) {
openArray(name);
for (Element item : list) {
if (item.hasValue())
primitiveValue(null, item);
else
json.nullValue();
}
closeArray();
}
name = "_"+name;
}
if (complex) {
openArray(name);
for (Element item : list) {
if (item.hasChildren()) {
open(null);
if (item.getProperty().isResource()) {
prop("resourceType", item.getType());
}
Set<String> done = new HashSet<String>();
for (Element child : item.getChildren()) {
compose(path+"."+name+"[]", item, done, child);
}
close();
} else
json.nullValue();
}
closeArray();
}
}
private void primitiveValue(String name, Element item) throws IOException {
if (name != null)
json.name(name);
String type = item.getType();
if (Utilities.existsInList(type, "boolean"))
json.value(item.getValue().equals("true") ? new Boolean(true) : new Boolean(false));
else if (Utilities.existsInList(type, "integer", "unsignedInt", "positiveInt"))
json.value(new Integer(item.getValue()));
else if (Utilities.existsInList(type, "decimal"))
json.value(new BigDecimal(item.getValue()));
else
json.value(item.getValue());
}
private void compose(String path, Element element) throws IOException {
String name = element.getName();
if (element.isPrimitive() || ParserBase.isPrimitive(element.getType())) {
if (element.hasValue())
primitiveValue(name, element);
name = "_"+name;
}
if (element.hasChildren()) {
open(name);
if (element.getProperty().isResource()) {
prop("resourceType", element.getType());
}
Set<String> done = new HashSet<String>();
for (Element child : element.getChildren()) {
compose(path+"."+element.getName(), element, done, child);
}
close();
}
}
}

View File

@ -0,0 +1,29 @@
package org.hl7.fhir.dstu3.metamodel;
import java.io.InputStream;
import java.io.OutputStream;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
public class Manager {
public enum FhirFormat { XML, JSON, JSONLD, TURTLE }
public static Element parse(IWorkerContext context, InputStream source, FhirFormat inputFormat) throws Exception {
return makeParser(context, inputFormat).parse(source);
}
public static void compose(IWorkerContext context, Element e, OutputStream destination, FhirFormat outputFormat, OutputStyle style, String base) throws Exception {
makeParser(context, outputFormat).compose(e, destination, style, base);
}
public static ParserBase makeParser(IWorkerContext context, FhirFormat format) {
switch (format) {
case JSON : return new JsonParser(context);
case XML : return new XmlParser(context);
}
return null;
}
}

View File

@ -0,0 +1,167 @@
package org.hl7.fhir.dstu3.metamodel;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.dstu3.exceptions.DefinitionException;
import org.hl7.fhir.dstu3.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu3.formats.FormatUtilities;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.model.ElementDefinition;
import org.hl7.fhir.dstu3.model.OperationOutcome;
import org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation;
import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueType;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.utils.ProfileUtilities;
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
import org.hl7.fhir.dstu3.validation.ValidationMessage;
import org.hl7.fhir.dstu3.validation.ValidationMessage.Source;
import org.hl7.fhir.utilities.Utilities;
public abstract class ParserBase {
interface IErrorNotifier {
}
public enum ValidationPolicy { NONE, QUICK, EVERYTHING }
public static boolean isPrimitive(String code) {
return Utilities.existsInList(code,
"xhtml", "boolean", "integer", "string", "decimal", "uri", "base64Binary", "instant", "date", "dateTime",
"time", "code", "oid", "id", "markdown", "unsignedInt", "positiveInt", "xhtml", "base64Binary");
}
protected IWorkerContext context;
protected ValidationPolicy policy;
protected List<ValidationMessage> errors;
public ParserBase(IWorkerContext context) {
super();
this.context = context;
policy = ValidationPolicy.NONE;
}
public void setupValidation(ValidationPolicy policy, List<ValidationMessage> errors) {
this.policy = policy;
this.errors = errors;
}
public abstract Element parse(InputStream stream) throws Exception;
public abstract void compose(Element e, OutputStream destination, OutputStyle style, String base) throws Exception;
public void logError(int line, int col, String path, IssueType type, String message, IssueSeverity level) throws FHIRFormatError {
if (policy == ValidationPolicy.EVERYTHING) {
ValidationMessage msg = new ValidationMessage(Source.InstanceValidator, type, line, col, path, message, level);
errors.add(msg);
} else if (level == IssueSeverity.FATAL || (level == IssueSeverity.ERROR && policy == ValidationPolicy.QUICK))
throw new FHIRFormatError(message+String.format(" at line %d col %d", line, col));
}
protected StructureDefinition getDefinition(int line, int col, String ns, String name) throws FHIRFormatError {
if (ns == null) {
logError(line, col, name, IssueType.STRUCTURE, "This cannot be parsed as a FHIR object (no namespace)", IssueSeverity.FATAL);
return null;
}
if (name == null) {
logError(line, col, name, IssueType.STRUCTURE, "This cannot be parsed as a FHIR object (no name)", IssueSeverity.FATAL);
return null;
}
for (StructureDefinition sd : context.allStructures()) {
if (name.equals(sd.getIdElement().getIdPart())) {
if((ns == null || ns.equals(FormatUtilities.FHIR_NS)) && !ToolingExtensions.hasExtension(sd, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
return sd;
String sns = ToolingExtensions.readStringExtension(sd, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
if (ns != null && ns.equals(sns))
return sd;
}
}
logError(line, col, name, IssueType.STRUCTURE, "This does not appear to be a FHIR resource (unknown namespace/name '"+ns+"::"+name+"')", IssueSeverity.FATAL);
return null;
}
protected StructureDefinition getDefinition(int line, int col, String name) throws FHIRFormatError {
if (name == null) {
logError(line, col, name, IssueType.STRUCTURE, "This cannot be parsed as a FHIR object (no name)", IssueSeverity.FATAL);
return null;
}
for (StructureDefinition sd : context.allStructures()) {
if (name.equals(sd.getIdElement().getIdPart())) {
return sd;
}
}
logError(line, col, name, IssueType.STRUCTURE, "This does not appear to be a FHIR resource (unknown name '"+name+"')", IssueSeverity.FATAL);
return null;
}
protected List<Property> getChildProperties(Property property, String elementName, String statedType) throws DefinitionException {
ElementDefinition ed = property.getDefinition();
StructureDefinition sd = property.getStructure();
List<ElementDefinition> children = ProfileUtilities.getChildMap(sd, ed);
if (children.isEmpty()) {
// ok, find the right definitions
String t = null;
if (ed.getType().size() == 1)
t = ed.getType().get(0).getCode();
else if (ed.getType().size() == 0)
throw new Error("types == 0, and no children found");
else {
t = ed.getType().get(0).getCode();
boolean all = true;
for (TypeRefComponent tr : ed.getType()) {
if (!tr.getCode().equals(t)) {
all = false;
break;
}
}
if (!all) {
// ok, it's polymorphic
if (ed.hasRepresentation(PropertyRepresentation.TYPEATTR)) {
t = statedType;
if (t == null && ToolingExtensions.hasExtension(ed, "http://hl7.org/fhir/StructureDefinition/elementdefinition-defaultype"))
t = ToolingExtensions.readStringExtension(ed, "http://hl7.org/fhir/StructureDefinition/elementdefinition-defaultype");
boolean ok = false;
for (TypeRefComponent tr : ed.getType())
if (tr.getCode().equals(t))
ok = true;
if (!ok)
throw new DefinitionException("Type '"+t+"' is not an acceptable type for '"+elementName+"' on property "+property.getDefinition().getPath());
} else {
t = elementName.substring(tail(ed.getPath()).length() - 3);
if (isPrimitive(lowFirst(t)))
t = lowFirst(t);
}
}
}
if (!"xhtml".equals(t)) {
sd = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+t);
if (sd == null)
throw new DefinitionException("Unable to find class '"+t+"' for name '"+elementName+"' on property "+property.getDefinition().getPath());
children = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElement().get(0));
}
}
List<Property> properties = new ArrayList<Property>();
for (ElementDefinition child : children) {
properties.add(new Property(context, child, sd));
}
return properties;
}
private String lowFirst(String t) {
return t.substring(0, 1).toLowerCase()+t.substring(1);
}
private String tail(String path) {
return path.contains(".") ? path.substring(path.lastIndexOf(".")+1) : path;
}
}

View File

@ -0,0 +1,157 @@
package org.hl7.fhir.dstu3.metamodel;
import org.hl7.fhir.dstu3.formats.FormatUtilities;
import org.hl7.fhir.dstu3.model.ElementDefinition;
import org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
public class Property {
private IWorkerContext context;
private ElementDefinition definition;
private StructureDefinition structure;
private Boolean canBePrimitive;
public Property(IWorkerContext context, ElementDefinition definition, StructureDefinition structure) {
this.context = context;
this.definition = definition;
this.structure = structure;
}
public String getName() {
return definition.getPath().substring(definition.getPath().lastIndexOf(".")+1);
}
public ElementDefinition getDefinition() {
return definition;
}
public String getType() {
if (definition.getType().size() == 0)
return null;
else if (definition.getType().size() > 1) {
String tn = definition.getType().get(0).getCode();
for (int i = 1; i < definition.getType().size(); i++) {
if (!tn.equals(definition.getType().get(i).getCode()))
throw new Error("logic error, gettype when types > 1");
}
return tn;
} else
return definition.getType().get(0).getCode();
}
public String getType(String elementName) {
if (definition.getType().size() == 0)
return null;
else if (definition.getType().size() > 1) {
String t = definition.getType().get(0).getCode();
boolean all = true;
for (TypeRefComponent tr : definition.getType()) {
if (!t.equals(tr.getCode()))
all = false;
}
if (all)
return t;
String tail = definition.getPath().substring(definition.getPath().lastIndexOf(".")+1);
if (tail.endsWith("[x]") && elementName != null && elementName.startsWith(tail.substring(0, tail.length()-3))) {
String name = elementName.substring(tail.length()-3);
return ParserBase.isPrimitive(lowFirst(name)) ? lowFirst(name) : name;
} else
throw new Error("logic error, gettype when types > 1, name mismatch for "+elementName+" on at "+definition.getPath());
} else if (definition.getType().get(0).getCode() == null) {
return structure.getId();
} else
return definition.getType().get(0).getCode();
}
public boolean hasType(String elementName) {
if (definition.getType().size() == 0)
return false;
else if (definition.getType().size() > 1) {
String t = definition.getType().get(0).getCode();
boolean all = true;
for (TypeRefComponent tr : definition.getType()) {
if (!t.equals(tr.getCode()))
all = false;
}
if (all)
return true;
String tail = definition.getPath().substring(definition.getPath().lastIndexOf(".")+1);
if (tail.endsWith("[x]") && elementName.startsWith(tail.substring(0, tail.length()-3))) {
String name = elementName.substring(tail.length()-3);
return true;
} else
return false;
} else
return true;
}
public StructureDefinition getStructure() {
return structure;
}
public boolean isPrimitive(String name) {
return ParserBase.isPrimitive(getType(name));
}
private String lowFirst(String t) {
return t.substring(0, 1).toLowerCase()+t.substring(1);
}
public boolean isResource() {
return definition.getType().size() == 1 && ("Resource".equals(definition.getType().get(0).getCode()) || "DomainResource".equals(definition.getType().get(0).getCode()));
}
public boolean isList() {
return !definition.getMax().equals("1");
}
public String getScopedPropertyName() {
return definition.getBase().getPath();
}
public String getNamespace() {
if (ToolingExtensions.hasExtension(definition, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
return ToolingExtensions.readStringExtension(definition, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
if (ToolingExtensions.hasExtension(structure, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
return ToolingExtensions.readStringExtension(structure, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
return FormatUtilities.FHIR_NS;
}
public boolean IsLogicalAndHasPrimitiveValue(String name) {
if (canBePrimitive!= null)
return canBePrimitive;
canBePrimitive = false;
if (structure.getKind() != StructureDefinitionKind.LOGICAL)
return false;
if (!hasType(name))
return false;
StructureDefinition sd = context.fetchResource(StructureDefinition.class, structure.getUrl().substring(0, structure.getUrl().lastIndexOf("/")+1)+getType(name));
if (sd == null || sd.getKind() != StructureDefinitionKind.LOGICAL)
return false;
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (ed.getPath().equals(sd.getId()+".value") && ed.getType().size() == 1 && ParserBase.isPrimitive(ed.getType().get(0).getCode())) {
canBePrimitive = true;
return true;
}
}
return false;
}
public boolean isChoice() {
if (definition.getType().size() <= 1)
return false;
String tn = definition.getType().get(0).getCode();
for (int i = 1; i < definition.getType().size(); i++)
if (!definition.getType().get(i).getCode().equals(tn))
return true;
return false;
}
}

View File

@ -0,0 +1,419 @@
package org.hl7.fhir.dstu3.metamodel;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXSource;
import org.apache.commons.lang3.NotImplementedException;
import org.hl7.fhir.dstu3.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu3.formats.FormatUtilities;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.metamodel.Element.SpecialElement;
import org.hl7.fhir.dstu3.model.DateTimeType;
import org.hl7.fhir.dstu3.model.ElementDefinition;
import org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueType;
import org.hl7.fhir.dstu3.model.Enumeration;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
import org.hl7.fhir.dstu3.utils.XmlLocationAnnotator;
import org.hl7.fhir.dstu3.utils.XmlLocationData;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.XhtmlComposer;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
import org.hl7.fhir.utilities.xhtml.XhtmlParser;
import org.hl7.fhir.utilities.xml.XMLUtil;
import org.hl7.fhir.utilities.xml.XMLWriter;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
public class XmlParser extends ParserBase {
public XmlParser(IWorkerContext context) {
super(context);
}
public Element parse(InputStream stream) throws Exception {
Document doc = null;
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// xxe protection
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
factory.setXIncludeAware(false);
factory.setExpandEntityReferences(false);
factory.setNamespaceAware(true);
if (policy == ValidationPolicy.EVERYTHING) {
// use a slower parser that keeps location data
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer nullTransformer = transformerFactory.newTransformer();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
doc = docBuilder.newDocument();
DOMResult domResult = new DOMResult(doc);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
spf.setValidating(false);
// xxe protection
spf.setFeature("http://xml.org/sax/features/external-general-entities", false);
spf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
SAXParser saxParser = spf.newSAXParser();
XMLReader xmlReader = saxParser.getXMLReader();
// xxe protection
xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
xmlReader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
XmlLocationAnnotator locationAnnotator = new XmlLocationAnnotator(xmlReader, doc);
InputSource inputSource = new InputSource(stream);
SAXSource saxSource = new SAXSource(locationAnnotator, inputSource);
nullTransformer.transform(saxSource, domResult);
} else {
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(stream);
}
} catch (Exception e) {
logError(0, 0, "(syntax)", IssueType.INVALID, e.getMessage(), IssueSeverity.FATAL);
doc = null;
}
if (doc == null)
return null;
else
return parse(doc);
}
private void checkForProcessingInstruction(Document document) throws FHIRFormatError {
if (policy == ValidationPolicy.EVERYTHING) {
Node node = document.getFirstChild();
while (node != null) {
if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE)
logError(line(document), col(document), "(document)", IssueType.INVALID, "No processing instructions allowed in resources", IssueSeverity.ERROR);
node = node.getNextSibling();
}
}
}
private int line(Node node) {
XmlLocationData loc = (XmlLocationData) node.getUserData(XmlLocationData.LOCATION_DATA_KEY);
return loc == null ? 0 : loc.getStartLine();
}
private int col(Node node) {
XmlLocationData loc = (XmlLocationData) node.getUserData(XmlLocationData.LOCATION_DATA_KEY);
return loc == null ? 0 : loc.getStartColumn();
}
public Element parse(Document doc) throws Exception {
checkForProcessingInstruction(doc);
org.w3c.dom.Element element = doc.getDocumentElement();
return parse(element);
}
public Element parse(org.w3c.dom.Element element) throws Exception {
String ns = element.getNamespaceURI();
String name = element.getLocalName();
String path = "/"+pathPrefix(ns)+name;
StructureDefinition sd = getDefinition(line(element), col(element), ns, name);
if (sd == null)
return null;
Element result = new Element(element.getLocalName(), new Property(context, sd.getSnapshot().getElement().get(0), sd));
checkElement(element, path, result.getProperty());
result.markLocation(line(element), col(element));
result.setType(element.getLocalName());
parseChildren(path, element, result);
result.numberChildren();
return result;
}
private String pathPrefix(String ns) {
if (Utilities.noString(ns))
return "";
if (ns.equals(FormatUtilities.FHIR_NS))
return "f:";
if (ns.equals(FormatUtilities.XHTML_NS))
return "h:";
if (ns.equals("urn:hl7-org:v3"))
return "v3:";
return "?:";
}
private boolean empty(org.w3c.dom.Element element) {
for (int i = 0; i < element.getAttributes().getLength(); i++) {
String n = element.getAttributes().item(i).getNodeName();
if (!n.equals("xmlns") && !n.startsWith("xmlns:"))
return false;
}
if (!Utilities.noString(element.getTextContent().trim()))
return false;
Node n = element.getFirstChild();
while (n != null) {
if (n.getNodeType() == Node.ELEMENT_NODE)
return false;
n = n.getNextSibling();
}
return true;
}
private void checkElement(org.w3c.dom.Element element, String path, Property prop) throws FHIRFormatError {
if (policy == ValidationPolicy.EVERYTHING) {
if (empty(element))
logError(line(element), col(element), path, IssueType.INVALID, "Element must have some content", IssueSeverity.ERROR);
String ns = FormatUtilities.FHIR_NS;
if (ToolingExtensions.hasExtension(prop.getDefinition(), "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
ns = ToolingExtensions.readStringExtension(prop.getDefinition(), "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
else if (ToolingExtensions.hasExtension(prop.getStructure(), "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"))
ns = ToolingExtensions.readStringExtension(prop.getStructure(), "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
if (!element.getNamespaceURI().equals(ns))
logError(line(element), col(element), path, IssueType.INVALID, "Wrong namespace - expected '"+ns+"'", IssueSeverity.ERROR);
}
}
public Element parse(org.w3c.dom.Element base, String type) throws Exception {
StructureDefinition sd = getDefinition(0, 0, FormatUtilities.FHIR_NS, type);
Element result = new Element(base.getLocalName(), new Property(context, sd.getSnapshot().getElement().get(0), sd));
String path = "/"+pathPrefix(base.getNamespaceURI())+base.getLocalName();
checkElement(base, path, result.getProperty());
result.setType(base.getLocalName());
parseChildren(path, base, result);
result.numberChildren();
return result;
}
private void parseChildren(String path, org.w3c.dom.Element node, Element context) throws Exception {
// this parsing routine retains the original order in a the XML file, to support validation
reapComments(node, context);
List<Property> properties = getChildProperties(context.getProperty(), context.getName(), XMLUtil.getXsiType(node));
String text = XMLUtil.getDirectText(node).trim();
if (!Utilities.noString(text)) {
Property property = getTextProp(properties);
if (property != null) {
context.getChildren().add(new Element(property.getName(), property, property.getType(), text).markLocation(line(node), col(node)));
} else {
logError(line(node), col(node), path, IssueType.STRUCTURE, "Text should not be present", IssueSeverity.ERROR);
}
}
for (int i = 0; i < node.getAttributes().getLength(); i++) {
Node attr = node.getAttributes().item(i);
if (!(attr.getNodeName().equals("xmlns") || attr.getNodeName().startsWith("xmlns:"))) {
Property property = getAttrProp(properties, attr.getNodeName());
if (property != null) {
String av = attr.getNodeValue();
if (ToolingExtensions.hasExtension(property.getDefinition(), "http://www.healthintersections.com.au/fhir/StructureDefinition/elementdefinition-dateformat"))
av = convertForDateFormat(ToolingExtensions.readStringExtension(property.getDefinition(), "http://www.healthintersections.com.au/fhir/StructureDefinition/elementdefinition-dateformat"), av);
if (property.getName().equals("value") && context.isPrimitive())
context.setValue(av);
else
context.getChildren().add(new Element(property.getName(), property, property.getType(), av).markLocation(line(node), col(node)));
} else {
logError(line(node), col(node), path, IssueType.STRUCTURE, "Undefined attribute '@"+attr.getNodeName()+"'", IssueSeverity.ERROR);
}
}
}
Node child = node.getFirstChild();
while (child != null) {
if (child.getNodeType() == Node.ELEMENT_NODE) {
Property property = getElementProp(properties, child.getLocalName());
if (property != null) {
if (!property.isChoice() && "xhtml".equals(property.getType())) {
XhtmlNode xhtml = new XhtmlParser().setValidatorMode(true).parseHtmlNode((org.w3c.dom.Element) child);
context.getChildren().add(new Element("div", property, "xhtml", new XhtmlComposer().setXmlOnly(true).compose(xhtml)).setXhtml(xhtml).markLocation(line(child), col(child)));
} else {
String npath = path+"/"+pathPrefix(child.getNamespaceURI())+child.getLocalName();
Element n = new Element(child.getLocalName(), property).markLocation(line(child), col(child));
checkElement((org.w3c.dom.Element) child, npath, n.getProperty());
boolean ok = true;
if (property.isChoice()) {
if (property.getDefinition().hasRepresentation(PropertyRepresentation.TYPEATTR)) {
String xsiType = ((org.w3c.dom.Element) child).getAttributeNS(FormatUtilities.NS_XSI, "type");
if (xsiType == null) {
logError(line(child), col(child), path, IssueType.STRUCTURE, "No type found on '"+child.getLocalName()+'"', IssueSeverity.ERROR);
ok = false;
} else {
if (xsiType.contains(":"))
xsiType = xsiType.substring(xsiType.indexOf(":")+1);
n.setType(xsiType);
}
} else
n.setType(n.getType());
}
context.getChildren().add(n);
if (ok) {
if (property.isResource())
parseResource(npath, (org.w3c.dom.Element) child, n);
else
parseChildren(npath, (org.w3c.dom.Element) child, n);
}
}
} else
logError(line(child), col(child), path, IssueType.STRUCTURE, "Undefined element '"+child.getLocalName()+'"', IssueSeverity.ERROR);
} else if (child.getNodeType() == Node.CDATA_SECTION_NODE){
logError(line(child), col(child), path, IssueType.STRUCTURE, "CDATA is not allowed", IssueSeverity.ERROR);
} else if (!Utilities.existsInList(child.getNodeType(), 3, 8)) {
logError(line(child), col(child), path, IssueType.STRUCTURE, "Node type "+Integer.toString(child.getNodeType())+" is not allowed", IssueSeverity.ERROR);
}
child = child.getNextSibling();
}
}
private Property getElementProp(List<Property> properties, String nodeName) {
for (Property p : properties)
if (!p.getDefinition().hasRepresentation(PropertyRepresentation.XMLATTR) && !p.getDefinition().hasRepresentation(PropertyRepresentation.XMLTEXT)) {
if (p.getName().equals(nodeName))
return p;
if (p.getName().endsWith("[x]") && nodeName.length() > p.getName().length()-3 && p.getName().substring(0, p.getName().length()-3).equals(nodeName.substring(0, p.getName().length()-3)))
return p;
}
return null;
}
private Property getAttrProp(List<Property> properties, String nodeName) {
for (Property p : properties)
if (p.getName().equals(nodeName) && p.getDefinition().hasRepresentation(PropertyRepresentation.XMLATTR))
return p;
return null;
}
private Property getTextProp(List<Property> properties) {
for (Property p : properties)
if (p.getDefinition().hasRepresentation(PropertyRepresentation.XMLTEXT))
return p;
return null;
}
private String convertForDateFormat(String fmt, String av) throws FHIRException {
if ("v3".equals(fmt)) {
DateTimeType d = DateTimeType.parseV3(av);
return d.asStringValue();
} else
throw new FHIRException("Unknown Data format '"+fmt+"'");
}
private void parseResource(String string, org.w3c.dom.Element container, Element parent) throws Exception {
org.w3c.dom.Element res = XMLUtil.getFirstChild(container);
String name = res.getLocalName();
StructureDefinition sd = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+name);
if (sd == null)
throw new FHIRFormatError("Contained resource does not appear to be a FHIR resource (unknown name '"+res.getLocalName()+"')");
parent.updateProperty(new Property(context, sd.getSnapshot().getElement().get(0), sd), parent.getProperty().getName().equals("contained") ? SpecialElement.CONTAINED : SpecialElement.BUNDLE_ENTRY);
parent.setType(name);
parseChildren(res.getLocalName(), res, parent);
}
private void reapComments(org.w3c.dom.Element element, Element context) {
Node node = element.getPreviousSibling();
while (node != null && node.getNodeType() != Node.ELEMENT_NODE) {
if (node.getNodeType() == Node.COMMENT_NODE)
context.getComments().add(0, node.getTextContent());
node = node.getPreviousSibling();
}
node = element.getLastChild();
while (node != null && node.getNodeType() != Node.ELEMENT_NODE) {
node = node.getPreviousSibling();
}
while (node != null) {
if (node.getNodeType() == Node.COMMENT_NODE)
context.getComments().add(node.getTextContent());
node = node.getNextSibling();
}
}
private boolean isAttr(Property property) {
for (Enumeration<PropertyRepresentation> r : property.getDefinition().getRepresentation()) {
if (r.getValue() == PropertyRepresentation.XMLATTR) {
return true;
}
}
return false;
}
private boolean isText(Property property) {
for (Enumeration<PropertyRepresentation> r : property.getDefinition().getRepresentation()) {
if (r.getValue() == PropertyRepresentation.XMLTEXT) {
return true;
}
}
return false;
}
@Override
public void compose(Element e, OutputStream stream, OutputStyle style, String base) throws Exception {
XMLWriter xml = new XMLWriter(stream, "UTF-8");
xml.setPretty(style == OutputStyle.PRETTY);
xml.start();
xml.setDefaultNamespace(e.getProperty().getNamespace());
composeElement(xml, e, e.getType());
xml.end();
}
private void composeElement(XMLWriter xml, Element element, String elementName) throws IOException {
for (String s : element.getComments()) {
xml.comment(s, true);
}
if (isText(element.getProperty())) {
xml.enter(elementName);
xml.text(element.getValue());
xml.exit(elementName);
} else if (element.isPrimitive() || (element.hasType() && ParserBase.isPrimitive(element.getType()))) {
if (element.getType().equals("xhtml")) {
xml.escapedText(element.getValue());
} else if (isText(element.getProperty())) {
xml.text(element.getValue());
} else {
if (element.hasValue())
xml.attribute("value", element.getValue());
if (element.hasChildren()) {
xml.enter(elementName);
for (Element child : element.getChildren())
composeElement(xml, child, child.getName());
xml.exit(elementName);
} else
xml.element(elementName);
}
} else {
for (Element child : element.getChildren()) {
if (isAttr(child.getProperty()))
xml.attribute(child.getName(), child.getValue());
}
xml.enter(elementName);
if (element.getSpecial() != null)
xml.enter(element.getType());
for (Element child : element.getChildren()) {
if (isText(child.getProperty()))
xml.text(child.getValue());
else if (!isAttr(child.getProperty()))
composeElement(xml, child, child.getName());
}
if (element.getSpecial() != null)
xml.exit(element.getType());
xml.exit(elementName);
}
}
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -862,11 +862,8 @@ public class Account extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty())
&& (type == null || type.isEmpty()) && (status == null || status.isEmpty()) && (activePeriod == null || activePeriod.isEmpty())
&& (currency == null || currency.isEmpty()) && (balance == null || balance.isEmpty()) && (coveragePeriod == null || coveragePeriod.isEmpty())
&& (subject == null || subject.isEmpty()) && (owner == null || owner.isEmpty()) && (description == null || description.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, name, type, status
, activePeriod, currency, balance, coveragePeriod, subject, owner, description);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -775,8 +775,8 @@ public class ActionDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (offset == null || offset.isEmpty()) && (anchor == null || anchor.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, relationship
, offset, anchor);
}
public String fhirType() {
@ -961,8 +961,7 @@ public class ActionDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
}
public String fhirType() {
@ -1187,8 +1186,7 @@ public class ActionDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, expression);
}
public String fhirType() {
@ -2364,13 +2362,9 @@ public class ActionDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (label == null || label.isEmpty())
&& (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty())
&& (concept == null || concept.isEmpty()) && (supportingEvidence == null || supportingEvidence.isEmpty())
&& (documentation == null || documentation.isEmpty()) && (relatedAction == null || relatedAction.isEmpty())
&& (participantType == null || participantType.isEmpty()) && (type == null || type.isEmpty())
&& (behavior == null || behavior.isEmpty()) && (resource == null || resource.isEmpty()) && (customization == null || customization.isEmpty())
&& (action == null || action.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, label, title
, description, textEquivalent, concept, supportingEvidence, documentation, relatedAction, participantType
, type, behavior, resource, customization, action);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1042,10 +1042,8 @@ public class Address extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty())
&& (text == null || text.isEmpty()) && (line == null || line.isEmpty()) && (city == null || city.isEmpty())
&& (district == null || district.isEmpty()) && (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty())
&& (country == null || country.isEmpty()) && (period == null || period.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, type, text, line, city, district
, state, postalCode, country, period);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
@ -81,9 +81,8 @@ public class Age extends Quantity {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, comparator, unit, system
, code);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1332,10 +1332,8 @@ public class AllergyIntolerance extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (substance == null || substance.isEmpty()) && (certainty == null || certainty.isEmpty())
&& (manifestation == null || manifestation.isEmpty()) && (description == null || description.isEmpty())
&& (onset == null || onset.isEmpty()) && (severity == null || severity.isEmpty()) && (exposureRoute == null || exposureRoute.isEmpty())
&& (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, certainty, manifestation
, description, onset, severity, exposureRoute, note);
}
public String fhirType() {
@ -2405,12 +2403,9 @@ public class AllergyIntolerance extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (type == null || type.isEmpty()) && (category == null || category.isEmpty()) && (criticality == null || criticality.isEmpty())
&& (substance == null || substance.isEmpty()) && (patient == null || patient.isEmpty()) && (recordedDate == null || recordedDate.isEmpty())
&& (recorder == null || recorder.isEmpty()) && (reporter == null || reporter.isEmpty()) && (onset == null || onset.isEmpty())
&& (lastOccurence == null || lastOccurence.isEmpty()) && (note == null || note.isEmpty())
&& (reaction == null || reaction.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type, category
, criticality, substance, patient, recordedDate, recorder, reporter, onset, lastOccurence, note
, reaction);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -341,8 +341,7 @@ public class Annotation extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (author == null || author.isEmpty()) && (time == null || time.isEmpty())
&& (text == null || text.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(author, time, text);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -800,8 +800,7 @@ public class Appointment extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (actor == null || actor.isEmpty())
&& (required == null || required.isEmpty()) && (status == null || status.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, actor, required, status);
}
public String fhirType() {
@ -2006,13 +2005,9 @@ public class Appointment extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (serviceCategory == null || serviceCategory.isEmpty()) && (serviceType == null || serviceType.isEmpty())
&& (specialty == null || specialty.isEmpty()) && (appointmentType == null || appointmentType.isEmpty())
&& (reason == null || reason.isEmpty()) && (priority == null || priority.isEmpty()) && (description == null || description.isEmpty())
&& (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (minutesDuration == null || minutesDuration.isEmpty())
&& (slot == null || slot.isEmpty()) && (created == null || created.isEmpty()) && (comment == null || comment.isEmpty())
&& (participant == null || participant.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, serviceCategory
, serviceType, specialty, appointmentType, reason, priority, description, start, end, minutesDuration
, slot, created, comment, participant);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -708,10 +708,8 @@ public class AppointmentResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (appointment == null || appointment.isEmpty())
&& (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (participantType == null || participantType.isEmpty())
&& (actor == null || actor.isEmpty()) && (participantStatus == null || participantStatus.isEmpty())
&& (comment == null || comment.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, appointment, start
, end, participantType, actor, participantStatus, comment);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -678,10 +678,8 @@ public class Attachment extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (language == null || language.isEmpty())
&& (data == null || data.isEmpty()) && (url == null || url.isEmpty()) && (size == null || size.isEmpty())
&& (hash == null || hash.isEmpty()) && (title == null || title.isEmpty()) && (creation == null || creation.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, language, data, url
, size, hash, title, creation);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1249,11 +1249,8 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (role == null || role.isEmpty()) && (reference == null || reference.isEmpty())
&& (userId == null || userId.isEmpty()) && (altId == null || altId.isEmpty()) && (name == null || name.isEmpty())
&& (requestor == null || requestor.isEmpty()) && (location == null || location.isEmpty())
&& (policy == null || policy.isEmpty()) && (media == null || media.isEmpty()) && (network == null || network.isEmpty())
&& (purposeOfUse == null || purposeOfUse.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, reference, userId, altId
, name, requestor, location, policy, media, network, purposeOfUse);
}
public String fhirType() {
@ -1477,8 +1474,7 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (address == null || address.isEmpty()) && (type == null || type.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(address, type);
}
public String fhirType() {
@ -1768,8 +1764,7 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (site == null || site.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (type == null || type.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, identifier, type);
}
public String fhirType() {
@ -2467,11 +2462,8 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty())
&& (type == null || type.isEmpty()) && (role == null || role.isEmpty()) && (lifecycle == null || lifecycle.isEmpty())
&& (securityLabel == null || securityLabel.isEmpty()) && (name == null || name.isEmpty())
&& (description == null || description.isEmpty()) && (query == null || query.isEmpty()) && (detail == null || detail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, reference, type, role
, lifecycle, securityLabel, name, description, query, detail);
}
public String fhirType() {
@ -2696,8 +2688,7 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
}
public String fhirType() {
@ -3486,11 +3477,8 @@ public class AuditEvent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty())
&& (action == null || action.isEmpty()) && (recorded == null || recorded.isEmpty()) && (outcome == null || outcome.isEmpty())
&& (outcomeDesc == null || outcomeDesc.isEmpty()) && (purposeOfEvent == null || purposeOfEvent.isEmpty())
&& (agent == null || agent.isEmpty()) && (source == null || source.isEmpty()) && (entity == null || entity.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subtype, action, recorded
, outcome, outcomeDesc, purposeOfEvent, agent, source, entity);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -205,7 +205,7 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
}
public boolean isEmpty() {
return super.isEmpty() && (modifierExtension == null || modifierExtension.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifierExtension);
}

View File

@ -170,11 +170,11 @@ private Map<String, Object> userData;
}
public boolean equalsDeep(Base other) {
return other == this;
return other != null;
}
public boolean equalsShallow(Base other) {
return other == this;
return other != null;
}
public static boolean compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull) {
@ -196,8 +196,13 @@ private Map<String, Object> userData;
}
public static boolean compareDeep(Base e1, Base e2, boolean allowNull) {
if (e1 == null && e2 == null && allowNull)
return true;
if (allowNull) {
boolean noLeft = e1 == null || e1.isEmpty();
boolean noRight = e2 == null || e2.isEmpty();
if (noLeft && noRight) {
return true;
}
}
if (e1 == null || e2 == null)
return false;
if (e2.isMetadataBased() && !e1.isMetadataBased()) // respect existing order for debugging consistency; outcome must be the same either way
@ -230,9 +235,12 @@ private Map<String, Object> userData;
}
public static boolean compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull) {
if (e1 == null && e2 == null && allowNull)
return true;
if (e1 == null || e2 == null)
boolean noLeft = e1 == null || e1.isEmpty();
boolean noRight = e2 == null || e2.isEmpty();
if (noLeft && noRight && allowNull) {
return true;
}
if (noLeft != noRight)
return false;
return e1.equalsShallow(e2);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -461,9 +461,8 @@ public class Basic extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty())
&& (subject == null || subject.isEmpty()) && (created == null || created.isEmpty()) && (author == null || author.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, code, subject, created
, author);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -270,8 +270,7 @@ public class Binary extends BaseBinary implements IBaseBinary {
}
public boolean isEmpty() {
return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (content == null || content.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, content);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -566,9 +566,8 @@ public class BodySite extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (patient == null || patient.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (code == null || code.isEmpty()) && (modifier == null || modifier.isEmpty()) && (description == null || description.isEmpty())
&& (image == null || image.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, identifier, code, modifier
, description, image);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -684,8 +684,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (relation == null || relation.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relation, url);
}
public String fhirType() {
@ -1151,9 +1150,8 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (link == null || link.isEmpty()) && (fullUrl == null || fullUrl.isEmpty())
&& (resource == null || resource.isEmpty()) && (search == null || search.isEmpty()) && (request == null || request.isEmpty())
&& (response == null || response.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, fullUrl, resource, search
, request, response);
}
public String fhirType() {
@ -1395,8 +1393,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (mode == null || mode.isEmpty()) && (score == null || score.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, score);
}
public String fhirType() {
@ -1897,10 +1894,8 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (method == null || method.isEmpty()) && (url == null || url.isEmpty())
&& (ifNoneMatch == null || ifNoneMatch.isEmpty()) && (ifModifiedSince == null || ifModifiedSince.isEmpty())
&& (ifMatch == null || ifMatch.isEmpty()) && (ifNoneExist == null || ifNoneExist.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(method, url, ifNoneMatch, ifModifiedSince
, ifMatch, ifNoneExist);
}
public String fhirType() {
@ -2266,8 +2261,8 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty())
&& (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, location, etag, lastModified
);
}
public String fhirType() {
@ -2752,9 +2747,8 @@ public class Bundle extends Resource implements IBaseBundle {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (total == null || total.isEmpty())
&& (link == null || link.isEmpty()) && (entry == null || entry.isEmpty()) && (signature == null || signature.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, total, link, entry, signature
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -659,8 +659,7 @@ public class CarePlan extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (plan == null || plan.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, plan);
}
public String fhirType() {
@ -856,8 +855,7 @@ public class CarePlan extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member);
}
public String fhirType() {
@ -1230,8 +1228,8 @@ public class CarePlan extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (actionResulting == null || actionResulting.isEmpty()) && (progress == null || progress.isEmpty())
&& (reference == null || reference.isEmpty()) && (detail == null || detail.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionResulting, progress, reference
, detail);
}
public String fhirType() {
@ -2367,14 +2365,9 @@ public class CarePlan extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (code == null || code.isEmpty())
&& (reasonCode == null || reasonCode.isEmpty()) && (reasonReference == null || reasonReference.isEmpty())
&& (goal == null || goal.isEmpty()) && (status == null || status.isEmpty()) && (statusReason == null || statusReason.isEmpty())
&& (prohibited == null || prohibited.isEmpty()) && (scheduled == null || scheduled.isEmpty())
&& (location == null || location.isEmpty()) && (performer == null || performer.isEmpty())
&& (product == null || product.isEmpty()) && (dailyAmount == null || dailyAmount.isEmpty())
&& (quantity == null || quantity.isEmpty()) && (description == null || description.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, code, reasonCode, reasonReference
, goal, status, statusReason, prohibited, scheduled, location, performer, product, dailyAmount
, quantity, description);
}
public String fhirType() {
@ -3708,13 +3701,9 @@ public class CarePlan extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty())
&& (status == null || status.isEmpty()) && (context == null || context.isEmpty()) && (period == null || period.isEmpty())
&& (author == null || author.isEmpty()) && (modified == null || modified.isEmpty()) && (category == null || category.isEmpty())
&& (description == null || description.isEmpty()) && (addresses == null || addresses.isEmpty())
&& (support == null || support.isEmpty()) && (relatedPlan == null || relatedPlan.isEmpty())
&& (participant == null || participant.isEmpty()) && (goal == null || goal.isEmpty()) && (activity == null || activity.isEmpty())
&& (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subject, status, context
, period, author, modified, category, description, addresses, support, relatedPlan, participant
, goal, activity, note);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -278,8 +278,7 @@ public class CareTeam extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty())
&& (period == null || period.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member, period);
}
public String fhirType() {
@ -909,10 +908,8 @@ public class CareTeam extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (type == null || type.isEmpty()) && (name == null || name.isEmpty()) && (subject == null || subject.isEmpty())
&& (period == null || period.isEmpty()) && (participant == null || participant.isEmpty())
&& (managingOrganization == null || managingOrganization.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type, name
, subject, period, participant, managingOrganization);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -539,8 +539,8 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (claim == null || claim.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (reference == null || reference.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(claim, relationship, reference
);
}
public String fhirType() {
@ -749,8 +749,7 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party);
}
public String fhirType() {
@ -955,8 +954,7 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, diagnosis);
}
public String fhirType() {
@ -1255,8 +1253,7 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (date == null || date.isEmpty())
&& (procedure == null || procedure.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, date, procedure);
}
public String fhirType() {
@ -1831,10 +1828,8 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty())
&& (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty())
&& (preAuthRef == null || preAuthRef.isEmpty()) && (claimResponse == null || claimResponse.isEmpty())
&& (originalRuleset == null || originalRuleset.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, coverage, businessArrangement
, preAuthRef, claimResponse, originalRuleset);
}
public String fhirType() {
@ -2035,8 +2030,7 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (time == null || time.isEmpty()) && (type == null || type.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(time, type);
}
public String fhirType() {
@ -3589,16 +3583,10 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (provider == null || provider.isEmpty()) && (supervisor == null || supervisor.isEmpty())
&& (providerQualification == null || providerQualification.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty())
&& (service == null || service.isEmpty()) && (serviceModifier == null || serviceModifier.isEmpty())
&& (modifier == null || modifier.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (serviced == null || serviced.isEmpty()) && (place == null || place.isEmpty()) && (quantity == null || quantity.isEmpty())
&& (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty())
&& (net == null || net.isEmpty()) && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty())
&& (subSite == null || subSite.isEmpty()) && (detail == null || detail.isEmpty()) && (prosthesis == null || prosthesis.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, provider, supervisor
, providerQualification, diagnosisLinkId, service, serviceModifier, modifier, programCode, serviced
, place, quantity, unitPrice, factor, points, net, udi, bodySite, subSite, detail, prosthesis
);
}
public String fhirType() {
@ -4425,11 +4413,8 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty())
&& (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty())
&& (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, service, programCode
, quantity, unitPrice, factor, points, net, udi, subDetail);
}
public String fhirType() {
@ -5175,11 +5160,8 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty())
&& (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty())
&& (udi == null || udi.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, service, programCode
, quantity, unitPrice, factor, points, net, udi);
}
public String fhirType() {
@ -5444,8 +5426,8 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty())
&& (priorMaterial == null || priorMaterial.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(initial, priorDate, priorMaterial
);
}
public String fhirType() {
@ -5698,8 +5680,7 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty())
&& (extractionDate == null || extractionDate.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(tooth, reason, extractionDate);
}
public String fhirType() {
@ -8432,24 +8413,12 @@ public class Claim extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty())
&& (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty())
&& (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty())
&& (billablePeriod == null || billablePeriod.isEmpty()) && (target == null || target.isEmpty())
&& (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty())
&& (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty())
&& (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (related == null || related.isEmpty())
&& (prescription == null || prescription.isEmpty()) && (originalPrescription == null || originalPrescription.isEmpty())
&& (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (occurrenceCode == null || occurrenceCode.isEmpty())
&& (occurenceSpanCode == null || occurenceSpanCode.isEmpty()) && (valueCode == null || valueCode.isEmpty())
&& (diagnosis == null || diagnosis.isEmpty()) && (procedure == null || procedure.isEmpty())
&& (specialCondition == null || specialCondition.isEmpty()) && (patient == null || patient.isEmpty())
&& (coverage == null || coverage.isEmpty()) && (accidentDate == null || accidentDate.isEmpty())
&& (accidentType == null || accidentType.isEmpty()) && (accidentLocation == null || accidentLocation.isEmpty())
&& (interventionException == null || interventionException.isEmpty()) && (onset == null || onset.isEmpty())
&& (employmentImpacted == null || employmentImpacted.isEmpty()) && (hospitalization == null || hospitalization.isEmpty())
&& (item == null || item.isEmpty()) && (total == null || total.isEmpty()) && (additionalMaterial == null || additionalMaterial.isEmpty())
&& (missingTeeth == null || missingTeeth.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subType, identifier, ruleset
, originalRuleset, created, billablePeriod, target, provider, organization, use, priority, fundsReserve
, enterer, facility, related, prescription, originalPrescription, payee, referral, occurrenceCode
, occurenceSpanCode, valueCode, diagnosis, procedure, specialCondition, patient, coverage, accidentDate
, accidentType, accidentLocation, interventionException, onset, employmentImpacted, hospitalization
, item, total, additionalMaterial, missingTeeth);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -458,9 +458,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (noteNumber == null || noteNumber.isEmpty())
&& (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, noteNumber, adjudication
, detail);
}
public String fhirType() {
@ -775,8 +774,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -1099,8 +1098,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty())
&& (subDetail == null || subDetail.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, adjudication, subDetail
);
}
public String fhirType() {
@ -1415,8 +1414,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -1658,8 +1657,7 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, adjudication);
}
public String fhirType() {
@ -1974,8 +1972,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -2514,10 +2512,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (service == null || service.isEmpty())
&& (fee == null || fee.isEmpty()) && (noteNumberLinkId == null || noteNumberLinkId.isEmpty())
&& (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, service, fee, noteNumberLinkId
, adjudication, detail);
}
public String fhirType() {
@ -2832,8 +2828,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -3099,8 +3095,7 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (service == null || service.isEmpty()) && (fee == null || fee.isEmpty())
&& (adjudication == null || adjudication.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(service, fee, adjudication);
}
public String fhirType() {
@ -3415,8 +3410,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -3751,9 +3746,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (detailSequenceLinkId == null || detailSequenceLinkId.isEmpty())
&& (subdetailSequenceLinkId == null || subdetailSequenceLinkId.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, detailSequenceLinkId
, subdetailSequenceLinkId, code);
}
public String fhirType() {
@ -4018,8 +4012,7 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (number == null || number.isEmpty()) && (type == null || type.isEmpty())
&& (text == null || text.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, text);
}
public String fhirType() {
@ -4549,10 +4542,8 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty())
&& (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty())
&& (preAuthRef == null || preAuthRef.isEmpty()) && (claimResponse == null || claimResponse.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, coverage, businessArrangement
, preAuthRef, claimResponse);
}
public String fhirType() {
@ -6220,18 +6211,10 @@ public class ClaimResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty())
&& (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
&& (created == null || created.isEmpty()) && (organization == null || organization.isEmpty())
&& (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty())
&& (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty())
&& (payeeType == null || payeeType.isEmpty()) && (item == null || item.isEmpty()) && (addItem == null || addItem.isEmpty())
&& (error == null || error.isEmpty()) && (totalCost == null || totalCost.isEmpty()) && (unallocDeductable == null || unallocDeductable.isEmpty())
&& (totalBenefit == null || totalBenefit.isEmpty()) && (paymentAdjustment == null || paymentAdjustment.isEmpty())
&& (paymentAdjustmentReason == null || paymentAdjustmentReason.isEmpty()) && (paymentDate == null || paymentDate.isEmpty())
&& (paymentAmount == null || paymentAmount.isEmpty()) && (paymentRef == null || paymentRef.isEmpty())
&& (reserved == null || reserved.isEmpty()) && (form == null || form.isEmpty()) && (note == null || note.isEmpty())
&& (coverage == null || coverage.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, request, ruleset, originalRuleset
, created, organization, requestProvider, requestOrganization, outcome, disposition, payeeType
, item, addItem, error, totalCost, unallocDeductable, totalBenefit, paymentAdjustment, paymentAdjustmentReason
, paymentDate, paymentAmount, paymentRef, reserved, form, note, coverage);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -375,8 +375,7 @@ public class ClinicalImpression extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (item == null || item.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, item);
}
public String fhirType() {
@ -584,8 +583,7 @@ public class ClinicalImpression extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (item == null || item.isEmpty()) && (cause == null || cause.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, cause);
}
public String fhirType() {
@ -793,8 +791,7 @@ public class ClinicalImpression extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (item == null || item.isEmpty()) && (reason == null || reason.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, reason);
}
public String fhirType() {
@ -2194,13 +2191,9 @@ public class ClinicalImpression extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (patient == null || patient.isEmpty()) && (assessor == null || assessor.isEmpty())
&& (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
&& (previous == null || previous.isEmpty()) && (problem == null || problem.isEmpty()) && (trigger == null || trigger.isEmpty())
&& (investigations == null || investigations.isEmpty()) && (protocol == null || protocol.isEmpty())
&& (summary == null || summary.isEmpty()) && (finding == null || finding.isEmpty()) && (resolved == null || resolved.isEmpty())
&& (ruledOut == null || ruledOut.isEmpty()) && (prognosis == null || prognosis.isEmpty())
&& (plan == null || plan.isEmpty()) && (action == null || action.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, assessor, status, date
, description, previous, problem, trigger, investigations, protocol, summary, finding, resolved
, ruledOut, prognosis, plan, action);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -545,8 +545,7 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -936,8 +935,8 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (description == null || description.isEmpty())
&& (operator == null || operator.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, operator, value
);
}
public String fhirType() {
@ -1232,8 +1231,7 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (description == null || description.isEmpty())
&& (type == null || type.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, type);
}
public String fhirType() {
@ -1775,9 +1773,8 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (display == null || display.isEmpty())
&& (definition == null || definition.isEmpty()) && (designation == null || designation.isEmpty())
&& (property == null || property.isEmpty()) && (concept == null || concept.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, definition, designation
, property, concept);
}
public String fhirType() {
@ -2050,8 +2047,7 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty())
&& (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use, value);
}
public String fhirType() {
@ -2349,8 +2345,7 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value);
}
public String fhirType() {
@ -3977,16 +3972,10 @@ public class CodeSystem extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
&& (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (caseSensitive == null || caseSensitive.isEmpty())
&& (valueSet == null || valueSet.isEmpty()) && (compositional == null || compositional.isEmpty())
&& (versionNeeded == null || versionNeeded.isEmpty()) && (content == null || content.isEmpty())
&& (count == null || count.isEmpty()) && (filter == null || filter.isEmpty()) && (property == null || property.isEmpty())
&& (concept == null || concept.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, name
, status, experimental, publisher, contact, date, description, useContext, requirements, copyright
, caseSensitive, valueSet, compositional, versionNeeded, content, count, filter, property, concept
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -280,8 +280,7 @@ public class CodeableConcept extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (coding == null || coding.isEmpty()) && (text == null || text.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coding, text);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -481,9 +481,8 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
&& (code == null || code.isEmpty()) && (display == null || display.isEmpty()) && (userSelected == null || userSelected.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, display
, userSelected);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -354,7 +354,7 @@ public class Communication extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
}
public String fhirType() {
@ -1392,12 +1392,8 @@ public class Communication extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
&& (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty())
&& (medium == null || medium.isEmpty()) && (status == null || status.isEmpty()) && (encounter == null || encounter.isEmpty())
&& (sent == null || sent.isEmpty()) && (received == null || received.isEmpty()) && (reason == null || reason.isEmpty())
&& (subject == null || subject.isEmpty()) && (requestDetail == null || requestDetail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, category, sender, recipient
, payload, medium, status, encounter, sent, received, reason, subject, requestDetail);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -434,7 +434,7 @@ public class CommunicationRequest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
}
public String fhirType() {
@ -1511,12 +1511,9 @@ public class CommunicationRequest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
&& (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty())
&& (medium == null || medium.isEmpty()) && (requester == null || requester.isEmpty()) && (status == null || status.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (scheduled == null || scheduled.isEmpty())
&& (reason == null || reason.isEmpty()) && (requestedOn == null || requestedOn.isEmpty())
&& (subject == null || subject.isEmpty()) && (priority == null || priority.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, category, sender, recipient
, payload, medium, requester, status, encounter, scheduled, reason, requestedOn, subject, priority
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -410,8 +410,7 @@ public class CompartmentDefinition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -736,8 +735,7 @@ public class CompartmentDefinition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (param == null || param.isEmpty())
&& (documentation == null || documentation.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, param, documentation);
}
public String fhirType() {
@ -1672,12 +1670,8 @@ public class CompartmentDefinition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (name == null || name.isEmpty())
&& (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
&& (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty())
&& (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (code == null || code.isEmpty()) && (search == null || search.isEmpty()) && (resource == null || resource.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, name, status, experimental
, publisher, contact, date, description, requirements, code, search, resource);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -591,8 +591,7 @@ public class Composition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (mode == null || mode.isEmpty()) && (time == null || time.isEmpty())
&& (party == null || party.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, time, party);
}
public String fhirType() {
@ -901,8 +900,7 @@ public class Composition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (period == null || period.isEmpty())
&& (detail == null || detail.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, period, detail);
}
public String fhirType() {
@ -1480,10 +1478,8 @@ public class Composition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (title == null || title.isEmpty()) && (code == null || code.isEmpty())
&& (text == null || text.isEmpty()) && (mode == null || mode.isEmpty()) && (orderedBy == null || orderedBy.isEmpty())
&& (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()) && (section == null || section.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, code, text, mode, orderedBy
, entry, emptyReason, section);
}
public String fhirType() {
@ -2528,12 +2524,9 @@ public class Composition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty())
&& (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty()) && (title == null || title.isEmpty())
&& (status == null || status.isEmpty()) && (confidentiality == null || confidentiality.isEmpty())
&& (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (attester == null || attester.isEmpty())
&& (custodian == null || custodian.isEmpty()) && (event == null || event.isEmpty()) && (encounter == null || encounter.isEmpty())
&& (section == null || section.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, date, type, class_
, title, status, confidentiality, subject, author, attester, custodian, event, encounter, section
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -275,8 +275,7 @@ public class ConceptMap extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -651,8 +650,7 @@ public class ConceptMap extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
&& (code == null || code.isEmpty()) && (target == null || target.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, target);
}
public String fhirType() {
@ -1249,9 +1247,8 @@ public class ConceptMap extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
&& (code == null || code.isEmpty()) && (equivalence == null || equivalence.isEmpty()) && (comments == null || comments.isEmpty())
&& (dependsOn == null || dependsOn.isEmpty()) && (product == null || product.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, equivalence
, comments, dependsOn, product);
}
public String fhirType() {
@ -1543,8 +1540,7 @@ public class ConceptMap extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (element == null || element.isEmpty()) && (system == null || system.isEmpty())
&& (code == null || code.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(element, system, code);
}
public String fhirType() {
@ -2755,13 +2751,9 @@ public class ConceptMap extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
&& (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty())
&& (element == null || element.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, name
, status, experimental, publisher, contact, date, description, useContext, requirements, copyright
, source, target, element);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -415,8 +415,7 @@ public class Condition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (summary == null || summary.isEmpty()) && (assessment == null || assessment.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(summary, assessment);
}
public String fhirType() {
@ -643,8 +642,7 @@ public class Condition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (detail == null || detail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, detail);
}
public String fhirType() {
@ -1915,13 +1913,9 @@ public class Condition extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (asserter == null || asserter.isEmpty())
&& (dateRecorded == null || dateRecorded.isEmpty()) && (code == null || code.isEmpty()) && (category == null || category.isEmpty())
&& (clinicalStatus == null || clinicalStatus.isEmpty()) && (verificationStatus == null || verificationStatus.isEmpty())
&& (severity == null || severity.isEmpty()) && (onset == null || onset.isEmpty()) && (abatement == null || abatement.isEmpty())
&& (stage == null || stage.isEmpty()) && (evidence == null || evidence.isEmpty()) && (bodySite == null || bodySite.isEmpty())
&& (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, patient, encounter
, asserter, dateRecorded, code, category, clinicalStatus, verificationStatus, severity, onset
, abatement, stage, evidence, bodySite, note);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1687,8 +1687,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -1986,8 +1985,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (version == null || version.isEmpty())
&& (releaseDate == null || releaseDate.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, version, releaseDate);
}
public String fhirType() {
@ -2215,8 +2213,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (description == null || description.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, url);
}
public String fhirType() {
@ -2979,11 +2976,8 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty())
&& (security == null || security.isEmpty()) && (resource == null || resource.isEmpty()) && (interaction == null || interaction.isEmpty())
&& (transactionMode == null || transactionMode.isEmpty()) && (searchParam == null || searchParam.isEmpty())
&& (operation == null || operation.isEmpty()) && (compartment == null || compartment.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, documentation, security, resource
, interaction, transactionMode, searchParam, operation, compartment);
}
public String fhirType() {
@ -3366,9 +3360,8 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (cors == null || cors.isEmpty()) && (service == null || service.isEmpty())
&& (description == null || description.isEmpty()) && (certificate == null || certificate.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(cors, service, description, certificate
);
}
public String fhirType() {
@ -3592,8 +3585,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (blob == null || blob.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, blob);
}
public String fhirType() {
@ -4575,13 +4567,9 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty())
&& (interaction == null || interaction.isEmpty()) && (versioning == null || versioning.isEmpty())
&& (readHistory == null || readHistory.isEmpty()) && (updateCreate == null || updateCreate.isEmpty())
&& (conditionalCreate == null || conditionalCreate.isEmpty()) && (conditionalUpdate == null || conditionalUpdate.isEmpty())
&& (conditionalDelete == null || conditionalDelete.isEmpty()) && (searchInclude == null || searchInclude.isEmpty())
&& (searchRevInclude == null || searchRevInclude.isEmpty()) && (searchParam == null || searchParam.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, interaction, versioning
, readHistory, updateCreate, conditionalCreate, conditionalUpdate, conditionalDelete, searchInclude
, searchRevInclude, searchParam);
}
public String fhirType() {
@ -4809,8 +4797,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation);
}
public String fhirType() {
@ -5460,10 +5447,8 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty())
&& (type == null || type.isEmpty()) && (documentation == null || documentation.isEmpty())
&& (target == null || target.isEmpty()) && (modifier == null || modifier.isEmpty()) && (chain == null || chain.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition, type, documentation
, target, modifier, chain);
}
public String fhirType() {
@ -5691,8 +5676,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation);
}
public String fhirType() {
@ -5922,8 +5906,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition);
}
public String fhirType() {
@ -6307,9 +6290,8 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (endpoint == null || endpoint.isEmpty()) && (reliableCache == null || reliableCache.isEmpty())
&& (documentation == null || documentation.isEmpty()) && (event == null || event.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(endpoint, reliableCache, documentation
, event);
}
public String fhirType() {
@ -6514,8 +6496,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (protocol == null || protocol.isEmpty()) && (address == null || address.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(protocol, address);
}
public String fhirType() {
@ -7064,10 +7045,8 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (category == null || category.isEmpty())
&& (mode == null || mode.isEmpty()) && (focus == null || focus.isEmpty()) && (request == null || request.isEmpty())
&& (response == null || response.isEmpty()) && (documentation == null || documentation.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, category, mode, focus, request
, response, documentation);
}
public String fhirType() {
@ -7366,8 +7345,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty())
&& (profile == null || profile.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, documentation, profile);
}
public String fhirType() {
@ -9041,16 +9019,9 @@ public class Conformance extends DomainResource implements IBaseConformance {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty())
&& (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
&& (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty())
&& (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (requirements == null || requirements.isEmpty()) && (copyright == null || copyright.isEmpty())
&& (kind == null || kind.isEmpty()) && (software == null || software.isEmpty()) && (implementation == null || implementation.isEmpty())
&& (fhirVersion == null || fhirVersion.isEmpty()) && (acceptUnknown == null || acceptUnknown.isEmpty())
&& (format == null || format.isEmpty()) && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty())
&& (messaging == null || messaging.isEmpty()) && (document == null || document.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, version, name, status, experimental
, date, publisher, contact, description, useContext, requirements, copyright, kind, software
, implementation, fhirVersion, acceptUnknown, format, profile, rest, messaging, document);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -715,9 +715,8 @@ public class ContactPoint extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (value == null || value.isEmpty())
&& (use == null || use.isEmpty()) && (rank == null || rank.isEmpty()) && (period == null || period.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, value, use, rank, period
);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -279,8 +279,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actor, role);
}
public String fhirType() {
@ -567,8 +566,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty())
&& (signature == null || signature.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party, signature);
}
public String fhirType() {
@ -1144,10 +1142,8 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty())
&& (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty())
&& (net == null || net.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, identifier, effectiveTime
, quantity, unitPrice, factor, points, net);
}
public String fhirType() {
@ -2051,11 +2047,8 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty())
&& (applies == null || applies.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty())
&& (topic == null || topic.isEmpty()) && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty())
&& (agent == null || agent.isEmpty()) && (text == null || text.isEmpty()) && (valuedItem == null || valuedItem.isEmpty())
&& (group == null || group.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, issued, applies, type
, subType, topic, action, actionReason, agent, text, valuedItem, group);
}
public String fhirType() {
@ -2296,8 +2289,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actor, role);
}
public String fhirType() {
@ -2873,10 +2865,8 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty())
&& (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty())
&& (net == null || net.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, identifier, effectiveTime
, quantity, unitPrice, factor, points, net);
}
public String fhirType() {
@ -3041,7 +3031,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
}
public String fhirType() {
@ -3206,7 +3196,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
}
public String fhirType() {
@ -3371,7 +3361,7 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
}
public String fhirType() {
@ -4955,13 +4945,9 @@ public class Contract extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty())
&& (applies == null || applies.isEmpty()) && (subject == null || subject.isEmpty()) && (topic == null || topic.isEmpty())
&& (authority == null || authority.isEmpty()) && (domain == null || domain.isEmpty()) && (type == null || type.isEmpty())
&& (subType == null || subType.isEmpty()) && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty())
&& (agent == null || agent.isEmpty()) && (signer == null || signer.isEmpty()) && (valuedItem == null || valuedItem.isEmpty())
&& (term == null || term.isEmpty()) && (binding == null || binding.isEmpty()) && (friendly == null || friendly.isEmpty())
&& (legal == null || legal.isEmpty()) && (rule == null || rule.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, issued, applies, subject
, topic, authority, domain, type, subType, action, actionReason, agent, signer, valuedItem, term
, binding, friendly, legal, rule);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
@ -81,9 +81,8 @@ public class Count extends Quantity {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, comparator, unit, system
, code);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1296,13 +1296,9 @@ public class Coverage extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (issuer == null || issuer.isEmpty()) && (bin == null || bin.isEmpty())
&& (period == null || period.isEmpty()) && (type == null || type.isEmpty()) && (planholder == null || planholder.isEmpty())
&& (beneficiary == null || beneficiary.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (identifier == null || identifier.isEmpty()) && (group == null || group.isEmpty()) && (plan == null || plan.isEmpty())
&& (subPlan == null || subPlan.isEmpty()) && (dependent == null || dependent.isEmpty()) && (sequence == null || sequence.isEmpty())
&& (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (network == null || network.isEmpty())
&& (contract == null || contract.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(issuer, bin, period, type, planholder
, beneficiary, relationship, identifier, group, plan, subPlan, dependent, sequence, exception
, school, network, contract);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -426,8 +426,7 @@ public class DataElement extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -793,8 +792,7 @@ public class DataElement extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty())
&& (name == null || name.isEmpty()) && (comment == null || comment.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, uri, name, comment);
}
public String fhirType() {
@ -1913,12 +1911,9 @@ public class DataElement extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
&& (publisher == null || publisher.isEmpty()) && (date == null || date.isEmpty()) && (name == null || name.isEmpty())
&& (contact == null || contact.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (stringency == null || stringency.isEmpty())
&& (mapping == null || mapping.isEmpty()) && (element == null || element.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, status
, experimental, publisher, date, name, contact, useContext, copyright, stringency, mapping, element
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -525,9 +525,8 @@ public class DataRequirement extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty())
&& (valueCode == null || valueCode.isEmpty()) && (valueCoding == null || valueCoding.isEmpty())
&& (valueCodeableConcept == null || valueCodeableConcept.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, valueSet, valueCode, valueCoding
, valueCodeableConcept);
}
public String fhirType() {
@ -756,8 +755,7 @@ public class DataRequirement extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, value);
}
public String fhirType() {
@ -1251,9 +1249,8 @@ public class DataRequirement extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty())
&& (mustSupport == null || mustSupport.isEmpty()) && (codeFilter == null || codeFilter.isEmpty())
&& (dateFilter == null || dateFilter.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, mustSupport, codeFilter
, dateFilter);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -515,9 +515,8 @@ public class DecisionSupportRule extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty())
&& (trigger == null || trigger.isEmpty()) && (condition == null || condition.isEmpty()) && (action == null || action.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, library, trigger
, condition, action);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -420,9 +420,8 @@ public class DecisionSupportServiceModule extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (moduleMetadata == null || moduleMetadata.isEmpty()) && (trigger == null || trigger.isEmpty())
&& (parameter == null || parameter.isEmpty()) && (dataRequirement == null || dataRequirement.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, trigger, parameter
, dataRequirement);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -418,8 +418,7 @@ public class DetectedIssue extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (action == null || action.isEmpty()) && (date == null || date.isEmpty())
&& (author == null || author.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action, date, author);
}
public String fhirType() {
@ -1187,11 +1186,8 @@ public class DetectedIssue extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (patient == null || patient.isEmpty()) && (category == null || category.isEmpty())
&& (severity == null || severity.isEmpty()) && (implicated == null || implicated.isEmpty())
&& (detail == null || detail.isEmpty()) && (date == null || date.isEmpty()) && (author == null || author.isEmpty())
&& (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty())
&& (mitigation == null || mitigation.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, category, severity, implicated
, detail, date, author, identifier, reference, mitigation);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1334,13 +1334,9 @@ public class Device extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (udiCarrier == null || udiCarrier.isEmpty())
&& (status == null || status.isEmpty()) && (type == null || type.isEmpty()) && (lotNumber == null || lotNumber.isEmpty())
&& (manufacturer == null || manufacturer.isEmpty()) && (manufactureDate == null || manufactureDate.isEmpty())
&& (expirationDate == null || expirationDate.isEmpty()) && (model == null || model.isEmpty())
&& (version == null || version.isEmpty()) && (patient == null || patient.isEmpty()) && (owner == null || owner.isEmpty())
&& (contact == null || contact.isEmpty()) && (location == null || location.isEmpty()) && (url == null || url.isEmpty())
&& (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, udiCarrier, status
, type, lotNumber, manufacturer, manufactureDate, expirationDate, model, version, patient, owner
, contact, location, url, note);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -514,8 +514,8 @@ public class DeviceComponent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (specType == null || specType.isEmpty()) && (componentId == null || componentId.isEmpty())
&& (productionSpec == null || productionSpec.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(specType, componentId, productionSpec
);
}
public String fhirType() {
@ -1233,12 +1233,9 @@ public class DeviceComponent extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (lastSystemChange == null || lastSystemChange.isEmpty()) && (source == null || source.isEmpty())
&& (parent == null || parent.isEmpty()) && (operationalStatus == null || operationalStatus.isEmpty())
&& (parameterGroup == null || parameterGroup.isEmpty()) && (measurementPrinciple == null || measurementPrinciple.isEmpty())
&& (productionSpecification == null || productionSpecification.isEmpty()) && (languageCode == null || languageCode.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, lastSystemChange
, source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification
, languageCode);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -974,8 +974,7 @@ public class DeviceMetric extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (state == null || state.isEmpty())
&& (time == null || time.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, state, time);
}
public String fhirType() {
@ -1679,11 +1678,8 @@ public class DeviceMetric extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (unit == null || unit.isEmpty()) && (source == null || source.isEmpty()) && (parent == null || parent.isEmpty())
&& (operationalStatus == null || operationalStatus.isEmpty()) && (color == null || color.isEmpty())
&& (category == null || category.isEmpty()) && (measurementPeriod == null || measurementPeriod.isEmpty())
&& (calibration == null || calibration.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, unit, source
, parent, operationalStatus, color, category, measurementPeriod, calibration);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1452,12 +1452,9 @@ public class DeviceUseRequest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty())
&& (device == null || device.isEmpty()) && (encounter == null || encounter.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (indication == null || indication.isEmpty()) && (notes == null || notes.isEmpty()) && (prnReason == null || prnReason.isEmpty())
&& (orderedOn == null || orderedOn.isEmpty()) && (recordedOn == null || recordedOn.isEmpty())
&& (subject == null || subject.isEmpty()) && (timing == null || timing.isEmpty()) && (priority == null || priority.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(bodySite, status, device, encounter
, identifier, indication, notes, prnReason, orderedOn, recordedOn, subject, timing, priority
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -806,10 +806,8 @@ public class DeviceUseStatement extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (whenUsed == null || whenUsed.isEmpty())
&& (device == null || device.isEmpty()) && (identifier == null || identifier.isEmpty()) && (indication == null || indication.isEmpty())
&& (notes == null || notes.isEmpty()) && (recordedOn == null || recordedOn.isEmpty()) && (subject == null || subject.isEmpty())
&& (timing == null || timing.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(bodySite, whenUsed, device, identifier
, indication, notes, recordedOn, subject, timing);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -769,8 +769,8 @@ public class DiagnosticOrder extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (description == null || description.isEmpty())
&& (dateTime == null || dateTime.isEmpty()) && (actor == null || actor.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, description, dateTime, actor
);
}
public String fhirType() {
@ -1211,9 +1211,8 @@ public class DiagnosticOrder extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (specimen == null || specimen.isEmpty())
&& (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) && (event == null || event.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, specimen, bodySite, status
, event);
}
public String fhirType() {
@ -2265,11 +2264,8 @@ public class DiagnosticOrder extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (priority == null || priority.isEmpty()) && (subject == null || subject.isEmpty()) && (encounter == null || encounter.isEmpty())
&& (orderer == null || orderer.isEmpty()) && (reason == null || reason.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty())
&& (specimen == null || specimen.isEmpty()) && (event == null || event.isEmpty()) && (item == null || item.isEmpty())
&& (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, priority, subject
, encounter, orderer, reason, supportingInformation, specimen, event, item, note);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -437,8 +437,7 @@ public class DiagnosticReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (comment == null || comment.isEmpty()) && (link == null || link.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(comment, link);
}
public String fhirType() {
@ -1831,13 +1830,9 @@ public class DiagnosticReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty())
&& (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (request == null || request.isEmpty())
&& (specimen == null || specimen.isEmpty()) && (result == null || result.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
&& (image == null || image.isEmpty()) && (conclusion == null || conclusion.isEmpty()) && (codedDiagnosis == null || codedDiagnosis.isEmpty())
&& (presentedForm == null || presentedForm.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, category, code
, subject, encounter, effective, issued, performer, request, specimen, result, imagingStudy
, image, conclusion, codedDiagnosis, presentedForm);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
@ -81,9 +81,8 @@ public class Distance extends Quantity {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, comparator, unit, system
, code);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -203,7 +203,7 @@ public class DocumentManifest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (p == null || p.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(p);
}
public String fhirType() {
@ -399,8 +399,7 @@ public class DocumentManifest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref);
}
public String fhirType() {
@ -1361,11 +1360,8 @@ public class DocumentManifest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (subject == null || subject.isEmpty()) && (recipient == null || recipient.isEmpty()) && (type == null || type.isEmpty())
&& (author == null || author.isEmpty()) && (created == null || created.isEmpty()) && (source == null || source.isEmpty())
&& (status == null || status.isEmpty()) && (description == null || description.isEmpty())
&& (content == null || content.isEmpty()) && (related == null || related.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier, subject
, recipient, type, author, created, source, status, description, content, related);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -387,8 +387,7 @@ public class DocumentReference extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (target == null || target.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, target);
}
public String fhirType() {
@ -609,8 +608,7 @@ public class DocumentReference extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (attachment == null || attachment.isEmpty()) && (format == null || format.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(attachment, format);
}
public String fhirType() {
@ -1133,10 +1131,8 @@ public class DocumentReference extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (encounter == null || encounter.isEmpty()) && (event == null || event.isEmpty())
&& (period == null || period.isEmpty()) && (facilityType == null || facilityType.isEmpty())
&& (practiceSetting == null || practiceSetting.isEmpty()) && (sourcePatientInfo == null || sourcePatientInfo.isEmpty())
&& (related == null || related.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(encounter, event, period, facilityType
, practiceSetting, sourcePatientInfo, related);
}
public String fhirType() {
@ -1332,8 +1328,7 @@ public class DocumentReference extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref);
}
public String fhirType() {
@ -2545,13 +2540,9 @@ public class DocumentReference extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (subject == null || subject.isEmpty()) && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty())
&& (author == null || author.isEmpty()) && (custodian == null || custodian.isEmpty()) && (authenticator == null || authenticator.isEmpty())
&& (created == null || created.isEmpty()) && (indexed == null || indexed.isEmpty()) && (status == null || status.isEmpty())
&& (docStatus == null || docStatus.isEmpty()) && (relatesTo == null || relatesTo.isEmpty())
&& (description == null || description.isEmpty()) && (securityLabel == null || securityLabel.isEmpty())
&& (content == null || content.isEmpty()) && (context == null || context.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier, subject
, type, class_, author, custodian, authenticator, created, indexed, status, docStatus, relatesTo
, description, securityLabel, content, context);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -423,9 +423,8 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
}
public boolean isEmpty() {
return super.isEmpty() && (text == null || text.isEmpty()) && (contained == null || contained.isEmpty())
&& (extension == null || extension.isEmpty()) && (modifierExtension == null || modifierExtension.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(text, contained, extension, modifierExtension
);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
@ -81,9 +81,8 @@ public class Duration extends Quantity {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, comparator, unit, system
, code);
}

View File

@ -29,21 +29,21 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*;
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseElement;
import org.hl7.fhir.instance.model.api.IBaseHasExtensions;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.*;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
/**
* Base definition for all elements in a resource.
*/
public abstract class Element extends Base implements IBaseHasExtensions {
public abstract class Element extends Base implements IBaseHasExtensions, IBaseElement {
/**
* unique id for the element within a resource (for internal references).
@ -306,8 +306,7 @@ public abstract class Element extends Base implements IBaseHasExtensions {
}
public boolean isEmpty() {
return super.isEmpty() && (id == null || id.isEmpty()) && (extension == null || extension.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(id, extension);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -941,8 +941,8 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (discriminator == null || discriminator.isEmpty()) && (description == null || description.isEmpty())
&& (ordered == null || ordered.isEmpty()) && (rules == null || rules.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(discriminator, description, ordered
, rules);
}
public String fhirType() {
@ -1234,8 +1234,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (path == null || path.isEmpty()) && (min == null || min.isEmpty())
&& (max == null || max.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, min, max);
}
public String fhirType() {
@ -1655,9 +1654,8 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (profile == null || profile.isEmpty())
&& (aggregation == null || aggregation.isEmpty()) && (versioning == null || versioning.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, aggregation, versioning
);
}
public String fhirType() {
@ -2152,9 +2150,8 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (key == null || key.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (severity == null || severity.isEmpty()) && (human == null || human.isEmpty()) && (expression == null || expression.isEmpty())
&& (xpath == null || xpath.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(key, requirements, severity, human
, expression, xpath);
}
public String fhirType() {
@ -2453,8 +2450,8 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (strength == null || strength.isEmpty()) && (description == null || description.isEmpty())
&& (valueSet == null || valueSet.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, description, valueSet
);
}
public String fhirType() {
@ -2749,8 +2746,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (identity == null || identity.isEmpty()) && (language == null || language.isEmpty())
&& (map == null || map.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, language, map);
}
public String fhirType() {
@ -5608,19 +5604,10 @@ public class ElementDefinition extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (path == null || path.isEmpty()) && (representation == null || representation.isEmpty())
&& (name == null || name.isEmpty()) && (label == null || label.isEmpty()) && (code == null || code.isEmpty())
&& (slicing == null || slicing.isEmpty()) && (short_ == null || short_.isEmpty()) && (definition == null || definition.isEmpty())
&& (comments == null || comments.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (alias == null || alias.isEmpty()) && (min == null || min.isEmpty()) && (max == null || max.isEmpty())
&& (base == null || base.isEmpty()) && (contentReference == null || contentReference.isEmpty())
&& (type == null || type.isEmpty()) && (defaultValue == null || defaultValue.isEmpty()) && (meaningWhenMissing == null || meaningWhenMissing.isEmpty())
&& (fixed == null || fixed.isEmpty()) && (pattern == null || pattern.isEmpty()) && (example == null || example.isEmpty())
&& (minValue == null || minValue.isEmpty()) && (maxValue == null || maxValue.isEmpty()) && (maxLength == null || maxLength.isEmpty())
&& (condition == null || condition.isEmpty()) && (constraint == null || constraint.isEmpty())
&& (mustSupport == null || mustSupport.isEmpty()) && (isModifier == null || isModifier.isEmpty())
&& (isSummary == null || isSummary.isEmpty()) && (binding == null || binding.isEmpty()) && (mapping == null || mapping.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, representation, name, label
, code, slicing, short_, definition, comments, requirements, alias, min, max, base, contentReference
, type, defaultValue, meaningWhenMissing, fixed, pattern, example, minValue, maxValue, maxLength
, condition, constraint, mustSupport, isModifier, isSummary, binding, mapping);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1129,13 +1129,9 @@ public class EligibilityRequest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty())
&& (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty())
&& (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty())
&& (priority == null || priority.isEmpty()) && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty())
&& (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty())
&& (serviced == null || serviced.isEmpty()) && (benefitCategory == null || benefitCategory.isEmpty())
&& (benefitSubCategory == null || benefitSubCategory.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ruleset, originalRuleset
, created, target, provider, organization, priority, enterer, facility, patient, coverage, businessArrangement
, serviced, benefitCategory, benefitSubCategory);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -437,9 +437,8 @@ public class EligibilityResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (subCategory == null || subCategory.isEmpty())
&& (network == null || network.isEmpty()) && (unit == null || unit.isEmpty()) && (term == null || term.isEmpty())
&& (financial == null || financial.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, subCategory, network
, unit, term, financial);
}
public String fhirType() {
@ -718,8 +717,7 @@ public class EligibilityResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (benefit == null || benefit.isEmpty())
&& (benefitUsed == null || benefitUsed.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, benefit, benefitUsed);
}
public String fhirType() {
@ -859,7 +857,7 @@ public class EligibilityResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code);
}
public String fhirType() {
@ -1948,14 +1946,9 @@ public class EligibilityResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty())
&& (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty())
&& (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
&& (created == null || created.isEmpty()) && (organization == null || organization.isEmpty())
&& (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty())
&& (inforce == null || inforce.isEmpty()) && (contract == null || contract.isEmpty()) && (form == null || form.isEmpty())
&& (benefitBalance == null || benefitBalance.isEmpty()) && (error == null || error.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, request, outcome, disposition
, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization, inforce
, contract, form, benefitBalance, error);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -715,8 +715,7 @@ Not to be used when the patient is currently at the location
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, period);
}
public String fhirType() {
@ -994,8 +993,7 @@ Not to be used when the patient is currently at the location
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (period == null || period.isEmpty())
&& (individual == null || individual.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, individual);
}
public String fhirType() {
@ -1859,13 +1857,9 @@ Not to be used when the patient is currently at the location
}
public boolean isEmpty() {
return super.isEmpty() && (preAdmissionIdentifier == null || preAdmissionIdentifier.isEmpty())
&& (origin == null || origin.isEmpty()) && (admitSource == null || admitSource.isEmpty())
&& (admittingDiagnosis == null || admittingDiagnosis.isEmpty()) && (reAdmission == null || reAdmission.isEmpty())
&& (dietPreference == null || dietPreference.isEmpty()) && (specialCourtesy == null || specialCourtesy.isEmpty())
&& (specialArrangement == null || specialArrangement.isEmpty()) && (destination == null || destination.isEmpty())
&& (dischargeDisposition == null || dischargeDisposition.isEmpty()) && (dischargeDiagnosis == null || dischargeDiagnosis.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(preAdmissionIdentifier, origin
, admitSource, admittingDiagnosis, reAdmission, dietPreference, specialCourtesy, specialArrangement
, destination, dischargeDisposition, dischargeDiagnosis);
}
public String fhirType() {
@ -2143,8 +2137,7 @@ Not to be used when the patient is currently at the location
}
public boolean isEmpty() {
return super.isEmpty() && (location == null || location.isEmpty()) && (status == null || status.isEmpty())
&& (period == null || period.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(location, status, period);
}
public String fhirType() {
@ -3633,15 +3626,9 @@ Not to be used when the patient is currently at the location
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (statusHistory == null || statusHistory.isEmpty()) && (class_ == null || class_.isEmpty())
&& (type == null || type.isEmpty()) && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty())
&& (episodeOfCare == null || episodeOfCare.isEmpty()) && (incomingReferral == null || incomingReferral.isEmpty())
&& (participant == null || participant.isEmpty()) && (appointment == null || appointment.isEmpty())
&& (period == null || period.isEmpty()) && (length == null || length.isEmpty()) && (reason == null || reason.isEmpty())
&& (indication == null || indication.isEmpty()) && (hospitalization == null || hospitalization.isEmpty())
&& (location == null || location.isEmpty()) && (serviceProvider == null || serviceProvider.isEmpty())
&& (partOf == null || partOf.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusHistory
, class_, type, priority, patient, episodeOfCare, incomingReferral, participant, appointment
, period, length, reason, indication, hospitalization, location, serviceProvider, partOf);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1047,11 +1047,8 @@ public class Endpoint extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty())
&& (contact == null || contact.isEmpty()) && (connectionType == null || connectionType.isEmpty())
&& (method == null || method.isEmpty()) && (period == null || period.isEmpty()) && (address == null || address.isEmpty())
&& (payloadFormat == null || payloadFormat.isEmpty()) && (payloadType == null || payloadType.isEmpty())
&& (header == null || header.isEmpty()) && (publicKey == null || publicKey.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, managingOrganization, contact
, connectionType, method, period, address, payloadFormat, payloadType, header, publicKey);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -771,11 +771,8 @@ public class EnrollmentRequest extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty())
&& (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty())
&& (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty())
&& (subject == null || subject.isEmpty()) && (coverage == null || coverage.isEmpty()) && (relationship == null || relationship.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ruleset, originalRuleset
, created, target, provider, organization, subject, coverage, relationship);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -786,12 +786,8 @@ public class EnrollmentResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty())
&& (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty())
&& (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
&& (created == null || created.isEmpty()) && (organization == null || organization.isEmpty())
&& (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, request, outcome, disposition
, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -393,8 +393,7 @@ public class EpisodeOfCare extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, period);
}
public String fhirType() {
@ -1381,11 +1380,9 @@ public class EpisodeOfCare extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (statusHistory == null || statusHistory.isEmpty()) && (type == null || type.isEmpty())
&& (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty())
&& (period == null || period.isEmpty()) && (referralRequest == null || referralRequest.isEmpty())
&& (careManager == null || careManager.isEmpty()) && (team == null || team.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusHistory
, type, condition, patient, managingOrganization, period, referralRequest, careManager, team
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -275,8 +275,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -452,8 +451,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(include, exclude);
}
public String fhirType() {
@ -622,7 +620,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(codeSystem);
}
public String fhirType() {
@ -850,8 +848,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version);
}
public String fhirType() {
@ -1020,7 +1017,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(codeSystem);
}
public String fhirType() {
@ -1248,8 +1245,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version);
}
public String fhirType() {
@ -1425,8 +1421,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(include, exclude);
}
public String fhirType() {
@ -1595,7 +1590,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (designation == null || designation.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(designation);
}
public String fhirType() {
@ -1795,8 +1790,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use);
}
public String fhirType() {
@ -1965,7 +1959,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (designation == null || designation.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(designation);
}
public String fhirType() {
@ -2165,8 +2159,7 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use);
}
public String fhirType() {
@ -3548,16 +3541,10 @@ public class ExpansionProfile extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
&& (codeSystem == null || codeSystem.isEmpty()) && (includeDesignations == null || includeDesignations.isEmpty())
&& (designation == null || designation.isEmpty()) && (includeDefinition == null || includeDefinition.isEmpty())
&& (includeInactive == null || includeInactive.isEmpty()) && (excludeNested == null || excludeNested.isEmpty())
&& (excludeNotForUI == null || excludeNotForUI.isEmpty()) && (excludePostCoordinated == null || excludePostCoordinated.isEmpty())
&& (displayLanguage == null || displayLanguage.isEmpty()) && (limitedExpansion == null || limitedExpansion.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, name
, status, experimental, publisher, contact, date, description, codeSystem, includeDesignations
, designation, includeDefinition, includeInactive, excludeNested, excludeNotForUI, excludePostCoordinated
, displayLanguage, limitedExpansion);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -420,8 +420,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (claim == null || claim.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (reference == null || reference.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(claim, relationship, reference
);
}
public String fhirType() {
@ -622,8 +622,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party);
}
public String fhirType() {
@ -828,8 +827,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, diagnosis);
}
public String fhirType() {
@ -1128,8 +1126,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (date == null || date.isEmpty())
&& (procedure == null || procedure.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, date, procedure);
}
public String fhirType() {
@ -1389,8 +1386,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (coverage == null || coverage.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, preAuthRef);
}
public String fhirType() {
@ -1591,8 +1587,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (time == null || time.isEmpty()) && (type == null || type.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(time, type);
}
public String fhirType() {
@ -3323,17 +3318,10 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (provider == null || provider.isEmpty()) && (supervisor == null || supervisor.isEmpty())
&& (providerQualification == null || providerQualification.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty())
&& (service == null || service.isEmpty()) && (serviceModifier == null || serviceModifier.isEmpty())
&& (modifier == null || modifier.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (serviced == null || serviced.isEmpty()) && (place == null || place.isEmpty()) && (quantity == null || quantity.isEmpty())
&& (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty())
&& (net == null || net.isEmpty()) && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty())
&& (subSite == null || subSite.isEmpty()) && (noteNumber == null || noteNumber.isEmpty())
&& (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty())
&& (prosthesis == null || prosthesis.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, provider, supervisor
, providerQualification, diagnosisLinkId, service, serviceModifier, modifier, programCode, serviced
, place, quantity, unitPrice, factor, points, net, udi, bodySite, subSite, noteNumber, adjudication
, detail, prosthesis);
}
public String fhirType() {
@ -3648,8 +3636,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -4558,12 +4546,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty())
&& (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty())
&& (udi == null || udi.isEmpty()) && (adjudication == null || adjudication.isEmpty()) && (subDetail == null || subDetail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, service, programCode
, quantity, unitPrice, factor, points, net, udi, adjudication, subDetail);
}
public String fhirType() {
@ -4878,8 +4862,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -5706,11 +5690,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty())
&& (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty())
&& (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty())
&& (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty())
&& (udi == null || udi.isEmpty()) && (adjudication == null || adjudication.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, service, programCode
, quantity, unitPrice, factor, points, net, udi, adjudication);
}
public String fhirType() {
@ -6025,8 +6006,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -6291,8 +6272,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty())
&& (priorMaterial == null || priorMaterial.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(initial, priorDate, priorMaterial
);
}
public String fhirType() {
@ -6831,10 +6812,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (service == null || service.isEmpty())
&& (fee == null || fee.isEmpty()) && (noteNumberLinkId == null || noteNumberLinkId.isEmpty())
&& (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, service, fee, noteNumberLinkId
, adjudication, detail);
}
public String fhirType() {
@ -7149,8 +7128,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -7416,8 +7395,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (service == null || service.isEmpty()) && (fee == null || fee.isEmpty())
&& (adjudication == null || adjudication.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(service, fee, adjudication);
}
public String fhirType() {
@ -7732,8 +7710,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty())
&& (amount == null || amount.isEmpty()) && (value == null || value.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount, value
);
}
public String fhirType() {
@ -7986,8 +7964,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty())
&& (extractionDate == null || extractionDate.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(tooth, reason, extractionDate);
}
public String fhirType() {
@ -8252,8 +8229,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (number == null || number.isEmpty()) && (type == null || type.isEmpty())
&& (text == null || text.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, text);
}
public String fhirType() {
@ -8652,9 +8628,8 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (category == null || category.isEmpty()) && (subCategory == null || subCategory.isEmpty())
&& (network == null || network.isEmpty()) && (unit == null || unit.isEmpty()) && (term == null || term.isEmpty())
&& (financial == null || financial.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, subCategory, network
, unit, term, financial);
}
public String fhirType() {
@ -8933,8 +8908,7 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (benefit == null || benefit.isEmpty())
&& (benefitUsed == null || benefitUsed.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, benefit, benefitUsed);
}
public String fhirType() {
@ -12194,30 +12168,14 @@ public class ExplanationOfBenefit extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (claim == null || claim.isEmpty())
&& (claimResponse == null || claimResponse.isEmpty()) && (type == null || type.isEmpty())
&& (subType == null || subType.isEmpty()) && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
&& (created == null || created.isEmpty()) && (billablePeriod == null || billablePeriod.isEmpty())
&& (disposition == null || disposition.isEmpty()) && (provider == null || provider.isEmpty())
&& (organization == null || organization.isEmpty()) && (facility == null || facility.isEmpty())
&& (related == null || related.isEmpty()) && (prescription == null || prescription.isEmpty())
&& (originalPrescription == null || originalPrescription.isEmpty()) && (payee == null || payee.isEmpty())
&& (referral == null || referral.isEmpty()) && (occurrenceCode == null || occurrenceCode.isEmpty())
&& (occurenceSpanCode == null || occurenceSpanCode.isEmpty()) && (valueCode == null || valueCode.isEmpty())
&& (diagnosis == null || diagnosis.isEmpty()) && (procedure == null || procedure.isEmpty())
&& (specialCondition == null || specialCondition.isEmpty()) && (patient == null || patient.isEmpty())
&& (precedence == null || precedence.isEmpty()) && (coverage == null || coverage.isEmpty())
&& (accidentDate == null || accidentDate.isEmpty()) && (accidentType == null || accidentType.isEmpty())
&& (accidentLocation == null || accidentLocation.isEmpty()) && (interventionException == null || interventionException.isEmpty())
&& (onset == null || onset.isEmpty()) && (employmentImpacted == null || employmentImpacted.isEmpty())
&& (hospitalization == null || hospitalization.isEmpty()) && (item == null || item.isEmpty())
&& (addItem == null || addItem.isEmpty()) && (missingTeeth == null || missingTeeth.isEmpty())
&& (totalCost == null || totalCost.isEmpty()) && (unallocDeductable == null || unallocDeductable.isEmpty())
&& (totalBenefit == null || totalBenefit.isEmpty()) && (paymentAdjustment == null || paymentAdjustment.isEmpty())
&& (paymentAdjustmentReason == null || paymentAdjustmentReason.isEmpty()) && (paymentDate == null || paymentDate.isEmpty())
&& (paymentAmount == null || paymentAmount.isEmpty()) && (paymentRef == null || paymentRef.isEmpty())
&& (reserved == null || reserved.isEmpty()) && (form == null || form.isEmpty()) && (note == null || note.isEmpty())
&& (benefitBalance == null || benefitBalance.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, claim, claimResponse
, type, subType, ruleset, originalRuleset, created, billablePeriod, disposition, provider, organization
, facility, related, prescription, originalPrescription, payee, referral, occurrenceCode, occurenceSpanCode
, valueCode, diagnosis, procedure, specialCondition, patient, precedence, coverage, accidentDate
, accidentType, accidentLocation, interventionException, onset, employmentImpacted, hospitalization
, item, addItem, missingTeeth, totalCost, unallocDeductable, totalBenefit, paymentAdjustment
, paymentAdjustmentReason, paymentDate, paymentAmount, paymentRef, reserved, form, note, benefitBalance
);
}
@Override

View File

@ -1,9 +1,13 @@
package org.hl7.fhir.dstu3.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
import org.hl7.fhir.dstu3.model.ExpressionNode.TypeDetails;
import org.hl7.fhir.utilities.Utilities;
public class ExpressionNode {
@ -36,12 +40,14 @@ public class ExpressionNode {
return Integer.toString(line)+", "+Integer.toString(column);
}
}
public enum Function {
public enum Function {
Custom,
Empty, Not, Exists, SubsetOf, SupersetOf, IsDistinct, Distinct, Count, Where, Select, All, Repeat, Item /*implicit from name[]*/, As, Is, Single,
First, Last, Tail, Skip, Take, Iif, ToInteger, ToDecimal, ToString, Substring, StartsWith, EndsWith, Matches, ReplaceMatches, Contains, Replace, Length,
Children, Descendents, MemberOf, Trace, Today, Now, Resolve, Extension;
public static Function fromCode(String name) {
public static Function fromCode(String name) {
if (name.equals("empty")) return Function.Empty;
if (name.equals("not")) return Function.Not;
if (name.equals("exists")) return Function.Exists;
@ -83,11 +89,11 @@ public class ExpressionNode {
if (name.equals("now")) return Function.Now;
if (name.equals("resolve")) return Function.Resolve;
if (name.equals("extension")) return Function.Extension;
return null;
}
public String toCode() {
switch (this) {
case Empty : return "empty";
return null;
}
public String toCode() {
switch (this) {
case Empty : return "empty";
case Not : return "not";
case Exists : return "exists";
case SubsetOf : return "subsetOf";
@ -95,17 +101,17 @@ public class ExpressionNode {
case IsDistinct : return "isDistinct";
case Distinct : return "distinct";
case Count : return "count";
case Where : return "where";
case Where : return "where";
case Select : return "select";
case All : return "all";
case All : return "all";
case Repeat : return "repeat";
case Item : return "item";
case As : return "as";
case Is : return "is";
case Single : return "single";
case First : return "first";
case Last : return "last";
case Tail : return "tail";
case First : return "first";
case Last : return "last";
case Tail : return "tail";
case Skip : return "skip";
case Take : return "take";
case Iif : return "iif";
@ -113,11 +119,11 @@ public class ExpressionNode {
case ToDecimal : return "toDecimal";
case ToString : return "toString";
case Substring : return "substring";
case StartsWith : return "startsWith";
case StartsWith : return "startsWith";
case EndsWith : return "endsWith";
case Matches : return "matches";
case Matches : return "matches";
case ReplaceMatches : return "replaceMatches";
case Contains : return "contains";
case Contains : return "contains";
case Replace : return "replace";
case Length : return "length";
case Children : return "children";
@ -126,16 +132,16 @@ public class ExpressionNode {
case Trace : return "trace";
case Today : return "today";
case Now : return "now";
case Resolve : return "resolve";
case Extension : return "extension";
default: return "??";
}
}
}
case Resolve : return "resolve";
case Extension : return "extension";
default: return "??";
}
}
}
public enum Operation {
Equals, Equivalent, NotEquals, NotEquivalent, LessThen, Greater, LessOrEqual, GreaterOrEqual, Is, As, Union, Or, And, Xor, Implies,
Times, DivideBy, Plus, Minus, Div, Mod, In;
Times, DivideBy, Plus, Minus, Concatenate, Div, Mod, In, Contains;
public static Operation fromCode(String name) {
if (Utilities.noString(name))
@ -174,8 +180,10 @@ public class ExpressionNode {
return Operation.DivideBy;
if (name.equals("+"))
return Operation.Plus;
if (name.equals("-"))
return Operation.Minus;
if (name.equals("-"))
return Operation.Minus;
if (name.equals("&"))
return Operation.Concatenate;
if (name.equals("implies"))
return Operation.Implies;
if (name.equals("div"))
@ -184,6 +192,8 @@ public class ExpressionNode {
return Operation.Mod;
if (name.equals("in"))
return Operation.In;
if (name.equals("contains"))
return Operation.Contains;
return null;
}
@ -203,19 +213,103 @@ public class ExpressionNode {
case Xor : return "xor";
case Times : return "*";
case DivideBy : return "/";
case Plus : return "+";
case Minus : return "-";
case Plus : return "+";
case Minus : return "-";
case Concatenate : return "&";
case Implies : return "implies";
case Is : return "is";
case As : return "as";
case Div : return "div";
case Mod : return "mod";
case In : return "in";
case Contains : return "contains";
default: return "??";
}
}
}
public enum CollectionStatus {
SINGLETON, ORDERED, UNORDERED
}
public static class TypeDetails {
private Set<String> types = new HashSet<String>();
private CollectionStatus collectionStatus;
public TypeDetails(CollectionStatus collectionStatus, String... names) {
super();
this.collectionStatus = collectionStatus;
for (String n : names)
this.types.add(n);
}
public TypeDetails(CollectionStatus collectionStatus, Set<String> names) {
super();
this.collectionStatus = collectionStatus;
for (String n : names)
this.types.add(n);
}
public void addType(String n) {
this.types.add(n);
}
public void addTypes(Collection<String> n) {
this.types.addAll(n);
}
public boolean hasType(String... tn) {
for (String t: tn)
if (types.contains(t))
return true;
return false;
}
public void update(TypeDetails source) {
types.addAll(source.types);
if (collectionStatus == null)
collectionStatus = source.collectionStatus;
else if (source.collectionStatus == CollectionStatus.UNORDERED)
collectionStatus = source.collectionStatus;
else
collectionStatus = CollectionStatus.ORDERED;
}
public TypeDetails union(TypeDetails right) {
TypeDetails result = new TypeDetails(null);
if (right.collectionStatus == CollectionStatus.UNORDERED || collectionStatus == CollectionStatus.UNORDERED)
result.collectionStatus = CollectionStatus.UNORDERED;
else
result.collectionStatus = CollectionStatus.ORDERED;
result.types.addAll(types);
result.types.addAll(right.types);
return result;
}
public boolean hasNoTypes() {
return types.isEmpty();
}
public Set<String> getTypes() {
return types;
}
public TypeDetails toSingleton() {
TypeDetails result = new TypeDetails(CollectionStatus.SINGLETON);
result.types.addAll(types);
return result;
}
public CollectionStatus getCollectionStatus() {
return collectionStatus;
}
public boolean hasType(Set<String> tn) {
for (String t: tn)
if (types.contains(t))
return true;
return false;
}
public String describe() {
return types.toString();
}
public String getType() {
for (String t : types)
return t;
return null;
}
}
//the expression will have one of either name or constant
private String uniqueId;
@ -233,8 +327,8 @@ public class ExpressionNode {
private SourceLocation end;
private SourceLocation opStart;
private SourceLocation opEnd;
private Set<String> types;
private Set<String> opTypes;
private TypeDetails types;
private TypeDetails opTypes;
public ExpressionNode(int uniqueId) {
@ -242,6 +336,55 @@ public class ExpressionNode {
this.uniqueId = Integer.toString(uniqueId);
}
public String toString() {
StringBuilder b = new StringBuilder();
switch (kind) {
case Name:
b.append(name);
break;
case Function:
if (function == Function.Item)
b.append("[");
else {
b.append(name);
b.append("(");
}
boolean first = true;
for (ExpressionNode n : parameters) {
if (first)
first = false;
else
b.append(", ");
b.append(n.toString());
}
if (function == Function.Item)
b.append("]");
else {
b.append(")");
}
break;
case Constant:
b.append(Utilities.escapeJava(constant));
break;
case Group:
b.append("(");
b.append(group.toString());
b.append(")");
}
if (inner != null) {
b.append(".");
b.append(inner.toString());
}
if (operation != null) {
b.append(" ");
b.append(operation.toCode());
b.append(" ");
b.append(opNext.toString());
}
return b.toString();
}
public String getName() {
return name;
}
@ -290,13 +433,11 @@ public class ExpressionNode {
public List<ExpressionNode> getParameters() {
return parameters;
}
public boolean checkName(boolean mappingExtensions) {
public boolean checkName() {
if (!name.startsWith("$"))
return true;
else if (mappingExtensions && name.equals("$value"))
return true;
else
return name.equals("$context") || name.equals("$resource") || name.equals("$parent");
return name.equals("$this");
}
public Kind getKind() {
@ -473,20 +614,20 @@ public class ExpressionNode {
return Integer.toString(start.line)+", "+Integer.toString(start.column);
}
public Set<String> getTypes() {
public TypeDetails getTypes() {
return types;
}
public void setTypes(Set<String> types) {
public void setTypes(TypeDetails types) {
this.types = types;
}
public Set<String> getOpTypes() {
public TypeDetails getOpTypes() {
return opTypes;
}
public void setOpTypes(Set<String> opTypes) {
public void setOpTypes(TypeDetails opTypes) {
this.opTypes = opTypes;
}
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -385,8 +385,7 @@ public class Extension extends BaseExtension implements IBaseExtension<Extension
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, value);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -489,8 +489,7 @@ public class FamilyMemberHistory extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (outcome == null || outcome.isEmpty())
&& (onset == null || onset.isEmpty()) && (note == null || note.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, outcome, onset, note);
}
public String fhirType() {
@ -1479,11 +1478,8 @@ public class FamilyMemberHistory extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty())
&& (date == null || date.isEmpty()) && (status == null || status.isEmpty()) && (name == null || name.isEmpty())
&& (relationship == null || relationship.isEmpty()) && (gender == null || gender.isEmpty())
&& (born == null || born.isEmpty()) && (age == null || age.isEmpty()) && (deceased == null || deceased.isEmpty())
&& (note == null || note.isEmpty()) && (condition == null || condition.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, patient, date, status
, name, relationship, gender, born, age, deceased, note, condition);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -721,10 +721,8 @@ public class Flag extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
&& (status == null || status.isEmpty()) && (period == null || period.isEmpty()) && (subject == null || subject.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (author == null || author.isEmpty()) && (code == null || code.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, category, status, period
, subject, encounter, author, code);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -393,7 +393,7 @@ public class Goal extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (result == null || result.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(result);
}
public String fhirType() {
@ -1471,13 +1471,9 @@ public class Goal extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty())
&& (start == null || start.isEmpty()) && (target == null || target.isEmpty()) && (category == null || category.isEmpty())
&& (description == null || description.isEmpty()) && (status == null || status.isEmpty())
&& (statusDate == null || statusDate.isEmpty()) && (statusReason == null || statusReason.isEmpty())
&& (expressedBy == null || expressedBy.isEmpty()) && (priority == null || priority.isEmpty())
&& (addresses == null || addresses.isEmpty()) && (note == null || note.isEmpty()) && (outcome == null || outcome.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subject, start, target
, category, description, status, statusDate, statusReason, expressedBy, priority, addresses
, note, outcome);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -542,8 +542,7 @@ public class Group extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty())
&& (exclude == null || exclude.isEmpty()) && (period == null || period.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, exclude, period);
}
public String fhirType() {
@ -812,8 +811,7 @@ public class Group extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (entity == null || entity.isEmpty()) && (period == null || period.isEmpty())
&& (inactive == null || inactive.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, period, inactive);
}
public String fhirType() {
@ -1532,10 +1530,8 @@ public class Group extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty())
&& (actual == null || actual.isEmpty()) && (active == null || active.isEmpty()) && (code == null || code.isEmpty())
&& (name == null || name.isEmpty()) && (quantity == null || quantity.isEmpty()) && (characteristic == null || characteristic.isEmpty())
&& (member == null || member.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, actual, active
, code, name, quantity, characteristic, member);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -1258,12 +1258,9 @@ public class GuidanceResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (label == null || label.isEmpty())
&& (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty())
&& (concept == null || concept.isEmpty()) && (supportingEvidence == null || supportingEvidence.isEmpty())
&& (relatedAction == null || relatedAction.isEmpty()) && (documentation == null || documentation.isEmpty())
&& (participant == null || participant.isEmpty()) && (type == null || type.isEmpty()) && (behavior == null || behavior.isEmpty())
&& (resource == null || resource.isEmpty()) && (action == null || action.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, label, title
, description, textEquivalent, concept, supportingEvidence, relatedAction, documentation, participant
, type, behavior, resource, action);
}
public String fhirType() {
@ -1606,8 +1603,8 @@ public class GuidanceResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (offset == null || offset.isEmpty()) && (anchor == null || anchor.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, relationship
, offset, anchor);
}
public String fhirType() {
@ -1792,8 +1789,7 @@ public class GuidanceResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
}
public String fhirType() {
@ -2434,10 +2430,8 @@ public class GuidanceResponse extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (requestId == null || requestId.isEmpty()) && (module == null || module.isEmpty())
&& (status == null || status.isEmpty()) && (evaluationMessage == null || evaluationMessage.isEmpty())
&& (outputParameters == null || outputParameters.isEmpty()) && (action == null || action.isEmpty())
&& (dataRequirement == null || dataRequirement.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(requestId, module, status, evaluationMessage
, outputParameters, action, dataRequirement);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -589,9 +589,8 @@ public class HealthcareService extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (daysOfWeek == null || daysOfWeek.isEmpty()) && (allDay == null || allDay.isEmpty())
&& (availableStartTime == null || availableStartTime.isEmpty()) && (availableEndTime == null || availableEndTime.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(daysOfWeek, allDay, availableStartTime
, availableEndTime);
}
public String fhirType() {
@ -795,8 +794,7 @@ public class HealthcareService extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (description == null || description.isEmpty()) && (during == null || during.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, during);
}
public String fhirType() {
@ -2615,18 +2613,10 @@ public class HealthcareService extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (providedBy == null || providedBy.isEmpty())
&& (serviceCategory == null || serviceCategory.isEmpty()) && (serviceType == null || serviceType.isEmpty())
&& (specialty == null || specialty.isEmpty()) && (location == null || location.isEmpty())
&& (serviceName == null || serviceName.isEmpty()) && (comment == null || comment.isEmpty())
&& (extraDetails == null || extraDetails.isEmpty()) && (photo == null || photo.isEmpty())
&& (telecom == null || telecom.isEmpty()) && (coverageArea == null || coverageArea.isEmpty())
&& (serviceProvisionCode == null || serviceProvisionCode.isEmpty()) && (eligibility == null || eligibility.isEmpty())
&& (eligibilityNote == null || eligibilityNote.isEmpty()) && (programName == null || programName.isEmpty())
&& (characteristic == null || characteristic.isEmpty()) && (referralMethod == null || referralMethod.isEmpty())
&& (publicKey == null || publicKey.isEmpty()) && (appointmentRequired == null || appointmentRequired.isEmpty())
&& (availableTime == null || availableTime.isEmpty()) && (notAvailable == null || notAvailable.isEmpty())
&& (availabilityExceptions == null || availabilityExceptions.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, providedBy, serviceCategory
, serviceType, specialty, location, serviceName, comment, extraDetails, photo, telecom, coverageArea
, serviceProvisionCode, eligibility, eligibilityNote, programName, characteristic, referralMethod
, publicKey, appointmentRequired, availableTime, notAvailable, availabilityExceptions);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -936,9 +936,8 @@ public class HumanName extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (use == null || use.isEmpty()) && (text == null || text.isEmpty())
&& (family == null || family.isEmpty()) && (given == null || given.isEmpty()) && (prefix == null || prefix.isEmpty())
&& (suffix == null || suffix.isEmpty()) && (period == null || period.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, text, family, given, prefix
, suffix, period);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -615,9 +615,8 @@ public class Identifier extends Type implements ICompositeType {
}
public boolean isEmpty() {
return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty())
&& (system == null || system.isEmpty()) && (value == null || value.isEmpty()) && (period == null || period.isEmpty())
&& (assigner == null || assigner.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, type, system, value, period
, assigner);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -630,9 +630,8 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
&& (dicom == null || dicom.isEmpty()) && (viewable == null || viewable.isEmpty()) && (series == null || series.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, imagingStudy, dicom, viewable
, series);
}
public String fhirType() {
@ -857,8 +856,7 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, url);
}
public String fhirType() {
@ -1475,10 +1473,8 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (height == null || height.isEmpty())
&& (width == null || width.isEmpty()) && (frames == null || frames.isEmpty()) && (duration == null || duration.isEmpty())
&& (size == null || size.isEmpty()) && (title == null || title.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, height, width, frames
, duration, size, title, url);
}
public String fhirType() {
@ -1801,8 +1797,7 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (dicom == null || dicom.isEmpty())
&& (instance == null || instance.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, dicom, instance);
}
public String fhirType() {
@ -2027,8 +2022,7 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, url);
}
public String fhirType() {
@ -2431,9 +2425,8 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sopClass == null || sopClass.isEmpty()) && (uid == null || uid.isEmpty())
&& (dicom == null || dicom.isEmpty()) && (frameNumbers == null || frameNumbers.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sopClass, uid, dicom, frameNumbers
);
}
public String fhirType() {
@ -2658,8 +2651,7 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, url);
}
public String fhirType() {
@ -3225,10 +3217,8 @@ public class ImagingExcerpt extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (patient == null || patient.isEmpty())
&& (authoringTime == null || authoringTime.isEmpty()) && (author == null || author.isEmpty())
&& (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (study == null || study.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, patient, authoringTime, author
, title, description, study);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -416,8 +416,8 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
&& (series == null || series.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, url, imagingStudy, series
);
}
public String fhirType() {
@ -727,8 +727,7 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (instance == null || instance.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, url, instance);
}
public String fhirType() {
@ -1101,8 +1100,7 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (sopClass == null || sopClass.isEmpty()) && (uid == null || uid.isEmpty())
&& (url == null || url.isEmpty()) && (frame == null || frame.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sopClass, uid, url, frame);
}
public String fhirType() {
@ -1357,8 +1355,7 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (number == null || number.isEmpty()) && (url == null || url.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, url);
}
public String fhirType() {
@ -1924,10 +1921,8 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (patient == null || patient.isEmpty())
&& (authoringTime == null || authoringTime.isEmpty()) && (author == null || author.isEmpty())
&& (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (study == null || study.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, patient, authoringTime, author
, title, description, study);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -937,11 +937,8 @@ public class ImagingStudy extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (number == null || number.isEmpty())
&& (modality == null || modality.isEmpty()) && (description == null || description.isEmpty())
&& (numberOfInstances == null || numberOfInstances.isEmpty()) && (availability == null || availability.isEmpty())
&& (url == null || url.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (laterality == null || laterality.isEmpty())
&& (started == null || started.isEmpty()) && (instance == null || instance.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, number, modality, description
, numberOfInstances, availability, url, bodySite, laterality, started, instance);
}
public String fhirType() {
@ -1450,9 +1447,8 @@ public class ImagingStudy extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (number == null || number.isEmpty())
&& (sopClass == null || sopClass.isEmpty()) && (type == null || type.isEmpty()) && (title == null || title.isEmpty())
&& (content == null || content.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, number, sopClass, type, title
, content);
}
public String fhirType() {
@ -2738,14 +2734,9 @@ public class ImagingStudy extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (accession == null || accession.isEmpty())
&& (identifier == null || identifier.isEmpty()) && (availability == null || availability.isEmpty())
&& (modalityList == null || modalityList.isEmpty()) && (patient == null || patient.isEmpty())
&& (started == null || started.isEmpty()) && (order == null || order.isEmpty()) && (referrer == null || referrer.isEmpty())
&& (interpreter == null || interpreter.isEmpty()) && (url == null || url.isEmpty()) && (numberOfSeries == null || numberOfSeries.isEmpty())
&& (numberOfInstances == null || numberOfInstances.isEmpty()) && (procedure == null || procedure.isEmpty())
&& (description == null || description.isEmpty()) && (series == null || series.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, accession, identifier, availability
, modalityList, patient, started, order, referrer, interpreter, url, numberOfSeries, numberOfInstances
, procedure, description, series);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -288,8 +288,7 @@ public class Immunization extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (reason == null || reason.isEmpty()) && (reasonNotGiven == null || reasonNotGiven.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reason, reasonNotGiven);
}
public String fhirType() {
@ -579,8 +578,7 @@ public class Immunization extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (date == null || date.isEmpty()) && (detail == null || detail.isEmpty())
&& (reported == null || reported.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, detail, reported);
}
public String fhirType() {
@ -1183,10 +1181,8 @@ public class Immunization extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty())
&& (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()) && (seriesDoses == null || seriesDoses.isEmpty())
&& (targetDisease == null || targetDisease.isEmpty()) && (doseStatus == null || doseStatus.isEmpty())
&& (doseStatusReason == null || doseStatusReason.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(doseSequence, description, authority
, series, seriesDoses, targetDisease, doseStatus, doseStatusReason);
}
public String fhirType() {
@ -2656,16 +2652,10 @@ public class Immunization extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) && (patient == null || patient.isEmpty())
&& (wasNotGiven == null || wasNotGiven.isEmpty()) && (reported == null || reported.isEmpty())
&& (performer == null || performer.isEmpty()) && (requester == null || requester.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (manufacturer == null || manufacturer.isEmpty())
&& (location == null || location.isEmpty()) && (lotNumber == null || lotNumber.isEmpty())
&& (expirationDate == null || expirationDate.isEmpty()) && (site == null || site.isEmpty())
&& (route == null || route.isEmpty()) && (doseQuantity == null || doseQuantity.isEmpty())
&& (note == null || note.isEmpty()) && (explanation == null || explanation.isEmpty()) && (reaction == null || reaction.isEmpty())
&& (vaccinationProtocol == null || vaccinationProtocol.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, date, vaccineCode
, patient, wasNotGiven, reported, performer, requester, encounter, manufacturer, location, lotNumber
, expirationDate, site, route, doseQuantity, note, explanation, reaction, vaccinationProtocol
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -681,11 +681,8 @@ public class ImmunizationRecommendation extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty())
&& (doseNumber == null || doseNumber.isEmpty()) && (forecastStatus == null || forecastStatus.isEmpty())
&& (dateCriterion == null || dateCriterion.isEmpty()) && (protocol == null || protocol.isEmpty())
&& (supportingImmunization == null || supportingImmunization.isEmpty()) && (supportingPatientInformation == null || supportingPatientInformation.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, vaccineCode, doseNumber, forecastStatus
, dateCriterion, protocol, supportingImmunization, supportingPatientInformation);
}
public String fhirType() {
@ -890,8 +887,7 @@ public class ImmunizationRecommendation extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value);
}
public String fhirType() {
@ -1250,8 +1246,8 @@ public class ImmunizationRecommendation extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty())
&& (authority == null || authority.isEmpty()) && (series == null || series.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(doseSequence, description, authority
, series);
}
public String fhirType() {
@ -1586,8 +1582,8 @@ public class ImmunizationRecommendation extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty())
&& (recommendation == null || recommendation.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, patient, recommendation
);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -545,8 +545,7 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
}
public String fhirType() {
@ -771,8 +770,7 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, uri);
}
public String fhirType() {
@ -1082,8 +1080,7 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty())
&& (resource == null || resource.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, resource);
}
public String fhirType() {
@ -1589,9 +1586,8 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (example == null || example.isEmpty()) && (name == null || name.isEmpty())
&& (description == null || description.isEmpty()) && (acronym == null || acronym.isEmpty())
&& (source == null || source.isEmpty()) && (exampleFor == null || exampleFor.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(example, name, description, acronym
, source, exampleFor);
}
public String fhirType() {
@ -1821,8 +1817,7 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile);
}
public String fhirType() {
@ -2455,9 +2450,8 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (source == null || source.isEmpty()) && (name == null || name.isEmpty())
&& (kind == null || kind.isEmpty()) && (type == null || type.isEmpty()) && (package_ == null || package_.isEmpty())
&& (format == null || format.isEmpty()) && (page == null || page.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(source, name, kind, type, package_
, format, page);
}
public String fhirType() {
@ -3779,14 +3773,9 @@ public class ImplementationGuide extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty())
&& (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
&& (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty())
&& (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty())
&& (dependency == null || dependency.isEmpty()) && (package_ == null || package_.isEmpty())
&& (global == null || global.isEmpty()) && (binary == null || binary.isEmpty()) && (page == null || page.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, version, name, status, experimental
, publisher, contact, date, description, useContext, copyright, fhirVersion, dependency, package_
, global, binary, page);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -335,8 +335,7 @@ public class Library extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, identifier, version);
}
public String fhirType() {
@ -703,8 +702,8 @@ public class Library extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (document == null || document.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, identifier, version, document
);
}
public String fhirType() {
@ -1002,8 +1001,7 @@ public class Library extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, identifier, version);
}
public String fhirType() {
@ -1396,9 +1394,8 @@ public class Library extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (codeSystem == null || codeSystem.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, identifier, version, codeSystem
);
}
public String fhirType() {
@ -2078,11 +2075,8 @@ public class Library extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (moduleMetadata == null || moduleMetadata.isEmpty()) && (model == null || model.isEmpty())
&& (library == null || library.isEmpty()) && (codeSystem == null || codeSystem.isEmpty())
&& (valueSet == null || valueSet.isEmpty()) && (parameter == null || parameter.isEmpty())
&& (dataRequirement == null || dataRequirement.isEmpty()) && (document == null || document.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, model, library
, codeSystem, valueSet, parameter, dataRequirement, document);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -345,8 +345,7 @@ public class Linkage extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource);
}
public String fhirType() {
@ -586,8 +585,7 @@ public class Linkage extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (author == null || author.isEmpty()) && (item == null || item.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(author, item);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -580,8 +580,7 @@ public class ListResource extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (flag == null || flag.isEmpty()) && (deleted == null || deleted.isEmpty())
&& (date == null || date.isEmpty()) && (item == null || item.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(flag, deleted, date, item);
}
public String fhirType() {
@ -1526,11 +1525,8 @@ public class ListResource extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (mode == null || mode.isEmpty()) && (title == null || title.isEmpty()) && (code == null || code.isEmpty())
&& (subject == null || subject.isEmpty()) && (encounter == null || encounter.isEmpty()) && (date == null || date.isEmpty())
&& (source == null || source.isEmpty()) && (orderedBy == null || orderedBy.isEmpty()) && (note == null || note.isEmpty())
&& (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, mode, title
, code, subject, encounter, date, source, orderedBy, note, entry, emptyReason);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -577,8 +577,7 @@ public class Location extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (longitude == null || longitude.isEmpty()) && (latitude == null || latitude.isEmpty())
&& (altitude == null || altitude.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude);
}
public String fhirType() {
@ -1426,12 +1425,8 @@ public class Location extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (mode == null || mode.isEmpty())
&& (type == null || type.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty())
&& (physicalType == null || physicalType.isEmpty()) && (position == null || position.isEmpty())
&& (managingOrganization == null || managingOrganization.isEmpty()) && (partOf == null || partOf.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, name, description
, mode, type, telecom, address, physicalType, position, managingOrganization, partOf);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -968,9 +968,8 @@ public class Measure extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty())
&& (description == null || description.isEmpty()) && (population == null || population.isEmpty())
&& (stratifier == null || stratifier.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, name, description, population
, stratifier);
}
public String fhirType() {
@ -1378,9 +1377,8 @@ public class Measure extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (criteria == null || criteria.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, name, description
, criteria);
}
public String fhirType() {
@ -1657,8 +1655,7 @@ public class Measure extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (criteria == null || criteria.isEmpty())
&& (path == null || path.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, criteria, path);
}
public String fhirType() {
@ -2031,8 +2028,8 @@ public class Measure extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (usage == null || usage.isEmpty())
&& (criteria == null || criteria.isEmpty()) && (path == null || path.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, usage, criteria, path
);
}
public String fhirType() {
@ -3225,14 +3222,9 @@ public class Measure extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty())
&& (disclaimer == null || disclaimer.isEmpty()) && (scoring == null || scoring.isEmpty())
&& (type == null || type.isEmpty()) && (riskAdjustment == null || riskAdjustment.isEmpty())
&& (rateAggregation == null || rateAggregation.isEmpty()) && (rationale == null || rationale.isEmpty())
&& (clinicalRecommendationStatement == null || clinicalRecommendationStatement.isEmpty())
&& (improvementNotation == null || improvementNotation.isEmpty()) && (definition == null || definition.isEmpty())
&& (guidance == null || guidance.isEmpty()) && (set == null || set.isEmpty()) && (group == null || group.isEmpty())
&& (supplementalData == null || supplementalData.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, library, disclaimer
, scoring, type, riskAdjustment, rateAggregation, rationale, clinicalRecommendationStatement
, improvementNotation, definition, guidance, set, group, supplementalData);
}
@Override

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/
// Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
// Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*;
@ -715,9 +715,8 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (population == null || population.isEmpty())
&& (measureScore == null || measureScore.isEmpty()) && (stratifier == null || stratifier.isEmpty())
&& (supplementalData == null || supplementalData.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, population, measureScore
, stratifier, supplementalData);
}
public String fhirType() {
@ -1011,8 +1010,7 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (count == null || count.isEmpty())
&& (patients == null || patients.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, count, patients);
}
public String fhirType() {
@ -1233,8 +1231,7 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (group == null || group.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, group);
}
public String fhirType() {
@ -1562,8 +1559,8 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (population == null || population.isEmpty())
&& (measureScore == null || measureScore.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, population, measureScore
);
}
public String fhirType() {
@ -1857,8 +1854,7 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (count == null || count.isEmpty())
&& (patients == null || patients.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, count, patients);
}
public String fhirType() {
@ -2079,8 +2075,7 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (group == null || group.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, group);
}
public String fhirType() {
@ -2374,8 +2369,7 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (count == null || count.isEmpty())
&& (patients == null || patients.isEmpty());
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, count, patients);
}
public String fhirType() {
@ -3082,11 +3076,8 @@ public class MeasureReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (measure == null || measure.isEmpty()) && (type == null || type.isEmpty())
&& (patient == null || patient.isEmpty()) && (period == null || period.isEmpty()) && (status == null || status.isEmpty())
&& (date == null || date.isEmpty()) && (reportingOrganization == null || reportingOrganization.isEmpty())
&& (group == null || group.isEmpty()) && (evaluatedResources == null || evaluatedResources.isEmpty())
;
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, type, patient, period
, status, date, reportingOrganization, group, evaluatedResources);
}
@Override

Some files were not shown because too many files have changed in this diff Show More