Adding AdverseReaction

This commit is contained in:
jamesagnew 2014-03-25 13:42:38 -04:00
parent fe26ff5515
commit fb23e82ee9
69 changed files with 4193 additions and 184 deletions

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@ -9,6 +9,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.text.WordUtils;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
@ -19,11 +21,11 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
private final IAccessor myAccessor;
private final String myElementName;
private final Field myField;
private final String myFormalDefinition;
private final int myMax;
private final int myMin;
private final IMutator myMutator;
private final String myShortDefinition;
private final String myFormalDefinition;
BaseRuntimeDeclaredChildDefinition(Field theField, Child theChildAnnotation, Description theDescriptionAnnotation, String theElementName) throws ConfigurationException {
super();
@ -62,7 +64,14 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
elementName = "classElement"; // because getClass() is reserved
}
final Method accessor = BeanUtils.findAccessor(declaringClass, targetReturnType, elementName);
final Method mutator = BeanUtils.findMutator(declaringClass, targetReturnType, elementName);
if (accessor==null) {
throw new ConfigurationException("Could not find bean accessor/getter for property " + elementName + " on class " + declaringClass.getCanonicalName());
}
final Method mutator = findMutator(declaringClass, targetReturnType, elementName);
if (mutator==null) {
throw new ConfigurationException("Could not find bean mutator/setter for property " + elementName + " on class " + declaringClass.getCanonicalName() + " (expected return type " + targetReturnType.getCanonicalName() + ")");
}
if (List.class.isAssignableFrom(targetReturnType)) {
myAccessor = new ListAccessor(accessor);
@ -77,14 +86,6 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
}
public String getShortDefinition() {
return myShortDefinition;
}
public String getFormalDefinition() {
return myFormalDefinition;
}
@Override
public IAccessor getAccessor() {
return myAccessor;
@ -98,6 +99,10 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
return myField;
}
public String getFormalDefinition() {
return myFormalDefinition;
}
@Override
public int getMax() {
return myMax;
@ -113,6 +118,10 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
return myMutator;
}
public String getShortDefinition() {
return myShortDefinition;
}
public BaseRuntimeElementDefinition<?> getSingleChildOrThrow() {
if (getValidChildNames().size() != 1) {
throw new IllegalStateException("This child has " + getValidChildNames().size() + " children, expected 1. This is a HAPI bug. Found: " + getValidChildNames());
@ -120,6 +129,17 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
return getChildByName(getValidChildNames().iterator().next());
}
private static Method findMutator(Class<?> theDeclaringClass, Class<?> theTargetReturnType, String theElementName) {
String methodName = "set" + WordUtils.capitalize(theElementName);
try {
return theDeclaringClass.getMethod(methodName, theTargetReturnType);
} catch (NoSuchMethodException e) {
return null;
} catch (SecurityException e) {
throw new ConfigurationException("Failed to scan class '" + theDeclaringClass + "' because of a security exception", e);
}
}
private final class ListAccessor implements IAccessor {
private final Method myAccessorMethod;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
@ -255,7 +255,7 @@ class ModelScanner {
} while (current != null);
for (Class<? extends ICompositeElement> next : classes) {
scanCompositeElementForChildren(next, theDefinition, elementNames, orderToElementDef, orderToExtensionDef);
scanCompositeElementForChildren(next, elementNames, orderToElementDef, orderToExtensionDef);
}
// while (orderToElementDef.size() > 0 && orderToElementDef.firstKey() <
@ -288,7 +288,7 @@ class ModelScanner {
}
@SuppressWarnings("unchecked")
private void scanCompositeElementForChildren(Class<? extends ICompositeElement> theClass, BaseRuntimeElementCompositeDefinition<?> theDefinition, Set<String> elementNames, TreeMap<Integer, BaseRuntimeDeclaredChildDefinition> theOrderToElementDef,
private void scanCompositeElementForChildren(Class<? extends ICompositeElement> theClass, Set<String> elementNames, TreeMap<Integer, BaseRuntimeDeclaredChildDefinition> theOrderToElementDef,
TreeMap<Integer, BaseRuntimeDeclaredChildDefinition> theOrderToExtensionDef) {
int baseElementOrder = theOrderToElementDef.isEmpty() ? 0 : theOrderToElementDef.lastEntry().getKey() + 1;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.lang.reflect.Field;
import java.util.Collections;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.ResourceDef;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.util.Map;

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.context;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.apache.commons.lang3.StringUtils.join;
import java.util.Collections;
import java.util.Comparator;

View File

@ -3,6 +3,7 @@ package ca.uhn.fhir.model.api;
import java.io.IOException;
import java.io.Reader;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
@ -18,6 +19,32 @@ public abstract class BaseResourceReference extends BaseElement {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseResourceReference.class);
private IResource myResource;
private String myResourceId;
private Class<? extends IResource> myResourceType;
/**
* Constructor
*/
public BaseResourceReference() {
// nothing
}
/**
* Constructor
*/
public BaseResourceReference(Class<? extends IResource> theResourceType, String theResourceId) {
myResourceType = theResourceType;
myResourceId = theResourceId;
}
@Override
protected boolean isBaseEmpty() {
return super.isBaseEmpty() && myResource == null && myResourceType == null && StringUtils.isBlank(myResourceId);
}
public BaseResourceReference(IResource theResource) {
myResource=theResource;
}
/**
* Gets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference). creating it if it does not exist. Will not return <code>null</code>.
@ -43,6 +70,14 @@ public abstract class BaseResourceReference extends BaseElement {
return myResource;
}
public String getResourceId() {
return myResourceId;
}
public Class<? extends IResource> getResourceType() {
return myResourceType;
}
public String getResourceUrl() {
return getReference().getValue();
}
@ -88,4 +123,12 @@ public abstract class BaseResourceReference extends BaseElement {
myResource = theResource;
}
public void setResourceId(String theResourceId) {
myResourceId = theResourceId;
}
public void setResourceType(Class<? extends IResource> theResourceType) {
myResourceType = theResourceType;
}
}

View File

@ -335,7 +335,7 @@ public class AttachmentDt
* The number of bytes of data that make up this attachment.
* </p>
*/
public AttachmentDt setSize( Integer theInteger) {
public AttachmentDt setSize( int theInteger) {
mySize = new IntegerDt(theInteger);
return this;
}

View File

@ -337,7 +337,7 @@ public class CodingDt
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
* </p>
*/
public CodingDt setPrimary( Boolean theBoolean) {
public CodingDt setPrimary( boolean theBoolean) {
myPrimary = new BooleanDt(theBoolean);
return this;
}

View File

@ -25,6 +25,7 @@ import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@ -59,11 +60,23 @@ public class IdentifierDt
/**
* Creates a new identifier with the given system and value
*/
public IdentifierDt(String theSystem, String theValue) {
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) {
setSystem(theSystem);
setValue(theValue);
}
/**
* Creates a new identifier with the given system and value
*/
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) {
setUse(theUse);
setSystem(theSystem);
setValue(theValue);
setLabel(theLabel);
}
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="usual | official | temp | secondary (If known)",

View File

@ -24,6 +24,7 @@ import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
/**
* HAPI/FHIR <b>Range</b> Datatype
@ -111,6 +112,58 @@ public class RangeDt
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( long theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( double theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>high</b> (High limit).
@ -142,6 +195,58 @@ public class RangeDt
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( long theValue) {
myHigh = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( double theValue) {
myHigh = new QuantityDt(theValue);
return this;
}

View File

@ -24,6 +24,7 @@ import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
/**
* HAPI/FHIR <b>Ratio</b> Datatype
@ -111,6 +112,58 @@ public class RatioDt
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( long theValue) {
myNumerator = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( double theValue) {
myNumerator = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>denominator</b> (Denominator value).
@ -142,6 +195,58 @@ public class RatioDt
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( long theValue) {
myDenominator = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( double theValue) {
myDenominator = new QuantityDt(theValue);
return this;
}

View File

@ -21,6 +21,7 @@ import java.util.List;
import ca.uhn.fhir.model.api.BaseResourceReference;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
@ -51,6 +52,33 @@ public class ResourceReferenceDt
// nothing
}
/**
* Constructor which creates a normal resource reference
*
* @param theResourceType The resource type
* @param theResourceId The resource ID
*/
public ResourceReferenceDt(Class<? extends IResource> theResourceType, String theResourceId) {
super(theResourceType, theResourceId);
}
/**
* Constructor which creates a resource reference containing the actual
* resource in question.
* <p>
* <b>
* When using this in a server:</b> Generally if this is serialized, it will be serialized
* as a contained resource, so this should not be used if the intent is not to actually
* supply the referenced resource. This is not a hard-and-fast rule however, as the
* server can be configured to not serialized this resource, or to load an ID and contain
* even if this constructor is not used.
* </p>
*
* @param theResource The resource instance
*/
public ResourceReferenceDt(IResource theResource) {
super(theResource);
}
@Child(name="reference", type=StringDt.class, order=0, min=0, max=1)
@Description(

View File

@ -24,6 +24,7 @@ import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
@ -149,6 +150,58 @@ public class SampledDataDt
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( long theValue) {
myOrigin = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( double theValue) {
myOrigin = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>period</b> (Number of milliseconds between samples).
@ -468,7 +521,7 @@ public class SampledDataDt
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
* </p>
*/
public SampledDataDt setDimensions( Integer theInteger) {
public SampledDataDt setDimensions( int theInteger) {
myDimensions = new IntegerDt(theInteger);
return this;
}

View File

@ -290,7 +290,7 @@ public class ScheduleDt
* Indicates how often the event should occur.
* </p>
*/
public Repeat setFrequency( Integer theInteger) {
public Repeat setFrequency( int theInteger) {
myFrequency = new IntegerDt(theInteger);
return this;
}
@ -492,7 +492,7 @@ public class ScheduleDt
* A total count of the desired number of repetitions
* </p>
*/
public Repeat setCount( Integer theInteger) {
public Repeat setCount( int theInteger) {
myCount = new IntegerDt(theInteger);
return this;
}

View File

@ -0,0 +1,909 @@
package ca.uhn.fhir.model.dstu.resource;
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.CausalityExpectationEnum;
import ca.uhn.fhir.model.dstu.valueset.ExposureTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ReactionSeverityEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
/**
* HAPI/FHIR <b>AdverseReaction</b> Resource
* (Specific reactions to a substance)
*
* <p>
* <b>Definition:</b>
* Records an unexpected reaction suspected to be related to the exposure of the reaction subject to a substance
* </p>
*
* <p>
* <b>Requirements:</b>
* Used to track reactions when it is unknown the exact cause but there's a desire to flag/track potential causes. Also used to capture reactions that are significant for inclusion in the health record or as evidence for an allergy or intolerance.
* </p>
*/
@ResourceDef(name="AdverseReaction", profile="http://hl7.org/fhir/profiles/AdverseReaction", id="adversereaction")
public class AdverseReaction extends BaseResource implements IResource {
/**
* Search parameter constant for <b>symptom</b>
* <p>
* Description: <b>One of the symptoms of the reaction</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AdverseReaction.symptom.code</b><br/>
* </p>
*/
public static final String SP_SYMPTOM = "symptom";
/**
* Search parameter constant for <b>substance</b>
* <p>
* Description: <b>The name or code of the substance that produces the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.exposure.substance</b><br/>
* </p>
*/
public static final String SP_SUBSTANCE = "substance";
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b>The date of the reaction</b><br/>
* Type: <b>date</b><br/>
* Path: <b>AdverseReaction.date</b><br/>
* </p>
*/
public static final String SP_DATE = "date";
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the sensitivity is about</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.subject</b><br/>
* </p>
*/
public static final String SP_SUBJECT = "subject";
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this adverse reaction",
formalDefinition="This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="date", type=DateTimeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="When the reaction occurred",
formalDefinition="The date (and possibly time) when the reaction began"
)
private DateTimeDt myDate;
@Child(name="subject", order=2, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class,
})
@Description(
shortDefinition="Who had the reaction",
formalDefinition="The subject of the adverse reaction"
)
private ResourceReferenceDt mySubject;
@Child(name="didNotOccurFlag", type=BooleanDt.class, order=3, min=1, max=1)
@Description(
shortDefinition="Indicates lack of reaction",
formalDefinition="If true, indicates that no reaction occurred."
)
private BooleanDt myDidNotOccurFlag;
@Child(name="recorder", order=4, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class,
ca.uhn.fhir.model.dstu.resource.Patient.class,
})
@Description(
shortDefinition="Who recorded the reaction",
formalDefinition="Identifies the individual responsible for the information in the reaction record."
)
private ResourceReferenceDt myRecorder;
@Child(name="symptom", order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="What was reaction?",
formalDefinition="The signs and symptoms that were observed as part of the reaction"
)
private java.util.List<Symptom> mySymptom;
@Child(name="exposure", order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Suspected substance",
formalDefinition="An exposure to a substance that preceded a reaction occurrence"
)
private java.util.List<Exposure> myExposure;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myDate, mySubject, myDidNotOccurFlag, myRecorder, mySymptom, myExposure);
}
@Override
public java.util.List<IElement> getAllPopulatedChildElements() {
return getAllPopulatedChildElementsOfType(null);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, mySubject, myDidNotOccurFlag, myRecorder, mySymptom, myExposure);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this adverse reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public AdverseReaction setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this adverse reaction),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AdverseReaction addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AdverseReaction addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>date</b> (When the reaction occurred).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who had the reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The subject of the adverse reaction
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Who had the reaction)
*
* <p>
* <b>Definition:</b>
* The subject of the adverse reaction
* </p>
*/
public AdverseReaction setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>didNotOccurFlag</b> (Indicates lack of reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public BooleanDt getDidNotOccurFlag() {
if (myDidNotOccurFlag == null) {
myDidNotOccurFlag = new BooleanDt();
}
return myDidNotOccurFlag;
}
/**
* Sets the value(s) for <b>didNotOccurFlag</b> (Indicates lack of reaction)
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public AdverseReaction setDidNotOccurFlag(BooleanDt theValue) {
myDidNotOccurFlag = theValue;
return this;
}
/**
* Sets the value for <b>didNotOccurFlag</b> (Indicates lack of reaction)
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public AdverseReaction setDidNotOccurFlag( boolean theBoolean) {
myDidNotOccurFlag = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>recorder</b> (Who recorded the reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the individual responsible for the information in the reaction record.
* </p>
*/
public ResourceReferenceDt getRecorder() {
return myRecorder;
}
/**
* Sets the value(s) for <b>recorder</b> (Who recorded the reaction)
*
* <p>
* <b>Definition:</b>
* Identifies the individual responsible for the information in the reaction record.
* </p>
*/
public AdverseReaction setRecorder(ResourceReferenceDt theValue) {
myRecorder = theValue;
return this;
}
/**
* Gets the value(s) for <b>symptom</b> (What was reaction?).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public java.util.List<Symptom> getSymptom() {
if (mySymptom == null) {
mySymptom = new java.util.ArrayList<Symptom>();
}
return mySymptom;
}
/**
* Sets the value(s) for <b>symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public AdverseReaction setSymptom(java.util.List<Symptom> theValue) {
mySymptom = theValue;
return this;
}
/**
* Adds and returns a new value for <b>symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public Symptom addSymptom() {
Symptom newType = new Symptom();
getSymptom().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>symptom</b> (What was reaction?),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public Symptom getSymptomFirstRep() {
if (getSymptom().isEmpty()) {
return addSymptom();
}
return getSymptom().get(0);
}
/**
* Gets the value(s) for <b>exposure</b> (Suspected substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public java.util.List<Exposure> getExposure() {
if (myExposure == null) {
myExposure = new java.util.ArrayList<Exposure>();
}
return myExposure;
}
/**
* Sets the value(s) for <b>exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public AdverseReaction setExposure(java.util.List<Exposure> theValue) {
myExposure = theValue;
return this;
}
/**
* Adds and returns a new value for <b>exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public Exposure addExposure() {
Exposure newType = new Exposure();
getExposure().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>exposure</b> (Suspected substance),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public Exposure getExposureFirstRep() {
if (getExposure().isEmpty()) {
return addExposure();
}
return getExposure().get(0);
}
/**
* Block class for child element: <b>AdverseReaction.symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
@Block(name="AdverseReaction.symptom")
public static class Symptom extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="E.g. Rash, vomiting",
formalDefinition="Indicates the specific sign or symptom that was observed"
)
private CodeableConceptDt myCode;
@Child(name="severity", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="severe | serious | moderate | minor",
formalDefinition="The severity of the sign or symptom"
)
private BoundCodeDt<ReactionSeverityEnum> mySeverity;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, mySeverity);
}
@Override
public java.util.List<IElement> getAllPopulatedChildElements() {
return getAllPopulatedChildElementsOfType(null);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, mySeverity);
}
/**
* Gets the value(s) for <b>code</b> (E.g. Rash, vomiting).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates the specific sign or symptom that was observed
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (E.g. Rash, vomiting)
*
* <p>
* <b>Definition:</b>
* Indicates the specific sign or symptom that was observed
* </p>
*/
public Symptom setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>severity</b> (severe | serious | moderate | minor).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public BoundCodeDt<ReactionSeverityEnum> getSeverity() {
if (mySeverity == null) {
mySeverity = new BoundCodeDt<ReactionSeverityEnum>(ReactionSeverityEnum.VALUESET_BINDER);
}
return mySeverity;
}
/**
* Sets the value(s) for <b>severity</b> (severe | serious | moderate | minor)
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public Symptom setSeverity(BoundCodeDt<ReactionSeverityEnum> theValue) {
mySeverity = theValue;
return this;
}
/**
* Sets the value(s) for <b>severity</b> (severe | serious | moderate | minor)
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public Symptom setSeverity(ReactionSeverityEnum theValue) {
getSeverity().setValueAsEnum(theValue);
return this;
}
}
/**
* Block class for child element: <b>AdverseReaction.exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
@Block(name="AdverseReaction.exposure")
public static class Exposure extends BaseElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="When the exposure occurred",
formalDefinition="Identifies the initial date of the exposure that is suspected to be related to the reaction"
)
private DateTimeDt myDate;
@Child(name="type", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="drugadmin | immuniz | coincidental",
formalDefinition="The type of exposure: Drug Administration, Immunization, Coincidental"
)
private BoundCodeDt<ExposureTypeEnum> myType;
@Child(name="causalityExpectation", type=CodeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="likely | unlikely | confirmed | unknown",
formalDefinition="A statement of how confident that the recorder was that this exposure caused the reaction"
)
private BoundCodeDt<CausalityExpectationEnum> myCausalityExpectation;
@Child(name="substance", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class,
})
@Description(
shortDefinition="Presumed causative substance",
formalDefinition="Substance that is presumed to have caused the adverse reaction"
)
private ResourceReferenceDt mySubstance;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDate, myType, myCausalityExpectation, mySubstance);
}
@Override
public java.util.List<IElement> getAllPopulatedChildElements() {
return getAllPopulatedChildElementsOfType(null);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDate, myType, myCausalityExpectation, mySubstance);
}
/**
* Gets the value(s) for <b>date</b> (When the exposure occurred).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public BoundCodeDt<ExposureTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeDt<ExposureTypeEnum>(ExposureTypeEnum.VALUESET_BINDER);
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental)
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public Exposure setType(BoundCodeDt<ExposureTypeEnum> theValue) {
myType = theValue;
return this;
}
/**
* Sets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental)
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public Exposure setType(ExposureTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public BoundCodeDt<CausalityExpectationEnum> getCausalityExpectation() {
if (myCausalityExpectation == null) {
myCausalityExpectation = new BoundCodeDt<CausalityExpectationEnum>(CausalityExpectationEnum.VALUESET_BINDER);
}
return myCausalityExpectation;
}
/**
* Sets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown)
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public Exposure setCausalityExpectation(BoundCodeDt<CausalityExpectationEnum> theValue) {
myCausalityExpectation = theValue;
return this;
}
/**
* Sets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown)
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public Exposure setCausalityExpectation(CausalityExpectationEnum theValue) {
getCausalityExpectation().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>substance</b> (Presumed causative substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Substance that is presumed to have caused the adverse reaction
* </p>
*/
public ResourceReferenceDt getSubstance() {
if (mySubstance == null) {
mySubstance = new ResourceReferenceDt();
}
return mySubstance;
}
/**
* Sets the value(s) for <b>substance</b> (Presumed causative substance)
*
* <p>
* <b>Definition:</b>
* Substance that is presumed to have caused the adverse reaction
* </p>
*/
public Exposure setSubstance(ResourceReferenceDt theValue) {
mySubstance = theValue;
return this;
}
}
}

View File

@ -740,7 +740,7 @@ public class Conformance extends BaseResource implements IResource {
* A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
* </p>
*/
public Conformance setExperimental( Boolean theBoolean) {
public Conformance setExperimental( boolean theBoolean) {
myExperimental = new BooleanDt(theBoolean);
return this;
}
@ -947,7 +947,7 @@ public class Conformance extends BaseResource implements IResource {
* A flag that indicates whether the application accepts unknown elements as part of a resource.
* </p>
*/
public Conformance setAcceptUnknown( Boolean theBoolean) {
public Conformance setAcceptUnknown( boolean theBoolean) {
myAcceptUnknown = new BooleanDt(theBoolean);
return this;
}
@ -2134,7 +2134,7 @@ public class Conformance extends BaseResource implements IResource {
* Server adds CORS headers when responding to requests - this enables javascript applications to yuse the server
* </p>
*/
public RestSecurity setCors( Boolean theBoolean) {
public RestSecurity setCors( boolean theBoolean) {
myCors = new BooleanDt(theBoolean);
return this;
}
@ -2689,7 +2689,7 @@ public class Conformance extends BaseResource implements IResource {
* A flag for whether the server is able to return past versions as part of the vRead operation
* </p>
*/
public RestResource setReadHistory( Boolean theBoolean) {
public RestResource setReadHistory( boolean theBoolean) {
myReadHistory = new BooleanDt(theBoolean);
return this;
}
@ -2733,7 +2733,7 @@ public class Conformance extends BaseResource implements IResource {
* A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server
* </p>
*/
public RestResource setUpdateCreate( Boolean theBoolean) {
public RestResource setUpdateCreate( boolean theBoolean) {
myUpdateCreate = new BooleanDt(theBoolean);
return this;
}
@ -3920,7 +3920,7 @@ public class Conformance extends BaseResource implements IResource {
* Length if the receiver's reliable messaging cache (if a receiver) or how long the cache length on the receiver should be (if a sender)
* </p>
*/
public Messaging setReliableCache( Integer theInteger) {
public Messaging setReliableCache( int theInteger) {
myReliableCache = new IntegerDt(theInteger);
return this;
}

View File

@ -31,6 +31,7 @@ import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
@ -306,6 +307,42 @@ public class Device extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Instance id from manufacturer, owner and others)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this device by various organizations. The most likely organizations to assign identifiers are the manufacturer and the owner, though regulatory agencies may also assign an identifier. The identifiers identify the particular device, not the kind of device
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Device addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Instance id from manufacturer, owner and others)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this device by various organizations. The most likely organizations to assign identifiers are the manufacturer and the owner, though regulatory agencies may also assign an identifier. The identifiers identify the particular device, not the kind of device
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Device addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>type</b> (What kind of device this is).

View File

@ -35,6 +35,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
@ -434,6 +435,42 @@ public class DiagnosticOrder extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order by the order or by the receiver
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public DiagnosticOrder addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order by the order or by the receiver
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public DiagnosticOrder addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>encounter</b> (The encounter that this diagnostic order is associated with).

View File

@ -37,6 +37,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
@ -556,6 +557,32 @@ public class DiagnosticReport extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Id for external references to this report)
*
* <p>
* <b>Definition:</b>
* The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
* </p>
*/
public DiagnosticReport setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Id for external references to this report)
*
* <p>
* <b>Definition:</b>
* The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
* </p>
*/
public DiagnosticReport setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>requestDetail</b> (What was requested).

View File

@ -38,6 +38,7 @@ import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum;
import ca.uhn.fhir.model.dstu.valueset.EncounterReasonCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum;
import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
@ -341,6 +342,42 @@ public class Encounter extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) by which this encounter is known)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Encounter addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) by which this encounter is known)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Encounter addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>status</b> (planned | in progress | onleave | finished | cancelled).
@ -1179,6 +1216,32 @@ public class Encounter extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>preAdmissionIdentifier</b> (Pre-admission identifier)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Hospitalization setPreAdmissionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myPreAdmissionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>preAdmissionIdentifier</b> (Pre-admission identifier)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Hospitalization setPreAdmissionIdentifier( String theSystem, String theValue) {
myPreAdmissionIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>origin</b> (The location from which the patient came before admission).
@ -1628,7 +1691,7 @@ public class Encounter extends BaseResource implements IResource {
* Whether this hospitalization is a readmission
* </p>
*/
public Hospitalization setReAdmission( Boolean theBoolean) {
public Hospitalization setReAdmission( boolean theBoolean) {
myReAdmission = new BooleanDt(theBoolean);
return this;
}

View File

@ -35,6 +35,7 @@ import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.RangeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@ -258,6 +259,32 @@ public class Group extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique id)
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public Group setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique id)
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public Group setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>type</b> (person | animal | practitioner | device | medication | substance).
@ -341,7 +368,7 @@ public class Group extends BaseResource implements IResource {
* If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals
* </p>
*/
public Group setActual( Boolean theBoolean) {
public Group setActual( boolean theBoolean) {
myActual = new BooleanDt(theBoolean);
return this;
}
@ -460,7 +487,7 @@ public class Group extends BaseResource implements IResource {
* A count of the number of resource instances that are part of the group
* </p>
*/
public Group setQuantity( Integer theInteger) {
public Group setQuantity( int theInteger) {
myQuantity = new IntegerDt(theInteger);
return this;
}
@ -717,7 +744,7 @@ public class Group extends BaseResource implements IResource {
* If true, indicates the characteristic is one that is NOT held by members of the group
* </p>
*/
public Characteristic setExclude( Boolean theBoolean) {
public Characteristic setExclude( boolean theBoolean) {
myExclude = new BooleanDt(theBoolean);
return this;
}

View File

@ -33,6 +33,7 @@ import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum;
import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum;
import ca.uhn.fhir.model.dstu.valueset.ModalityEnum;
@ -455,6 +456,32 @@ public class ImagingStudy extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>accessionNo</b> (Accession Number (0008,0050))
*
* <p>
* <b>Definition:</b>
* Accession Number
* </p>
*/
public ImagingStudy setAccessionNo( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myAccessionNo = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>accessionNo</b> (Accession Number (0008,0050))
*
* <p>
* <b>Definition:</b>
* Accession Number
* </p>
*/
public ImagingStudy setAccessionNo( String theSystem, String theValue) {
myAccessionNo = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>identifier</b> (Other identifiers for the study (0020,0010)).
@ -515,6 +542,42 @@ public class ImagingStudy extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Other identifiers for the study (0020,0010))
*
* <p>
* <b>Definition:</b>
* Other identifiers for the study
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public ImagingStudy addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Other identifiers for the study (0020,0010))
*
* <p>
* <b>Definition:</b>
* Other identifiers for the study
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public ImagingStudy addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>order</b> (Order(s) that caused this study to be performed).
@ -774,7 +837,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Number of Series in Study
* </p>
*/
public ImagingStudy setNumberOfSeries( Integer theInteger) {
public ImagingStudy setNumberOfSeries( int theInteger) {
myNumberOfSeries = new IntegerDt(theInteger);
return this;
}
@ -818,7 +881,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Number of SOP Instances in Study
* </p>
*/
public ImagingStudy setNumberOfInstances( Integer theInteger) {
public ImagingStudy setNumberOfInstances( int theInteger) {
myNumberOfInstances = new IntegerDt(theInteger);
return this;
}
@ -1198,7 +1261,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* The number of this series in the overall sequence
* </p>
*/
public Series setNumber( Integer theInteger) {
public Series setNumber( int theInteger) {
myNumber = new IntegerDt(theInteger);
return this;
}
@ -1361,7 +1424,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Sequence that contains attributes from the
* </p>
*/
public Series setNumberOfInstances( Integer theInteger) {
public Series setNumberOfInstances( int theInteger) {
myNumberOfInstances = new IntegerDt(theInteger);
return this;
}
@ -1722,7 +1785,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* The number of this image in the series
* </p>
*/
public SeriesInstance setNumber( Integer theInteger) {
public SeriesInstance setNumber( int theInteger) {
myNumber = new IntegerDt(theInteger);
return this;
}

View File

@ -33,6 +33,7 @@ import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum;
@ -275,6 +276,32 @@ public class Location extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique code or number identifying the location to its users)
*
* <p>
* <b>Definition:</b>
* Unique code or number identifying the location to its users
* </p>
*/
public Location setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique code or number identifying the location to its users)
*
* <p>
* <b>Definition:</b>
* Unique code or number identifying the location to its users
* </p>
*/
public Location setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>name</b> (Name of the location as used by humans).

View File

@ -31,6 +31,7 @@ import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@ -376,6 +377,42 @@ public class Media extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Media addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Media addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>dateTime</b> (When the media was taken/recorded (end)).
@ -606,7 +643,7 @@ public class Media extends BaseResource implements IResource {
* Height of the image in pixels(photo/video)
* </p>
*/
public Media setHeight( Integer theInteger) {
public Media setHeight( int theInteger) {
myHeight = new IntegerDt(theInteger);
return this;
}
@ -650,7 +687,7 @@ public class Media extends BaseResource implements IResource {
* Width of the image in pixels (photo/video)
* </p>
*/
public Media setWidth( Integer theInteger) {
public Media setWidth( int theInteger) {
myWidth = new IntegerDt(theInteger);
return this;
}
@ -694,7 +731,7 @@ public class Media extends BaseResource implements IResource {
* The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required
* </p>
*/
public Media setFrames( Integer theInteger) {
public Media setFrames( int theInteger) {
myFrames = new IntegerDt(theInteger);
return this;
}
@ -738,7 +775,7 @@ public class Media extends BaseResource implements IResource {
* The length of the recording in seconds - for audio and video
* </p>
*/
public Media setLength( Integer theInteger) {
public Media setLength( int theInteger) {
myLength = new IntegerDt(theInteger);
return this;
}

View File

@ -306,7 +306,7 @@ public class Medication extends BaseResource implements IResource {
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
* </p>
*/
public Medication setIsBrand( Boolean theBoolean) {
public Medication setIsBrand( boolean theBoolean) {
myIsBrand = new BooleanDt(theBoolean);
return this;
}

View File

@ -40,10 +40,12 @@ import ca.uhn.fhir.model.dstu.composite.RangeDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.composite.SampledDataDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationInterpretationCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@ -782,6 +784,32 @@ public class Observation extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique Id for this particular observation)
*
* <p>
* <b>Definition:</b>
* A unique identifier for the simple observation
* </p>
*/
public Observation setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique Id for this particular observation)
*
* <p>
* <b>Definition:</b>
* A unique identifier for the simple observation
* </p>
*/
public Observation setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who and/or what this is about).
@ -1088,6 +1116,58 @@ public class Observation extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>low</b> (Low Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
* </p>
*/
public ReferenceRange setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
* </p>
*/
public ReferenceRange setLow( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
* </p>
*/
public ReferenceRange setLow( long theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>low</b> (Low Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
* </p>
*/
public ReferenceRange setLow( double theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>high</b> (High Range, if relevant).
@ -1119,6 +1199,58 @@ public class Observation extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>high</b> (High Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
* </p>
*/
public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
* </p>
*/
public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
* </p>
*/
public ReferenceRange setHigh( long theValue) {
myHigh = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>high</b> (High Range, if relevant)
*
* <p>
* <b>Definition:</b>
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
* </p>
*/
public ReferenceRange setHigh( double theValue) {
myHigh = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>meaning</b> (Indicates the meaning/use of this range of this range).

View File

@ -35,6 +35,7 @@ import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
@ -271,6 +272,42 @@ public class Organization extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifies this organization across multiple systems)
*
* <p>
* <b>Definition:</b>
* Identifier for the organization that is used to identify the organization across multiple disparate systems
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Organization addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifies this organization across multiple systems)
*
* <p>
* <b>Definition:</b>
* Identifier for the organization that is used to identify the organization across multiple disparate systems
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Organization addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>name</b> (Name used for the organization).
@ -653,7 +690,7 @@ public class Organization extends BaseResource implements IResource {
* Whether the organization's record is still in active use
* </p>
*/
public Organization setActive( Boolean theBoolean) {
public Organization setActive( boolean theBoolean) {
myActive = new BooleanDt(theBoolean);
return this;
}

View File

@ -40,6 +40,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
@ -423,6 +424,42 @@ public class Patient extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (An identifier for the person as this patient)
*
* <p>
* <b>Definition:</b>
* An identifier that applies to this person as a patient
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Patient addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (An identifier for the person as this patient)
*
* <p>
* <b>Definition:</b>
* An identifier that applies to this person as a patient
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Patient addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>name</b> (A name associated with the patient).
@ -1186,7 +1223,7 @@ public class Patient extends BaseResource implements IResource {
* Whether this patient record is in active use
* </p>
*/
public Patient setActive( Boolean theBoolean) {
public Patient setActive( boolean theBoolean) {
myActive = new BooleanDt(theBoolean);
return this;
}

View File

@ -39,6 +39,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum;
import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
@ -330,6 +331,42 @@ public class Practitioner extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (A identifier for the person as this agent)
*
* <p>
* <b>Definition:</b>
* An identifier that applies to this person in this role
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Practitioner addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (A identifier for the person as this agent)
*
* <p>
* <b>Definition:</b>
* An identifier that applies to this person in this role
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Practitioner addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>name</b> (A name associated with the person).

View File

@ -732,7 +732,7 @@ public class Profile extends BaseResource implements IResource {
* This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
* </p>
*/
public Profile setExperimental( Boolean theBoolean) {
public Profile setExperimental( boolean theBoolean) {
myExperimental = new BooleanDt(theBoolean);
return this;
}
@ -1553,7 +1553,7 @@ public class Profile extends BaseResource implements IResource {
* This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context
* </p>
*/
public Structure setPublish( Boolean theBoolean) {
public Structure setPublish( boolean theBoolean) {
myPublish = new BooleanDt(theBoolean);
return this;
}
@ -2128,7 +2128,7 @@ public class Profile extends BaseResource implements IResource {
* If the matching elements have to occur in the same order as defined in the profile
* </p>
*/
public StructureElementSlicing setOrdered( Boolean theBoolean) {
public StructureElementSlicing setOrdered( boolean theBoolean) {
myOrdered = new BooleanDt(theBoolean);
return this;
}
@ -2627,7 +2627,7 @@ public class Profile extends BaseResource implements IResource {
* The minimum number of times this element SHALL appear in the instance
* </p>
*/
public StructureElementDefinition setMin( Integer theInteger) {
public StructureElementDefinition setMin( int theInteger) {
myMin = new IntegerDt(theInteger);
return this;
}
@ -2875,7 +2875,7 @@ public class Profile extends BaseResource implements IResource {
* Indicates the shortest length that SHALL be supported by conformant instances without truncation
* </p>
*/
public StructureElementDefinition setMaxLength( Integer theInteger) {
public StructureElementDefinition setMaxLength( int theInteger) {
myMaxLength = new IntegerDt(theInteger);
return this;
}
@ -3057,7 +3057,7 @@ public class Profile extends BaseResource implements IResource {
* If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported
* </p>
*/
public StructureElementDefinition setMustSupport( Boolean theBoolean) {
public StructureElementDefinition setMustSupport( boolean theBoolean) {
myMustSupport = new BooleanDt(theBoolean);
return this;
}
@ -3101,7 +3101,7 @@ public class Profile extends BaseResource implements IResource {
* If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
* </p>
*/
public StructureElementDefinition setIsModifier( Boolean theBoolean) {
public StructureElementDefinition setIsModifier( boolean theBoolean) {
myIsModifier = new BooleanDt(theBoolean);
return this;
}
@ -3831,7 +3831,7 @@ public class Profile extends BaseResource implements IResource {
* If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding. If false, then conformant systems are constrained to the provided codes alone
* </p>
*/
public StructureElementDefinitionBinding setIsExtensible( Boolean theBoolean) {
public StructureElementDefinitionBinding setIsExtensible( boolean theBoolean) {
myIsExtensible = new BooleanDt(theBoolean);
return this;
}

View File

@ -33,6 +33,7 @@ import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
@ -258,6 +259,42 @@ public class RelatedPerson extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>patient</b> (The patient this person is related to).

View File

@ -37,6 +37,8 @@ import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum;
import ca.uhn.fhir.model.dstu.valueset.SpecimenTreatmentProcedureEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
@ -217,6 +219,42 @@ public class Specimen extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Identifier)
*
* <p>
* <b>Definition:</b>
* Id for specimen
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Specimen addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Identifier)
*
* <p>
* <b>Definition:</b>
* Id for specimen
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Specimen addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>type</b> (Kind of material that forms the specimen).
@ -367,6 +405,32 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>accessionIdentifier</b> (Identifier assigned by the lab)
*
* <p>
* <b>Definition:</b>
* The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.
* </p>
*/
public Specimen setAccessionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myAccessionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>accessionIdentifier</b> (Identifier assigned by the lab)
*
* <p>
* <b>Definition:</b>
* The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.
* </p>
*/
public Specimen setAccessionIdentifier( String theSystem, String theValue) {
myAccessionIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>receivedTime</b> (The time when specimen was received for processing).
@ -952,6 +1016,58 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>quantity</b> (The quantity of specimen collected)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
* </p>
*/
public Collection setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (The quantity of specimen collected)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
* </p>
*/
public Collection setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (The quantity of specimen collected)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
* </p>
*/
public Collection setQuantity( long theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>quantity</b> (The quantity of specimen collected)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
* </p>
*/
public Collection setQuantity( double theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>method</b> (Technique used to perform collection).
@ -1348,6 +1464,42 @@ public class Specimen extends BaseResource implements IResource {
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Id for the container)
*
* <p>
* <b>Definition:</b>
* Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Container addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Id for the container)
*
* <p>
* <b>Definition:</b>
* Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Container addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>description</b> (Textual description of the container).
@ -1454,6 +1606,58 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>capacity</b> (Container volume or size)
*
* <p>
* <b>Definition:</b>
* The capacity (volume or other measure) the container may contain.
* </p>
*/
public Container setCapacity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myCapacity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>capacity</b> (Container volume or size)
*
* <p>
* <b>Definition:</b>
* The capacity (volume or other measure) the container may contain.
* </p>
*/
public Container setCapacity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myCapacity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>capacity</b> (Container volume or size)
*
* <p>
* <b>Definition:</b>
* The capacity (volume or other measure) the container may contain.
* </p>
*/
public Container setCapacity( long theValue) {
myCapacity = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>capacity</b> (Container volume or size)
*
* <p>
* <b>Definition:</b>
* The capacity (volume or other measure) the container may contain.
* </p>
*/
public Container setCapacity( double theValue) {
myCapacity = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>specimenQuantity</b> (Quantity of specimen within container).
@ -1485,6 +1689,58 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>specimenQuantity</b> (Quantity of specimen within container)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
* </p>
*/
public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
mySpecimenQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>specimenQuantity</b> (Quantity of specimen within container)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
* </p>
*/
public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
mySpecimenQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>specimenQuantity</b> (Quantity of specimen within container)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
* </p>
*/
public Container setSpecimenQuantity( long theValue) {
mySpecimenQuantity = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>specimenQuantity</b> (Quantity of specimen within container)
*
* <p>
* <b>Definition:</b>
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
* </p>
*/
public Container setSpecimenQuantity( double theValue) {
mySpecimenQuantity = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>additive</b> (Additive associated with container).

View File

@ -35,6 +35,8 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
@ -410,6 +412,32 @@ public class Substance extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Identifier of the package/container)
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public Instance setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Identifier of the package/container)
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public Instance setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>expiry</b> (When no longer valid to use).
@ -498,6 +526,58 @@ public class Substance extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( long theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( double theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
}

View File

@ -33,6 +33,7 @@ import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
@ -691,7 +692,7 @@ public class ValueSet extends BaseResource implements IResource {
* This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
* </p>
*/
public ValueSet setExperimental( Boolean theBoolean) {
public ValueSet setExperimental( boolean theBoolean) {
myExperimental = new BooleanDt(theBoolean);
return this;
}
@ -735,7 +736,7 @@ public class ValueSet extends BaseResource implements IResource {
* Whether this is intended to be used with an extensible binding or not
* </p>
*/
public ValueSet setExtensible( Boolean theBoolean) {
public ValueSet setExtensible( boolean theBoolean) {
myExtensible = new BooleanDt(theBoolean);
return this;
}
@ -1072,7 +1073,7 @@ public class ValueSet extends BaseResource implements IResource {
* If code comparison is case sensitive when codes within this system are compared to each other
* </p>
*/
public Define setCaseSensitive( Boolean theBoolean) {
public Define setCaseSensitive( boolean theBoolean) {
myCaseSensitive = new BooleanDt(theBoolean);
return this;
}
@ -1285,7 +1286,7 @@ public class ValueSet extends BaseResource implements IResource {
* If this code is not for use as a real concept
* </p>
*/
public DefineConcept setAbstract( Boolean theBoolean) {
public DefineConcept setAbstract( boolean theBoolean) {
myAbstract = new BooleanDt(theBoolean);
return this;
}
@ -2241,6 +2242,32 @@ public class ValueSet extends BaseResource implements IResource {
return this;
}
/**
* Sets the value for <b>identifier</b> (Uniquely identifies this expansion)
*
* <p>
* <b>Definition:</b>
* An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
* </p>
*/
public Expansion setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Uniquely identifies this expansion)
*
* <p>
* <b>Definition:</b>
* An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so
* </p>
*/
public Expansion setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>timestamp</b> (Time valueset expansion happened).

View File

@ -0,0 +1,131 @@
package ca.uhn.fhir.model.dstu.valueset;
import java.util.HashMap;
import java.util.Map;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
public enum CausalityExpectationEnum {
/**
* Code Value: <b>likely</b>
*
* Likely that this specific exposure caused the reaction.
*/
LIKELY("likely", "http://hl7.org/fhir/causalityExpectation"),
/**
* Code Value: <b>unlikely</b>
*
* Unlikely that this specific exposure caused the reaction - the exposure is being linked to for information purposes.
*/
UNLIKELY("unlikely", "http://hl7.org/fhir/causalityExpectation"),
/**
* Code Value: <b>confirmed</b>
*
* It has been confirmed that this exposure was one of the causes of the reaction.
*/
CONFIRMED("confirmed", "http://hl7.org/fhir/causalityExpectation"),
/**
* Code Value: <b>unknown</b>
*
* It is unknown whether this exposure had anything to do with the reaction.
*/
UNKNOWN("unknown", "http://hl7.org/fhir/causalityExpectation"),
;
/**
* Identifier for this Value Set:
* http://hl7.org/fhir/vs/causalityExpectation
*/
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/causalityExpectation";
/**
* Name for this Value Set:
* CausalityExpectation
*/
public static final String VALUESET_NAME = "CausalityExpectation";
private static Map<String, CausalityExpectationEnum> CODE_TO_ENUM = new HashMap<String, CausalityExpectationEnum>();
private static Map<String, Map<String, CausalityExpectationEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CausalityExpectationEnum>>();
private final String myCode;
private final String mySystem;
static {
for (CausalityExpectationEnum next : CausalityExpectationEnum.values()) {
CODE_TO_ENUM.put(next.getCode(), next);
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, CausalityExpectationEnum>());
}
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
}
}
/**
* Returns the code associated with this enumerated value
*/
public String getCode() {
return myCode;
}
/**
* Returns the code system associated with this enumerated value
*/
public String getSystem() {
return mySystem;
}
/**
* Returns the enumerated value associated with this code
*/
public CausalityExpectationEnum forCode(String theCode) {
CausalityExpectationEnum retVal = CODE_TO_ENUM.get(theCode);
return retVal;
}
/**
* Converts codes to their respective enumerated values
*/
public static final IValueSetEnumBinder<CausalityExpectationEnum> VALUESET_BINDER = new IValueSetEnumBinder<CausalityExpectationEnum>() {
@Override
public String toCodeString(CausalityExpectationEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(CausalityExpectationEnum theEnum) {
return theEnum.getSystem();
}
@Override
public CausalityExpectationEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public CausalityExpectationEnum fromCodeString(String theCodeString, String theSystemString) {
Map<String, CausalityExpectationEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
CausalityExpectationEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}

View File

@ -0,0 +1,124 @@
package ca.uhn.fhir.model.dstu.valueset;
import java.util.HashMap;
import java.util.Map;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
public enum ExposureTypeEnum {
/**
* Code Value: <b>drugadmin</b>
*
* Drug Administration.
*/
DRUGADMIN("drugadmin", "http://hl7.org/fhir/exposureType"),
/**
* Code Value: <b>immuniz</b>
*
* Immunization.
*/
IMMUNIZ("immuniz", "http://hl7.org/fhir/exposureType"),
/**
* Code Value: <b>coincidental</b>
*
* In the same area as the substance.
*/
COINCIDENTAL("coincidental", "http://hl7.org/fhir/exposureType"),
;
/**
* Identifier for this Value Set:
* http://hl7.org/fhir/vs/exposureType
*/
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/exposureType";
/**
* Name for this Value Set:
* ExposureType
*/
public static final String VALUESET_NAME = "ExposureType";
private static Map<String, ExposureTypeEnum> CODE_TO_ENUM = new HashMap<String, ExposureTypeEnum>();
private static Map<String, Map<String, ExposureTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ExposureTypeEnum>>();
private final String myCode;
private final String mySystem;
static {
for (ExposureTypeEnum next : ExposureTypeEnum.values()) {
CODE_TO_ENUM.put(next.getCode(), next);
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, ExposureTypeEnum>());
}
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
}
}
/**
* Returns the code associated with this enumerated value
*/
public String getCode() {
return myCode;
}
/**
* Returns the code system associated with this enumerated value
*/
public String getSystem() {
return mySystem;
}
/**
* Returns the enumerated value associated with this code
*/
public ExposureTypeEnum forCode(String theCode) {
ExposureTypeEnum retVal = CODE_TO_ENUM.get(theCode);
return retVal;
}
/**
* Converts codes to their respective enumerated values
*/
public static final IValueSetEnumBinder<ExposureTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<ExposureTypeEnum>() {
@Override
public String toCodeString(ExposureTypeEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(ExposureTypeEnum theEnum) {
return theEnum.getSystem();
}
@Override
public ExposureTypeEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public ExposureTypeEnum fromCodeString(String theCodeString, String theSystemString) {
Map<String, ExposureTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
ExposureTypeEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}

View File

@ -0,0 +1,131 @@
package ca.uhn.fhir.model.dstu.valueset;
import java.util.HashMap;
import java.util.Map;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
public enum ReactionSeverityEnum {
/**
* Code Value: <b>severe</b>
*
* Severe complications arose due to the reaction.
*/
SEVERE("severe", "http://hl7.org/fhir/reactionSeverity"),
/**
* Code Value: <b>serious</b>
*
* Serious inconvenience to the subject.
*/
SERIOUS("serious", "http://hl7.org/fhir/reactionSeverity"),
/**
* Code Value: <b>moderate</b>
*
* Moderate inconvenience to the subject.
*/
MODERATE("moderate", "http://hl7.org/fhir/reactionSeverity"),
/**
* Code Value: <b>minor</b>
*
* Minor inconvenience to the subject.
*/
MINOR("minor", "http://hl7.org/fhir/reactionSeverity"),
;
/**
* Identifier for this Value Set:
* http://hl7.org/fhir/vs/reactionSeverity
*/
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reactionSeverity";
/**
* Name for this Value Set:
* ReactionSeverity
*/
public static final String VALUESET_NAME = "ReactionSeverity";
private static Map<String, ReactionSeverityEnum> CODE_TO_ENUM = new HashMap<String, ReactionSeverityEnum>();
private static Map<String, Map<String, ReactionSeverityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ReactionSeverityEnum>>();
private final String myCode;
private final String mySystem;
static {
for (ReactionSeverityEnum next : ReactionSeverityEnum.values()) {
CODE_TO_ENUM.put(next.getCode(), next);
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, ReactionSeverityEnum>());
}
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
}
}
/**
* Returns the code associated with this enumerated value
*/
public String getCode() {
return myCode;
}
/**
* Returns the code system associated with this enumerated value
*/
public String getSystem() {
return mySystem;
}
/**
* Returns the enumerated value associated with this code
*/
public ReactionSeverityEnum forCode(String theCode) {
ReactionSeverityEnum retVal = CODE_TO_ENUM.get(theCode);
return retVal;
}
/**
* Converts codes to their respective enumerated values
*/
public static final IValueSetEnumBinder<ReactionSeverityEnum> VALUESET_BINDER = new IValueSetEnumBinder<ReactionSeverityEnum>() {
@Override
public String toCodeString(ReactionSeverityEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(ReactionSeverityEnum theEnum) {
return theEnum.getSystem();
}
@Override
public ReactionSeverityEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public ReactionSeverityEnum fromCodeString(String theCodeString, String theSystemString) {
Map<String, ReactionSeverityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
ReactionSeverityEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}

View File

@ -1,6 +1,10 @@
package ca.uhn.fhir.model.primitive;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.*;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.DAY;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MILLI;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MONTH;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.SECOND;
import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.YEAR;
import java.text.ParseException;
import java.util.Calendar;

View File

@ -21,7 +21,7 @@ public class BooleanDt extends BasePrimitive<Boolean> {
* Constructor
*/
@SimpleSetter
public BooleanDt(@SimpleSetter.Parameter(name="theBoolean") Boolean theBoolean) {
public BooleanDt(@SimpleSetter.Parameter(name="theBoolean") boolean theBoolean) {
setValue(theBoolean);
}

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.model.primitive;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.defaultString;
import java.util.HashSet;
import java.util.Set;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.model.primitive;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.defaultString;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.dstu.composite.CodingDt;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.model.primitive;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.defaultString;
import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;

View File

@ -38,7 +38,9 @@ public class DecimalDt extends BasePrimitive<BigDecimal> {
*/
@SimpleSetter
public DecimalDt(@SimpleSetter.Parameter(name = "theValue") double theValue) {
setValue(new BigDecimal(theValue));
// Use the valueOf here because the constructor gives crazy precision
// changes due to the floating point conversion
setValue(BigDecimal.valueOf(theValue));
}
/**

View File

@ -21,7 +21,7 @@ public class IntegerDt extends BasePrimitive<Integer> {
* Constructor
*/
@SimpleSetter
public IntegerDt(@SimpleSetter.Parameter(name = "theInteger") Integer theInteger) {
public IntegerDt(@SimpleSetter.Parameter(name = "theInteger") int theInteger) {
setValue(theInteger);
}

View File

@ -30,10 +30,12 @@ public class UriDt extends BasePrimitive<URI> {
setValueAsString(theValue);
}
@Override
public URI getValue() {
return myValue;
}
@Override
public void setValue(URI theValue) {
myValue = theValue;
}

View File

@ -2,9 +2,10 @@ package ca.uhn.fhir.narrative;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.parser.DataFormatException;
public interface INarrativeGenerator {
public NarrativeDt generateNarrative(String theProfile, IResource theResource);
public NarrativeDt generateNarrative(String theProfile, IResource theResource) throws DataFormatException;
}

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.narrative;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException;
import java.io.InputStream;
@ -31,12 +31,12 @@ import org.thymeleaf.templateresolver.TemplateResolver;
import org.thymeleaf.util.DOMUtils;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum;
import ca.uhn.fhir.model.primitive.XhtmlDt;
import ca.uhn.fhir.parser.DataFormatException;
public class ThymeleafNarrativeGenerator implements INarrativeGenerator {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ThymeleafNarrativeGenerator.class);
@ -48,6 +48,24 @@ public class ThymeleafNarrativeGenerator implements INarrativeGenerator {
private TemplateEngine myDatatypeTemplateEngine;
private boolean myIgnoreFailures = true;
/**
* If set to <code>true</code>, which is the default, if any failure occurs during narrative generation the generator will suppress any generated exceptions, and simply return a default narrative
* indicating that no narrative is available.
*/
public boolean isIgnoreFailures() {
return myIgnoreFailures;
}
/**
* If set to <code>true</code>, which is the default, if any failure occurs during narrative generation the generator will suppress any generated exceptions, and simply return a default narrative
* indicating that no narrative is available.
*/
public void setIgnoreFailures(boolean theIgnoreFailures) {
myIgnoreFailures = theIgnoreFailures;
}
public ThymeleafNarrativeGenerator() throws IOException {
myProfileToNarrativeTemplate = new HashMap<String, String>();
myDatatypeClassNameToNarrativeTemplate = new HashMap<String, String>();
@ -131,15 +149,18 @@ public class ThymeleafNarrativeGenerator implements INarrativeGenerator {
try {
Context context = new Context();
context.setVariable("resource", theResource);
context.setVariable("render", new SubElementRenderer());
String result = myProfileTemplateEngine.process(theProfile, context);
result = result.replaceAll("\\s+", " ").replace("> ", ">").replace(" <", "<");
return new NarrativeDt(new XhtmlDt(result), NarrativeStatusEnum.GENERATED);
} catch (Exception e) {
if (myIgnoreFailures) {
ourLog.error("Failed to generate narrative", e);
return null;
return new NarrativeDt(new XhtmlDt("<div>Error: no narrative available</div>"), NarrativeStatusEnum.EMPTY);
} else {
throw new DataFormatException(e);
}
}
}
@ -237,12 +258,4 @@ public class ThymeleafNarrativeGenerator implements INarrativeGenerator {
}
public class SubElementRenderer {
public String formatDt(IDatatype theDatatype) {
return "AAA<div></div>";
}
}
}

View File

@ -12,11 +12,11 @@ public interface IParser {
String encodeBundleToString(Bundle theBundle) throws DataFormatException, IOException;
void encodeBundleToWriter(Bundle theBundle, Writer theWriter) throws IOException;
void encodeBundleToWriter(Bundle theBundle, Writer theWriter) throws IOException, DataFormatException;
String encodeResourceToString(IResource theResource) throws DataFormatException, IOException;
void encodeResourceToWriter(IResource theResource, Writer stringWriter) throws IOException;
void encodeResourceToWriter(IResource theResource, Writer stringWriter) throws IOException, DataFormatException;
Bundle parseBundle(Reader theReader);

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.parser;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.IOException;
import java.io.Reader;
@ -483,8 +484,16 @@ public class JsonParser extends BaseParser implements IParser {
} else {
theWriter.writeStartObject();
}
if (value.getReference().isEmpty() == false) {
theWriter.write("resource", value.getReference().getValueAsString());
String reference = value.getReference().getValue();
if (StringUtils.isBlank(reference)) {
if (value.getResourceType() != null && StringUtils.isNotBlank(value.getResourceId())) {
reference = myContext.getResourceDefinition(value.getResourceType()).getName() + '/' + value.getResourceId();
}
}
if (StringUtils.isNotBlank(reference)) {
theWriter.write("resource", reference);
}
if (value.getDisplay().isEmpty() == false) {
theWriter.write("display", value.getDisplay().getValueAsString());

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.parser;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.parser;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.Reader;
import java.io.StringWriter;
@ -81,7 +82,7 @@ public class XmlParser extends BaseParser implements IParser {
}
@Override
public void encodeBundleToWriter(Bundle theBundle, Writer theWriter) {
public void encodeBundleToWriter(Bundle theBundle, Writer theWriter) throws DataFormatException {
try {
XMLStreamWriter eventWriter;
eventWriter = myXmlOutputFactory.createXMLStreamWriter(theWriter);
@ -156,7 +157,7 @@ public class XmlParser extends BaseParser implements IParser {
}
@Override
public void encodeResourceToWriter(IResource theResource, Writer stringWriter) {
public void encodeResourceToWriter(IResource theResource, Writer stringWriter) throws DataFormatException {
XMLStreamWriter eventWriter;
try {
eventWriter = myXmlOutputFactory.createXMLStreamWriter(stringWriter);
@ -409,14 +410,21 @@ public class XmlParser extends BaseParser implements IParser {
}
private void encodeResourceReferenceToStreamWriter(XMLStreamWriter theEventWriter, ResourceReferenceDt theRef) throws XMLStreamException {
String reference = theRef.getReference().getValue();
if (StringUtils.isBlank(reference)) {
if (theRef.getResourceType() != null && StringUtils.isNotBlank(theRef.getResourceId())) {
reference = myContext.getResourceDefinition(theRef.getResourceType()).getName() + '/' + theRef.getResourceId();
}
}
if (!(theRef.getDisplay().isEmpty())) {
theEventWriter.writeStartElement("display");
theEventWriter.writeAttribute("value", theRef.getDisplay().getValue());
theEventWriter.writeEndElement();
}
if (!(theRef.getReference().isEmpty())) {
if (StringUtils.isNotBlank(reference)) {
theEventWriter.writeStartElement("reference");
theEventWriter.writeAttribute("value", theRef.getReference().getValue());
theEventWriter.writeAttribute("value", reference);
theEventWriter.writeEndElement();
}
}
@ -441,7 +449,7 @@ public class XmlParser extends BaseParser implements IParser {
theEventWriter.writeEndElement();
}
private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, List<UndeclaredExtension> extensions, String tagName) throws XMLStreamException {
private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, List<UndeclaredExtension> extensions, String tagName) throws XMLStreamException, DataFormatException {
for (UndeclaredExtension next : extensions) {
theWriter.writeStartElement(tagName);
theWriter.writeAttribute("url", next.getUrl());

View File

@ -15,7 +15,6 @@ import ca.uhn.fhir.rest.client.GetClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.Util;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;

View File

@ -17,7 +17,6 @@ import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.client.GetClientInvocation;
import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.Util;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.util.QueryUtil;

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.rest.server;
package ca.uhn.fhir.rest.method;
import java.io.UnsupportedEncodingException;
import java.lang.annotation.Annotation;
@ -25,7 +25,7 @@ import ca.uhn.fhir.util.ReflectionUtil;
/**
* Created by dsotnikov on 2/25/2014.
*/
public class Util {
class Util {
public static Map<String, String> getQueryParams(String query) {
try {

View File

@ -15,7 +15,7 @@ public class CollectionBinder
/**
* @param thePositionDescription Just used in exceptions if theCollectionType is invalid
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "rawtypes", "cast" })
public static Class<? extends Collection> getInstantiableCollectionType(Class<? extends Collection<?>> theCollectionType, String thePositionDescription) {
if (theCollectionType.equals(List.class) || theCollectionType .equals(ArrayList.class)) {
return (Class<? extends Collection>) ArrayList.class;

View File

@ -1,6 +1,6 @@
package ca.uhn.fhir.rest.server;
public enum EncodingUtil {
enum EncodingUtil {
XML(Constants.CT_FHIR_XML, Constants.CT_ATOM_XML, Constants.CT_XML),

View File

@ -25,6 +25,7 @@ import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.BundleEntry;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.narrative.INarrativeGenerator;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.method.BaseMethodBinding;
import ca.uhn.fhir.rest.method.Request;
@ -49,11 +50,28 @@ public abstract class RestfulServer extends HttpServlet {
private FhirContext myFhirContext;
private boolean myUseBrowserFriendlyContentTypes;
private INarrativeGenerator myNarrativeGenerator;
public INarrativeGenerator getNarrativeGenerator() {
return myNarrativeGenerator;
}
/**
* If set to <code>true</code> (default is false), the server will use browser friendly
* content-types (instead of standard FHIR ones) when it detects that the request
* is coming from a browser instead of a FHIR
* Sets the {@link INarrativeGenerator Narrative Generator} to use when serializing responses from this server, or <code>null</code> (which is the default) to disable narrative generation.
*
* @throws IllegalStateException
* Note that this method can only be called prior to {@link #init() initialization} and will throw an {@link IllegalStateException} if called after that.
*/
public void setNarrativeGenerator(INarrativeGenerator theNarrativeGenerator) {
if (myFhirContext != null) {
throw new IllegalStateException("Server has already been initialized, can not change this property");
}
myNarrativeGenerator = theNarrativeGenerator;
}
/**
* If set to <code>true</code> (default is false), the server will use browser friendly content-types (instead of standard FHIR ones) when it detects that the request is coming from a browser
* instead of a FHIR
*/
public void setUseBrowserFriendlyContentTypes(boolean theUseBrowserFriendlyContentTypes) {
myUseBrowserFriendlyContentTypes = theUseBrowserFriendlyContentTypes;
@ -197,7 +215,6 @@ public abstract class RestfulServer extends HttpServlet {
requestIsBrowser = true;
}
String resourceName = null;
String requestFullPath = StringUtils.defaultString(request.getRequestURI());
// String contextPath = StringUtils.defaultString(request.getContextPath());
@ -346,7 +363,8 @@ public abstract class RestfulServer extends HttpServlet {
}
@Override
public void init() throws ServletException {
public final void init() throws ServletException {
initialize();
try {
ourLog.info("Initializing HAPI FHIR restful server");
@ -366,6 +384,7 @@ public abstract class RestfulServer extends HttpServlet {
ourLog.info("Got {} resource providers", myTypeToProvider.size());
myFhirContext = new FhirContext(myTypeToProvider.keySet());
myFhirContext.setNarrativeGenerator(myNarrativeGenerator);
for (IResourceProvider provider : myTypeToProvider.values()) {
findResourceMethods(provider);
@ -378,6 +397,15 @@ public abstract class RestfulServer extends HttpServlet {
ourLog.error("An error occurred while loading request handlers!", ex);
throw new ServletException("Failed to initialize FHIR Restful server", ex);
}
ourLog.info("A FHIR has been lit on this server");
}
/**
* This method may be overridden by subclasses to do perform initialization that needs to be performed prior to the server being used.
*/
protected void initialize() {
// nothing by default
}
private void streamResponseAsBundle(HttpServletResponse theHttpResponse, List<IResource> theResult, EncodingUtil theResponseEncoding, String theServerBase, String theCompleteUrl,
@ -440,11 +468,15 @@ public abstract class RestfulServer extends HttpServlet {
bundle.getTotalResults().setValue(theResult.size());
PrintWriter writer = theHttpResponse.getWriter();
try {
getNewParser(theResponseEncoding, thePrettyPrint).encodeBundleToWriter(bundle, writer);
} finally {
writer.close();
}
}
private void streamResponseAsResource(HttpServletResponse theHttpResponse, IResource theResource, EncodingUtil theResponseEncoding, boolean thePrettyPrint, boolean theRequestIsBrowser) throws IOException {
private void streamResponseAsResource(HttpServletResponse theHttpResponse, IResource theResource, EncodingUtil theResponseEncoding, boolean thePrettyPrint, boolean theRequestIsBrowser)
throws IOException {
theHttpResponse.setStatus(200);
if (theRequestIsBrowser && myUseBrowserFriendlyContentTypes) {

View File

@ -1,13 +1,20 @@
<!--/*-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="narrative.css"/>
</head>
<body>
<!--*/-->
<div>
<div style="font-size: 1.2em;">
<div class="hapiHeaderText">
<th:block th:if="${not resource.name.text.empty}" th:text="${resource.name.text.value}"/>
<th:block th:if="${resource.name.text.empty} and ${not #lists.isEmpty(resource.name.coding)} and ${not resource.name.coding[0].empty} and ${not resource.name.coding[0].display.empty}" th:text="${resource.name.coding[0].display}"/>
<th:block th:if="${resource.name.text.empty} and ${not #lists.isEmpty(resource.name.coding)} and ${not resource.name.coding[0].empty} and ${resource.name.coding[0].display.empty}" th:text="Untitled Diagnostic Report"/>
<!--/*--> Complete Blood Count <!--*/-->
</div>
<div style="font-size: 1.2em;" ></div>
<table th:if="${not #lists.isEmpty(resource.result)} and ${resource.result[0].resource != null}">
<table class="hapiTableOfValues" th:if="${not #lists.isEmpty(resource.result)} and ${resource.result[0].resource != null}">
<thead>
<tr>
<td>Name</td>
@ -18,8 +25,8 @@
</tr>
</thead>
<tbody>
<th:block th:each="result : ${resource.result}">
<tr>
<th:block th:each="result,rowStat : ${resource.result}">
<tr th:class="${rowStat.odd}? 'hapiTableOfValuesRowOdd' : 'hapiTableOfValuesRowEven'" class="hapiTableOfValuesRowOdd">
<td>
<th:block th:if="${not result.resource.name.text.empty}" th:text="${result.resource.name.text.value}"/>
<th:block th:if="${result.resource.name.text.empty} and ${not #lists.isEmpty(result.resource.name.coding)} and ${not result.resource.name.coding[0].empty} and ${not result.resource.name.coding[0].display.empty}" th:text="${result.resource.name.coding[0].display}"/>
@ -41,11 +48,21 @@
</td>
<td th:text="${result.resource.status.value}">final</td>
</tr>
<tr th:if="${not result.resource.comments.empty}">
<tr th:class="${rowStat.odd}? 'hapiTableOfValuesRowOdd' : 'hapiTableOfValuesRowEven'" class="hapiTableOfValuesRowOdd">
<td th:text="${result.resource.comments.value}" colspan="5">This is a comment</td>
</tr>
<!--/*-->
<tr class="hapiTableOfValuesRowEven"><td>Lkc</td><td>198 g/L</td><td>H</td><td>78 g/L - 99 g/L</td><td>final</td></tr>
<tr class="hapiTableOfValuesRowEven"><td colspan="5">Yet another comment</td></tr>
<!--*/-->
</th:block>
</tbody>
</table>
</div>
<!--/*-->
</body>
</html>
<!--*/-->

View File

@ -1,11 +1,20 @@
<!--/*-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="narrative.css"/>
</head>
<body>
<!--*/-->
<div>
<div style="font-size: 1.2em;" th:if="${not #lists.isEmpty(resource.name)} and ${not resource.name[0].empty}">
<div class="hapiHeaderText" th:if="${not #lists.isEmpty(resource.name)} and ${not resource.name[0].empty}">
<span th:each="prefix : ${resource.name[0].prefix}" th:text="${prefix.value}">Dr</span>
<span th:each="givenName : ${resource.name[0].given}" th:text="${givenName.value} ">John</span>
<b th:each="familyName : ${resource.name[0].family}" th:text="${#strings.toUpperCase(familyName.value)}">SMITH</b>
<span th:each="suffix : ${resource.name[0].suffix}" th:text="${suffix.value}">Esq</span>
<span th:each="suffix : ${resource.name[0].suffix}" th:text="${suffix.value}">Jr</span>
</div>
<table>
<table class="hapiPropertyTable">
<tbody>
<tr th:if="${not #lists.isEmpty(resource.identifier)} and ${not resource.identifier[0].empty}">
<td>Identifier</td>
<td th:text="${resource.identifier[0].value.value}">8708660</td>
@ -27,5 +36,11 @@
<span th:text="${#dates.format(resource.birthDate.value,'dd MMMM yyyy')}">22 March 2012</span>
</td>
</tr>
</tbody>
</table>
</div>
<!--/*-->
</body>
</html>
<!--*/-->

View File

@ -0,0 +1,46 @@
BODY {
font-family: sans-serif;
}
DIV.hapiHeaderText {
font-size: 1.3em;
}
/********************************************************
* The following section is used for tables of values
* with multiple columns (e.g. the table of Observations
* in a Diagnostic Report for a lab test)
********************************************************/
TABLE.hapiTableOfValues THEAD TR TD {
background: #A0A0F0;
color: #000080;
font-size: 1.em;
font-weight: bold;
padding: 5px;
}
TABLE.hapiTableOfValues TBODY TR TD {
padding-left: 5px;
padding-right: 5px;
}
/* Even and odd row formatting */
TR.hapiTableOfValuesRowOdd TD {
background: #C0C0C0;
}
TR.hapiTableOfValuesRowEven TD {
background: #F0F0F0;
}
/********************************************************
* The following section is used for property tables. These
* tables have two columns, one for the property name, and
* one for the property value
********************************************************/
TABLE.hapiPropertyTable TBODY TR TD:FIRST-CHILD {
background: #C0C0C0;
text-align: right;
}

View File

@ -0,0 +1,14 @@
package example;
import ca.uhn.fhir.model.dstu.resource.Patient;
public class QuickUsage {
public void format() {
Patient obs = new Patient();
}
}

View File

@ -0,0 +1,16 @@
package ca.uhn.fhir.model.primitive;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class DecimalDtTest {
@Test
public void testPrecision() {
DecimalDt dt = new DecimalDt(2.03);
assertEquals("2.03", dt.getValueAsString());
}
}

View File

@ -3,21 +3,32 @@ package ca.uhn.fhir.narrative;
import java.io.IOException;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum;
import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
public class ThymeleafNarrativeGeneratorTest {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ThymeleafNarrativeGeneratorTest.class);
private ThymeleafNarrativeGenerator gen;
@Before
public void before() throws IOException {
gen = new ThymeleafNarrativeGenerator();
gen.setIgnoreFailures(false);
}
@Test
public void testGeneratePatient() throws IOException {
public void testGeneratePatient() throws DataFormatException, InternalErrorException {
Patient value = new Patient();
value.addIdentifier().setSystem("urn:names").setValue("123456");
@ -27,14 +38,13 @@ public class ThymeleafNarrativeGeneratorTest {
value.setBirthDate(new Date(), TemporalPrecisionEnum.DAY);
ThymeleafNarrativeGenerator gen = new ThymeleafNarrativeGenerator();
String output = gen.generateNarrative("http://hl7.org/fhir/profiles/Patient", value).getDiv().getValueAsString();
ourLog.info(output);
}
@Test
public void testGenerateDiagnosticReport() throws IOException {
public void testGenerateDiagnosticReport() throws DataFormatException, InternalErrorException {
DiagnosticReport value = new DiagnosticReport();
value.getName().setText("Some Diagnostic Report");
@ -42,14 +52,13 @@ public class ThymeleafNarrativeGeneratorTest {
value.addResult().setReference("Observation/2");
value.addResult().setReference("Observation/3");
ThymeleafNarrativeGenerator gen = new ThymeleafNarrativeGenerator();
String output = gen.generateNarrative("http://hl7.org/fhir/profiles/DiagnosticReport", value).getDiv().getValueAsString();
ourLog.info(output);
}
@Test
public void testGenerateDiagnosticReportWithObservations() throws IOException {
public void testGenerateDiagnosticReportWithObservations() throws DataFormatException, InternalErrorException {
DiagnosticReport value = new DiagnosticReport();
value.getName().setText("Some Diagnostic Report");
@ -63,8 +72,8 @@ public class ThymeleafNarrativeGeneratorTest {
ResourceReferenceDt result = value.addResult();
result.setResource(obs);
ThymeleafNarrativeGenerator gen = new ThymeleafNarrativeGenerator();
String output = gen.generateNarrative("http://hl7.org/fhir/profiles/DiagnosticReport", value).getDiv().getValueAsString();
NarrativeDt generateNarrative = gen.generateNarrative("http://hl7.org/fhir/profiles/DiagnosticReport", value);
String output = generateNarrative.getDiv().getValueAsString();
ourLog.info(output);
}

View File

@ -22,6 +22,7 @@ import ca.uhn.fhir.model.api.UndeclaredExtension;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Organization;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.resource.Specimen;
import ca.uhn.fhir.model.primitive.DecimalDt;
@ -29,6 +30,29 @@ import ca.uhn.fhir.model.primitive.DecimalDt;
public class JsonParserTest {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(JsonParserTest.class);
@Test
public void testEncodeResourceRef() throws DataFormatException, IOException {
Patient patient = new Patient();
patient.setManagingOrganization(new ResourceReferenceDt());
IParser p = new FhirContext().newJsonParser();
String str = p.encodeResourceToString(patient);
assertThat(str, IsNot.not(StringContains.containsString("managingOrganization")));
patient.setManagingOrganization(new ResourceReferenceDt(Organization.class, "123"));
str = p.encodeResourceToString(patient);
assertThat(str, StringContains.containsString("\"managingOrganization\":{\"resource\":\"Organization/123\"}"));
Organization org = new Organization();
org.addIdentifier().setSystem("foo").setValue("bar");
patient.setManagingOrganization(new ResourceReferenceDt(org));
str = p.encodeResourceToString(patient);
assertThat(str, StringContains.containsString("\"contained\":[{\"resourceType\":\"Organization\""));
}
@Test
public void testSimpleResourceEncode() throws IOException {

View File

@ -26,6 +26,7 @@ import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Organization;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.resource.Specimen;
import ca.uhn.fhir.model.dstu.resource.ValueSet;
@ -62,6 +63,29 @@ public class XmlParserTest {
assertThat(str, StringContains.containsString("<name><family value=\"Smith\"/></name>"));
}
@Test
public void testEncodeResourceRef() throws DataFormatException, IOException {
Patient patient = new Patient();
patient.setManagingOrganization(new ResourceReferenceDt());
IParser p = new FhirContext().newXmlParser();
String str = p.encodeResourceToString(patient);
assertThat(str, IsNot.not(StringContains.containsString("managingOrganization")));
patient.setManagingOrganization(new ResourceReferenceDt(Organization.class, "123"));
str = p.encodeResourceToString(patient);
assertThat(str, StringContains.containsString("<managingOrganization><reference value=\"Organization/123\"/></managingOrganization>"));
Organization org = new Organization();
org.addIdentifier().setSystem("foo").setValue("bar");
patient.setManagingOrganization(new ResourceReferenceDt(org));
str = p.encodeResourceToString(patient);
assertThat(str, StringContains.containsString("<contained><Organization"));
}
@Test
public void testNarrativeGeneration() throws DataFormatException, IOException {

View File

@ -39,6 +39,7 @@
<configuration>
<package>ca.uhn.fhir.model.dstu</package>
<baseResourceNames>
<baseResourceName>adversereaction</baseResourceName>
<baseResourceName>conformance</baseResourceName>
<baseResourceName>device</baseResourceName>
<baseResourceName>diagnosticorder</baseResourceName>

File diff suppressed because it is too large Load Diff

View File

@ -44,10 +44,22 @@ public class ${className}Dt
/**
* Creates a new identifier with the given system and value
*/
public IdentifierDt(String theSystem, String theValue) {
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) {
setSystem(theSystem);
setValue(theValue);
}
/**
* Creates a new identifier with the given system and value
*/
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) {
setUse(theUse);
setSystem(theSystem);
setValue(theValue);
setLabel(theLabel);
}
#end
#if ( ${className} == "Coding" )
/**
@ -62,16 +74,67 @@ public class ${className}Dt
/**
* Constructor
*/
public QuantityDt(double theValue) {
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
setValue(theValue);
}
/**
* Constructor
*/
public QuantityDt(long theValue) {
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
setValue(theValue);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setUnits(theUnits);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setUnits(theUnits);
}
#end
#if ( ${className} == "ResourceReference" )
/**
* Constructor which creates a normal resource reference
*
* @param theResourceType The resource type
* @param theResourceId The resource ID
*/
public ResourceReferenceDt(Class<? extends IResource> theResourceType, String theResourceId) {
super(theResourceType, theResourceId);
}
/**
* Constructor which creates a resource reference containing the actual
* resource in question.
* <p>
* <b>
* When using this in a server:</b> Generally if this is serialized, it will be serialized
* as a contained resource, so this should not be used if the intent is not to actually
* supply the referenced resource. This is not a hard-and-fast rule however, as the
* server can be configured to not serialized this resource, or to load an ID and contain
* even if this constructor is not used.
* </p>
*
* @param theResource The resource instance
*/
public ResourceReferenceDt(IResource theResource) {
super(theResource);
}
#end
#childExtensionFields( $childExtensionTypes )