Getting profile generation working
This commit is contained in:
parent
25a1e6925b
commit
c830d5f45d
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
|
||||
<classpathentry excluding="**/*.java" kind="src" path="src/test/resources"/>
|
||||
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/site/example/java"/>
|
||||
<classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-sources.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
|
|
|
@ -4,7 +4,7 @@ org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignor
|
|||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
|
@ -41,7 +41,7 @@ org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
|||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
|
||||
|
|
|
@ -25,4 +25,6 @@
|
|||
|
||||
* Support compartments for client and server
|
||||
|
||||
* Support slices in the model
|
||||
* Support slices in the model
|
||||
|
||||
* Support extensions (declared and undeclared) in primitives, narratives, etc.
|
|
@ -150,6 +150,7 @@
|
|||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
|
@ -175,6 +176,7 @@
|
|||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
|
|
|
@ -8,6 +8,8 @@ import java.util.Set;
|
|||
import ca.uhn.fhir.model.api.ICodeEnum;
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
|
@ -16,8 +18,8 @@ public abstract class BaseRuntimeChildDatatypeDefinition extends BaseRuntimeDecl
|
|||
|
||||
private BaseRuntimeElementDefinition<?> myElementDefinition;
|
||||
|
||||
public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, int theMin, int theMax, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theMin, theMax, theElementName);
|
||||
public BaseRuntimeChildDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
|
||||
|
||||
myDatatype = theDatatype;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.util.BeanUtils;
|
||||
|
||||
public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChildDefinition {
|
||||
|
@ -20,16 +22,18 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
private final int myMax;
|
||||
private final int myMin;
|
||||
private final IMutator myMutator;
|
||||
private final String myShortDefinition;
|
||||
private final String myFormalDefinition;
|
||||
|
||||
BaseRuntimeDeclaredChildDefinition(Field theField, int theMin, int theMax, String theElementName) throws ConfigurationException {
|
||||
BaseRuntimeDeclaredChildDefinition(Field theField, Child theChildAnnotation, Description theDescriptionAnnotation, String theElementName) throws ConfigurationException {
|
||||
super();
|
||||
if (theField == null) {
|
||||
throw new IllegalArgumentException("No field speficied");
|
||||
}
|
||||
if (theMin < 0) {
|
||||
if (theChildAnnotation.min() < 0) {
|
||||
throw new ConfigurationException("Min must be >= 0");
|
||||
}
|
||||
if (theMax != -1 && theMax < theMin) {
|
||||
if (theChildAnnotation.max() != -1 && theChildAnnotation.max() < theChildAnnotation.min()) {
|
||||
throw new ConfigurationException("Max must be >= Min (unless it is -1 / unlimited)");
|
||||
}
|
||||
if (isBlank(theElementName)) {
|
||||
|
@ -37,10 +41,17 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
}
|
||||
|
||||
myField = theField;
|
||||
myMin = theMin;
|
||||
myMax = theMax;
|
||||
myMin = theChildAnnotation.min();
|
||||
myMax = theChildAnnotation.max();
|
||||
myElementName = theElementName;
|
||||
|
||||
if (theDescriptionAnnotation != null) {
|
||||
myShortDefinition = theDescriptionAnnotation.shortDefinition();
|
||||
myFormalDefinition = theDescriptionAnnotation.formalDefinition();
|
||||
}else {
|
||||
myShortDefinition=null;
|
||||
myFormalDefinition=null;
|
||||
}
|
||||
|
||||
// TODO: handle lists (max>0), and maybe max=0?
|
||||
|
||||
Class<?> declaringClass = myField.getDeclaringClass();
|
||||
|
@ -48,11 +59,11 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
try {
|
||||
final Method accessor = BeanUtils.findAccessor(declaringClass, targetReturnType, myElementName);
|
||||
final Method mutator = BeanUtils.findMutator(declaringClass, targetReturnType, myElementName);
|
||||
|
||||
|
||||
if (List.class.isAssignableFrom(targetReturnType)) {
|
||||
myAccessor = new ListAccessor(accessor);
|
||||
myMutator = new ListMutator(mutator);
|
||||
}else {
|
||||
} else {
|
||||
myAccessor = new PlainAccessor(accessor);
|
||||
myMutator = new PlainMutator(targetReturnType, mutator);
|
||||
}
|
||||
|
@ -62,6 +73,15 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
|
||||
}
|
||||
|
||||
public String getShortDefinition() {
|
||||
return myShortDefinition;
|
||||
}
|
||||
|
||||
public String getFormalDefinition() {
|
||||
return myFormalDefinition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAccessor getAccessor() {
|
||||
return myAccessor;
|
||||
}
|
||||
|
@ -82,25 +102,55 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
return myMin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMutator getMutator() {
|
||||
return myMutator;
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
return getChildByName(getValidChildNames().iterator().next());
|
||||
}
|
||||
|
||||
private final class ListAccessor implements IAccessor {
|
||||
private final Method myAccessorMethod;
|
||||
|
||||
private ListAccessor(Method theAccessor) {
|
||||
myAccessorMethod = theAccessor;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<IElement> getValues(Object theTarget) {
|
||||
try {
|
||||
return (List<IElement>) myAccessorMethod.invoke(theTarget);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class ListMutator implements IMutator {
|
||||
private final Method myMutator;
|
||||
private final Method myMutatorMethod;
|
||||
|
||||
private ListMutator(Method theMutator) {
|
||||
myMutator = theMutator;
|
||||
myMutatorMethod = theMutator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addValue(Object theTarget, IElement theValue) {
|
||||
public void addValue(Object theTarget, IElement theValue) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<IElement> existingList = (List<IElement>) myAccessor.getValues(theTarget);
|
||||
if (existingList == null) {
|
||||
existingList = new ArrayList<IElement>();
|
||||
try {
|
||||
myMutator.invoke(theTarget, existingList);
|
||||
myMutatorMethod.invoke(theTarget, existingList);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
@ -113,18 +163,17 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
}
|
||||
}
|
||||
|
||||
private final class ListAccessor implements IAccessor {
|
||||
private final Method myAccessor;
|
||||
private final class PlainAccessor implements IAccessor {
|
||||
private final Method myAccessorMethod;
|
||||
|
||||
private ListAccessor(Method theAccessor) {
|
||||
myAccessor = theAccessor;
|
||||
private PlainAccessor(Method theAccessor) {
|
||||
myAccessorMethod = theAccessor;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<IElement> getValues(Object theTarget) {
|
||||
try {
|
||||
return (List<IElement>) myAccessor.invoke(theTarget);
|
||||
return Collections.singletonList((IElement) myAccessorMethod.invoke(theTarget));
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
@ -136,15 +185,15 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
}
|
||||
|
||||
private final class PlainMutator implements IMutator {
|
||||
private final Method myMutatorMethod;
|
||||
private final Class<?> myTargetReturnType;
|
||||
private final Method myMutator;
|
||||
|
||||
private PlainMutator(Class<?> theTargetReturnType, Method theMutator) {
|
||||
assert theTargetReturnType != null;
|
||||
assert theMutator != null;
|
||||
|
||||
|
||||
myTargetReturnType = theTargetReturnType;
|
||||
myMutator = theMutator;
|
||||
myMutatorMethod = theMutator;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -153,7 +202,7 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
if (theValue != null && !myTargetReturnType.isAssignableFrom(theValue.getClass())) {
|
||||
throw new ConfigurationException("Value for field " + myElementName + " expects type " + myTargetReturnType + " but got " + theValue.getClass());
|
||||
}
|
||||
myMutator.invoke(theTarget, theValue);
|
||||
myMutatorMethod.invoke(theTarget, theValue);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
@ -164,26 +213,4 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
|
|||
}
|
||||
}
|
||||
|
||||
private final class PlainAccessor implements IAccessor {
|
||||
private final Method myAccessor;
|
||||
|
||||
private PlainAccessor(Method theAccessor) {
|
||||
myAccessor = theAccessor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IElement> getValues(Object theTarget) {
|
||||
try {
|
||||
return Collections.singletonList((IElement)myAccessor.invoke(theTarget));
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new ConfigurationException("Failed to get value", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,11 +14,8 @@ import ca.uhn.fhir.parser.DataFormatException;
|
|||
public abstract class BaseRuntimeElementCompositeDefinition<T extends ICompositeElement> extends BaseRuntimeElementDefinition<T> {
|
||||
|
||||
private List<BaseRuntimeChildDefinition> myChildren = new ArrayList<BaseRuntimeChildDefinition>();
|
||||
private List<RuntimeChildDeclaredExtensionDefinition> myExtensions = new ArrayList<RuntimeChildDeclaredExtensionDefinition>();
|
||||
private Map<String, BaseRuntimeChildDefinition> myNameToChild = new HashMap<String, BaseRuntimeChildDefinition>();
|
||||
|
||||
private Map<String, RuntimeChildDeclaredExtensionDefinition> myUrlToExtension = new HashMap<String, RuntimeChildDeclaredExtensionDefinition>();
|
||||
|
||||
public BaseRuntimeElementCompositeDefinition(String theName, Class<? extends T> theImplementingClass) {
|
||||
super(theName, theImplementingClass);
|
||||
}
|
||||
|
@ -33,17 +30,6 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IComposite
|
|||
myChildren.add(theNext);
|
||||
}
|
||||
|
||||
public void addExtension(RuntimeChildDeclaredExtensionDefinition theExtension) {
|
||||
if (theExtension== null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
myExtensions.add(theExtension);
|
||||
}
|
||||
|
||||
public List<RuntimeChildDeclaredExtensionDefinition> getExtensions() {
|
||||
return myExtensions;
|
||||
}
|
||||
|
||||
public BaseRuntimeChildDefinition getChildByNameOrThrowDataFormatException(String theName) throws DataFormatException {
|
||||
BaseRuntimeChildDefinition retVal = myNameToChild.get(theName);
|
||||
if (retVal == null) {
|
||||
|
@ -56,21 +42,13 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IComposite
|
|||
return myChildren;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns null if none
|
||||
*/
|
||||
public RuntimeChildDeclaredExtensionDefinition getDeclaredExtension(String theExtensionUrl) {
|
||||
return myUrlToExtension.get(theExtensionUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
super.sealAndInitialize(theClassToElementDefinitions);
|
||||
|
||||
for (BaseRuntimeChildDefinition next : myChildren) {
|
||||
next.sealAndInitialize(theClassToElementDefinitions);
|
||||
}
|
||||
for (BaseRuntimeChildDefinition next : myExtensions) {
|
||||
next.sealAndInitialize(theClassToElementDefinitions);
|
||||
}
|
||||
|
||||
myNameToChild = new HashMap<String, BaseRuntimeChildDefinition>();
|
||||
for (BaseRuntimeChildDefinition next : myChildren) {
|
||||
|
@ -83,17 +61,7 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IComposite
|
|||
}
|
||||
}
|
||||
|
||||
for (RuntimeChildDeclaredExtensionDefinition next : myExtensions) {
|
||||
String extUrl = next.getExtensionUrl();
|
||||
if (myUrlToExtension.containsKey(extUrl)) {
|
||||
throw new ConfigurationException("Duplicate extension URL: " + extUrl);
|
||||
} else {
|
||||
myUrlToExtension.put(extUrl, next);
|
||||
}
|
||||
}
|
||||
|
||||
myChildren = Collections.unmodifiableList(myChildren);
|
||||
myNameToChild = Collections.unmodifiableMap(myNameToChild);
|
||||
myExtensions = Collections.unmodifiableList(myExtensions);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +1,63 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
|
||||
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
||||
|
||||
public abstract class BaseRuntimeElementDefinition<T extends IElement> {
|
||||
|
||||
private String myName;
|
||||
private Class<? extends T> myImplementingClass;
|
||||
private List<RuntimeChildDeclaredExtensionDefinition> myExtensions = new ArrayList<RuntimeChildDeclaredExtensionDefinition>();
|
||||
private Map<String, RuntimeChildDeclaredExtensionDefinition> myUrlToExtension = new HashMap<String, RuntimeChildDeclaredExtensionDefinition>();
|
||||
private List<RuntimeChildDeclaredExtensionDefinition> myExtensionsModifier = new ArrayList<RuntimeChildDeclaredExtensionDefinition>();
|
||||
private List<RuntimeChildDeclaredExtensionDefinition> myExtensionsNonModifier = new ArrayList<RuntimeChildDeclaredExtensionDefinition>();
|
||||
|
||||
public BaseRuntimeElementDefinition(String theName, Class<? extends T> theImplementingClass) {
|
||||
assert StringUtils.isNotBlank(theName);
|
||||
assert theImplementingClass != null;
|
||||
|
||||
|
||||
myName = theName;
|
||||
myImplementingClass=theImplementingClass;
|
||||
myImplementingClass = theImplementingClass;
|
||||
}
|
||||
|
||||
public void addExtension(RuntimeChildDeclaredExtensionDefinition theExtension) {
|
||||
if (theExtension == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
myExtensions.add(theExtension);
|
||||
}
|
||||
|
||||
public List<RuntimeChildDeclaredExtensionDefinition> getExtensions() {
|
||||
return myExtensions;
|
||||
}
|
||||
|
||||
public List<RuntimeChildDeclaredExtensionDefinition> getExtensionsModifier() {
|
||||
return myExtensionsModifier;
|
||||
}
|
||||
|
||||
public List<RuntimeChildDeclaredExtensionDefinition> getExtensionsNonModifier() {
|
||||
return myExtensionsNonModifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns null if none
|
||||
*/
|
||||
public RuntimeChildDeclaredExtensionDefinition getDeclaredExtension(String theExtensionUrl) {
|
||||
return myUrlToExtension.get(theExtensionUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the runtime name for this resource (i.e. the name that
|
||||
* will be used in encoded messages)
|
||||
* will be used in encoded messages)
|
||||
*/
|
||||
public String getName() {
|
||||
return myName;
|
||||
|
@ -37,22 +70,22 @@ public abstract class BaseRuntimeElementDefinition<T extends IElement> {
|
|||
public T newInstance(Object theArgument) {
|
||||
try {
|
||||
if (theArgument == null) {
|
||||
return getImplementingClass().newInstance();
|
||||
}else {
|
||||
return getImplementingClass().newInstance();
|
||||
} else {
|
||||
return getImplementingClass().getConstructor(IValueSetEnumBinder.class).newInstance(theArgument);
|
||||
}
|
||||
} catch (InstantiationException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
} catch (SecurityException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+getImplementingClass().getName(), e);
|
||||
throw new ConfigurationException("Failed to instantiate type:" + getImplementingClass().getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,15 +94,37 @@ public abstract class BaseRuntimeElementDefinition<T extends IElement> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Invoked prior to use to perform any initialization and make object mutable
|
||||
* Invoked prior to use to perform any initialization and make object
|
||||
* mutable
|
||||
*/
|
||||
abstract void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions);
|
||||
void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
for (BaseRuntimeChildDefinition next : myExtensions) {
|
||||
next.sealAndInitialize(theClassToElementDefinitions);
|
||||
}
|
||||
|
||||
for (RuntimeChildDeclaredExtensionDefinition next : myExtensions) {
|
||||
String extUrl = next.getExtensionUrl();
|
||||
if (myUrlToExtension.containsKey(extUrl)) {
|
||||
throw new ConfigurationException("Duplicate extension URL: " + extUrl);
|
||||
} else {
|
||||
myUrlToExtension.put(extUrl, next);
|
||||
}
|
||||
if (next.isModifier()) {
|
||||
myExtensionsModifier.add(next);
|
||||
} else {
|
||||
myExtensionsNonModifier.add(next);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
myExtensions = Collections.unmodifiableList(myExtensions);
|
||||
}
|
||||
|
||||
public abstract ChildTypeEnum getChildType();
|
||||
|
||||
|
||||
public enum ChildTypeEnum {
|
||||
COMPOSITE_DATATYPE, PRIMITIVE_DATATYPE, RESOURCE, RESOURCE_REF, RESOURCE_BLOCK, PRIMITIVE_XHTML, UNDECL_EXT, EXTENSION_DECLARED
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
|
@ -19,12 +19,12 @@ public class FhirContext {
|
|||
private final Map<String, RuntimeResourceDefinition> myNameToElementDefinition;
|
||||
private RuntimeChildUndeclaredExtensionDefinition myRuntimeChildUndeclaredExtensionDefinition;
|
||||
|
||||
public FhirContext(Class<? extends IResource> theResourceType) {
|
||||
this(toCollection(theResourceType));
|
||||
public FhirContext(Class<?>... theResourceTypes) {
|
||||
this(toCollection(theResourceTypes));
|
||||
}
|
||||
|
||||
public FhirContext(Class<? extends IResource>[] theResourceTypes) {
|
||||
this(Arrays.asList(theResourceTypes));
|
||||
public FhirContext(Class<? extends IResource> theResourceType) {
|
||||
this(toCollection(theResourceType));
|
||||
}
|
||||
|
||||
public FhirContext(Collection<Class<? extends IResource>> theResourceTypes) {
|
||||
|
@ -39,13 +39,19 @@ public class FhirContext {
|
|||
}
|
||||
|
||||
public RuntimeResourceDefinition getResourceDefinition(Class<? extends IResource> theResourceType) {
|
||||
// TODO: parse this type if we would otherwise return null
|
||||
return (RuntimeResourceDefinition) myClassToElementDefinition.get(theResourceType);
|
||||
}
|
||||
|
||||
public RuntimeResourceDefinition getResourceDefinition(IResource theResource) {
|
||||
// TODO: parse this type if we would otherwise return null
|
||||
return (RuntimeResourceDefinition) myClassToElementDefinition.get(theResource.getClass());
|
||||
}
|
||||
|
||||
public BaseRuntimeElementDefinition<?> getResourceDefinition(String theResourceName) {
|
||||
return myNameToElementDefinition.get(theResourceName);
|
||||
}
|
||||
|
||||
public RuntimeChildUndeclaredExtensionDefinition getRuntimeChildUndeclaredExtensionDefinition() {
|
||||
return myRuntimeChildUndeclaredExtensionDefinition;
|
||||
}
|
||||
|
@ -58,14 +64,22 @@ public class FhirContext {
|
|||
return new XmlParser(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static List<Class<? extends IResource>> toCollection(Class<?>[] theResourceTypes) {
|
||||
ArrayList<Class<? extends IResource>> retVal = new ArrayList<Class<? extends IResource>>(1);
|
||||
for (Class<?> clazz : theResourceTypes) {
|
||||
if (!IResource.class.isAssignableFrom(clazz)) {
|
||||
throw new IllegalArgumentException(clazz.getCanonicalName() + " is not an instance of " + IResource.class.getSimpleName());
|
||||
}
|
||||
retVal.add((Class<? extends IResource>) clazz);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
private static Collection<Class<? extends IResource>> toCollection(Class<? extends IResource> theResourceType) {
|
||||
ArrayList<Class<? extends IResource>> retVal = new ArrayList<Class<? extends IResource>>(1);
|
||||
retVal.add(theResourceType);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public BaseRuntimeElementDefinition<?> getResourceDefinition(String theResourceName) {
|
||||
return myNameToElementDefinition.get(theResourceName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -31,12 +30,12 @@ import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
|||
import ca.uhn.fhir.model.api.ResourceReference;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.ChildResource;
|
||||
import ca.uhn.fhir.model.api.annotation.Choice;
|
||||
import ca.uhn.fhir.model.api.annotation.CodeTableDef;
|
||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
||||
import ca.uhn.fhir.model.primitive.DateDt;
|
||||
|
@ -261,16 +260,18 @@ class ModelScanner {
|
|||
|
||||
for (Field next : theClass.getDeclaredFields()) {
|
||||
|
||||
Child element = next.getAnnotation(Child.class);
|
||||
if (element == null) {
|
||||
Child childAnnotation = next.getAnnotation(Child.class);
|
||||
if (childAnnotation == null) {
|
||||
ourLog.debug("Ignoring non-type field '" + next.getName() + "' on target type: " + theClass);
|
||||
continue;
|
||||
}
|
||||
|
||||
Description descriptionAnnotation = next.getAnnotation(Description.class);
|
||||
|
||||
String elementName = element.name();
|
||||
int order = element.order() + baseElementOrder;
|
||||
int min = element.min();
|
||||
int max = element.max();
|
||||
String elementName = childAnnotation.name();
|
||||
int order = childAnnotation.order() + baseElementOrder;
|
||||
int min = childAnnotation.min();
|
||||
int max = childAnnotation.max();
|
||||
TreeMap<Integer, BaseRuntimeDeclaredChildDefinition> orderMap = theOrderToElementDef;
|
||||
|
||||
Extension extensionAttr = next.getAnnotation(Extension.class);
|
||||
|
@ -287,14 +288,13 @@ class ModelScanner {
|
|||
order--;
|
||||
}
|
||||
|
||||
Choice choiceAttr = element.choice();
|
||||
List<Class<? extends IElement>> choiceTypes = new ArrayList<Class<? extends IElement>>();
|
||||
for (Class<? extends IElement> nextChoiceType : choiceAttr.types()) {
|
||||
for (Class<? extends IElement> nextChoiceType : childAnnotation.type()) {
|
||||
choiceTypes.add(nextChoiceType);
|
||||
}
|
||||
|
||||
if (orderMap.containsKey(order)) {
|
||||
throw new ConfigurationException("Detected duplicate field order '" + element.order() + "' for element named '" + elementName + "' in type '" + theClass.getCanonicalName() + "'");
|
||||
throw new ConfigurationException("Detected duplicate field order '" + childAnnotation.order() + "' for element named '" + elementName + "' in type '" + theClass.getCanonicalName() + "'");
|
||||
}
|
||||
|
||||
if (elementNames.contains(elementName)) {
|
||||
|
@ -303,15 +303,14 @@ class ModelScanner {
|
|||
|
||||
Class<?> nextElementType = determineElementType(next);
|
||||
|
||||
ChildResource resRefAnnotation = next.getAnnotation(ChildResource.class);
|
||||
if (choiceTypes.isEmpty() == false) {
|
||||
if (choiceTypes.size() > 1 && !ResourceReferenceDt.class.isAssignableFrom(nextElementType)) {
|
||||
/*
|
||||
* Child is a choice element
|
||||
*/
|
||||
for (Class<? extends IElement> nextType : choiceTypes) {
|
||||
addScanAlso(nextType);
|
||||
}
|
||||
RuntimeChildChoiceDefinition def = new RuntimeChildChoiceDefinition(next, elementName, min, max, choiceTypes);
|
||||
RuntimeChildChoiceDefinition def = new RuntimeChildChoiceDefinition(next, elementName, childAnnotation, descriptionAnnotation, choiceTypes);
|
||||
orderMap.put(order, def);
|
||||
|
||||
} else if (extensionAttr != null) {
|
||||
|
@ -319,7 +318,7 @@ class ModelScanner {
|
|||
* Child is an extension
|
||||
*/
|
||||
Class<? extends IElement> et = (Class<? extends IElement>) nextElementType;
|
||||
RuntimeChildDeclaredExtensionDefinition def = new RuntimeChildDeclaredExtensionDefinition(next, min, max, elementName, extensionAttr.url(), et);
|
||||
RuntimeChildDeclaredExtensionDefinition def = new RuntimeChildDeclaredExtensionDefinition(next, childAnnotation, descriptionAnnotation, extensionAttr, elementName, extensionAttr.url(), et);
|
||||
orderMap.put(order, def);
|
||||
if (IElement.class.isAssignableFrom(nextElementType)) {
|
||||
addScanAlso((Class<? extends IElement>) nextElementType);
|
||||
|
@ -328,16 +327,15 @@ class ModelScanner {
|
|||
/*
|
||||
* Child is a resource reference
|
||||
*/
|
||||
if (resRefAnnotation == null) {
|
||||
throw new ConfigurationException("Field '" + elementName + "' in type '" + theClass.getCanonicalName() + "' is a resource reference but does not have a @" + ChildResource.class.getSimpleName() + " annotation");
|
||||
}
|
||||
|
||||
Class<? extends IResource>[] refType = resRefAnnotation.types();
|
||||
List<Class<? extends IResource>> refTypesList = Arrays.asList(refType);
|
||||
for (Class<? extends IElement> nextType : refTypesList) {
|
||||
List<Class<? extends IResource>> refTypesList = new ArrayList<Class<? extends IResource>>();
|
||||
for (Class<? extends IElement> nextType : childAnnotation.type()) {
|
||||
if (IResource.class.isAssignableFrom(nextType)== false) {
|
||||
throw new ConfigurationException("Field '" + next.getName() + "' is of type " + ResourceReferenceDt.class + " but contains a non-resource type: " + nextType.getCanonicalName());
|
||||
}
|
||||
refTypesList.add((Class<? extends IResource>) nextType);
|
||||
addScanAlso(nextType);
|
||||
}
|
||||
RuntimeChildResourceDefinition def = new RuntimeChildResourceDefinition(next, elementName, min, max, refTypesList);
|
||||
RuntimeChildResourceDefinition def = new RuntimeChildResourceDefinition(next, elementName, childAnnotation, descriptionAnnotation, refTypesList);
|
||||
orderMap.put(order, def);
|
||||
|
||||
} else if (IResourceBlock.class.isAssignableFrom(nextElementType)) {
|
||||
|
@ -348,7 +346,7 @@ class ModelScanner {
|
|||
|
||||
Class<? extends IResourceBlock> blockDef = (Class<? extends IResourceBlock>) nextElementType;
|
||||
addScanAlso(blockDef);
|
||||
RuntimeChildResourceBlockDefinition def = new RuntimeChildResourceBlockDefinition(next, min, max, elementName, blockDef);
|
||||
RuntimeChildResourceBlockDefinition def = new RuntimeChildResourceBlockDefinition(next, childAnnotation, descriptionAnnotation, elementName, blockDef);
|
||||
orderMap.put(order, def);
|
||||
|
||||
} else if (IDatatype.class.isAssignableFrom(nextElementType)) {
|
||||
|
@ -359,12 +357,12 @@ class ModelScanner {
|
|||
if (IPrimitiveDatatype.class.isAssignableFrom(nextElementType)) {
|
||||
if (nextElementType.equals(BoundCodeDt.class)) {
|
||||
IValueSetEnumBinder<Enum<?>> binder = getBoundCodeBinder(next);
|
||||
def = new RuntimeChildPrimitiveBoundCodeDatatypeDefinition(next, elementName, min, max, nextDatatype, binder);
|
||||
def = new RuntimeChildPrimitiveBoundCodeDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype, binder);
|
||||
} else {
|
||||
def = new RuntimeChildPrimitiveDatatypeDefinition(next, elementName, min, max, nextDatatype);
|
||||
def = new RuntimeChildPrimitiveDatatypeDefinition(next, elementName, descriptionAnnotation, childAnnotation, nextDatatype);
|
||||
}
|
||||
} else {
|
||||
def = new RuntimeChildCompositeDatatypeDefinition(next, elementName, min, max, nextDatatype);
|
||||
def = new RuntimeChildCompositeDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype);
|
||||
}
|
||||
|
||||
CodeableConceptElement concept = next.getAnnotation(CodeableConceptElement.class);
|
||||
|
@ -456,7 +454,7 @@ class ModelScanner {
|
|||
return resourceName;
|
||||
}
|
||||
|
||||
RuntimeResourceDefinition resourceDef = new RuntimeResourceDefinition(theClass, resourceName);
|
||||
RuntimeResourceDefinition resourceDef = new RuntimeResourceDefinition(theClass, resourceDefinition);
|
||||
myClassToElementDefinitions.put(theClass, resourceDef);
|
||||
myNameToResourceDefinitions.put(resourceName, resourceDef);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -9,9 +10,10 @@ import java.util.Set;
|
|||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
|
@ -20,8 +22,8 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini
|
|||
private Map<Class<? extends IElement>, String> myDatatypeToElementName;
|
||||
private Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> myDatatypeToElementDefinition;
|
||||
|
||||
public RuntimeChildChoiceDefinition(Field theField, String theElementName, int theMin, int theMax, List<Class<? extends IElement>> theChoiceTypes) {
|
||||
super(theField, theMin,theMax, theElementName);
|
||||
public RuntimeChildChoiceDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, List<Class<? extends IElement>> theChoiceTypes) {
|
||||
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
|
||||
|
||||
myChoiceTypes= Collections.unmodifiableList(theChoiceTypes);
|
||||
}
|
||||
|
@ -42,6 +44,7 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini
|
|||
return myNameToChildDefinition.get(theName);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
myNameToChildDefinition = new HashMap<String, BaseRuntimeElementDefinition<?>>();
|
||||
|
@ -54,7 +57,10 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini
|
|||
BaseRuntimeElementDefinition<?> nextDef;
|
||||
if (IResource.class.isAssignableFrom(next)) {
|
||||
elementName = getElementName() + StringUtils.capitalize(next.getSimpleName());
|
||||
nextDef = new RuntimeResourceReferenceDefinition(elementName);
|
||||
List<Class<? extends IResource>> types = new ArrayList<Class<? extends IResource>>();
|
||||
types.add((Class<? extends IResource>)next);
|
||||
nextDef = new RuntimeResourceReferenceDefinition(elementName, types);
|
||||
nextDef.sealAndInitialize(theClassToElementDefinitions);
|
||||
} else {
|
||||
nextDef = theClassToElementDefinitions.get(next);
|
||||
elementName = getElementName() + StringUtils.capitalize(nextDef.getName());
|
||||
|
|
|
@ -3,11 +3,13 @@ package ca.uhn.fhir.context;
|
|||
import java.lang.reflect.Field;
|
||||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildCompositeDatatypeDefinition extends BaseRuntimeChildDatatypeDefinition {
|
||||
|
||||
public RuntimeChildCompositeDatatypeDefinition(Field theField, String theElementName, int theMin, int theMax, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theElementName, theMin,theMax,theDatatype);
|
||||
public RuntimeChildCompositeDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theElementName, theChildAnnotation,theDescriptionAnnotation, theDatatype);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,21 +9,30 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
|
||||
public class RuntimeChildDeclaredExtensionDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
private Class<? extends IElement> myChildType;
|
||||
private BaseRuntimeElementDefinition<?> myChildDef;
|
||||
private Class<? extends IElement> myChildType;
|
||||
private String myDatatypeChildName;
|
||||
private boolean myDefinedLocally;
|
||||
private String myExtensionUrl;
|
||||
|
||||
private boolean myModifier;
|
||||
private Map<String, RuntimeChildDeclaredExtensionDefinition> myUrlToChildExtension;
|
||||
|
||||
RuntimeChildDeclaredExtensionDefinition(Field theField, int theMin, int theMax, String theElementName, String theExtensionUrl, Class<? extends IElement> theChildType) throws ConfigurationException {
|
||||
super(theField, theMin, theMax, theElementName);
|
||||
/**
|
||||
* @param theDefinedLocally See {@link Extension#definedLocally()}
|
||||
*/
|
||||
RuntimeChildDeclaredExtensionDefinition(Field theField, Child theChild, Description theDescriptionAnnotation, Extension theExtension, String theElementName, String theExtensionUrl, Class<? extends IElement> theChildType) throws ConfigurationException {
|
||||
super(theField, theChild, theDescriptionAnnotation, theElementName);
|
||||
assert isNotBlank(theExtensionUrl);
|
||||
myExtensionUrl = theExtensionUrl;
|
||||
myChildType = theChildType;
|
||||
myDefinedLocally=theExtension.definedLocally();
|
||||
myModifier = theExtension.isModifier();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,24 +40,14 @@ public class RuntimeChildDeclaredExtensionDefinition extends BaseRuntimeDeclared
|
|||
if (myDatatypeChildName != null) {
|
||||
if (myDatatypeChildName.equals(theName)) {
|
||||
return myChildDef;
|
||||
}else {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public IElement newInstance(){
|
||||
try {
|
||||
return myChildType.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+myChildType.getName(), e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:"+myChildType.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseRuntimeElementDefinition<?> getChildElementDefinitionByDatatype(Class<? extends IElement> theType) {
|
||||
if (myChildType.equals(theType)) {
|
||||
|
@ -65,36 +64,64 @@ public class RuntimeChildDeclaredExtensionDefinition extends BaseRuntimeDeclared
|
|||
public String getChildNameByDatatype(Class<? extends IElement> theDatatype) {
|
||||
if (myChildType.equals(theDatatype) && myDatatypeChildName != null) {
|
||||
return myDatatypeChildName;
|
||||
}else {
|
||||
} else {
|
||||
return "extension";
|
||||
}
|
||||
}
|
||||
|
||||
public Class<? extends IElement> getChildType() {
|
||||
return myChildType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtensionUrl() {
|
||||
return myExtensionUrl;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BaseRuntimeElementDefinition<?> getSingleChildOrThrow() {
|
||||
return myChildDef;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getValidChildNames() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
|
||||
public boolean isDefinedLocally() {
|
||||
return myDefinedLocally;
|
||||
}
|
||||
|
||||
public boolean isModifier() {
|
||||
return myModifier;
|
||||
}
|
||||
|
||||
public IElement newInstance() {
|
||||
try {
|
||||
return myChildType.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:" + myChildType.getName(), e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new ConfigurationException("Failed to instantiate type:" + myChildType.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
myUrlToChildExtension = new HashMap<String, RuntimeChildDeclaredExtensionDefinition>();
|
||||
|
||||
|
||||
BaseRuntimeElementDefinition<?> elementDef = theClassToElementDefinitions.get(myChildType);
|
||||
if (elementDef instanceof RuntimePrimitiveDatatypeDefinition || elementDef instanceof RuntimeCompositeDatatypeDefinition) {
|
||||
myDatatypeChildName = "value" + elementDef.getName().substring(0, 1).toUpperCase() + elementDef.getName().substring(1);
|
||||
myChildDef = elementDef;
|
||||
} else {
|
||||
RuntimeResourceBlockDefinition extDef = ((RuntimeResourceBlockDefinition)elementDef);
|
||||
RuntimeResourceBlockDefinition extDef = ((RuntimeResourceBlockDefinition) elementDef);
|
||||
for (RuntimeChildDeclaredExtensionDefinition next : extDef.getExtensions()) {
|
||||
myUrlToChildExtension.put(next.getExtensionUrl(), next);
|
||||
}
|
||||
myChildDef = extDef;
|
||||
}
|
||||
|
||||
|
||||
myUrlToChildExtension = Collections.unmodifiableMap(myUrlToChildExtension);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,20 @@ import java.lang.reflect.Field;
|
|||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildPrimitiveBoundCodeDatatypeDefinition extends RuntimeChildPrimitiveDatatypeDefinition {
|
||||
|
||||
private IValueSetEnumBinder<Enum<?>> myBinder;
|
||||
|
||||
public RuntimeChildPrimitiveBoundCodeDatatypeDefinition(Field theField, String theElementName, int theMin, int theMax, Class<? extends IDatatype> theDatatype, IValueSetEnumBinder<Enum<?>> theBinder) {
|
||||
super(theField, theElementName, theMin, theMax, theDatatype);
|
||||
public RuntimeChildPrimitiveBoundCodeDatatypeDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, Class<? extends IDatatype> theDatatype, IValueSetEnumBinder<Enum<?>> theBinder) {
|
||||
super(theField, theElementName, theDescriptionAnnotation, theChildAnnotation, theDatatype);
|
||||
|
||||
myBinder = theBinder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValueSetEnumBinder<Enum<?>> getInstanceConstructorArguments() {
|
||||
return myBinder;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,13 @@ package ca.uhn.fhir.context;
|
|||
import java.lang.reflect.Field;
|
||||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildPrimitiveDatatypeDefinition extends BaseRuntimeChildDatatypeDefinition {
|
||||
|
||||
public RuntimeChildPrimitiveDatatypeDefinition(Field theField, String theElementName, int theMin, int theMax, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theElementName, theMin,theMax, theDatatype);
|
||||
public RuntimeChildPrimitiveDatatypeDefinition(Field theField, String theElementName, Description theDescriptionAnnotation, Child theChildAnnotation, Class<? extends IDatatype> theDatatype) {
|
||||
super(theField, theElementName, theChildAnnotation, theDescriptionAnnotation, theDatatype);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,17 +5,18 @@ import java.util.Collections;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResourceBlock;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildResourceBlockDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
private RuntimeResourceBlockDefinition myElementDef;
|
||||
private Class<? extends IResourceBlock> myResourceBlockType;
|
||||
|
||||
public RuntimeChildResourceBlockDefinition(Field theField, int theMin, int theMax, String theElementName, Class<? extends IResourceBlock> theResourceBlockType) throws ConfigurationException {
|
||||
super(theField, theMin, theMax, theElementName);
|
||||
public RuntimeChildResourceBlockDefinition(Field theField, Child theChildAnnotation, Description theDescriptionAnnotation, String theElementName, Class<? extends IResourceBlock> theResourceBlockType) throws ConfigurationException {
|
||||
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
|
||||
myResourceBlockType = theResourceBlockType;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,19 +6,24 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.ResourceReference;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
|
||||
public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefinition {
|
||||
|
||||
private BaseRuntimeElementDefinition<?> myRuntimeDef;
|
||||
private List<Class<? extends IResource>> myResourceTypes;
|
||||
|
||||
public RuntimeChildResourceDefinition(Field theField, String theElementName, int theMin, int theMax, List<Class<? extends IResource>> theResourceTypes) {
|
||||
super(theField, theMin, theMax, theElementName);
|
||||
public RuntimeChildResourceDefinition(Field theField, String theElementName, Child theChildAnnotation, Description theDescriptionAnnotation, List<Class<? extends IResource>> theResourceTypes) {
|
||||
super(theField, theChildAnnotation, theDescriptionAnnotation, theElementName);
|
||||
myResourceTypes = theResourceTypes;
|
||||
|
||||
if (theResourceTypes == null || theResourceTypes.isEmpty()) {
|
||||
throw new ConfigurationException("Field '" + theField.getName() + "' on type '" + theField.getDeclaringClass().getCanonicalName() + "' has no resource types noted");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,6 +54,7 @@ public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefi
|
|||
|
||||
@Override
|
||||
void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
myRuntimeDef = new RuntimeResourceReferenceDefinition(getElementName());
|
||||
myRuntimeDef = new RuntimeResourceReferenceDefinition(getElementName(), myResourceTypes);
|
||||
myRuntimeDef.sealAndInitialize(theClassToElementDefinitions);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -9,6 +10,7 @@ import java.util.Set;
|
|||
|
||||
import ca.uhn.fhir.model.api.IDatatype;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.ResourceReference;
|
||||
import ca.uhn.fhir.model.api.UndeclaredExtension;
|
||||
|
||||
|
@ -69,7 +71,10 @@ public class RuntimeChildUndeclaredExtensionDefinition extends BaseRuntimeChildD
|
|||
|
||||
// Resource Reference
|
||||
myDatatypeToAttributeName.put(ResourceReference.class, "valueReference");
|
||||
RuntimeResourceReferenceDefinition def = new RuntimeResourceReferenceDefinition("valueResource");
|
||||
List<Class<? extends IResource>> types = new ArrayList<Class<? extends IResource>>();
|
||||
types.add(IResource.class);
|
||||
RuntimeResourceReferenceDefinition def = new RuntimeResourceReferenceDefinition("valueResource", types);
|
||||
def.sealAndInitialize(theClassToElementDefinitions);
|
||||
myAttributeNameToDefinition.put("valueResource", def);
|
||||
myDatatypeToDefinition.put(ResourceReference.class, def);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,41 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
import ca.uhn.fhir.model.dstu.resource.Profile;
|
||||
import ca.uhn.fhir.model.dstu.resource.Profile.ExtensionDefn;
|
||||
import ca.uhn.fhir.model.dstu.resource.Profile.Structure;
|
||||
import ca.uhn.fhir.model.dstu.resource.Profile.StructureElement;
|
||||
import ca.uhn.fhir.model.dstu.resource.Profile.StructureElementDefinitionType;
|
||||
import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
|
||||
import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
|
||||
|
||||
public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefinition<IResource> {
|
||||
|
||||
public RuntimeResourceDefinition(Class<? extends IResource> theClass, String theName) {
|
||||
super(theName, theClass);
|
||||
private String myResourceProfile;
|
||||
|
||||
public RuntimeResourceDefinition(Class<? extends IResource> theClass, ResourceDef theResourceAnnotation) {
|
||||
super(theResourceAnnotation.name(), theClass);
|
||||
myResourceProfile = theResourceAnnotation.profile();
|
||||
}
|
||||
|
||||
public String getResourceProfile() {
|
||||
return myResourceProfile;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,4 +43,224 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini
|
|||
return ChildTypeEnum.RESOURCE;
|
||||
}
|
||||
|
||||
public synchronized Profile toProfile() {
|
||||
Profile retVal = new Profile();
|
||||
RuntimeResourceDefinition def = this;
|
||||
|
||||
// Scan for extensions
|
||||
scanForExtensions(retVal, def);
|
||||
Collections.sort(retVal.getExtensionDefn(), new Comparator<ExtensionDefn>() {
|
||||
@Override
|
||||
public int compare(ExtensionDefn theO1, ExtensionDefn theO2) {
|
||||
return theO1.getCode().compareTo(theO2.getCode());
|
||||
}
|
||||
});
|
||||
|
||||
// Scan for children
|
||||
retVal.setName(getName());
|
||||
Structure struct = retVal.addStructure();
|
||||
LinkedList<String> path = new LinkedList<String>();
|
||||
|
||||
StructureElement element = struct.addElement();
|
||||
element.getDefinition().setMin(1);
|
||||
element.getDefinition().setMax("1");
|
||||
|
||||
fillProfile(struct, element, def, path, null);
|
||||
|
||||
retVal.getStructure().get(0).getElement().get(0).getDefinition().addType().getCode().setValue("Resource");
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
private Map<RuntimeChildDeclaredExtensionDefinition, String> myExtensionDefToCode = new HashMap<RuntimeChildDeclaredExtensionDefinition, String>();
|
||||
|
||||
private void scanForExtensions(Profile theProfile, BaseRuntimeElementDefinition<?> def) {
|
||||
BaseRuntimeElementCompositeDefinition<?> cdef = ((BaseRuntimeElementCompositeDefinition<?>) def);
|
||||
|
||||
for (RuntimeChildDeclaredExtensionDefinition nextChild : cdef.getExtensions()) {
|
||||
if (myExtensionDefToCode.containsKey(nextChild)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nextChild.isDefinedLocally() == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ExtensionDefn defn = theProfile.addExtensionDefn();
|
||||
String code = null;
|
||||
if (nextChild.getExtensionUrl().contains("#") && !nextChild.getExtensionUrl().endsWith("#")) {
|
||||
code = nextChild.getExtensionUrl().substring(nextChild.getExtensionUrl().indexOf('#') + 1);
|
||||
} else {
|
||||
throw new ConfigurationException("Locally defined extension has no '#[code]' part in extension URL: " + nextChild.getExtensionUrl());
|
||||
}
|
||||
|
||||
defn.setCode(code);
|
||||
if (myExtensionDefToCode.values().contains(code)) {
|
||||
throw new IllegalStateException("Duplicate extension code: " + code);
|
||||
}
|
||||
myExtensionDefToCode.put(nextChild, code);
|
||||
|
||||
if (nextChild.getChildType() != null && IPrimitiveDatatype.class.isAssignableFrom(nextChild.getChildType())) {
|
||||
RuntimePrimitiveDatatypeDefinition pdef = (RuntimePrimitiveDatatypeDefinition) nextChild.getSingleChildOrThrow();
|
||||
defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
|
||||
} else {
|
||||
RuntimeResourceBlockDefinition pdef = (RuntimeResourceBlockDefinition) nextChild.getSingleChildOrThrow();
|
||||
scanForExtensions(theProfile, pdef);
|
||||
|
||||
for (RuntimeChildDeclaredExtensionDefinition nextChildExt : pdef.getExtensions()) {
|
||||
StructureElementDefinitionType type = defn.getDefinition().addType();
|
||||
type.setCode(DataTypeEnum.EXTENSION);
|
||||
type.setProfile("#" + myExtensionDefToCode.get(nextChildExt));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void fillProfile(Structure theStruct, StructureElement theElement, BaseRuntimeElementDefinition<?> def, LinkedList<String> path, BaseRuntimeDeclaredChildDefinition theChild) {
|
||||
|
||||
fillBasics(theElement, def, path, theChild);
|
||||
|
||||
fillExtensions(theStruct, path, def.getExtensionsNonModifier(), "extension", false);
|
||||
fillExtensions(theStruct, path, def.getExtensionsModifier(), "modifierExtension", true);
|
||||
|
||||
if (def.getChildType() == ChildTypeEnum.RESOURCE) {
|
||||
StructureElement narrative = theStruct.addElement();
|
||||
narrative.setName("text");
|
||||
narrative.setPath(join(path, '.') + ".text");
|
||||
narrative.getDefinition().addType().setCode(DataTypeEnum.NARRATIVE);
|
||||
narrative.getDefinition().setIsModifier(false);
|
||||
narrative.getDefinition().setMin(0);
|
||||
narrative.getDefinition().setMax("1");
|
||||
|
||||
StructureElement contained = theStruct.addElement();
|
||||
contained.setName("contained");
|
||||
contained.setPath(join(path, '.') + ".contained");
|
||||
contained.getDefinition().addType().getCode().setValue("Resource");
|
||||
contained.getDefinition().setIsModifier(false);
|
||||
contained.getDefinition().setMin(0);
|
||||
contained.getDefinition().setMax("1");
|
||||
}
|
||||
|
||||
if (def instanceof BaseRuntimeElementCompositeDefinition) {
|
||||
BaseRuntimeElementCompositeDefinition<?> cdef = ((BaseRuntimeElementCompositeDefinition<?>) def);
|
||||
for (BaseRuntimeChildDefinition nextChild : cdef.getChildren()) {
|
||||
if (nextChild instanceof RuntimeChildUndeclaredExtensionDefinition) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BaseRuntimeDeclaredChildDefinition child = (BaseRuntimeDeclaredChildDefinition) nextChild;
|
||||
StructureElement elem = theStruct.addElement();
|
||||
fillMinAndMaxAndDefinitions(child, elem);
|
||||
|
||||
if (child instanceof RuntimeChildResourceBlockDefinition) {
|
||||
RuntimeResourceBlockDefinition nextDef = (RuntimeResourceBlockDefinition) child.getSingleChildOrThrow();
|
||||
fillProfile(theStruct, elem, nextDef, path, child);
|
||||
} else if (child instanceof RuntimeChildDeclaredExtensionDefinition) {
|
||||
throw new IllegalStateException("Unexpected child type: " + child.getClass().getCanonicalName());
|
||||
} else if (child instanceof RuntimeChildCompositeDatatypeDefinition || child instanceof RuntimeChildPrimitiveDatatypeDefinition || child instanceof RuntimeChildChoiceDefinition || child instanceof RuntimeChildResourceDefinition) {
|
||||
Iterator<String> childNamesIter = child.getValidChildNames().iterator();
|
||||
BaseRuntimeElementDefinition<?> nextDef = child.getChildByName(childNamesIter.next());
|
||||
fillBasics(elem, nextDef, path, child);
|
||||
fillName(elem, nextDef);
|
||||
while (childNamesIter.hasNext()) {
|
||||
nextDef = child.getChildByName(childNamesIter.next());
|
||||
fillName(elem, nextDef);
|
||||
}
|
||||
path.pollLast();
|
||||
} else {
|
||||
throw new IllegalStateException("Unexpected child type: " + child.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
throw new IllegalStateException("Unexpected child type: " + def.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
path.pollLast();
|
||||
}
|
||||
|
||||
private void fillExtensions(Structure theStruct, LinkedList<String> path, List<RuntimeChildDeclaredExtensionDefinition> extList, String elementName, boolean theIsModifier) {
|
||||
if (extList.size() > 0) {
|
||||
StructureElement extSlice = theStruct.addElement();
|
||||
extSlice.setName(elementName);
|
||||
extSlice.setPath(join(path, '.') + '.' + elementName);
|
||||
extSlice.getSlicing().getDiscriminator().setValue("url");
|
||||
extSlice.getSlicing().setOrdered(false);
|
||||
extSlice.getSlicing().setRules(SlicingRulesEnum.OPEN);
|
||||
extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
|
||||
|
||||
for (RuntimeChildDeclaredExtensionDefinition nextExt : extList) {
|
||||
StructureElement nextProfileExt = theStruct.addElement();
|
||||
nextProfileExt.getDefinition().setIsModifier(theIsModifier);
|
||||
nextProfileExt.setName(extSlice.getName());
|
||||
nextProfileExt.setPath(extSlice.getPath());
|
||||
fillMinAndMaxAndDefinitions(nextExt, nextProfileExt);
|
||||
StructureElementDefinitionType type = nextProfileExt.getDefinition().addType();
|
||||
type.setCode(DataTypeEnum.EXTENSION);
|
||||
if (nextExt.isDefinedLocally()) {
|
||||
type.setProfile(nextExt.getExtensionUrl().substring(nextExt.getExtensionUrl().indexOf('#')));
|
||||
} else {
|
||||
type.setProfile(nextExt.getExtensionUrl());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StructureElement extSlice = theStruct.addElement();
|
||||
extSlice.setName(elementName);
|
||||
extSlice.setPath(join(path, '.') + '.' + elementName);
|
||||
extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
|
||||
extSlice.getDefinition().setMin(0);
|
||||
extSlice.getDefinition().setMax("*");
|
||||
}
|
||||
}
|
||||
|
||||
private void fillName(StructureElement elem, BaseRuntimeElementDefinition<?> nextDef) {
|
||||
if (nextDef instanceof RuntimeResourceReferenceDefinition) {
|
||||
RuntimeResourceReferenceDefinition rr = (RuntimeResourceReferenceDefinition) nextDef;
|
||||
for (Class<? extends IResource> next : rr.getResourceTypes()) {
|
||||
RuntimeResourceDefinition resDef = rr.getDefinitionForResourceType(next);
|
||||
StructureElementDefinitionType type = elem.getDefinition().addType();
|
||||
type.getCode().setValue("ResourceReference");
|
||||
type.getProfile().setValueAsString(resDef.getResourceProfile());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
StructureElementDefinitionType type = elem.getDefinition().addType();
|
||||
String name = nextDef.getName();
|
||||
DataTypeEnum fromCodeString = DataTypeEnum.VALUESET_BINDER.fromCodeString(name);
|
||||
if (fromCodeString == null) {
|
||||
throw new ConfigurationException("Unknown type: " + name);
|
||||
}
|
||||
type.setCode(fromCodeString);
|
||||
}
|
||||
|
||||
private void fillMinAndMaxAndDefinitions(BaseRuntimeDeclaredChildDefinition child, StructureElement elem) {
|
||||
elem.getDefinition().setMin(child.getMin());
|
||||
if (child.getMax() == Child.MAX_UNLIMITED) {
|
||||
elem.getDefinition().setMax("*");
|
||||
} else {
|
||||
elem.getDefinition().setMax(Integer.toString(child.getMax()));
|
||||
}
|
||||
|
||||
if (isNotBlank(child.getShortDefinition())) {
|
||||
elem.getDefinition().getShort().setValue(child.getShortDefinition());
|
||||
}
|
||||
if (isNotBlank(child.getFormalDefinition())) {
|
||||
elem.getDefinition().getFormal().setValue(child.getFormalDefinition());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillBasics(StructureElement theElement, BaseRuntimeElementDefinition<?> def, LinkedList<String> path, BaseRuntimeDeclaredChildDefinition theChild) {
|
||||
if (path.isEmpty()) {
|
||||
path.add(def.getName());
|
||||
theElement.setName(def.getName());
|
||||
} else {
|
||||
path.add(WordUtils.uncapitalize(theChild.getElementName()));
|
||||
theElement.setName(theChild.getElementName());
|
||||
}
|
||||
theElement.setPath(StringUtils.join(path, '.'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,43 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.ResourceReference;
|
||||
|
||||
public class RuntimeResourceReferenceDefinition extends BaseRuntimeElementDefinition<ResourceReference> {
|
||||
|
||||
public RuntimeResourceReferenceDefinition(String theName) {
|
||||
private final List<Class<? extends IResource>> myResourceTypes;
|
||||
private HashMap<Class<? extends IResource>, RuntimeResourceDefinition> myResourceTypeToDefinition;
|
||||
|
||||
public RuntimeResourceReferenceDefinition(String theName, List<Class<? extends IResource>> theResourceTypes) {
|
||||
super(theName, ResourceReference.class);
|
||||
if (theResourceTypes == null || theResourceTypes.isEmpty()) {
|
||||
throw new ConfigurationException("Element '" + theName + "' has no resource types noted");
|
||||
}
|
||||
myResourceTypes = theResourceTypes;
|
||||
}
|
||||
|
||||
public List<Class<? extends IResource>> getResourceTypes() {
|
||||
return myResourceTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
void sealAndInitialize(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
myResourceTypeToDefinition = new HashMap<Class<? extends IResource>, RuntimeResourceDefinition>();
|
||||
for (Class<? extends IResource> next : myResourceTypes) {
|
||||
if (next.equals(IResource.class)) {
|
||||
continue;
|
||||
}
|
||||
RuntimeResourceDefinition definition = (RuntimeResourceDefinition) theClassToElementDefinitions.get(next);
|
||||
if (definition == null) {
|
||||
throw new ConfigurationException("Couldn't find definition for: " + next.getCanonicalName());
|
||||
}
|
||||
myResourceTypeToDefinition.put(next, definition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,4 +45,12 @@ public class RuntimeResourceReferenceDefinition extends BaseRuntimeElementDefini
|
|||
return ChildTypeEnum.RESOURCE_REF;
|
||||
}
|
||||
|
||||
public RuntimeResourceDefinition getDefinitionForResourceType(Class<? extends IResource> theType) {
|
||||
RuntimeResourceDefinition retVal = myResourceTypeToDefinition.get(theType);
|
||||
if (retVal == null) {
|
||||
throw new ConfigurationException("Unknown type: " + theType.getCanonicalName());
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
package ca.uhn.fhir.model.api;
|
||||
|
||||
|
||||
|
||||
public interface IValueSetEnumBinder<T extends Enum<?>> {
|
||||
|
||||
T fromCodeString(String theCodeString);
|
||||
|
||||
String toCodeString(T theEnum);
|
||||
|
||||
String toSystemString(T theEnum);
|
||||
|
||||
T fromCodeString(String theCodeString, String theSystemString);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -30,23 +30,6 @@ public @interface Child {
|
|||
|
||||
int max() default 1;
|
||||
|
||||
Choice choice() default @Choice();
|
||||
|
||||
Class<? extends IElement> type() default NoDatatype.class;
|
||||
|
||||
/**
|
||||
* Indicator that the type attribute is not set
|
||||
*/
|
||||
public class NoDatatype implements IElement
|
||||
{
|
||||
private NoDatatype() {
|
||||
// non instantiable
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Class<? extends IElement>[] type() default {};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package ca.uhn.fhir.model.api.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(value= {ElementType.FIELD})
|
||||
public @interface ChildResource {
|
||||
|
||||
Class<? extends IResource>[] types();
|
||||
|
||||
}
|
|
@ -9,6 +9,14 @@ import java.lang.annotation.Target;
|
|||
@Target(value= {ElementType.FIELD, ElementType.TYPE})
|
||||
public @interface Description {
|
||||
|
||||
String value();
|
||||
/**
|
||||
* Optional short name for this child
|
||||
*/
|
||||
String shortDefinition() default "";
|
||||
|
||||
/**
|
||||
* Optional formal definition for this child
|
||||
*/
|
||||
String formalDefinition() default "";
|
||||
|
||||
}
|
||||
|
|
|
@ -5,12 +5,37 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
|
||||
@Target(value= {ElementType.FIELD})
|
||||
@Target(value = { ElementType.FIELD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Extension {
|
||||
|
||||
/**
|
||||
* This parameter affects how the extension is treated when the element
|
||||
* definition containing this resource is exported to a profile.
|
||||
*
|
||||
* <p>
|
||||
* If set to <b><code>true</code></b>, the resource is taken to be a local
|
||||
* resource and its definition is exported along with the reference. Use
|
||||
* this option for extension defintions that you have added locally (i.e.
|
||||
* within your own organization)
|
||||
* </p>
|
||||
* <p>
|
||||
*
|
||||
* <p>
|
||||
* If set to <b><code>false</code></b>, the resource is taken to be a remote
|
||||
* resource and its definition is <b>not</b> exported to the profile. Use
|
||||
* this option for extensions that are defined by other organizations (i.e.
|
||||
* by regional authorities or jurisdictional governments)
|
||||
* </p>
|
||||
*/
|
||||
boolean definedLocally();
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if this extension is a
|
||||
* <a href="http://www.hl7.org/implement/standards/fhir/extensibility.html#modifierExtension">modifier extension</a>
|
||||
*/
|
||||
boolean isModifier();
|
||||
|
||||
String url();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ public @interface ResourceDef {
|
|||
|
||||
String name();
|
||||
|
||||
String profile() default "";
|
||||
|
||||
int identifierOrder() default ORDER_NOT_SPECIFIED;
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import ca.uhn.fhir.model.dstu.resource.*;
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world
|
||||
* There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
@ -42,27 +42,59 @@ public class AddressDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="home | work | temp | old - purpose of this address",
|
||||
formalDefinition="The purpose of this address"
|
||||
)
|
||||
private BoundCodeDt<AddressUseEnum> myUse;
|
||||
|
||||
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Text representation of the address",
|
||||
formalDefinition="A full text representation of the address"
|
||||
)
|
||||
private StringDt myText;
|
||||
|
||||
@Child(name="line", type=StringDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Street name, number, direction & P.O. Box etc",
|
||||
formalDefinition="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information"
|
||||
)
|
||||
private List<StringDt> myLine;
|
||||
|
||||
@Child(name="city", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of city, town etc.",
|
||||
formalDefinition="The name of the city, town, village or other community or delivery center."
|
||||
)
|
||||
private StringDt myCity;
|
||||
|
||||
@Child(name="state", type=StringDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Sub-unit of country (abreviations ok)",
|
||||
formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)."
|
||||
)
|
||||
private StringDt myState;
|
||||
|
||||
@Child(name="zip", type=StringDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Postal code for area",
|
||||
formalDefinition="A postal code designating a region defined by the postal service."
|
||||
)
|
||||
private StringDt myZip;
|
||||
|
||||
@Child(name="country", type=StringDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Country (can be ISO 3166 3 letter code)",
|
||||
formalDefinition="Country - a nation as commonly understood or generally accepted"
|
||||
)
|
||||
private StringDt myCountry;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=7, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Time period when address was/is in use",
|
||||
formalDefinition="Time period when address was/is in use"
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
|
||||
|
@ -158,14 +190,13 @@ public class AddressDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc ).
|
||||
* Gets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* This component contains the house number, apartment number, street name, street direction,
|
||||
P.O. Box number, delivery hints, and similar address information
|
||||
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
|
||||
* </p>
|
||||
*/
|
||||
public List<StringDt> getLine() {
|
||||
|
@ -176,12 +207,11 @@ P.O. Box number, delivery hints, and similar address information
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc )
|
||||
* Sets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* This component contains the house number, apartment number, street name, street direction,
|
||||
P.O. Box number, delivery hints, and similar address information
|
||||
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
|
||||
* </p>
|
||||
*/
|
||||
public void setLine(List<StringDt> theValue) {
|
||||
|
@ -189,12 +219,11 @@ P.O. Box number, delivery hints, and similar address information
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds and returns a new value for <b>line</b> (Street name, number, direction & P.O. Box etc )
|
||||
* Adds and returns a new value for <b>line</b> (Street name, number, direction & P.O. Box etc)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* This component contains the house number, apartment number, street name, street direction,
|
||||
P.O. Box number, delivery hints, and similar address information
|
||||
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
|
||||
* </p>
|
||||
*/
|
||||
public StringDt addLine() {
|
||||
|
@ -204,12 +233,11 @@ P.O. Box number, delivery hints, and similar address information
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a new value for <b>line</b> (Street name, number, direction & P.O. Box etc )
|
||||
* Adds a new value for <b>line</b> (Street name, number, direction & P.O. Box etc)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* This component contains the house number, apartment number, street name, street direction,
|
||||
P.O. Box number, delivery hints, and similar address information
|
||||
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
|
||||
* </p>
|
||||
*/
|
||||
public void addLine( String theString) {
|
||||
|
|
|
@ -42,24 +42,52 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="contentType", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Mime type of the content, with charset etc.",
|
||||
formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate"
|
||||
)
|
||||
private CodeDt myContentType;
|
||||
|
||||
@Child(name="language", type=CodeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Human language of the content (BCP-47)",
|
||||
formalDefinition="The human language of the content. The value can be any valid value according to BCP 47"
|
||||
)
|
||||
private CodeDt myLanguage;
|
||||
|
||||
@Child(name="data", type=Base64BinaryDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Data inline, base64ed",
|
||||
formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64"
|
||||
)
|
||||
private Base64BinaryDt myData;
|
||||
|
||||
@Child(name="url", type=UriDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Uri where the data can be found",
|
||||
formalDefinition="An alternative location where the data can be accessed"
|
||||
)
|
||||
private UriDt myUrl;
|
||||
|
||||
@Child(name="size", type=IntegerDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Number of bytes of content (if url provided)",
|
||||
formalDefinition="The number of bytes of data that make up this attachment."
|
||||
)
|
||||
private IntegerDt mySize;
|
||||
|
||||
@Child(name="hash", type=Base64BinaryDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Hash of the data (sha-1, base64ed )",
|
||||
formalDefinition="The calculated hash of the data using SHA-1. Represented using base64"
|
||||
)
|
||||
private Base64BinaryDt myHash;
|
||||
|
||||
@Child(name="title", type=StringDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Label to display in place of the data",
|
||||
formalDefinition="A label or set of text to display in place of the data"
|
||||
)
|
||||
private StringDt myTitle;
|
||||
|
||||
|
||||
|
@ -98,7 +126,19 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>contentType</b> (Mime type of the content, with charset etc.)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate
|
||||
* </p>
|
||||
*/
|
||||
public void setContentType( String theCode) {
|
||||
myContentType = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>language</b> (Human language of the content (BCP-47)).
|
||||
* creating it if it does
|
||||
|
@ -129,7 +169,19 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>language</b> (Human language of the content (BCP-47))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The human language of the content. The value can be any valid value according to BCP 47
|
||||
* </p>
|
||||
*/
|
||||
public void setLanguage( String theCode) {
|
||||
myLanguage = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>data</b> (Data inline, base64ed).
|
||||
* creating it if it does
|
||||
|
|
|
@ -42,9 +42,17 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype
|
|||
|
||||
|
||||
@Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Code defined by a terminology system",
|
||||
formalDefinition="A reference to a code defined by a terminology system"
|
||||
)
|
||||
private List<CodingDt> myCoding;
|
||||
|
||||
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Plain text representation of the concept",
|
||||
formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user"
|
||||
)
|
||||
private StringDt myText;
|
||||
|
||||
|
||||
|
@ -54,13 +62,13 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>coding</b> (Code defined by a terminology system ).
|
||||
* Gets the value(s) for <b>coding</b> (Code defined by a terminology system).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a code defined by a terminology system
|
||||
* A reference to a code defined by a terminology system
|
||||
* </p>
|
||||
*/
|
||||
public List<CodingDt> getCoding() {
|
||||
|
@ -71,11 +79,11 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>coding</b> (Code defined by a terminology system )
|
||||
* Sets the value(s) for <b>coding</b> (Code defined by a terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a code defined by a terminology system
|
||||
* A reference to a code defined by a terminology system
|
||||
* </p>
|
||||
*/
|
||||
public void setCoding(List<CodingDt> theValue) {
|
||||
|
@ -83,11 +91,11 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds and returns a new value for <b>coding</b> (Code defined by a terminology system )
|
||||
* Adds and returns a new value for <b>coding</b> (Code defined by a terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a code defined by a terminology system
|
||||
* A reference to a code defined by a terminology system
|
||||
* </p>
|
||||
*/
|
||||
public CodingDt addCoding() {
|
||||
|
|
|
@ -25,11 +25,11 @@ import ca.uhn.fhir.model.dstu.resource.*;
|
|||
|
||||
/**
|
||||
* HAPI/FHIR <b>Coding</b> Datatype
|
||||
* (A reference to a code defined by a terminology system )
|
||||
* (A reference to a code defined by a terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A reference to a code defined by a terminology system
|
||||
* A reference to a code defined by a terminology system
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
@ -42,24 +42,47 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identity of the terminology system",
|
||||
formalDefinition="The identification of the code system that defines the meaning of the symbol in the code."
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Version of the system - if relevant",
|
||||
formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Symbol in syntax defined by the system",
|
||||
formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)"
|
||||
)
|
||||
private CodeDt myCode;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Representation defined by the system",
|
||||
formalDefinition="A representation of the meaning of the code in the system, following the rules of the system."
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
@Child(name="primary", type=BooleanDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If this code was chosen directly by the user",
|
||||
formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)"
|
||||
)
|
||||
private BooleanDt myPrimary;
|
||||
|
||||
@Child(name="valueSet", order=5, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="valueSet", order=5, min=0, max=1, type={
|
||||
ValueSet.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Set this coding was chosen from",
|
||||
formalDefinition="The set of possible coded values this coding was chosen from or constrained by"
|
||||
)
|
||||
private ResourceReference myValueSet;
|
||||
|
||||
|
||||
|
@ -69,13 +92,13 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>system</b> (Identity of the terminology system ).
|
||||
* Gets the value(s) for <b>system</b> (Identity of the terminology system).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public UriDt getSystem() {
|
||||
|
@ -86,11 +109,11 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>system</b> (Identity of the terminology system )
|
||||
* Sets the value(s) for <b>system</b> (Identity of the terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public void setSystem(UriDt theValue) {
|
||||
|
@ -99,11 +122,11 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>system</b> (Identity of the terminology system )
|
||||
* Sets the value for <b>system</b> (Identity of the terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public void setSystem( String theUri) {
|
||||
|
@ -184,7 +207,19 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Symbol in syntax defined by the system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
||||
* </p>
|
||||
*/
|
||||
public void setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>display</b> (Representation defined by the system).
|
||||
* creating it if it does
|
||||
|
@ -192,7 +227,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getDisplay() {
|
||||
|
@ -207,7 +242,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay(StringDt theValue) {
|
||||
|
@ -220,7 +255,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay( String theString) {
|
||||
|
|
|
@ -42,15 +42,31 @@ public class ContactDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="system", type=CodeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="phone | fax | email | url",
|
||||
formalDefinition="Telecommunications form for contact - what communications system is required to make use of the contact"
|
||||
)
|
||||
private BoundCodeDt<ContactSystemEnum> mySystem;
|
||||
|
||||
@Child(name="value", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The actual contact details",
|
||||
formalDefinition="The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."
|
||||
)
|
||||
private StringDt myValue;
|
||||
|
||||
@Child(name="use", type=CodeDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="home | work | temp | old | mobile - purpose of this address",
|
||||
formalDefinition="Identifies the purpose for the address"
|
||||
)
|
||||
private BoundCodeDt<ContactUseEnum> myUse;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Time period when the contact was/is in use",
|
||||
formalDefinition="Time period when the contact was/is in use"
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
|
||||
|
|
|
@ -42,24 +42,52 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="usual | official | temp | nickname | anonymous | old | maiden",
|
||||
formalDefinition="Identifies the purpose for this name"
|
||||
)
|
||||
private BoundCodeDt<NameUseEnum> myUse;
|
||||
|
||||
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Text representation of the full name",
|
||||
formalDefinition="A full text representation of the name"
|
||||
)
|
||||
private StringDt myText;
|
||||
|
||||
@Child(name="family", type=StringDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Family name (often called 'Surname')",
|
||||
formalDefinition="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."
|
||||
)
|
||||
private List<StringDt> myFamily;
|
||||
|
||||
@Child(name="given", type=StringDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Given names (not always 'first'). Includes middle names",
|
||||
formalDefinition="Given name"
|
||||
)
|
||||
private List<StringDt> myGiven;
|
||||
|
||||
@Child(name="prefix", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Parts that come before the name",
|
||||
formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name"
|
||||
)
|
||||
private List<StringDt> myPrefix;
|
||||
|
||||
@Child(name="suffix", type=StringDt.class, order=5, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Parts that come after the name",
|
||||
formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name"
|
||||
)
|
||||
private List<StringDt> mySuffix;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Time period when name was/is in use",
|
||||
formalDefinition="Indicates the period of time when this name was valid for the named person."
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
|
||||
|
|
|
@ -56,24 +56,47 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype , I
|
|||
}
|
||||
|
||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="usual | official | temp | secondary (If known)",
|
||||
formalDefinition="The purpose of this identifier"
|
||||
)
|
||||
private BoundCodeDt<IdentifierUseEnum> myUse;
|
||||
|
||||
@Child(name="label", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Description of identifier",
|
||||
formalDefinition="A text string for the identifier that can be displayed to a human so they can recognize the identifier"
|
||||
)
|
||||
private StringDt myLabel;
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The namespace for the identifier",
|
||||
formalDefinition="Establishes the namespace in which set of possible id values is unique."
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="value", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The value that is unique",
|
||||
formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system."
|
||||
)
|
||||
private StringDt myValue;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Time period when id is/was valid for use",
|
||||
formalDefinition="Time period during which identifier is/was valid for use"
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
@Child(name="assigner", order=5, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="assigner", order=5, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Organization that issued id (may be just text)",
|
||||
formalDefinition="Organization that issued/manages the identifier"
|
||||
)
|
||||
private ResourceReference myAssigner;
|
||||
|
||||
|
||||
|
@ -83,8 +106,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype , I
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>use</b> (usual | official | temp | secondary (If known)
|
||||
).
|
||||
* Gets the value(s) for <b>use</b> (usual | official | temp | secondary (If known)).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -101,8 +123,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype , I
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known)
|
||||
)
|
||||
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -115,8 +136,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype , I
|
|||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known)
|
||||
)
|
||||
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
|
|
@ -42,9 +42,17 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="start", type=DateTimeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Starting time with inclusive boundary",
|
||||
formalDefinition="The start of the period. The boundary is inclusive."
|
||||
)
|
||||
private DateTimeDt myStart;
|
||||
|
||||
@Child(name="end", type=DateTimeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="End time with inclusive boundary, if not ongoing",
|
||||
formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing"
|
||||
)
|
||||
private DateTimeDt myEnd;
|
||||
|
||||
|
||||
|
|
|
@ -42,18 +42,38 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="value", type=DecimalDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Numerical value (with implicit precision)",
|
||||
formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value"
|
||||
)
|
||||
private DecimalDt myValue;
|
||||
|
||||
@Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="< | <= | >= | > - how to understand the value",
|
||||
formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value"
|
||||
)
|
||||
private BoundCodeDt<QuantityCompararatorEnum> myComparator;
|
||||
|
||||
@Child(name="units", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Unit representation",
|
||||
formalDefinition="A human-readable form of the units"
|
||||
)
|
||||
private StringDt myUnits;
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="System that defines coded unit form",
|
||||
formalDefinition="The identification of the system that provides the coded form of the unit"
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Coded form of the unit",
|
||||
formalDefinition="A computer processable form of the units in some unit representation system"
|
||||
)
|
||||
private CodeDt myCode;
|
||||
|
||||
|
||||
|
@ -100,7 +120,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public void setValue( java.math.BigDecimal theValue) {
|
||||
public void setValue( long theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -124,7 +144,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public void setValue( long theValue) {
|
||||
public void setValue( java.math.BigDecimal theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -136,7 +156,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public BoundCodeDt<QuantityCompararatorEnum> getComparator() {
|
||||
|
@ -151,7 +171,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public void setComparator(BoundCodeDt<QuantityCompararatorEnum> theValue) {
|
||||
|
@ -164,7 +184,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value
|
||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public void setComparator(QuantityCompararatorEnum theValue) {
|
||||
|
@ -288,7 +308,19 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Coded form of the unit)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
*/
|
||||
public void setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import ca.uhn.fhir.model.dstu.resource.*;
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A set of ordered Quantities defined by a low and high limit.
|
||||
* A set of ordered Quantities defined by a low and high limit.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
@ -42,9 +42,17 @@ public class RangeDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Low limit",
|
||||
formalDefinition="The low limit. The boundary is inclusive."
|
||||
)
|
||||
private QuantityDt myLow;
|
||||
|
||||
@Child(name="high", type=QuantityDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="High limit",
|
||||
formalDefinition="The high limit. The boundary is inclusive."
|
||||
)
|
||||
private QuantityDt myHigh;
|
||||
|
||||
|
||||
|
@ -54,7 +62,7 @@ public class RangeDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>low</b> (Low limit ).
|
||||
* Gets the value(s) for <b>low</b> (Low limit).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -71,7 +79,7 @@ public class RangeDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>low</b> (Low limit )
|
||||
* Sets the value(s) for <b>low</b> (Low limit)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -85,13 +93,13 @@ public class RangeDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>high</b> (High limit ).
|
||||
* Gets the value(s) for <b>high</b> (High limit).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The high limit. The boundary is inclusive.
|
||||
* The high limit. The boundary is inclusive.
|
||||
* </p>
|
||||
*/
|
||||
public QuantityDt getHigh() {
|
||||
|
@ -102,11 +110,11 @@ public class RangeDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>high</b> (High limit )
|
||||
* Sets the value(s) for <b>high</b> (High limit)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The high limit. The boundary is inclusive.
|
||||
* The high limit. The boundary is inclusive.
|
||||
* </p>
|
||||
*/
|
||||
public void setHigh(QuantityDt theValue) {
|
||||
|
|
|
@ -29,7 +29,7 @@ import ca.uhn.fhir.model.dstu.resource.*;
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A relationship of two Quantity values - expressed as a numerator and a denominator.
|
||||
* A relationship of two Quantity values - expressed as a numerator and a denominator.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
@ -42,9 +42,17 @@ public class RatioDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="numerator", type=QuantityDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Numerator value",
|
||||
formalDefinition="The value of the numerator"
|
||||
)
|
||||
private QuantityDt myNumerator;
|
||||
|
||||
@Child(name="denominator", type=QuantityDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Denominator value",
|
||||
formalDefinition="The value of the denominator"
|
||||
)
|
||||
private QuantityDt myDenominator;
|
||||
|
||||
|
||||
|
|
|
@ -42,9 +42,17 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty
|
|||
|
||||
|
||||
@Child(name="reference", type=StringDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Relative, internal or absolute URL reference",
|
||||
formalDefinition="A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources"
|
||||
)
|
||||
private StringDt myReference;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Text alternative for the resource",
|
||||
formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference"
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
|
||||
|
@ -103,7 +111,7 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getDisplay() {
|
||||
|
@ -118,7 +126,7 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay(StringDt theValue) {
|
||||
|
@ -131,7 +139,7 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay( String theString) {
|
||||
|
|
|
@ -42,24 +42,52 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="origin", type=QuantityDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Zero value and units",
|
||||
formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series"
|
||||
)
|
||||
private QuantityDt myOrigin;
|
||||
|
||||
@Child(name="period", type=DecimalDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Number of milliseconds between samples",
|
||||
formalDefinition="The length of time between sampling times, measured in milliseconds"
|
||||
)
|
||||
private DecimalDt myPeriod;
|
||||
|
||||
@Child(name="factor", type=DecimalDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Multiply data by this before adding to origin",
|
||||
formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin"
|
||||
)
|
||||
private DecimalDt myFactor;
|
||||
|
||||
@Child(name="lowerLimit", type=DecimalDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Lower limit of detection",
|
||||
formalDefinition="The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)"
|
||||
)
|
||||
private DecimalDt myLowerLimit;
|
||||
|
||||
@Child(name="upperLimit", type=DecimalDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Upper limit of detection",
|
||||
formalDefinition="The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)"
|
||||
)
|
||||
private DecimalDt myUpperLimit;
|
||||
|
||||
@Child(name="dimensions", type=IntegerDt.class, order=5, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Number of sample points at each time point",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private IntegerDt myDimensions;
|
||||
|
||||
@Child(name="data", type=StringDt.class, order=6, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Decimal values with spaces, or \"E\" | \"U\" | \"L\"",
|
||||
formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value"
|
||||
)
|
||||
private StringDt myData;
|
||||
|
||||
|
||||
|
@ -137,7 +165,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
* The length of time between sampling times, measured in milliseconds
|
||||
* </p>
|
||||
*/
|
||||
public void setPeriod( java.math.BigDecimal theValue) {
|
||||
public void setPeriod( long theValue) {
|
||||
myPeriod = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -161,7 +189,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
* The length of time between sampling times, measured in milliseconds
|
||||
* </p>
|
||||
*/
|
||||
public void setPeriod( long theValue) {
|
||||
public void setPeriod( java.math.BigDecimal theValue) {
|
||||
myPeriod = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -204,7 +232,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
||||
* </p>
|
||||
*/
|
||||
public void setFactor( java.math.BigDecimal theValue) {
|
||||
public void setFactor( long theValue) {
|
||||
myFactor = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -228,7 +256,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
||||
* </p>
|
||||
*/
|
||||
public void setFactor( long theValue) {
|
||||
public void setFactor( java.math.BigDecimal theValue) {
|
||||
myFactor = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -240,7 +268,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit)
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public DecimalDt getLowerLimit() {
|
||||
|
@ -255,7 +283,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit)
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setLowerLimit(DecimalDt theValue) {
|
||||
|
@ -268,10 +296,10 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit)
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setLowerLimit( java.math.BigDecimal theValue) {
|
||||
public void setLowerLimit( long theValue) {
|
||||
myLowerLimit = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -280,7 +308,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit)
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setLowerLimit( double theValue) {
|
||||
|
@ -292,10 +320,10 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit)
|
||||
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setLowerLimit( long theValue) {
|
||||
public void setLowerLimit( java.math.BigDecimal theValue) {
|
||||
myLowerLimit = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -307,7 +335,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit)
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public DecimalDt getUpperLimit() {
|
||||
|
@ -322,7 +350,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit)
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setUpperLimit(DecimalDt theValue) {
|
||||
|
@ -335,10 +363,10 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit)
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setUpperLimit( java.math.BigDecimal theValue) {
|
||||
public void setUpperLimit( long theValue) {
|
||||
myUpperLimit = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -347,7 +375,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit)
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setUpperLimit( double theValue) {
|
||||
|
@ -359,10 +387,10 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit)
|
||||
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
|
||||
* </p>
|
||||
*/
|
||||
public void setUpperLimit( long theValue) {
|
||||
public void setUpperLimit( java.math.BigDecimal theValue) {
|
||||
myUpperLimit = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -411,13 +439,13 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>data</b> (Decimal values with spaces, or "E" | "U" | "L").
|
||||
* Gets the value(s) for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\").
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getData() {
|
||||
|
@ -428,11 +456,11 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>data</b> (Decimal values with spaces, or "E" | "U" | "L")
|
||||
* Sets the value(s) for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\")
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
|
||||
* </p>
|
||||
*/
|
||||
public void setData(StringDt theValue) {
|
||||
|
@ -441,11 +469,11 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>data</b> (Decimal values with spaces, or "E" | "U" | "L")
|
||||
* Sets the value for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\")
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value
|
||||
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
|
||||
* </p>
|
||||
*/
|
||||
public void setData( String theString) {
|
||||
|
|
|
@ -42,9 +42,17 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
|
||||
|
||||
@Child(name="event", type=PeriodDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="When the event occurs",
|
||||
formalDefinition="Identifies specific time periods when the event should occur"
|
||||
)
|
||||
private List<PeriodDt> myEvent;
|
||||
|
||||
@Child(name="repeat", order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Only if there is none or one event",
|
||||
formalDefinition="Identifies a repeating pattern to the intended time periods."
|
||||
)
|
||||
private Repeat myRepeat;
|
||||
|
||||
|
||||
|
@ -104,7 +112,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* </p>
|
||||
*/
|
||||
public Repeat getRepeat() {
|
||||
|
@ -119,7 +127,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* </p>
|
||||
*/
|
||||
public void setRepeat(Repeat theValue) {
|
||||
|
@ -133,28 +141,52 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* Identifies a repeating pattern to the intended time periods.
|
||||
* </p>
|
||||
*/
|
||||
@Block(name="Schedule.repeat")
|
||||
public static class Repeat extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Event occurs frequency times per duration",
|
||||
formalDefinition="Indicates how often the event should occur."
|
||||
)
|
||||
private IntegerDt myFrequency;
|
||||
|
||||
@Child(name="when", type=CodeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events",
|
||||
formalDefinition="Identifies the occurrence of daily life that determines timing"
|
||||
)
|
||||
private BoundCodeDt<EventTimingEnum> myWhen;
|
||||
|
||||
@Child(name="duration", type=DecimalDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Repeating or event-related duration",
|
||||
formalDefinition="How long each repetition should last"
|
||||
)
|
||||
private DecimalDt myDuration;
|
||||
|
||||
@Child(name="units", type=CodeDt.class, order=3, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)",
|
||||
formalDefinition="The units of time for the duration"
|
||||
)
|
||||
private BoundCodeDt<UnitsOfTimeEnum> myUnits;
|
||||
|
||||
@Child(name="count", type=IntegerDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Number of times to repeat",
|
||||
formalDefinition="A total count of the desired number of repetitions"
|
||||
)
|
||||
private IntegerDt myCount;
|
||||
|
||||
@Child(name="end", type=DateTimeDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="When to stop repeats",
|
||||
formalDefinition="When to stop repeating the schedule"
|
||||
)
|
||||
private DateTimeDt myEnd;
|
||||
|
||||
|
||||
|
@ -287,7 +319,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
* How long each repetition should last
|
||||
* </p>
|
||||
*/
|
||||
public void setDuration( java.math.BigDecimal theValue) {
|
||||
public void setDuration( long theValue) {
|
||||
myDuration = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -311,7 +343,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype {
|
|||
* How long each repetition should last
|
||||
* </p>
|
||||
*/
|
||||
public void setDuration( long theValue) {
|
||||
public void setDuration( java.math.BigDecimal theValue) {
|
||||
myDuration = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
* Allows institutions to track their devices.
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Device")
|
||||
@ResourceDef(name="Device", profile="http://hl7.org/fhir/profiles/Device")
|
||||
public class Device extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -122,51 +122,100 @@ public class Device extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Instance id from manufacturer, owner and others",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="What kind of device this is",
|
||||
formalDefinition="A kind of this device"
|
||||
)
|
||||
private CodeableConceptDt myType;
|
||||
|
||||
@Child(name="manufacturer", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of device manufacturer",
|
||||
formalDefinition="A name of the manufacturer"
|
||||
)
|
||||
private StringDt myManufacturer;
|
||||
|
||||
@Child(name="model", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Model id assigned by the manufacturer",
|
||||
formalDefinition="The \"model\" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type"
|
||||
)
|
||||
private StringDt myModel;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Version number (i.e. software)",
|
||||
formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="expiry", type=DateDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Date of expiry of this device (if applicable)",
|
||||
formalDefinition="Date of expiry of this device (if applicable)"
|
||||
)
|
||||
private DateDt myExpiry;
|
||||
|
||||
@Child(name="udi", type=StringDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="FDA Mandated Unique Device Identifier",
|
||||
formalDefinition="FDA Mandated Unique Device Identifier. Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm"
|
||||
)
|
||||
private StringDt myUdi;
|
||||
|
||||
@Child(name="lotNumber", type=StringDt.class, order=7, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Lot number of manufacture",
|
||||
formalDefinition="Lot number assigned by the manufacturer"
|
||||
)
|
||||
private StringDt myLotNumber;
|
||||
|
||||
@Child(name="owner", order=8, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="owner", order=8, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Organization responsible for device",
|
||||
formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device"
|
||||
)
|
||||
private ResourceReference myOwner;
|
||||
|
||||
@Child(name="location", order=9, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="location", order=9, min=0, max=1, type={
|
||||
Location.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Where the resource is found",
|
||||
formalDefinition="The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. \"in/with the patient\"), or a coded location"
|
||||
)
|
||||
private ResourceReference myLocation;
|
||||
|
||||
@Child(name="patient", order=10, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="patient", order=10, min=0, max=1, type={
|
||||
Patient.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="If the resource is affixed to a person",
|
||||
formalDefinition="Patient information, if the resource is affixed to a person"
|
||||
)
|
||||
private ResourceReference myPatient;
|
||||
|
||||
@Child(name="contact", type=ContactDt.class, order=11, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Details for human/organization for support",
|
||||
formalDefinition="Contact details for an organization or a particular human that is responsible for the device"
|
||||
)
|
||||
private List<ContactDt> myContact;
|
||||
|
||||
@Child(name="url", type=UriDt.class, order=12, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Network address to contact device",
|
||||
formalDefinition="A network address on which the device may be contacted directly"
|
||||
)
|
||||
private UriDt myUrl;
|
||||
|
||||
|
||||
|
@ -300,7 +349,7 @@ public class Device extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* The \"model\" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getModel() {
|
||||
|
@ -315,7 +364,7 @@ public class Device extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* The \"model\" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* </p>
|
||||
*/
|
||||
public void setModel(StringDt theValue) {
|
||||
|
@ -328,7 +377,7 @@ public class Device extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* The \"model\" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type
|
||||
* </p>
|
||||
*/
|
||||
public void setModel( String theString) {
|
||||
|
@ -558,7 +607,7 @@ public class Device extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. "in/with the patient"), or a coded location
|
||||
* The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. \"in/with the patient\"), or a coded location
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReference getLocation() {
|
||||
|
@ -573,7 +622,7 @@ public class Device extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. "in/with the patient"), or a coded location
|
||||
* The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. \"in/with the patient\"), or a coded location
|
||||
* </p>
|
||||
*/
|
||||
public void setLocation(ResourceReference theValue) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Group")
|
||||
@ResourceDef(name="Group", profile="http://hl7.org/fhir/profiles/Group")
|
||||
public class Group extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -132,34 +132,65 @@ public class Group extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Unique id",
|
||||
formalDefinition="A unique business identifier for this group"
|
||||
)
|
||||
private IdentifierDt myIdentifier;
|
||||
|
||||
@Child(name="type", type=CodeDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="person | animal | practitioner | device | medication | substance",
|
||||
formalDefinition="Identifies the broad classification of the kind of resources the group includes"
|
||||
)
|
||||
private BoundCodeDt<GroupTypeEnum> myType;
|
||||
|
||||
@Child(name="actual", type=BooleanDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Descriptive or actual",
|
||||
formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals"
|
||||
)
|
||||
private BooleanDt myActual;
|
||||
|
||||
@Child(name="code", type=CodeableConceptDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Kind of Group members",
|
||||
formalDefinition="Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc."
|
||||
)
|
||||
private CodeableConceptDt myCode;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Label for Group",
|
||||
formalDefinition="A label assigned to the group for human identification and communication"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="quantity", type=IntegerDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Number of members",
|
||||
formalDefinition="A count of the number of resource instances that are part of the group"
|
||||
)
|
||||
private IntegerDt myQuantity;
|
||||
|
||||
@Child(name="characteristic", order=6, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Trait of group members",
|
||||
formalDefinition="Identifies the traits shared by members of the group"
|
||||
)
|
||||
private List<Characteristic> myCharacteristic;
|
||||
|
||||
@Child(name="member", order=7, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="member", order=7, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Patient.class,
|
||||
Practitioner.class,
|
||||
Device.class,
|
||||
Medication.class,
|
||||
Substance.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Who is in group",
|
||||
formalDefinition="Identifies the resource instances that are members of the group."
|
||||
)
|
||||
private List<ResourceReference> myMember;
|
||||
|
||||
|
||||
|
@ -292,7 +323,7 @@ public class Group extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Provides a specific type of resource the group includes. E.g. "cow", "syringe", etc.
|
||||
* Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getCode() {
|
||||
|
@ -307,7 +338,7 @@ public class Group extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Provides a specific type of resource the group includes. E.g. "cow", "syringe", etc.
|
||||
* Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc.
|
||||
* </p>
|
||||
*/
|
||||
public void setCode(CodeableConceptDt theValue) {
|
||||
|
@ -486,17 +517,29 @@ public class Group extends BaseResource implements IResource {
|
|||
public static class Characteristic extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Kind of characteristic",
|
||||
formalDefinition="A code that identifies the kind of trait being asserted"
|
||||
)
|
||||
private CodeableConceptDt myCode;
|
||||
|
||||
@Child(name="value", order=1, min=1, max=1, choice=@Choice(types= {
|
||||
@Child(name="value", order=1, min=1, max=1, type={
|
||||
CodeableConceptDt.class,
|
||||
BooleanDt.class,
|
||||
QuantityDt.class,
|
||||
RangeDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Value held by characteristic",
|
||||
formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group"
|
||||
)
|
||||
private IDatatype myValue;
|
||||
|
||||
@Child(name="exclude", type=BooleanDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Group includes or excludes",
|
||||
formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group"
|
||||
)
|
||||
private BooleanDt myExclude;
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated
|
||||
* Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Location")
|
||||
@ResourceDef(name="Location", profile="http://hl7.org/fhir/profiles/Location")
|
||||
public class Location extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -122,45 +122,91 @@ public class Location extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Unique code or number identifying the location to its users",
|
||||
formalDefinition="Unique code or number identifying the location to its users"
|
||||
)
|
||||
private IdentifierDt myIdentifier;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of the location as used by humans",
|
||||
formalDefinition="Name of the location as used by humans. Does not need to be unique."
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Description of the Location, which helps in finding or referencing the place",
|
||||
formalDefinition="Description of the Location, which helps in finding or referencing the place"
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=3, min=0, max=1)
|
||||
private CodeableConceptDt myType;
|
||||
@Description(
|
||||
shortDefinition="Indicates the type of function performed at the location",
|
||||
formalDefinition="Indicates the type of function performed at the location"
|
||||
)
|
||||
private BoundCodeableConceptDt<LocationTypeEnum> myType;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Contact details of the location",
|
||||
formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites"
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Physical location",
|
||||
formalDefinition=""
|
||||
)
|
||||
private AddressDt myAddress;
|
||||
|
||||
@Child(name="physicalType", type=CodeableConceptDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Physical form of the location",
|
||||
formalDefinition="Physical form of the location, e.g. building, room, vehicle, road"
|
||||
)
|
||||
private CodeableConceptDt myPhysicalType;
|
||||
|
||||
@Child(name="position", order=7, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The absolute geographic location",
|
||||
formalDefinition="The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML)"
|
||||
)
|
||||
private Position myPosition;
|
||||
|
||||
@Child(name="managingOrganization", order=8, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="managingOrganization", order=8, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The organization that is responsible for the provisioning and upkeep of the location",
|
||||
formalDefinition=""
|
||||
)
|
||||
private ResourceReference myManagingOrganization;
|
||||
|
||||
@Child(name="status", type=CodeDt.class, order=9, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="active | suspended | inactive",
|
||||
formalDefinition=""
|
||||
)
|
||||
private BoundCodeDt<LocationStatusEnum> myStatus;
|
||||
|
||||
@Child(name="partOf", order=10, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="partOf", order=10, min=0, max=1, type={
|
||||
Location.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Another Location which this Location is physically part of",
|
||||
formalDefinition=""
|
||||
)
|
||||
private ResourceReference myPartOf;
|
||||
|
||||
@Child(name="mode", type=CodeDt.class, order=11, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="instance | kind",
|
||||
formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations"
|
||||
)
|
||||
private BoundCodeDt<LocationModeEnum> myMode;
|
||||
|
||||
|
||||
|
@ -296,9 +342,9 @@ public class Location extends BaseResource implements IResource {
|
|||
* Indicates the type of function performed at the location
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getType() {
|
||||
public BoundCodeableConceptDt<LocationTypeEnum> getType() {
|
||||
if (myType == null) {
|
||||
myType = new CodeableConceptDt();
|
||||
myType = new BoundCodeableConceptDt<LocationTypeEnum>(LocationTypeEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myType;
|
||||
}
|
||||
|
@ -311,11 +357,23 @@ public class Location extends BaseResource implements IResource {
|
|||
* Indicates the type of function performed at the location
|
||||
* </p>
|
||||
*/
|
||||
public void setType(CodeableConceptDt theValue) {
|
||||
public void setType(BoundCodeableConceptDt<LocationTypeEnum> theValue) {
|
||||
myType = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>type</b> (Indicates the type of function performed at the location)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Indicates the type of function performed at the location
|
||||
* </p>
|
||||
*/
|
||||
public void setType(LocationTypeEnum theValue) {
|
||||
getType().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>telecom</b> (Contact details of the location).
|
||||
|
@ -424,7 +482,7 @@ public class Location extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>position</b> (The absolute geographic location ).
|
||||
* Gets the value(s) for <b>position</b> (The absolute geographic location).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -441,7 +499,7 @@ public class Location extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>position</b> (The absolute geographic location )
|
||||
* Sets the value(s) for <b>position</b> (The absolute geographic location)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -603,7 +661,7 @@ public class Location extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Block class for child element: <b>Location.position</b> (The absolute geographic location )
|
||||
* Block class for child element: <b>Location.position</b> (The absolute geographic location)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -614,12 +672,24 @@ public class Location extends BaseResource implements IResource {
|
|||
public static class Position extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="longitude", type=DecimalDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Longitude as expressed in KML",
|
||||
formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)"
|
||||
)
|
||||
private DecimalDt myLongitude;
|
||||
|
||||
@Child(name="latitude", type=DecimalDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Latitude as expressed in KML",
|
||||
formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)"
|
||||
)
|
||||
private DecimalDt myLatitude;
|
||||
|
||||
@Child(name="altitude", type=DecimalDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Altitude as expressed in KML",
|
||||
formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)"
|
||||
)
|
||||
private DecimalDt myAltitude;
|
||||
|
||||
|
||||
|
@ -666,7 +736,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setLongitude( java.math.BigDecimal theValue) {
|
||||
public void setLongitude( long theValue) {
|
||||
myLongitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -690,7 +760,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setLongitude( long theValue) {
|
||||
public void setLongitude( java.math.BigDecimal theValue) {
|
||||
myLongitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -733,7 +803,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setLatitude( java.math.BigDecimal theValue) {
|
||||
public void setLatitude( long theValue) {
|
||||
myLatitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -757,7 +827,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setLatitude( long theValue) {
|
||||
public void setLatitude( java.math.BigDecimal theValue) {
|
||||
myLatitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -800,7 +870,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setAltitude( java.math.BigDecimal theValue) {
|
||||
public void setAltitude( long theValue) {
|
||||
myAltitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
@ -824,7 +894,7 @@ public class Location extends BaseResource implements IResource {
|
|||
* Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
|
||||
* </p>
|
||||
*/
|
||||
public void setAltitude( long theValue) {
|
||||
public void setAltitude( java.math.BigDecimal theValue) {
|
||||
myAltitude = new DecimalDt(theValue);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Medication")
|
||||
@ResourceDef(name="Medication", profile="http://hl7.org/fhir/profiles/Medication")
|
||||
public class Medication extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -112,27 +112,54 @@ public class Medication extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Common / Commercial name",
|
||||
formalDefinition="The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Codes that identify this medication",
|
||||
formalDefinition="A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes"
|
||||
)
|
||||
private CodeableConceptDt myCode;
|
||||
|
||||
@Child(name="isBrand", type=BooleanDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="True if a brand",
|
||||
formalDefinition="Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)"
|
||||
)
|
||||
private BooleanDt myIsBrand;
|
||||
|
||||
@Child(name="manufacturer", order=3, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="manufacturer", order=3, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Manufacturer of the item",
|
||||
formalDefinition="Describes the details of the manufacturer"
|
||||
)
|
||||
private ResourceReference myManufacturer;
|
||||
|
||||
@Child(name="kind", type=CodeDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="product | package",
|
||||
formalDefinition="Medications are either a single administrable product or a package that contains one or more products."
|
||||
)
|
||||
private BoundCodeDt<MedicationKindEnum> myKind;
|
||||
|
||||
@Child(name="product", order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Administrable medication details",
|
||||
formalDefinition="Information that only applies to products (not packages)"
|
||||
)
|
||||
private Product myProduct;
|
||||
|
||||
@Child(name="package", type=CodeDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Details about packaged medications",
|
||||
formalDefinition="Information that only applies to packages (not products)"
|
||||
)
|
||||
private CodeDt myPackage;
|
||||
|
||||
|
||||
|
@ -222,7 +249,7 @@ public class Medication extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* </p>
|
||||
*/
|
||||
public BooleanDt getIsBrand() {
|
||||
|
@ -237,7 +264,7 @@ public class Medication extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* </p>
|
||||
*/
|
||||
public void setIsBrand(BooleanDt theValue) {
|
||||
|
@ -250,7 +277,7 @@ public class Medication extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
|
||||
* </p>
|
||||
*/
|
||||
public void setIsBrand( Boolean theBoolean) {
|
||||
|
@ -393,7 +420,19 @@ public class Medication extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>package</b> (Details about packaged medications)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Information that only applies to packages (not products)
|
||||
* </p>
|
||||
*/
|
||||
public void setPackage( String theCode) {
|
||||
myPackage = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Block class for child element: <b>Medication.product</b> (Administrable medication details)
|
||||
*
|
||||
|
@ -406,9 +445,17 @@ public class Medication extends BaseResource implements IResource {
|
|||
public static class Product extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="powder | tablets | carton +",
|
||||
formalDefinition="Describes the form of the item. Powder; tables; carton"
|
||||
)
|
||||
private CodeableConceptDt myForm;
|
||||
|
||||
@Child(name="ingredient", order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Active or inactive ingredient",
|
||||
formalDefinition="Identifies a particular constituent of interest in the product"
|
||||
)
|
||||
private List<ProductIngredient> myIngredient;
|
||||
|
||||
|
||||
|
@ -506,14 +553,21 @@ public class Medication extends BaseResource implements IResource {
|
|||
@Block(name="Medication.product.ingredient")
|
||||
public static class ProductIngredient extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="item", order=0, min=1, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="item", order=0, min=1, max=1, type={
|
||||
Substance.class,
|
||||
Medication.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The product contained",
|
||||
formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication"
|
||||
)
|
||||
private ResourceReference myItem;
|
||||
|
||||
@Child(name="amount", type=RatioDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="How much ingredient in product",
|
||||
formalDefinition="Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet"
|
||||
)
|
||||
private RatioDt myAmount;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
* Observations are a key aspect of healthcare. This resource is used to capture those that do not require more sophisticated mechanisms.
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Observation")
|
||||
@ResourceDef(name="Observation", profile="http://hl7.org/fhir/profiles/Observation")
|
||||
public class Observation extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -192,9 +192,13 @@ public class Observation extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="name", type=CodeableConceptDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Type of observation (code / type)",
|
||||
formalDefinition="Describes what was observed. Sometimes this is called the observation \"code\""
|
||||
)
|
||||
private CodeableConceptDt myName;
|
||||
|
||||
@Child(name="value", order=1, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="value", order=1, min=0, max=1, type={
|
||||
QuantityDt.class,
|
||||
CodeableConceptDt.class,
|
||||
AttachmentDt.class,
|
||||
|
@ -202,66 +206,123 @@ public class Observation extends BaseResource implements IResource {
|
|||
PeriodDt.class,
|
||||
SampledDataDt.class,
|
||||
StringDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Actual result",
|
||||
formalDefinition="The information determined as a result of making the observation, if the information has a simple value"
|
||||
)
|
||||
private IDatatype myValue;
|
||||
|
||||
@Child(name="interpretation", type=CodeableConceptDt.class, order=2, min=0, max=1)
|
||||
private CodeableConceptDt myInterpretation;
|
||||
@Description(
|
||||
shortDefinition="High, low, normal, etc.",
|
||||
formalDefinition="The assessment made based on the result of the observation."
|
||||
)
|
||||
private BoundCodeableConceptDt<ObservationInterpretationCodesEnum> myInterpretation;
|
||||
|
||||
@Child(name="comments", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Comments about result",
|
||||
formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result."
|
||||
)
|
||||
private StringDt myComments;
|
||||
|
||||
@Child(name="applies", order=4, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="applies", order=4, min=0, max=1, type={
|
||||
DateTimeDt.class,
|
||||
PeriodDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Physiologically Relevant time/time-period for observation",
|
||||
formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself"
|
||||
)
|
||||
private IDatatype myApplies;
|
||||
|
||||
@Child(name="issued", type=InstantDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Date/Time this was made available",
|
||||
formalDefinition=""
|
||||
)
|
||||
private InstantDt myIssued;
|
||||
|
||||
@Child(name="status", type=CodeDt.class, order=6, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="registered | preliminary | final | amended +",
|
||||
formalDefinition="The status of the result value"
|
||||
)
|
||||
private BoundCodeDt<ObservationStatusEnum> myStatus;
|
||||
|
||||
@Child(name="reliability", type=CodeDt.class, order=7, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="ok | ongoing | early | questionable | calibrating | error +",
|
||||
formalDefinition="An estimate of the degree to which quality issues have impacted on the value reported"
|
||||
)
|
||||
private BoundCodeDt<ObservationReliabilityEnum> myReliability;
|
||||
|
||||
@Child(name="bodySite", type=CodeableConceptDt.class, order=8, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Observed body part",
|
||||
formalDefinition="Indicates where on the subject's body the observation was made."
|
||||
)
|
||||
private CodeableConceptDt myBodySite;
|
||||
|
||||
@Child(name="method", type=CodeableConceptDt.class, order=9, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="How it was done",
|
||||
formalDefinition="Indicates the mechanism used to perform the observation"
|
||||
)
|
||||
private CodeableConceptDt myMethod;
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=10, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Unique Id for this particular observation",
|
||||
formalDefinition="A unique identifier for the simple observation"
|
||||
)
|
||||
private IdentifierDt myIdentifier;
|
||||
|
||||
@Child(name="subject", order=11, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="subject", order=11, min=0, max=1, type={
|
||||
Patient.class,
|
||||
Group.class,
|
||||
Device.class,
|
||||
Location.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Who and/or what this is about",
|
||||
formalDefinition="The thing the observation is being made about"
|
||||
)
|
||||
private ResourceReference mySubject;
|
||||
|
||||
@Child(name="specimen", order=12, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="specimen", order=12, min=0, max=1, type={
|
||||
Specimen.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Specimen used for this observation",
|
||||
formalDefinition="The specimen that was used when this observation was made"
|
||||
)
|
||||
private ResourceReference mySpecimen;
|
||||
|
||||
@Child(name="performer", order=13, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="performer", order=13, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Practitioner.class,
|
||||
Device.class,
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Who did the observation",
|
||||
formalDefinition="Who was responsible for asserting the observed value as \"true\""
|
||||
)
|
||||
private List<ResourceReference> myPerformer;
|
||||
|
||||
@Child(name="referenceRange", order=14, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Provides guide for interpretation",
|
||||
formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range"
|
||||
)
|
||||
private List<ReferenceRange> myReferenceRange;
|
||||
|
||||
@Child(name="related", order=15, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Observations related to this observation",
|
||||
formalDefinition="Related observations - either components, or previous observations, or statements of derivation"
|
||||
)
|
||||
private List<Related> myRelated;
|
||||
|
||||
|
||||
|
@ -277,7 +338,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Describes what was observed. Sometimes this is called the observation "code"
|
||||
* Describes what was observed. Sometimes this is called the observation \"code\"
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getName() {
|
||||
|
@ -292,7 +353,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Describes what was observed. Sometimes this is called the observation "code"
|
||||
* Describes what was observed. Sometimes this is called the observation \"code\"
|
||||
* </p>
|
||||
*/
|
||||
public void setName(CodeableConceptDt theValue) {
|
||||
|
@ -339,9 +400,9 @@ public class Observation extends BaseResource implements IResource {
|
|||
* The assessment made based on the result of the observation.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getInterpretation() {
|
||||
public BoundCodeableConceptDt<ObservationInterpretationCodesEnum> getInterpretation() {
|
||||
if (myInterpretation == null) {
|
||||
myInterpretation = new CodeableConceptDt();
|
||||
myInterpretation = new BoundCodeableConceptDt<ObservationInterpretationCodesEnum>(ObservationInterpretationCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myInterpretation;
|
||||
}
|
||||
|
@ -354,11 +415,23 @@ public class Observation extends BaseResource implements IResource {
|
|||
* The assessment made based on the result of the observation.
|
||||
* </p>
|
||||
*/
|
||||
public void setInterpretation(CodeableConceptDt theValue) {
|
||||
public void setInterpretation(BoundCodeableConceptDt<ObservationInterpretationCodesEnum> theValue) {
|
||||
myInterpretation = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>interpretation</b> (High, low, normal, etc.)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The assessment made based on the result of the observation.
|
||||
* </p>
|
||||
*/
|
||||
public void setInterpretation(ObservationInterpretationCodesEnum theValue) {
|
||||
getInterpretation().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>comments</b> (Comments about result).
|
||||
|
@ -410,7 +483,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
|
||||
* The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
|
||||
* </p>
|
||||
*/
|
||||
public IDatatype getApplies() {
|
||||
|
@ -422,7 +495,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
|
||||
* The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
|
||||
* </p>
|
||||
*/
|
||||
public void setApplies(IDatatype theValue) {
|
||||
|
@ -530,7 +603,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error + ).
|
||||
* Gets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error +).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -547,7 +620,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error + )
|
||||
* Sets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error +)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -560,7 +633,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error + )
|
||||
* Sets the value(s) for <b>reliability</b> (ok | ongoing | early | questionable | calibrating | error +)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -700,7 +773,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The specimen that was used when this observation was made
|
||||
* The specimen that was used when this observation was made
|
||||
* </p>
|
||||
*/
|
||||
public ResourceReference getSpecimen() {
|
||||
|
@ -715,7 +788,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The specimen that was used when this observation was made
|
||||
* The specimen that was used when this observation was made
|
||||
* </p>
|
||||
*/
|
||||
public void setSpecimen(ResourceReference theValue) {
|
||||
|
@ -731,7 +804,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Who was responsible for asserting the observed value as "true"
|
||||
* Who was responsible for asserting the observed value as \"true\"
|
||||
* </p>
|
||||
*/
|
||||
public List<ResourceReference> getPerformer() {
|
||||
|
@ -743,7 +816,7 @@ public class Observation extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Who was responsible for asserting the observed value as "true"
|
||||
* Who was responsible for asserting the observed value as \"true\"
|
||||
* </p>
|
||||
*/
|
||||
public void setPerformer(List<ResourceReference> theValue) {
|
||||
|
@ -852,15 +925,31 @@ public class Observation extends BaseResource implements IResource {
|
|||
public static class ReferenceRange extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Low Range, if relevant",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private QuantityDt myLow;
|
||||
|
||||
@Child(name="high", type=QuantityDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="High Range, if relevant",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private QuantityDt myHigh;
|
||||
|
||||
@Child(name="meaning", type=CodeableConceptDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Indicates the meaning/use of this range of this range",
|
||||
formalDefinition="Code for the meaning of the reference range"
|
||||
)
|
||||
private CodeableConceptDt myMeaning;
|
||||
|
||||
@Child(name="age", type=RangeDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Applicable age range, if relevant",
|
||||
formalDefinition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so"
|
||||
)
|
||||
private RangeDt myAge;
|
||||
|
||||
|
||||
|
@ -1009,12 +1098,19 @@ public class Observation extends BaseResource implements IResource {
|
|||
public static class Related extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="has-component | has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by",
|
||||
formalDefinition="A code specifying the kind of relationship that exists with the target observation"
|
||||
)
|
||||
private BoundCodeDt<ObservationRelationshipTypeEnum> myType;
|
||||
|
||||
@Child(name="target", order=1, min=1, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="target", order=1, min=1, max=1, type={
|
||||
Observation.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Observation that is related to this one",
|
||||
formalDefinition="A reference to the observation that is related to this observation"
|
||||
)
|
||||
private ResourceReference myTarget;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Organization")
|
||||
@ResourceDef(name="Organization", profile="http://hl7.org/fhir/profiles/Organization")
|
||||
public class Organization extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -112,36 +112,70 @@ public class Organization extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Identifies this organization across multiple systems",
|
||||
formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name used for the organization",
|
||||
formalDefinition="A name associated with the organization"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=2, min=0, max=1)
|
||||
private CodeableConceptDt myType;
|
||||
@Description(
|
||||
shortDefinition="Kind of organization",
|
||||
formalDefinition="The kind of organization that this is"
|
||||
)
|
||||
private BoundCodeableConceptDt<OrganizationTypeEnum> myType;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A contact detail for the organization",
|
||||
formalDefinition="A contact detail for the organization"
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="An address for the organization",
|
||||
formalDefinition="An address for the organization"
|
||||
)
|
||||
private List<AddressDt> myAddress;
|
||||
|
||||
@Child(name="partOf", order=5, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="partOf", order=5, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The organization of which this organization forms a part",
|
||||
formalDefinition="The organization of which this organization forms a part"
|
||||
)
|
||||
private ResourceReference myPartOf;
|
||||
|
||||
@Child(name="contact", order=6, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Contact for the organization for a certain purpose",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<Contact> myContact;
|
||||
|
||||
@Child(name="location", order=7, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="location", order=7, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Location.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Location(s) the organization uses to provide services",
|
||||
formalDefinition="Location(s) the organization uses to provide services"
|
||||
)
|
||||
private List<ResourceReference> myLocation;
|
||||
|
||||
@Child(name="active", type=BooleanDt.class, order=8, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Whether the organization's record is still in active use",
|
||||
formalDefinition="Whether the organization's record is still in active use"
|
||||
)
|
||||
private BooleanDt myActive;
|
||||
|
||||
|
||||
|
@ -247,9 +281,9 @@ public class Organization extends BaseResource implements IResource {
|
|||
* The kind of organization that this is
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getType() {
|
||||
public BoundCodeableConceptDt<OrganizationTypeEnum> getType() {
|
||||
if (myType == null) {
|
||||
myType = new CodeableConceptDt();
|
||||
myType = new BoundCodeableConceptDt<OrganizationTypeEnum>(OrganizationTypeEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myType;
|
||||
}
|
||||
|
@ -262,11 +296,23 @@ public class Organization extends BaseResource implements IResource {
|
|||
* The kind of organization that this is
|
||||
* </p>
|
||||
*/
|
||||
public void setType(CodeableConceptDt theValue) {
|
||||
public void setType(BoundCodeableConceptDt<OrganizationTypeEnum> theValue) {
|
||||
myType = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>type</b> (Kind of organization)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The kind of organization that this is
|
||||
* </p>
|
||||
*/
|
||||
public void setType(OrganizationTypeEnum theValue) {
|
||||
getType().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>telecom</b> (A contact detail for the organization).
|
||||
|
@ -517,19 +563,39 @@ public class Organization extends BaseResource implements IResource {
|
|||
public static class Contact extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="purpose", type=CodeableConceptDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The type of contact",
|
||||
formalDefinition="Indicates a purpose for which the contact can be reached"
|
||||
)
|
||||
private CodeableConceptDt myPurpose;
|
||||
|
||||
@Child(name="name", type=HumanNameDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="A name associated with the contact",
|
||||
formalDefinition="A name associated with the contact"
|
||||
)
|
||||
private HumanNameDt myName;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Contact details (telephone, email, etc) for a contact",
|
||||
formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted."
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Visiting or postal addresses for the contact",
|
||||
formalDefinition="Visiting or postal addresses for the contact"
|
||||
)
|
||||
private AddressDt myAddress;
|
||||
|
||||
@Child(name="gender", type=CodeableConceptDt.class, order=4, min=0, max=1)
|
||||
private CodeableConceptDt myGender;
|
||||
@Description(
|
||||
shortDefinition="Gender for administrative purposes",
|
||||
formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
|
||||
)
|
||||
private BoundCodeableConceptDt<AdministrativeGenderCodesEnum> myGender;
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -606,7 +672,7 @@ public class Organization extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public List<ContactDt> getTelecom() {
|
||||
|
@ -621,7 +687,7 @@ public class Organization extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public void setTelecom(List<ContactDt> theValue) {
|
||||
|
@ -633,7 +699,7 @@ public class Organization extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public ContactDt addTelecom() {
|
||||
|
@ -681,12 +747,12 @@ public class Organization extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getGender() {
|
||||
public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGender() {
|
||||
if (myGender == null) {
|
||||
myGender = new CodeableConceptDt();
|
||||
myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myGender;
|
||||
}
|
||||
|
@ -696,14 +762,26 @@ public class Organization extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(CodeableConceptDt theValue) {
|
||||
public void setGender(BoundCodeableConceptDt<AdministrativeGenderCodesEnum> theValue) {
|
||||
myGender = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(AdministrativeGenderCodesEnum theValue) {
|
||||
getGender().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
* Tracking patient is the center of the healthcare process
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Patient")
|
||||
@ResourceDef(name="Patient", profile="http://hl7.org/fhir/profiles/Patient")
|
||||
public class Patient extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -192,67 +192,133 @@ public class Patient extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="An identifier for the person as this patient",
|
||||
formalDefinition="An identifier that applies to this person as a patient"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="name", type=HumanNameDt.class, order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A name associated with the patient",
|
||||
formalDefinition="A name associated with the individual."
|
||||
)
|
||||
private List<HumanNameDt> myName;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A contact detail for the individual",
|
||||
formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted."
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="gender", type=CodeableConceptDt.class, order=3, min=0, max=1)
|
||||
private CodeableConceptDt myGender;
|
||||
@Description(
|
||||
shortDefinition="Gender for administrative purposes",
|
||||
formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes."
|
||||
)
|
||||
private BoundCodeableConceptDt<AdministrativeGenderCodesEnum> myGender;
|
||||
|
||||
@Child(name="birthDate", type=DateTimeDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The date and time of birth for the individual",
|
||||
formalDefinition="The date and time of birth for the individual"
|
||||
)
|
||||
private DateTimeDt myBirthDate;
|
||||
|
||||
@Child(name="deceased", order=5, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="deceased", order=5, min=0, max=1, type={
|
||||
BooleanDt.class,
|
||||
DateTimeDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Indicates if the individual is deceased or not",
|
||||
formalDefinition="Indicates if the individual is deceased or not"
|
||||
)
|
||||
private IDatatype myDeceased;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Addresses for the individual",
|
||||
formalDefinition="Addresses for the individual"
|
||||
)
|
||||
private List<AddressDt> myAddress;
|
||||
|
||||
@Child(name="maritalStatus", type=CodeableConceptDt.class, order=7, min=0, max=1)
|
||||
private CodeableConceptDt myMaritalStatus;
|
||||
@Description(
|
||||
shortDefinition="Marital (civil) status of a person",
|
||||
formalDefinition="This field contains a patient's most recent marital (civil) status."
|
||||
)
|
||||
private BoundCodeableConceptDt<MaritalStatusCodesEnum> myMaritalStatus;
|
||||
|
||||
@Child(name="multipleBirth", order=8, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="multipleBirth", order=8, min=0, max=1, type={
|
||||
BooleanDt.class,
|
||||
IntegerDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Whether patient is part of a multiple birth",
|
||||
formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order."
|
||||
)
|
||||
private IDatatype myMultipleBirth;
|
||||
|
||||
@Child(name="photo", type=AttachmentDt.class, order=9, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Image of the person",
|
||||
formalDefinition="Image of the person"
|
||||
)
|
||||
private List<AttachmentDt> myPhoto;
|
||||
|
||||
@Child(name="contact", order=10, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A contact party (e.g. guardian, partner, friend) for the patient",
|
||||
formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient"
|
||||
)
|
||||
private List<Contact> myContact;
|
||||
|
||||
@Child(name="animal", order=11, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If this patient is an animal (non-human)",
|
||||
formalDefinition="This element has a value if the patient is an animal"
|
||||
)
|
||||
private Animal myAnimal;
|
||||
|
||||
@Child(name="communication", type=CodeableConceptDt.class, order=12, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Languages which may be used to communicate with the patient about his or her health",
|
||||
formalDefinition="Languages which may be used to communicate with the patient about his or her health"
|
||||
)
|
||||
private List<CodeableConceptDt> myCommunication;
|
||||
|
||||
@Child(name="careProvider", order=13, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="careProvider", order=13, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Organization.class,
|
||||
Practitioner.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Patient's nominated care provider",
|
||||
formalDefinition="Patient's nominated care provider"
|
||||
)
|
||||
private List<ResourceReference> myCareProvider;
|
||||
|
||||
@Child(name="managingOrganization", order=14, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="managingOrganization", order=14, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Organization that is the custodian of the patient record",
|
||||
formalDefinition="Organization that is the custodian of the patient record"
|
||||
)
|
||||
private ResourceReference myManagingOrganization;
|
||||
|
||||
@Child(name="link", order=15, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Link to another patient resource that concerns the same actual person",
|
||||
formalDefinition="Link to another patient resource that concerns the same actual person"
|
||||
)
|
||||
private List<Link> myLink;
|
||||
|
||||
@Child(name="active", type=BooleanDt.class, order=16, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Whether this patient's record is in active use",
|
||||
formalDefinition="Whether this patient record is in active use"
|
||||
)
|
||||
private BooleanDt myActive;
|
||||
|
||||
|
||||
|
@ -312,7 +378,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A name associated with the individual.
|
||||
* A name associated with the individual.
|
||||
* </p>
|
||||
*/
|
||||
public List<HumanNameDt> getName() {
|
||||
|
@ -327,7 +393,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A name associated with the individual.
|
||||
* A name associated with the individual.
|
||||
* </p>
|
||||
*/
|
||||
public void setName(List<HumanNameDt> theValue) {
|
||||
|
@ -339,7 +405,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A name associated with the individual.
|
||||
* A name associated with the individual.
|
||||
* </p>
|
||||
*/
|
||||
public HumanNameDt addName() {
|
||||
|
@ -356,7 +422,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public List<ContactDt> getTelecom() {
|
||||
|
@ -371,7 +437,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public void setTelecom(List<ContactDt> theValue) {
|
||||
|
@ -383,7 +449,7 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
|
||||
* </p>
|
||||
*/
|
||||
public ContactDt addTelecom() {
|
||||
|
@ -400,12 +466,12 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getGender() {
|
||||
public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGender() {
|
||||
if (myGender == null) {
|
||||
myGender = new CodeableConceptDt();
|
||||
myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myGender;
|
||||
}
|
||||
|
@ -415,14 +481,26 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(CodeableConceptDt theValue) {
|
||||
public void setGender(BoundCodeableConceptDt<AdministrativeGenderCodesEnum> theValue) {
|
||||
myGender = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(AdministrativeGenderCodesEnum theValue) {
|
||||
getGender().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>birthDate</b> (The date and time of birth for the individual).
|
||||
|
@ -561,9 +639,9 @@ public class Patient extends BaseResource implements IResource {
|
|||
* This field contains a patient's most recent marital (civil) status.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getMaritalStatus() {
|
||||
public BoundCodeableConceptDt<MaritalStatusCodesEnum> getMaritalStatus() {
|
||||
if (myMaritalStatus == null) {
|
||||
myMaritalStatus = new CodeableConceptDt();
|
||||
myMaritalStatus = new BoundCodeableConceptDt<MaritalStatusCodesEnum>(MaritalStatusCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myMaritalStatus;
|
||||
}
|
||||
|
@ -576,11 +654,23 @@ public class Patient extends BaseResource implements IResource {
|
|||
* This field contains a patient's most recent marital (civil) status.
|
||||
* </p>
|
||||
*/
|
||||
public void setMaritalStatus(CodeableConceptDt theValue) {
|
||||
public void setMaritalStatus(BoundCodeableConceptDt<MaritalStatusCodesEnum> theValue) {
|
||||
myMaritalStatus = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>maritalStatus</b> (Marital (civil) status of a person)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* This field contains a patient's most recent marital (civil) status.
|
||||
* </p>
|
||||
*/
|
||||
public void setMaritalStatus(MaritalStatusCodesEnum theValue) {
|
||||
getMaritalStatus().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>multipleBirth[x]</b> (Whether patient is part of a multiple birth).
|
||||
|
@ -931,24 +1021,47 @@ public class Patient extends BaseResource implements IResource {
|
|||
public static class Contact extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="relationship", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="The kind of relationship",
|
||||
formalDefinition="The nature of the relationship between the patient and the contact person"
|
||||
)
|
||||
private List<CodeableConceptDt> myRelationship;
|
||||
|
||||
@Child(name="name", type=HumanNameDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="A name associated with the person",
|
||||
formalDefinition="A name associated with the person"
|
||||
)
|
||||
private HumanNameDt myName;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A contact detail for the person",
|
||||
formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Address for the contact person",
|
||||
formalDefinition="Address for the contact person"
|
||||
)
|
||||
private AddressDt myAddress;
|
||||
|
||||
@Child(name="gender", type=CodeableConceptDt.class, order=4, min=0, max=1)
|
||||
private CodeableConceptDt myGender;
|
||||
@Description(
|
||||
shortDefinition="Gender for administrative purposes",
|
||||
formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
|
||||
)
|
||||
private BoundCodeableConceptDt<AdministrativeGenderCodesEnum> myGender;
|
||||
|
||||
@Child(name="organization", order=5, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="organization", order=5, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Organization that is associated with the contact",
|
||||
formalDefinition="Organization on behalf of which the contact is acting or for which the contact is working."
|
||||
)
|
||||
private ResourceReference myOrganization;
|
||||
|
||||
|
||||
|
@ -1114,12 +1227,12 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getGender() {
|
||||
public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGender() {
|
||||
if (myGender == null) {
|
||||
myGender = new CodeableConceptDt();
|
||||
myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myGender;
|
||||
}
|
||||
|
@ -1129,14 +1242,26 @@ public class Patient extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(CodeableConceptDt theValue) {
|
||||
public void setGender(BoundCodeableConceptDt<AdministrativeGenderCodesEnum> theValue) {
|
||||
myGender = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(AdministrativeGenderCodesEnum theValue) {
|
||||
getGender().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>organization</b> (Organization that is associated with the contact).
|
||||
|
@ -1185,12 +1310,24 @@ public class Patient extends BaseResource implements IResource {
|
|||
public static class Animal extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="species", type=CodeableConceptDt.class, order=0, min=1, max=1)
|
||||
private CodeableConceptDt mySpecies;
|
||||
@Description(
|
||||
shortDefinition="E.g. Dog, Cow",
|
||||
formalDefinition="Identifies the high level categorization of the kind of animal"
|
||||
)
|
||||
private BoundCodeableConceptDt<AnimalSpeciesEnum> mySpecies;
|
||||
|
||||
@Child(name="breed", type=CodeableConceptDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="E.g. Poodle, Angus",
|
||||
formalDefinition="Identifies the detailed categorization of the kind of animal."
|
||||
)
|
||||
private CodeableConceptDt myBreed;
|
||||
|
||||
@Child(name="genderStatus", type=CodeableConceptDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="E.g. Neutered, Intact",
|
||||
formalDefinition="Indicates the current state of the animal's reproductive organs"
|
||||
)
|
||||
private CodeableConceptDt myGenderStatus;
|
||||
|
||||
|
||||
|
@ -1209,9 +1346,9 @@ public class Patient extends BaseResource implements IResource {
|
|||
* Identifies the high level categorization of the kind of animal
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getSpecies() {
|
||||
public BoundCodeableConceptDt<AnimalSpeciesEnum> getSpecies() {
|
||||
if (mySpecies == null) {
|
||||
mySpecies = new CodeableConceptDt();
|
||||
mySpecies = new BoundCodeableConceptDt<AnimalSpeciesEnum>(AnimalSpeciesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return mySpecies;
|
||||
}
|
||||
|
@ -1224,11 +1361,23 @@ public class Patient extends BaseResource implements IResource {
|
|||
* Identifies the high level categorization of the kind of animal
|
||||
* </p>
|
||||
*/
|
||||
public void setSpecies(CodeableConceptDt theValue) {
|
||||
public void setSpecies(BoundCodeableConceptDt<AnimalSpeciesEnum> theValue) {
|
||||
mySpecies = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>species</b> (E.g. Dog, Cow)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies the high level categorization of the kind of animal
|
||||
* </p>
|
||||
*/
|
||||
public void setSpecies(AnimalSpeciesEnum theValue) {
|
||||
getSpecies().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>breed</b> (E.g. Poodle, Angus).
|
||||
|
@ -1307,13 +1456,20 @@ public class Patient extends BaseResource implements IResource {
|
|||
@Block(name="Patient.link")
|
||||
public static class Link extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="other", order=0, min=1, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="other", order=0, min=1, max=1, type={
|
||||
Patient.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The other patient resource that the link refers to",
|
||||
formalDefinition="The other patient resource that the link refers to"
|
||||
)
|
||||
private ResourceReference myOther;
|
||||
|
||||
@Child(name="type", type=CodeDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="replace | refer | seealso - type of link",
|
||||
formalDefinition="The type of link between this patient resource and another patient resource."
|
||||
)
|
||||
private BoundCodeDt<LinkTypeEnum> myType;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
* Need to track doctors, staff, locums etc. for both healthcare practitioners, funders, etc.
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Practitioner")
|
||||
@ResourceDef(name="Practitioner", profile="http://hl7.org/fhir/profiles/Practitioner")
|
||||
public class Practitioner extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -132,51 +132,105 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A identifier for the person as this agent",
|
||||
formalDefinition="An identifier that applies to this person in this role"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="name", type=HumanNameDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="A name associated with the person",
|
||||
formalDefinition="A name associated with the person"
|
||||
)
|
||||
private HumanNameDt myName;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A contact detail for the practitioner",
|
||||
formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address."
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="address", type=AddressDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Where practitioner can be found/visited",
|
||||
formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered"
|
||||
)
|
||||
private AddressDt myAddress;
|
||||
|
||||
@Child(name="gender", type=CodeableConceptDt.class, order=4, min=0, max=1)
|
||||
private CodeableConceptDt myGender;
|
||||
@Description(
|
||||
shortDefinition="Gender for administrative purposes",
|
||||
formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
|
||||
)
|
||||
private BoundCodeableConceptDt<AdministrativeGenderCodesEnum> myGender;
|
||||
|
||||
@Child(name="birthDate", type=DateTimeDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The date and time of birth for the practitioner",
|
||||
formalDefinition="The date and time of birth for the practitioner"
|
||||
)
|
||||
private DateTimeDt myBirthDate;
|
||||
|
||||
@Child(name="photo", type=AttachmentDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Image of the person",
|
||||
formalDefinition="Image of the person"
|
||||
)
|
||||
private List<AttachmentDt> myPhoto;
|
||||
|
||||
@Child(name="organization", order=7, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="organization", order=7, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The represented organization",
|
||||
formalDefinition="The organization that the practitioner represents"
|
||||
)
|
||||
private ResourceReference myOrganization;
|
||||
|
||||
@Child(name="role", type=CodeableConceptDt.class, order=8, min=0, max=Child.MAX_UNLIMITED)
|
||||
private List<CodeableConceptDt> myRole;
|
||||
@Description(
|
||||
shortDefinition="Roles which this practitioner may perform",
|
||||
formalDefinition="Roles which this practitioner is authorized to perform for the organization"
|
||||
)
|
||||
private List<BoundCodeableConceptDt<PractitionerRoleEnum>> myRole;
|
||||
|
||||
@Child(name="specialty", type=CodeableConceptDt.class, order=9, min=0, max=Child.MAX_UNLIMITED)
|
||||
private List<CodeableConceptDt> mySpecialty;
|
||||
@Description(
|
||||
shortDefinition="Specific specialty of the practitioner",
|
||||
formalDefinition="Specific specialty of the practitioner"
|
||||
)
|
||||
private List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> mySpecialty;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=10, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The period during which the practitioner is authorized to perform in these role(s)",
|
||||
formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization"
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
@Child(name="location", order=11, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="location", order=11, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Location.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The location(s) at which this practitioner provides care",
|
||||
formalDefinition="The location(s) at which this practitioner provides care"
|
||||
)
|
||||
private List<ResourceReference> myLocation;
|
||||
|
||||
@Child(name="qualification", order=12, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Qualifications obtained by training and certification",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<Qualification> myQualification;
|
||||
|
||||
@Child(name="communication", type=CodeableConceptDt.class, order=13, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A language the practitioner is able to use in patient communication",
|
||||
formalDefinition="A language the practitioner is able to use in patient communication"
|
||||
)
|
||||
private List<CodeableConceptDt> myCommunication;
|
||||
|
||||
|
||||
|
@ -342,12 +396,12 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getGender() {
|
||||
public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGender() {
|
||||
if (myGender == null) {
|
||||
myGender = new CodeableConceptDt();
|
||||
myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myGender;
|
||||
}
|
||||
|
@ -357,14 +411,26 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(CodeableConceptDt theValue) {
|
||||
public void setGender(BoundCodeableConceptDt<AdministrativeGenderCodesEnum> theValue) {
|
||||
myGender = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
|
||||
* </p>
|
||||
*/
|
||||
public void setGender(AdministrativeGenderCodesEnum theValue) {
|
||||
getGender().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>birthDate</b> (The date and time of birth for the practitioner).
|
||||
|
@ -506,9 +572,9 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
* Roles which this practitioner is authorized to perform for the organization
|
||||
* </p>
|
||||
*/
|
||||
public List<CodeableConceptDt> getRole() {
|
||||
public List<BoundCodeableConceptDt<PractitionerRoleEnum>> getRole() {
|
||||
if (myRole == null) {
|
||||
myRole = new ArrayList<CodeableConceptDt>();
|
||||
myRole = new ArrayList<BoundCodeableConceptDt<PractitionerRoleEnum>>();
|
||||
}
|
||||
return myRole;
|
||||
}
|
||||
|
@ -521,22 +587,34 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
* Roles which this practitioner is authorized to perform for the organization
|
||||
* </p>
|
||||
*/
|
||||
public void setRole(List<CodeableConceptDt> theValue) {
|
||||
public void setRole(List<BoundCodeableConceptDt<PractitionerRoleEnum>> theValue) {
|
||||
myRole = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds and returns a new value for <b>role</b> (Roles which this practitioner may perform)
|
||||
* Add a value for <b>role</b> (Roles which this practitioner may perform)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Roles which this practitioner is authorized to perform for the organization
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt addRole() {
|
||||
CodeableConceptDt newType = new CodeableConceptDt();
|
||||
getRole().add(newType);
|
||||
return newType;
|
||||
public void addRole(PractitionerRoleEnum theValue) {
|
||||
getRole().add(new BoundCodeableConceptDt<PractitionerRoleEnum>(PractitionerRoleEnum.VALUESET_BINDER, theValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s), and clears any existing value(s) for <b>role</b> (Roles which this practitioner may perform)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Roles which this practitioner is authorized to perform for the organization
|
||||
* </p>
|
||||
*/
|
||||
public void setRole(PractitionerRoleEnum theValue) {
|
||||
getRole().clear();
|
||||
addRole(theValue);
|
||||
}
|
||||
|
||||
|
||||
|
@ -550,9 +628,9 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
* Specific specialty of the practitioner
|
||||
* </p>
|
||||
*/
|
||||
public List<CodeableConceptDt> getSpecialty() {
|
||||
public List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> getSpecialty() {
|
||||
if (mySpecialty == null) {
|
||||
mySpecialty = new ArrayList<CodeableConceptDt>();
|
||||
mySpecialty = new ArrayList<BoundCodeableConceptDt<PractitionerSpecialtyEnum>>();
|
||||
}
|
||||
return mySpecialty;
|
||||
}
|
||||
|
@ -565,22 +643,34 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
* Specific specialty of the practitioner
|
||||
* </p>
|
||||
*/
|
||||
public void setSpecialty(List<CodeableConceptDt> theValue) {
|
||||
public void setSpecialty(List<BoundCodeableConceptDt<PractitionerSpecialtyEnum>> theValue) {
|
||||
mySpecialty = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds and returns a new value for <b>specialty</b> (Specific specialty of the practitioner)
|
||||
* Add a value for <b>specialty</b> (Specific specialty of the practitioner)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Specific specialty of the practitioner
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt addSpecialty() {
|
||||
CodeableConceptDt newType = new CodeableConceptDt();
|
||||
getSpecialty().add(newType);
|
||||
return newType;
|
||||
public void addSpecialty(PractitionerSpecialtyEnum theValue) {
|
||||
getSpecialty().add(new BoundCodeableConceptDt<PractitionerSpecialtyEnum>(PractitionerSpecialtyEnum.VALUESET_BINDER, theValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s), and clears any existing value(s) for <b>specialty</b> (Specific specialty of the practitioner)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Specific specialty of the practitioner
|
||||
* </p>
|
||||
*/
|
||||
public void setSpecialty(PractitionerSpecialtyEnum theValue) {
|
||||
getSpecialty().clear();
|
||||
addSpecialty(theValue);
|
||||
}
|
||||
|
||||
|
||||
|
@ -746,15 +836,26 @@ public class Practitioner extends BaseResource implements IResource {
|
|||
public static class Qualification extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Coded representation of the qualification",
|
||||
formalDefinition=""
|
||||
)
|
||||
private CodeableConceptDt myCode;
|
||||
|
||||
@Child(name="period", type=PeriodDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Period during which the qualification is valid",
|
||||
formalDefinition="Period during which the qualification is valid"
|
||||
)
|
||||
private PeriodDt myPeriod;
|
||||
|
||||
@Child(name="issuer", order=2, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="issuer", order=2, min=0, max=1, type={
|
||||
Organization.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Organization that regulates and issues the qualification",
|
||||
formalDefinition="Organization that regulates and issues the qualification"
|
||||
)
|
||||
private ResourceReference myIssuer;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Profile")
|
||||
@ResourceDef(name="Profile", profile="http://hl7.org/fhir/profiles/Profile")
|
||||
public class Profile extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -152,51 +152,115 @@ public class Profile extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Logical id to reference this profile",
|
||||
formalDefinition="The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)"
|
||||
)
|
||||
private StringDt myIdentifier;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Logical id for this version of the profile",
|
||||
formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Informal name for this profile",
|
||||
formalDefinition="A free text natural language name identifying the Profile"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="publisher", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of the publisher (Organization or individual)",
|
||||
formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile"
|
||||
)
|
||||
private StringDt myPublisher;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Contact information of the publisher",
|
||||
formalDefinition="Contact details to assist a user in finding and communicating with the publisher"
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Natural language description of the profile",
|
||||
formalDefinition="A free text natural language description of the profile and its use"
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="code", type=CodingDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Assist with indexing and finding",
|
||||
formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates."
|
||||
)
|
||||
private List<CodingDt> myCode;
|
||||
|
||||
@Child(name="status", type=CodeDt.class, order=7, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="draft | active | retired",
|
||||
formalDefinition="The status of the profile"
|
||||
)
|
||||
private BoundCodeDt<ResourceProfileStatusEnum> myStatus;
|
||||
|
||||
@Child(name="experimental", type=BooleanDt.class, order=8, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If for testing purposes, not real usage",
|
||||
formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
|
||||
)
|
||||
private BooleanDt myExperimental;
|
||||
|
||||
@Child(name="date", type=DateTimeDt.class, order=9, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Date for this version of the profile",
|
||||
formalDefinition="The date that this version of the profile was published"
|
||||
)
|
||||
private DateTimeDt myDate;
|
||||
|
||||
@Child(name="requirements", type=StringDt.class, order=10, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Scope and Usage this profile is for",
|
||||
formalDefinition="The Scope and Usage that this profile was created to meet"
|
||||
)
|
||||
private StringDt myRequirements;
|
||||
|
||||
@Child(name="fhirVersion", type=IdDt.class, order=11, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="FHIR Version this profile targets",
|
||||
formalDefinition="The version of the FHIR specification on which this profile is based"
|
||||
)
|
||||
private IdDt myFhirVersion;
|
||||
|
||||
@Child(name="mapping", order=12, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="External specification that the content is mapped to",
|
||||
formalDefinition="An external specification that the content is mapped to"
|
||||
)
|
||||
private List<Mapping> myMapping;
|
||||
|
||||
@Child(name="structure", order=13, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="A constraint on a resource or a data type",
|
||||
formalDefinition="A constraint statement about what contents a resource or data type may have"
|
||||
)
|
||||
private List<Structure> myStructure;
|
||||
|
||||
@Child(name="extensionDefn", order=14, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Definition of an extension",
|
||||
formalDefinition="An extension defined as part of the profile"
|
||||
)
|
||||
private List<ExtensionDefn> myExtensionDefn;
|
||||
|
||||
@Child(name="query", order=15, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Definition of a named query",
|
||||
formalDefinition="Definition of a named query and its parameters and their meaning"
|
||||
)
|
||||
private List<Query> myQuery;
|
||||
|
||||
|
||||
|
@ -923,15 +987,31 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class Mapping extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Internal id when this mapping is used",
|
||||
formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made"
|
||||
)
|
||||
private IdDt myIdentity;
|
||||
|
||||
@Child(name="uri", type=UriDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identifies what this mapping refers to",
|
||||
formalDefinition="A URI that identifies the specification that this mapping is expressed to"
|
||||
)
|
||||
private UriDt myUri;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Names what this mapping refers to",
|
||||
formalDefinition="A name for the specification that is being mapped to"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="comments", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Versions, Issues, Scope limitations etc",
|
||||
formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage"
|
||||
)
|
||||
private StringDt myComments;
|
||||
|
||||
|
||||
|
@ -1128,21 +1208,45 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class Structure extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="The Resource or Data Type being described",
|
||||
formalDefinition="The Resource or Data type being described"
|
||||
)
|
||||
private BoundCodeDt<FHIRDefinedTypeEnum> myType;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name for this particular structure (reference target)",
|
||||
formalDefinition="The name of this resource constraint statement (to refer to it from other resource constraints - from Profile.structure.element.definition.type.profile)"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="publish", type=BooleanDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="This definition is published (i.e. for validation)",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private BooleanDt myPublish;
|
||||
|
||||
@Child(name="purpose", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Human summary: why describe this resource?",
|
||||
formalDefinition="Human summary: why describe this resource?"
|
||||
)
|
||||
private StringDt myPurpose;
|
||||
|
||||
@Child(name="element", order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Definition of elements in the resource (if no profile)",
|
||||
formalDefinition="Captures constraints on each element within the resource"
|
||||
)
|
||||
private List<StructureElement> myElement;
|
||||
|
||||
@Child(name="searchParam", order=5, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Search params defined",
|
||||
formalDefinition="Additional search parameters for implementations to support and/or make use of"
|
||||
)
|
||||
private List<StructureSearchParam> mySearchParam;
|
||||
|
||||
|
||||
|
@ -1426,18 +1530,38 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElement extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="path", type=StringDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="The path of the element (see the formal definitions)",
|
||||
formalDefinition="The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource"
|
||||
)
|
||||
private StringDt myPath;
|
||||
|
||||
@Child(name="representation", type=CodeDt.class, order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="How this element is represented in instances",
|
||||
formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case"
|
||||
)
|
||||
private List<BoundCodeDt<PropertyRepresentationEnum>> myRepresentation;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name for this particular element definition (reference target)",
|
||||
formalDefinition="The name of this element definition (to refer to it from other element definitions using Profile.structure.element.definition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="slicing", order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="This element is sliced - slices follow",
|
||||
formalDefinition="Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)"
|
||||
)
|
||||
private StructureElementSlicing mySlicing;
|
||||
|
||||
@Child(name="definition", order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="More specific definition of the element",
|
||||
formalDefinition="Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource"
|
||||
)
|
||||
private StructureElementDefinition myDefinition;
|
||||
|
||||
|
||||
|
@ -1453,7 +1577,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource
|
||||
* The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getPath() {
|
||||
|
@ -1468,7 +1592,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource
|
||||
* The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
|
||||
* </p>
|
||||
*/
|
||||
public void setPath(StringDt theValue) {
|
||||
|
@ -1481,7 +1605,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource
|
||||
* The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
|
||||
* </p>
|
||||
*/
|
||||
public void setPath( String theString) {
|
||||
|
@ -1620,7 +1744,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>definition</b> (More specific definition of the element ).
|
||||
* Gets the value(s) for <b>definition</b> (More specific definition of the element).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -1637,7 +1761,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>definition</b> (More specific definition of the element )
|
||||
* Sets the value(s) for <b>definition</b> (More specific definition of the element)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -1665,12 +1789,24 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementSlicing extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="discriminator", type=IdDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Element that used to distinguish the slices",
|
||||
formalDefinition="Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices"
|
||||
)
|
||||
private IdDt myDiscriminator;
|
||||
|
||||
@Child(name="ordered", type=BooleanDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="If elements must be in same order as slices",
|
||||
formalDefinition="If the matching elements have to occur in the same order as defined in the profile"
|
||||
)
|
||||
private BooleanDt myOrdered;
|
||||
|
||||
@Child(name="rules", type=CodeDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="closed | open | openAtEnd",
|
||||
formalDefinition="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end"
|
||||
)
|
||||
private BoundCodeDt<SlicingRulesEnum> myRules;
|
||||
|
||||
|
||||
|
@ -1813,7 +1949,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Block class for child element: <b>Profile.structure.element.definition</b> (More specific definition of the element )
|
||||
* Block class for child element: <b>Profile.structure.element.definition</b> (More specific definition of the element)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -1824,57 +1960,129 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementDefinition extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="short", type=StringDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Concise definition for xml presentation",
|
||||
formalDefinition="A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification)"
|
||||
)
|
||||
private StringDt myShort;
|
||||
|
||||
@Child(name="formal", type=StringDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Full formal definition in human language",
|
||||
formalDefinition="The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource"
|
||||
)
|
||||
private StringDt myFormal;
|
||||
|
||||
@Child(name="comments", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Comments about the use of this element",
|
||||
formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc."
|
||||
)
|
||||
private StringDt myComments;
|
||||
|
||||
@Child(name="requirements", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Why is this needed?",
|
||||
formalDefinition="Explains why this element is needed and why it's been constrained as it has"
|
||||
)
|
||||
private StringDt myRequirements;
|
||||
|
||||
@Child(name="synonym", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Other names",
|
||||
formalDefinition="Identifies additional names by which this element might also be known"
|
||||
)
|
||||
private List<StringDt> mySynonym;
|
||||
|
||||
@Child(name="min", type=IntegerDt.class, order=5, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Minimum Cardinality",
|
||||
formalDefinition="The minimum number of times this element SHALL appear in the instance"
|
||||
)
|
||||
private IntegerDt myMin;
|
||||
|
||||
@Child(name="max", type=StringDt.class, order=6, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Maximum Cardinality (a number or *)",
|
||||
formalDefinition="The maximum number of times this element is permitted to appear in the instance"
|
||||
)
|
||||
private StringDt myMax;
|
||||
|
||||
@Child(name="type", order=7, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Data type and Profile for this element",
|
||||
formalDefinition="The data type or resource that the value of this element is permitted to be"
|
||||
)
|
||||
private List<StructureElementDefinitionType> myType;
|
||||
|
||||
@Child(name="nameReference", type=StringDt.class, order=8, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="To another element constraint (by element.name)",
|
||||
formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element"
|
||||
)
|
||||
private StringDt myNameReference;
|
||||
|
||||
@Child(name="value", type=IDatatype.class, order=9, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Fixed value: [as defined for a primitive type]",
|
||||
formalDefinition="Specifies a primitive value that SHALL hold for this element in the instance"
|
||||
)
|
||||
private IDatatype myValue;
|
||||
|
||||
@Child(name="example", type=IDatatype.class, order=10, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Example value: [as defined for type]",
|
||||
formalDefinition="An example value for this element"
|
||||
)
|
||||
private IDatatype myExample;
|
||||
|
||||
@Child(name="maxLength", type=IntegerDt.class, order=11, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Length for strings",
|
||||
formalDefinition="Indicates the shortest length that SHALL be supported by conformant instances without truncation"
|
||||
)
|
||||
private IntegerDt myMaxLength;
|
||||
|
||||
@Child(name="condition", type=IdDt.class, order=12, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Reference to invariant about presence",
|
||||
formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance"
|
||||
)
|
||||
private List<IdDt> myCondition;
|
||||
|
||||
@Child(name="constraint", order=13, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Condition that must evaluate to true",
|
||||
formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance"
|
||||
)
|
||||
private List<StructureElementDefinitionConstraint> myConstraint;
|
||||
|
||||
@Child(name="mustSupport", type=BooleanDt.class, order=14, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If the element must supported",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private BooleanDt myMustSupport;
|
||||
|
||||
@Child(name="isModifier", type=BooleanDt.class, order=15, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="If this modifies the meaning of other elements",
|
||||
formalDefinition="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."
|
||||
)
|
||||
private BooleanDt myIsModifier;
|
||||
|
||||
@Child(name="binding", order=16, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="ValueSet details if this is coded",
|
||||
formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)"
|
||||
)
|
||||
private StructureElementDefinitionBinding myBinding;
|
||||
|
||||
@Child(name="mapping", order=17, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Map element to another set of definitions",
|
||||
formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element"
|
||||
)
|
||||
private List<StructureElementDefinitionMapping> myMapping;
|
||||
|
||||
|
||||
|
@ -1933,7 +2141,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getFormal() {
|
||||
|
@ -1948,7 +2156,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* </p>
|
||||
*/
|
||||
public void setFormal(StringDt theValue) {
|
||||
|
@ -1961,7 +2169,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
|
||||
* </p>
|
||||
*/
|
||||
public void setFormal( String theString) {
|
||||
|
@ -2251,7 +2459,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getNameReference() {
|
||||
|
@ -2266,7 +2474,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* </p>
|
||||
*/
|
||||
public void setNameReference(StringDt theValue) {
|
||||
|
@ -2279,7 +2487,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
|
||||
* </p>
|
||||
*/
|
||||
public void setNameReference( String theString) {
|
||||
|
@ -2665,12 +2873,24 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementDefinitionType extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of Data type or Resource",
|
||||
formalDefinition=""
|
||||
)
|
||||
private BoundCodeDt<DataTypeEnum> myCode;
|
||||
|
||||
@Child(name="profile", type=UriDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Profile.structure to apply",
|
||||
formalDefinition="Identifies a profile that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile"
|
||||
)
|
||||
private UriDt myProfile;
|
||||
|
||||
@Child(name="aggregation", type=CodeDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="contained | referenced | bundled - how aggregated",
|
||||
formalDefinition="If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle"
|
||||
)
|
||||
private List<BoundCodeDt<AggregationModeEnum>> myAggregation;
|
||||
|
||||
|
||||
|
@ -2837,18 +3057,38 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementDefinitionConstraint extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="key", type=IdDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Target of 'condition' reference above",
|
||||
formalDefinition="Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality"
|
||||
)
|
||||
private IdDt myKey;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Short human label",
|
||||
formalDefinition="Used to label the constraint in OCL or in short displays incapable of displaying the full human description"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="severity", type=CodeDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="error | warning",
|
||||
formalDefinition="Identifies the impact constraint violation has on the conformance of the instance"
|
||||
)
|
||||
private BoundCodeDt<ConstraintSeverityEnum> mySeverity;
|
||||
|
||||
@Child(name="human", type=StringDt.class, order=3, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Human description of constraint",
|
||||
formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated"
|
||||
)
|
||||
private StringDt myHuman;
|
||||
|
||||
@Child(name="xpath", type=StringDt.class, order=4, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="XPath expression of constraint",
|
||||
formalDefinition="XPath expression of constraint"
|
||||
)
|
||||
private StringDt myXpath;
|
||||
|
||||
|
||||
|
@ -2993,7 +3233,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getHuman() {
|
||||
|
@ -3008,7 +3248,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* </p>
|
||||
*/
|
||||
public void setHuman(StringDt theValue) {
|
||||
|
@ -3021,7 +3261,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* Text that can be used to describe the constraint in messages identifying that the constraint has been violated
|
||||
* </p>
|
||||
*/
|
||||
public void setHuman( String theString) {
|
||||
|
@ -3088,21 +3328,41 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementDefinitionBinding extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Descriptive Name",
|
||||
formalDefinition="A descriptive name for this - can be useful for generating implementation artifacts"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="isExtensible", type=BooleanDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Can additional codes be used?",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private BooleanDt myIsExtensible;
|
||||
|
||||
@Child(name="conformance", type=CodeDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="required | preferred | example",
|
||||
formalDefinition="Indicates the degree of conformance expectations associated with this binding"
|
||||
)
|
||||
private BoundCodeDt<BindingConformanceEnum> myConformance;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Human explanation of the value set",
|
||||
formalDefinition="Describes the intended use of this particular set of codes"
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="reference", order=4, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="reference", order=4, min=0, max=1, type={
|
||||
UriDt.class,
|
||||
ValueSet.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Source of value set",
|
||||
formalDefinition="Points to the value set or external definition that identifies the set of codes to be used"
|
||||
)
|
||||
private IDatatype myReference;
|
||||
|
||||
|
||||
|
@ -3327,9 +3587,17 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureElementDefinitionMapping extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Reference to mapping declaration",
|
||||
formalDefinition="An internal reference to the definition of a mapping"
|
||||
)
|
||||
private IdDt myIdentity;
|
||||
|
||||
@Child(name="map", type=StringDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Details of the mapping",
|
||||
formalDefinition="Expresses what part of the target specification corresponds to this element"
|
||||
)
|
||||
private StringDt myMap;
|
||||
|
||||
|
||||
|
@ -3442,18 +3710,38 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class StructureSearchParam extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of search parameter",
|
||||
formalDefinition="The name of the standard or custom search parameter"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="type", type=CodeDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="number | date | string | token | reference | composite | quantity",
|
||||
formalDefinition="The type of value a search parameter refers to, and how the content is interpreted"
|
||||
)
|
||||
private BoundCodeDt<SearchParamTypeEnum> myType;
|
||||
|
||||
@Child(name="documentation", type=StringDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Contents and meaning of search parameter",
|
||||
formalDefinition="A specification for search parameters. For standard parameters, provides additional information on how the parameter is used in this solution. For custom parameters, provides a description of what the parameter does"
|
||||
)
|
||||
private StringDt myDocumentation;
|
||||
|
||||
@Child(name="xpath", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="XPath that extracts the parameter set",
|
||||
formalDefinition="An XPath expression that returns a set of elements for the search parameter"
|
||||
)
|
||||
private StringDt myXpath;
|
||||
|
||||
@Child(name="target", type=CodeDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Types of resource (if a resource reference)",
|
||||
formalDefinition="Types of resource (if a resource is referenced)"
|
||||
)
|
||||
private List<BoundCodeDt<ResourceTypeEnum>> myTarget;
|
||||
|
||||
|
||||
|
@ -3707,18 +3995,38 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class ExtensionDefn extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identifies the extension in this profile",
|
||||
formalDefinition="A unique code (within the profile) used to identify the extension"
|
||||
)
|
||||
private CodeDt myCode;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Use this name when displaying the value",
|
||||
formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user"
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
@Child(name="contextType", type=CodeDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="resource | datatype | mapping | extension",
|
||||
formalDefinition="Identifies the type of context to which the extension applies"
|
||||
)
|
||||
private BoundCodeDt<ExtensionContextEnum> myContextType;
|
||||
|
||||
@Child(name="context", type=StringDt.class, order=3, min=1, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Where the extension can be used in instances",
|
||||
formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied"
|
||||
)
|
||||
private List<StringDt> myContext;
|
||||
|
||||
@Child(name="definition", type=StructureElementDefinition.class, order=4, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Definition of the extension and its content",
|
||||
formalDefinition="Definition of the extension and its content"
|
||||
)
|
||||
private StructureElementDefinition myDefinition;
|
||||
|
||||
|
||||
|
@ -3757,7 +4065,19 @@ public class Profile extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Identifies the extension in this profile)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A unique code (within the profile) used to identify the extension
|
||||
* </p>
|
||||
*/
|
||||
public void setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>display</b> (Use this name when displaying the value).
|
||||
* creating it if it does
|
||||
|
@ -3765,7 +4085,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getDisplay() {
|
||||
|
@ -3780,7 +4100,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay(StringDt theValue) {
|
||||
|
@ -3793,7 +4113,7 @@ public class Profile extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* Defined so that applications can use this name when displaying the value of the extension to the user
|
||||
* </p>
|
||||
*/
|
||||
public void setDisplay( String theString) {
|
||||
|
@ -3950,12 +4270,24 @@ public class Profile extends BaseResource implements IResource {
|
|||
public static class Query extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Special named queries (_query=)",
|
||||
formalDefinition="The name of a query, which is used in the URI from Conformance statements declaring use of the query. Typically this will also be the name for the _query parameter when the query is called, though in some cases it may be aliased by a server to avoid collisions"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="documentation", type=StringDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Describes the named query",
|
||||
formalDefinition="Description of the query - the functionality it offers, and considerations about how it functions and to use it"
|
||||
)
|
||||
private StringDt myDocumentation;
|
||||
|
||||
@Child(name="parameter", type=StructureSearchParam.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Parameter for the named query",
|
||||
formalDefinition="A parameter of a named query"
|
||||
)
|
||||
private List<StructureSearchParam> myParameter;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Specimen")
|
||||
@ResourceDef(name="Specimen", profile="http://hl7.org/fhir/profiles/Specimen")
|
||||
public class Specimen extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -52,36 +52,71 @@ public class Specimen extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="External Identifier",
|
||||
formalDefinition="Id for specimen"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Kind of material that forms the specimen",
|
||||
formalDefinition="Kind of material that forms the specimen"
|
||||
)
|
||||
private CodeableConceptDt myType;
|
||||
|
||||
@Child(name="source", order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Parent of specimen",
|
||||
formalDefinition="Parent specimen from which the focal specimen was a component"
|
||||
)
|
||||
private List<Source> mySource;
|
||||
|
||||
@Child(name="subject", order=3, min=1, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="subject", order=3, min=1, max=1, type={
|
||||
Patient.class,
|
||||
Group.class,
|
||||
Device.class,
|
||||
Substance.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Where the specimen came from. This may be the patient(s) or from the environment or a device",
|
||||
formalDefinition=""
|
||||
)
|
||||
private ResourceReference mySubject;
|
||||
|
||||
@Child(name="accessionIdentifier", type=IdentifierDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identifier assigned by the lab",
|
||||
formalDefinition="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."
|
||||
)
|
||||
private IdentifierDt myAccessionIdentifier;
|
||||
|
||||
@Child(name="receivedTime", type=DateTimeDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The time when specimen was received for processing",
|
||||
formalDefinition="Time when specimen was received for processing or testing"
|
||||
)
|
||||
private DateTimeDt myReceivedTime;
|
||||
|
||||
@Child(name="collection", order=6, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Collection details",
|
||||
formalDefinition="Details concerning the specimen collection"
|
||||
)
|
||||
private Collection myCollection;
|
||||
|
||||
@Child(name="treatment", order=7, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Treatment and processing step details",
|
||||
formalDefinition="Details concerning treatment and processing steps for the specimen"
|
||||
)
|
||||
private List<Treatment> myTreatment;
|
||||
|
||||
@Child(name="container", order=8, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Direct container of specimen (tube/slide, etc)",
|
||||
formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here."
|
||||
)
|
||||
private List<Container> myContainer;
|
||||
|
||||
|
||||
|
@ -244,7 +279,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <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.
|
||||
* 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 IdentifierDt getAccessionIdentifier() {
|
||||
|
@ -259,7 +294,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <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.
|
||||
* 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 void setAccessionIdentifier(IdentifierDt theValue) {
|
||||
|
@ -405,7 +440,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* </p>
|
||||
*/
|
||||
public List<Container> getContainer() {
|
||||
|
@ -420,7 +455,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* </p>
|
||||
*/
|
||||
public void setContainer(List<Container> theValue) {
|
||||
|
@ -432,7 +467,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* </p>
|
||||
*/
|
||||
public Container addContainer() {
|
||||
|
@ -454,12 +489,19 @@ public class Specimen extends BaseResource implements IResource {
|
|||
public static class Source extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="relationship", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="parent | child",
|
||||
formalDefinition="Whether this relationship is to a parent or to a child"
|
||||
)
|
||||
private BoundCodeDt<HierarchicalRelationshipTypeEnum> myRelationship;
|
||||
|
||||
@Child(name="target", order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="target", order=1, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Specimen.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="The subject of the relationship",
|
||||
formalDefinition="The specimen resource that is the target of this relationship"
|
||||
)
|
||||
private List<ResourceReference> myTarget;
|
||||
|
||||
|
||||
|
@ -557,28 +599,51 @@ public class Specimen extends BaseResource implements IResource {
|
|||
@Block(name="Specimen.collection")
|
||||
public static class Collection extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="collector", order=0, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="collector", order=0, min=0, max=1, type={
|
||||
Practitioner.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Who collected the specimen",
|
||||
formalDefinition="Person who collected the specimen"
|
||||
)
|
||||
private ResourceReference myCollector;
|
||||
|
||||
@Child(name="comment", type=StringDt.class, order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Collector comments",
|
||||
formalDefinition="To communicate any details or issues encountered during the specimen collection procedure."
|
||||
)
|
||||
private List<StringDt> myComment;
|
||||
|
||||
@Child(name="collected", order=2, min=0, max=1, choice=@Choice(types= {
|
||||
@Child(name="collected", order=2, min=0, max=1, type={
|
||||
DateTimeDt.class,
|
||||
PeriodDt.class,
|
||||
}))
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Collection time",
|
||||
formalDefinition="Time when specimen was collected from subject - the physiologically relevant time"
|
||||
)
|
||||
private IDatatype myCollected;
|
||||
|
||||
@Child(name="quantity", type=QuantityDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="The quantity of specimen collected",
|
||||
formalDefinition="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample"
|
||||
)
|
||||
private QuantityDt myQuantity;
|
||||
|
||||
@Child(name="method", type=CodeableConceptDt.class, order=4, min=0, max=1)
|
||||
private CodeableConceptDt myMethod;
|
||||
@Description(
|
||||
shortDefinition="Technique used to perform collection",
|
||||
formalDefinition="A coded value specifying the technique that is used to perform the procedure"
|
||||
)
|
||||
private BoundCodeableConceptDt<SpecimenCollectionMethodEnum> myMethod;
|
||||
|
||||
@Child(name="sourceSite", type=CodeableConceptDt.class, order=5, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Anatomical collection site",
|
||||
formalDefinition="Anatomical location from which the specimen should be collected (if subject is a patient). This element is not used for environmental specimens."
|
||||
)
|
||||
private CodeableConceptDt mySourceSite;
|
||||
|
||||
|
||||
|
@ -712,7 +777,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <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
|
||||
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
|
||||
* </p>
|
||||
*/
|
||||
public QuantityDt getQuantity() {
|
||||
|
@ -727,7 +792,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <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
|
||||
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
|
||||
* </p>
|
||||
*/
|
||||
public void setQuantity(QuantityDt theValue) {
|
||||
|
@ -746,9 +811,9 @@ public class Specimen extends BaseResource implements IResource {
|
|||
* A coded value specifying the technique that is used to perform the procedure
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getMethod() {
|
||||
public BoundCodeableConceptDt<SpecimenCollectionMethodEnum> getMethod() {
|
||||
if (myMethod == null) {
|
||||
myMethod = new CodeableConceptDt();
|
||||
myMethod = new BoundCodeableConceptDt<SpecimenCollectionMethodEnum>(SpecimenCollectionMethodEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myMethod;
|
||||
}
|
||||
|
@ -761,11 +826,23 @@ public class Specimen extends BaseResource implements IResource {
|
|||
* A coded value specifying the technique that is used to perform the procedure
|
||||
* </p>
|
||||
*/
|
||||
public void setMethod(CodeableConceptDt theValue) {
|
||||
public void setMethod(BoundCodeableConceptDt<SpecimenCollectionMethodEnum> theValue) {
|
||||
myMethod = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>method</b> (Technique used to perform collection)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A coded value specifying the technique that is used to perform the procedure
|
||||
* </p>
|
||||
*/
|
||||
public void setMethod(SpecimenCollectionMethodEnum theValue) {
|
||||
getMethod().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>sourceSite</b> (Anatomical collection site).
|
||||
|
@ -814,15 +891,26 @@ public class Specimen extends BaseResource implements IResource {
|
|||
public static class Treatment extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Textual description of procedure",
|
||||
formalDefinition=""
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="procedure", type=CodeableConceptDt.class, order=1, min=0, max=1)
|
||||
private CodeableConceptDt myProcedure;
|
||||
@Description(
|
||||
shortDefinition="Indicates the treatment or processing step applied to the specimen",
|
||||
formalDefinition="A coded value specifying the procedure used to process the specimen"
|
||||
)
|
||||
private BoundCodeableConceptDt<SpecimenTreatmentProcedureEnum> myProcedure;
|
||||
|
||||
@Child(name="additive", order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@ChildResource(types= {
|
||||
@Child(name="additive", order=2, min=0, max=Child.MAX_UNLIMITED, type={
|
||||
Substance.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Material used in the processing step",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<ResourceReference> myAdditive;
|
||||
|
||||
|
||||
|
@ -884,9 +972,9 @@ public class Specimen extends BaseResource implements IResource {
|
|||
* A coded value specifying the procedure used to process the specimen
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getProcedure() {
|
||||
public BoundCodeableConceptDt<SpecimenTreatmentProcedureEnum> getProcedure() {
|
||||
if (myProcedure == null) {
|
||||
myProcedure = new CodeableConceptDt();
|
||||
myProcedure = new BoundCodeableConceptDt<SpecimenTreatmentProcedureEnum>(SpecimenTreatmentProcedureEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myProcedure;
|
||||
}
|
||||
|
@ -899,11 +987,23 @@ public class Specimen extends BaseResource implements IResource {
|
|||
* A coded value specifying the procedure used to process the specimen
|
||||
* </p>
|
||||
*/
|
||||
public void setProcedure(CodeableConceptDt theValue) {
|
||||
public void setProcedure(BoundCodeableConceptDt<SpecimenTreatmentProcedureEnum> theValue) {
|
||||
myProcedure = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>procedure</b> (Indicates the treatment or processing step applied to the specimen)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A coded value specifying the procedure used to process the specimen
|
||||
* </p>
|
||||
*/
|
||||
public void setProcedure(SpecimenTreatmentProcedureEnum theValue) {
|
||||
getProcedure().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>additive</b> (Material used in the processing step).
|
||||
|
@ -945,31 +1045,54 @@ public class Specimen extends BaseResource implements IResource {
|
|||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
|
||||
* </p>
|
||||
*/
|
||||
@Block(name="Specimen.container")
|
||||
public static class Container extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Id for the container",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private List<IdentifierDt> myIdentifier;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Textual description of the container",
|
||||
formalDefinition=""
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Kind of container directly associated with specimen",
|
||||
formalDefinition="The type of container associated with the specimen (e.g. slide, aliquot, etc)"
|
||||
)
|
||||
private CodeableConceptDt myType;
|
||||
|
||||
@Child(name="capacity", type=QuantityDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Container volume or size",
|
||||
formalDefinition="The capacity (volume or other measure) the container may contain."
|
||||
)
|
||||
private QuantityDt myCapacity;
|
||||
|
||||
@Child(name="specimenQuantity", type=QuantityDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Quantity of specimen within container",
|
||||
formalDefinition="The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type"
|
||||
)
|
||||
private QuantityDt mySpecimenQuantity;
|
||||
|
||||
@Child(name="additive", order=5, min=0, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="additive", order=5, min=0, max=1, type={
|
||||
Substance.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="Additive associated with container",
|
||||
formalDefinition="Additive associated with the container"
|
||||
)
|
||||
private ResourceReference myAdditive;
|
||||
|
||||
|
||||
|
@ -1159,7 +1282,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>additive</b> (Additive associated with container ).
|
||||
* Gets the value(s) for <b>additive</b> (Additive associated with container).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -1176,7 +1299,7 @@ public class Specimen extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>additive</b> (Additive associated with container )
|
||||
* Sets the value(s) for <b>additive</b> (Additive associated with container)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
|
|
@ -25,7 +25,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
|
||||
/**
|
||||
* HAPI/FHIR <b>Substance</b> Resource
|
||||
* (A homogeneous material with a definite composition )
|
||||
* (A homogeneous material with a definite composition)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="Substance")
|
||||
@ResourceDef(name="Substance", profile="http://hl7.org/fhir/profiles/Substance")
|
||||
public class Substance extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -92,15 +92,31 @@ public class Substance extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
|
||||
private CodeableConceptDt myType;
|
||||
@Description(
|
||||
shortDefinition="What kind of substance this is",
|
||||
formalDefinition="A code (or set of codes) that identify this substance"
|
||||
)
|
||||
private BoundCodeableConceptDt<SubstanceTypeEnum> myType;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Textual description of the substance, comments",
|
||||
formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes"
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="instance", order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If this describes a specific package/container of the substance",
|
||||
formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance"
|
||||
)
|
||||
private Instance myInstance;
|
||||
|
||||
@Child(name="ingredient", order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Composition information about the substance",
|
||||
formalDefinition="A substance can be composed of other substances"
|
||||
)
|
||||
private List<Ingredient> myIngredient;
|
||||
|
||||
|
||||
|
@ -119,9 +135,9 @@ public class Substance extends BaseResource implements IResource {
|
|||
* A code (or set of codes) that identify this substance
|
||||
* </p>
|
||||
*/
|
||||
public CodeableConceptDt getType() {
|
||||
public BoundCodeableConceptDt<SubstanceTypeEnum> getType() {
|
||||
if (myType == null) {
|
||||
myType = new CodeableConceptDt();
|
||||
myType = new BoundCodeableConceptDt<SubstanceTypeEnum>(SubstanceTypeEnum.VALUESET_BINDER);
|
||||
}
|
||||
return myType;
|
||||
}
|
||||
|
@ -134,11 +150,23 @@ public class Substance extends BaseResource implements IResource {
|
|||
* A code (or set of codes) that identify this substance
|
||||
* </p>
|
||||
*/
|
||||
public void setType(CodeableConceptDt theValue) {
|
||||
public void setType(BoundCodeableConceptDt<SubstanceTypeEnum> theValue) {
|
||||
myType = theValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>type</b> (What kind of substance this is)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A code (or set of codes) that identify this substance
|
||||
* </p>
|
||||
*/
|
||||
public void setType(SubstanceTypeEnum theValue) {
|
||||
getType().setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>description</b> (Textual description of the substance, comments).
|
||||
|
@ -270,12 +298,24 @@ public class Substance extends BaseResource implements IResource {
|
|||
public static class Instance extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identifier of the package/container",
|
||||
formalDefinition="Identifier associated with the package/container (usually a label affixed directly)"
|
||||
)
|
||||
private IdentifierDt myIdentifier;
|
||||
|
||||
@Child(name="expiry", type=DateTimeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="When no longer valid to use",
|
||||
formalDefinition="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry."
|
||||
)
|
||||
private DateTimeDt myExpiry;
|
||||
|
||||
@Child(name="quantity", type=QuantityDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Amount of substance in the package",
|
||||
formalDefinition="The amount of the substance"
|
||||
)
|
||||
private QuantityDt myQuantity;
|
||||
|
||||
|
||||
|
@ -417,12 +457,19 @@ public class Substance extends BaseResource implements IResource {
|
|||
public static class Ingredient extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="quantity", type=RatioDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Optional amount (concentration)",
|
||||
formalDefinition="The amount of the ingredient in the substance - a concentration ratio"
|
||||
)
|
||||
private RatioDt myQuantity;
|
||||
|
||||
@Child(name="substance", order=1, min=1, max=1)
|
||||
@ChildResource(types= {
|
||||
@Child(name="substance", order=1, min=1, max=1, type={
|
||||
Substance.class,
|
||||
})
|
||||
})
|
||||
@Description(
|
||||
shortDefinition="A component of the substance",
|
||||
formalDefinition="Another substance that is a component of this substance"
|
||||
)
|
||||
private ResourceReference mySubstance;
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import ca.uhn.fhir.model.dstu.valueset.*;
|
|||
*
|
||||
* </p>
|
||||
*/
|
||||
@ResourceDef(name="ValueSet")
|
||||
@ResourceDef(name="ValueSet", profile="http://hl7.org/fhir/profiles/ValueSet")
|
||||
public class ValueSet extends BaseResource implements IResource {
|
||||
|
||||
/**
|
||||
|
@ -152,45 +152,101 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
|
||||
|
||||
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Logical id to reference this value set",
|
||||
formalDefinition="The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)"
|
||||
)
|
||||
private StringDt myIdentifier;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Logical id for this version of the value set",
|
||||
formalDefinition="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="name", type=StringDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Informal name for this value set",
|
||||
formalDefinition="A free text natural language name describing the value set"
|
||||
)
|
||||
private StringDt myName;
|
||||
|
||||
@Child(name="publisher", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Name of the publisher (Organization or individual)",
|
||||
formalDefinition="The name of the individual or organization that published the value set"
|
||||
)
|
||||
private StringDt myPublisher;
|
||||
|
||||
@Child(name="telecom", type=ContactDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Contact information of the publisher",
|
||||
formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher"
|
||||
)
|
||||
private List<ContactDt> myTelecom;
|
||||
|
||||
@Child(name="description", type=StringDt.class, order=5, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Human language description of the value set",
|
||||
formalDefinition="A free text natural language description of the use of the value set - reason for definition, conditions of use, etc."
|
||||
)
|
||||
private StringDt myDescription;
|
||||
|
||||
@Child(name="copyright", type=StringDt.class, order=6, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="About the value set or its content",
|
||||
formalDefinition="A copyright statement relating to the value set and/or its contents"
|
||||
)
|
||||
private StringDt myCopyright;
|
||||
|
||||
@Child(name="status", type=CodeDt.class, order=7, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="draft | active | retired",
|
||||
formalDefinition="The status of the value set"
|
||||
)
|
||||
private BoundCodeDt<ValueSetStatusEnum> myStatus;
|
||||
|
||||
@Child(name="experimental", type=BooleanDt.class, order=8, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If for testing purposes, not real usage",
|
||||
formalDefinition="This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
|
||||
)
|
||||
private BooleanDt myExperimental;
|
||||
|
||||
@Child(name="extensible", type=BooleanDt.class, order=9, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Whether this is intended to be used with an extensible binding",
|
||||
formalDefinition="Whether this is intended to be used with an extensible binding or not"
|
||||
)
|
||||
private BooleanDt myExtensible;
|
||||
|
||||
@Child(name="date", type=DateTimeDt.class, order=10, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Date for given status",
|
||||
formalDefinition="The date that the value set status was last changed"
|
||||
)
|
||||
private DateTimeDt myDate;
|
||||
|
||||
@Child(name="define", order=11, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="When value set defines its own codes",
|
||||
formalDefinition=""
|
||||
)
|
||||
private Define myDefine;
|
||||
|
||||
@Child(name="compose", order=12, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="When value set includes codes from elsewhere",
|
||||
formalDefinition=""
|
||||
)
|
||||
private Compose myCompose;
|
||||
|
||||
@Child(name="expansion", order=13, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="When value set is an expansion",
|
||||
formalDefinition=""
|
||||
)
|
||||
private Expansion myExpansion;
|
||||
|
||||
|
||||
|
@ -502,8 +558,7 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>status</b> (draft | active | retired
|
||||
).
|
||||
* Gets the value(s) for <b>status</b> (draft | active | retired).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
*
|
||||
|
@ -520,8 +575,7 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>status</b> (draft | active | retired
|
||||
)
|
||||
* Sets the value(s) for <b>status</b> (draft | active | retired)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -534,8 +588,7 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
|
||||
|
||||
/**
|
||||
* Sets the value(s) for <b>status</b> (draft | active | retired
|
||||
)
|
||||
* Sets the value(s) for <b>status</b> (draft | active | retired)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
|
@ -793,15 +846,31 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class Define extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="URI to identify the code system",
|
||||
formalDefinition=""
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Version of this system",
|
||||
formalDefinition="The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="caseSensitive", type=BooleanDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If code comparison is case sensitive",
|
||||
formalDefinition="If code comparison is case sensitive when codes within this system are compared to each other"
|
||||
)
|
||||
private BooleanDt myCaseSensitive;
|
||||
|
||||
@Child(name="concept", order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Concepts in the code system",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<DefineConcept> myConcept;
|
||||
|
||||
|
||||
|
@ -998,18 +1067,38 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class DefineConcept extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Code that identifies concept",
|
||||
formalDefinition=""
|
||||
)
|
||||
private CodeDt myCode;
|
||||
|
||||
@Child(name="abstract", type=BooleanDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="If this code is not for use as a real concept",
|
||||
formalDefinition="If this code is not for use as a real concept"
|
||||
)
|
||||
private BooleanDt myAbstract;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Text to Display to the user",
|
||||
formalDefinition=""
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
@Child(name="definition", type=StringDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Formal Definition",
|
||||
formalDefinition="The formal definition of the concept. Formal definitions are not required, because of the prevalence of legacy systems without them, but they are highly recommended, as without them there is no formal meaning associated with the concept"
|
||||
)
|
||||
private StringDt myDefinition;
|
||||
|
||||
@Child(name="concept", type=DefineConcept.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Child Concepts (is-a / contains)",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<DefineConcept> myConcept;
|
||||
|
||||
|
||||
|
@ -1048,7 +1137,19 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Code that identifies concept)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
*
|
||||
* </p>
|
||||
*/
|
||||
public void setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>abstract</b> (If this code is not for use as a real concept).
|
||||
* creating it if it does
|
||||
|
@ -1239,12 +1340,24 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class Compose extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="import", type=UriDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Import the contents of another value set",
|
||||
formalDefinition="Includes the contents of the referenced value set as a part of the contents of this value set"
|
||||
)
|
||||
private List<UriDt> myImport;
|
||||
|
||||
@Child(name="include", order=1, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Include one or more codes from a code system",
|
||||
formalDefinition="Include one or more codes from a code system"
|
||||
)
|
||||
private List<ComposeInclude> myInclude;
|
||||
|
||||
@Child(name="exclude", type=ComposeInclude.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Explicitly exclude codes",
|
||||
formalDefinition="Exclude one or more codes from the value set"
|
||||
)
|
||||
private List<ComposeInclude> myExclude;
|
||||
|
||||
|
||||
|
@ -1415,15 +1528,31 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class ComposeInclude extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="The system the codes come from",
|
||||
formalDefinition="The code system from which the selected codes come from"
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Specific version of the code system referred to",
|
||||
formalDefinition="The version of the code system that the codes are selected from"
|
||||
)
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Code or concept from system",
|
||||
formalDefinition="Specifies a code or concept to be included or excluded. The list of codes is considered ordered, though the order may not have any particular significance"
|
||||
)
|
||||
private List<CodeDt> myCode;
|
||||
|
||||
@Child(name="filter", order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Select codes/concepts by their properties (including relationships)",
|
||||
formalDefinition="Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true."
|
||||
)
|
||||
private List<ComposeIncludeFilter> myFilter;
|
||||
|
||||
|
||||
|
@ -1561,7 +1690,22 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
return newType;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a new value for <b>code</b> (Code or concept from system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* Specifies a code or concept to be included or excluded. The list of codes is considered ordered, though the order may not have any particular significance
|
||||
* </p>
|
||||
*/
|
||||
public void addCode( String theCode) {
|
||||
if (myCode == null) {
|
||||
myCode = new ArrayList<CodeDt>();
|
||||
}
|
||||
myCode.add(new CodeDt(theCode));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>filter</b> (Select codes/concepts by their properties (including relationships)).
|
||||
* creating it if it does
|
||||
|
@ -1621,12 +1765,24 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class ComposeIncludeFilter extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="property", type=CodeDt.class, order=0, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="",
|
||||
formalDefinition="A code that identifies a property defined in the code system"
|
||||
)
|
||||
private CodeDt myProperty;
|
||||
|
||||
@Child(name="op", type=CodeDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="= | is-a | is-not-a | regex | in | not in",
|
||||
formalDefinition="The kind of operation to perform as a part of the filter criteria"
|
||||
)
|
||||
private BoundCodeDt<FilterOperatorEnum> myOp;
|
||||
|
||||
@Child(name="value", type=CodeDt.class, order=2, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Code from the system, or regex criteria",
|
||||
formalDefinition="The match value may be either a code defined by the system, or a string value which is used a regex match on the literal string of the property value"
|
||||
)
|
||||
private CodeDt myValue;
|
||||
|
||||
|
||||
|
@ -1665,7 +1821,19 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>property</b> ()
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A code that identifies a property defined in the code system
|
||||
* </p>
|
||||
*/
|
||||
public void setProperty( String theCode) {
|
||||
myProperty = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>op</b> (= | is-a | is-not-a | regex | in | not in).
|
||||
* creating it if it does
|
||||
|
@ -1739,7 +1907,19 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>value</b> (Code from the system, or regex criteria)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The match value may be either a code defined by the system, or a string value which is used a regex match on the literal string of the property value
|
||||
* </p>
|
||||
*/
|
||||
public void setValue( String theCode) {
|
||||
myValue = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1758,12 +1938,24 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class Expansion extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Uniquely identifies this expansion",
|
||||
formalDefinition="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"
|
||||
)
|
||||
private IdentifierDt myIdentifier;
|
||||
|
||||
@Child(name="timestamp", type=InstantDt.class, order=1, min=1, max=1)
|
||||
@Description(
|
||||
shortDefinition="Time valueset expansion happened",
|
||||
formalDefinition=""
|
||||
)
|
||||
private InstantDt myTimestamp;
|
||||
|
||||
@Child(name="contains", order=2, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Codes in the value set",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<ExpansionContains> myContains;
|
||||
|
||||
|
||||
|
@ -1917,15 +2109,31 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
public static class ExpansionContains extends BaseElement implements IResourceBlock {
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="System value for the code",
|
||||
formalDefinition=""
|
||||
)
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=1, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Code - if blank, this is not a choosable code",
|
||||
formalDefinition=""
|
||||
)
|
||||
private CodeDt myCode;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="User display for the concept",
|
||||
formalDefinition=""
|
||||
)
|
||||
private StringDt myDisplay;
|
||||
|
||||
@Child(name="contains", type=ExpansionContains.class, order=3, min=0, max=Child.MAX_UNLIMITED)
|
||||
@Description(
|
||||
shortDefinition="Codes contained in this concept",
|
||||
formalDefinition=""
|
||||
)
|
||||
private List<ExpansionContains> myContains;
|
||||
|
||||
|
||||
|
@ -2007,7 +2215,19 @@ public class ValueSet extends BaseResource implements IResource {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Code - if blank, this is not a choosable code)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
*
|
||||
* </p>
|
||||
*/
|
||||
public void setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>display</b> (User display for the concept).
|
||||
* creating it if it does
|
||||
|
|
|
@ -12,28 +12,28 @@ public enum AddressUseEnum {
|
|||
*
|
||||
* A communication address at a home.
|
||||
*/
|
||||
HOME("home"),
|
||||
HOME("home", "http://hl7.org/fhir/address-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>work</b>
|
||||
*
|
||||
* An office address. First choice for business related contacts during business hours.
|
||||
*/
|
||||
WORK("work"),
|
||||
WORK("work", "http://hl7.org/fhir/address-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>temp</b>
|
||||
*
|
||||
* A temporary address. The period can provide more detailed information.
|
||||
*/
|
||||
TEMP("temp"),
|
||||
TEMP("temp", "http://hl7.org/fhir/address-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>old</b>
|
||||
*
|
||||
* This address is no longer in use (or was never correct, but retained for records).
|
||||
*/
|
||||
OLD("old"),
|
||||
OLD("old", "http://hl7.org/fhir/address-use"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -50,11 +50,19 @@ public enum AddressUseEnum {
|
|||
public static final String VALUESET_NAME = "AddressUse";
|
||||
|
||||
private static Map<String, AddressUseEnum> CODE_TO_ENUM = new HashMap<String, AddressUseEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, AddressUseEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AddressUseEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (AddressUseEnum next : AddressUseEnum.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, AddressUseEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +73,13 @@ public enum AddressUseEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -81,18 +96,34 @@ public enum AddressUseEnum {
|
|||
public String toCodeString(AddressUseEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(AddressUseEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressUseEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressUseEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, AddressUseEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
AddressUseEnum(String theCode) {
|
||||
AddressUseEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
|
||||
package ca.uhn.fhir.model.dstu.valueset;
|
||||
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum AdministrativeGenderCodesEnum {
|
||||
|
||||
/**
|
||||
* Code Value: <b>F</b>
|
||||
*/
|
||||
F("F", "http://hl7.org/fhir/v3/AdministrativeGender"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>M</b>
|
||||
*/
|
||||
M("M", "http://hl7.org/fhir/v3/AdministrativeGender"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>UN</b>
|
||||
*/
|
||||
UN("UN", "http://hl7.org/fhir/v3/AdministrativeGender"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>UNK</b>
|
||||
*/
|
||||
UNK("UNK", "http://hl7.org/fhir/v3/NullFlavor"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* Identifier for this Value Set:
|
||||
* http://hl7.org/fhir/vs/administrative-gender
|
||||
*/
|
||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/administrative-gender";
|
||||
|
||||
/**
|
||||
* Name for this Value Set:
|
||||
* Administrative Gender Codes
|
||||
*/
|
||||
public static final String VALUESET_NAME = "Administrative Gender Codes";
|
||||
|
||||
private static Map<String, AdministrativeGenderCodesEnum> CODE_TO_ENUM = new HashMap<String, AdministrativeGenderCodesEnum>();
|
||||
private static Map<String, Map<String, AdministrativeGenderCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdministrativeGenderCodesEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (AdministrativeGenderCodesEnum next : AdministrativeGenderCodesEnum.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, AdministrativeGenderCodesEnum>());
|
||||
}
|
||||
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 AdministrativeGenderCodesEnum forCode(String theCode) {
|
||||
AdministrativeGenderCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts codes to their respective enumerated values
|
||||
*/
|
||||
public static final IValueSetEnumBinder<AdministrativeGenderCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdministrativeGenderCodesEnum>() {
|
||||
@Override
|
||||
public String toCodeString(AdministrativeGenderCodesEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(AdministrativeGenderCodesEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdministrativeGenderCodesEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdministrativeGenderCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, AdministrativeGenderCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
AdministrativeGenderCodesEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -12,14 +12,14 @@ public enum AggregationModeEnum {
|
|||
*
|
||||
* The reference is a local reference to a contained resource.
|
||||
*/
|
||||
CONTAINED("contained"),
|
||||
CONTAINED("contained", "http://hl7.org/fhir/resource-aggregation-mode"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>referenced</b>
|
||||
*
|
||||
* The reference to to a resource that has to be resolved externally to the resource that includes the reference.
|
||||
*/
|
||||
REFERENCED("referenced"),
|
||||
REFERENCED("referenced", "http://hl7.org/fhir/resource-aggregation-mode"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -36,11 +36,19 @@ public enum AggregationModeEnum {
|
|||
public static final String VALUESET_NAME = "AggregationMode";
|
||||
|
||||
private static Map<String, AggregationModeEnum> CODE_TO_ENUM = new HashMap<String, AggregationModeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, AggregationModeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AggregationModeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (AggregationModeEnum next : AggregationModeEnum.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, AggregationModeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +59,13 @@ public enum AggregationModeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -67,18 +82,34 @@ public enum AggregationModeEnum {
|
|||
public String toCodeString(AggregationModeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(AggregationModeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AggregationModeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AggregationModeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, AggregationModeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
AggregationModeEnum(String theCode) {
|
||||
AggregationModeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public enum AnimalSpeciesEnum {
|
|||
*
|
||||
* Canis lupus familiaris
|
||||
*/
|
||||
DOG("canislf"),
|
||||
DOG("canislf", "http://hl7.org/fhir/animal-species"),
|
||||
|
||||
/**
|
||||
* Display: <b>Sheep</b><br/>
|
||||
|
@ -21,7 +21,7 @@ public enum AnimalSpeciesEnum {
|
|||
*
|
||||
* Ovis aries
|
||||
*/
|
||||
SHEEP("ovisa"),
|
||||
SHEEP("ovisa", "http://hl7.org/fhir/animal-species"),
|
||||
|
||||
/**
|
||||
* Display: <b>Domestic Canary</b><br/>
|
||||
|
@ -29,7 +29,7 @@ public enum AnimalSpeciesEnum {
|
|||
*
|
||||
* Serinus canaria domestica
|
||||
*/
|
||||
DOMESTIC_CANARY("serinuscd"),
|
||||
DOMESTIC_CANARY("serinuscd", "http://hl7.org/fhir/animal-species"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -46,11 +46,19 @@ public enum AnimalSpeciesEnum {
|
|||
public static final String VALUESET_NAME = "AnimalSpecies";
|
||||
|
||||
private static Map<String, AnimalSpeciesEnum> CODE_TO_ENUM = new HashMap<String, AnimalSpeciesEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, AnimalSpeciesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AnimalSpeciesEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (AnimalSpeciesEnum next : AnimalSpeciesEnum.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, AnimalSpeciesEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +69,13 @@ public enum AnimalSpeciesEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -77,18 +92,34 @@ public enum AnimalSpeciesEnum {
|
|||
public String toCodeString(AnimalSpeciesEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(AnimalSpeciesEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimalSpeciesEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimalSpeciesEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, AnimalSpeciesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
AnimalSpeciesEnum(String theCode) {
|
||||
AnimalSpeciesEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum BindingConformanceEnum {
|
|||
*
|
||||
* Only codes in the specified set are allowed. If the binding is extensible, other codes may be used for concepts not covered by the bound set of codes.
|
||||
*/
|
||||
REQUIRED("required"),
|
||||
REQUIRED("required", "http://hl7.org/fhir/binding-conformance"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>preferred</b>
|
||||
*
|
||||
* For greater interoperability, implementers are strongly encouraged to use the bound set of codes, however alternate codes may be used in derived profiles and implementations if necessary without being considered non-conformant.
|
||||
*/
|
||||
PREFERRED("preferred"),
|
||||
PREFERRED("preferred", "http://hl7.org/fhir/binding-conformance"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>example</b>
|
||||
*
|
||||
* The codes in the set are an example to illustrate the meaning of the field. There is no particular preference for its use nor any assertion that the provided values are sufficient to meet implementation needs.
|
||||
*/
|
||||
EXAMPLE("example"),
|
||||
EXAMPLE("example", "http://hl7.org/fhir/binding-conformance"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum BindingConformanceEnum {
|
|||
public static final String VALUESET_NAME = "BindingConformance";
|
||||
|
||||
private static Map<String, BindingConformanceEnum> CODE_TO_ENUM = new HashMap<String, BindingConformanceEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, BindingConformanceEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, BindingConformanceEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (BindingConformanceEnum next : BindingConformanceEnum.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, BindingConformanceEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum BindingConformanceEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum BindingConformanceEnum {
|
|||
public String toCodeString(BindingConformanceEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(BindingConformanceEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BindingConformanceEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BindingConformanceEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, BindingConformanceEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
BindingConformanceEnum(String theCode) {
|
||||
BindingConformanceEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ public enum ConstraintSeverityEnum {
|
|||
*
|
||||
* If the constraint is violated, the resource is not conformant.
|
||||
*/
|
||||
ERROR("error"),
|
||||
ERROR("error", "http://hl7.org/fhir/constraint-severity"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>warning</b>
|
||||
*
|
||||
* If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.
|
||||
*/
|
||||
WARNING("warning"),
|
||||
WARNING("warning", "http://hl7.org/fhir/constraint-severity"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -36,11 +36,19 @@ public enum ConstraintSeverityEnum {
|
|||
public static final String VALUESET_NAME = "ConstraintSeverity";
|
||||
|
||||
private static Map<String, ConstraintSeverityEnum> CODE_TO_ENUM = new HashMap<String, ConstraintSeverityEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ConstraintSeverityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ConstraintSeverityEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ConstraintSeverityEnum next : ConstraintSeverityEnum.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, ConstraintSeverityEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +59,13 @@ public enum ConstraintSeverityEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -67,18 +82,34 @@ public enum ConstraintSeverityEnum {
|
|||
public String toCodeString(ConstraintSeverityEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ConstraintSeverityEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConstraintSeverityEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConstraintSeverityEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ConstraintSeverityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ConstraintSeverityEnum(String theCode) {
|
||||
ConstraintSeverityEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,28 +12,28 @@ public enum ContactSystemEnum {
|
|||
*
|
||||
* The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.
|
||||
*/
|
||||
PHONE("phone"),
|
||||
PHONE("phone", "http://hl7.org/fhir/contact-system"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>fax</b>
|
||||
*
|
||||
* The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.
|
||||
*/
|
||||
FAX("fax"),
|
||||
FAX("fax", "http://hl7.org/fhir/contact-system"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>email</b>
|
||||
*
|
||||
* The value is an email address.
|
||||
*/
|
||||
EMAIL("email"),
|
||||
EMAIL("email", "http://hl7.org/fhir/contact-system"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>url</b>
|
||||
*
|
||||
* The value is a url. This is intended for various personal contacts including blogs, Twitter, Facebook, etc. Do not use for email addresses.
|
||||
*/
|
||||
URL("url"),
|
||||
URL("url", "http://hl7.org/fhir/contact-system"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -50,11 +50,19 @@ public enum ContactSystemEnum {
|
|||
public static final String VALUESET_NAME = "ContactSystem";
|
||||
|
||||
private static Map<String, ContactSystemEnum> CODE_TO_ENUM = new HashMap<String, ContactSystemEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ContactSystemEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContactSystemEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ContactSystemEnum next : ContactSystemEnum.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, ContactSystemEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +73,13 @@ public enum ContactSystemEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -81,18 +96,34 @@ public enum ContactSystemEnum {
|
|||
public String toCodeString(ContactSystemEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ContactSystemEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactSystemEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactSystemEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ContactSystemEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ContactSystemEnum(String theCode) {
|
||||
ContactSystemEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,35 +12,35 @@ public enum ContactUseEnum {
|
|||
*
|
||||
* A communication contact at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available.
|
||||
*/
|
||||
HOME("home"),
|
||||
HOME("home", "http://hl7.org/fhir/contact-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>work</b>
|
||||
*
|
||||
* An office contact. First choice for business related contacts during business hours.
|
||||
*/
|
||||
WORK("work"),
|
||||
WORK("work", "http://hl7.org/fhir/contact-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>temp</b>
|
||||
*
|
||||
* A temporary contact. The period can provide more detailed information.
|
||||
*/
|
||||
TEMP("temp"),
|
||||
TEMP("temp", "http://hl7.org/fhir/contact-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>old</b>
|
||||
*
|
||||
* This contact is no longer in use (or was never correct, but retained for records).
|
||||
*/
|
||||
OLD("old"),
|
||||
OLD("old", "http://hl7.org/fhir/contact-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>mobile</b>
|
||||
*
|
||||
* A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business.
|
||||
*/
|
||||
MOBILE("mobile"),
|
||||
MOBILE("mobile", "http://hl7.org/fhir/contact-use"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -57,11 +57,19 @@ public enum ContactUseEnum {
|
|||
public static final String VALUESET_NAME = "ContactUse";
|
||||
|
||||
private static Map<String, ContactUseEnum> CODE_TO_ENUM = new HashMap<String, ContactUseEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ContactUseEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContactUseEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ContactUseEnum next : ContactUseEnum.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, ContactUseEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +80,13 @@ public enum ContactUseEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -88,18 +103,34 @@ public enum ContactUseEnum {
|
|||
public String toCodeString(ContactUseEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ContactUseEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactUseEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactUseEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ContactUseEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ContactUseEnum(String theCode) {
|
||||
ContactUseEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,238 +12,238 @@ public enum DataTypeEnum {
|
|||
*
|
||||
* There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.
|
||||
*/
|
||||
ADDRESS("Address"),
|
||||
ADDRESS("Address", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Age</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive.
|
||||
*/
|
||||
AGE("Age"),
|
||||
AGE("Age", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Attachment</b>
|
||||
*
|
||||
* For referring to data content defined in other formats.
|
||||
*/
|
||||
ATTACHMENT("Attachment"),
|
||||
ATTACHMENT("Attachment", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>CodeableConcept</b>
|
||||
*
|
||||
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
|
||||
*/
|
||||
CODEABLECONCEPT("CodeableConcept"),
|
||||
CODEABLECONCEPT("CodeableConcept", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Coding</b>
|
||||
*
|
||||
* A reference to a code defined by a terminology system.
|
||||
*/
|
||||
CODING("Coding"),
|
||||
CODING("Coding", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Contact</b>
|
||||
*
|
||||
* All kinds of technology mediated contact details for a person or organization, including telephone, email, etc.
|
||||
*/
|
||||
CONTACT("Contact"),
|
||||
CONTACT("Contact", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Count</b>
|
||||
*
|
||||
* There SHALL be a code with a value of "1" if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number.
|
||||
*/
|
||||
COUNT("Count"),
|
||||
COUNT("Count", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Distance</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM.
|
||||
*/
|
||||
DISTANCE("Distance"),
|
||||
DISTANCE("Distance", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Duration</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM.
|
||||
*/
|
||||
DURATION("Duration"),
|
||||
DURATION("Duration", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Extension</b>
|
||||
*
|
||||
* Optional Extensions Element - found in all resources.
|
||||
*/
|
||||
EXTENSION("Extension"),
|
||||
EXTENSION("Extension", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>HumanName</b>
|
||||
*
|
||||
* A human's name with the ability to identify parts and usage.
|
||||
*/
|
||||
HUMANNAME("HumanName"),
|
||||
HUMANNAME("HumanName", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Identifier</b>
|
||||
*
|
||||
* A technical identifier - identifies some entity uniquely and unambiguously.
|
||||
*/
|
||||
IDENTIFIER("Identifier"),
|
||||
IDENTIFIER("Identifier", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Money</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:std:iso:4217" - currency).
|
||||
*/
|
||||
MONEY("Money"),
|
||||
MONEY("Money", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Narrative</b>
|
||||
*
|
||||
* A human-readable formatted text, including images.
|
||||
*/
|
||||
NARRATIVE("Narrative"),
|
||||
NARRATIVE("Narrative", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Period</b>
|
||||
*
|
||||
* A time period defined by a start and end date and optionally time.
|
||||
*/
|
||||
PERIOD("Period"),
|
||||
PERIOD("Period", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Quantity</b>
|
||||
*
|
||||
* A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
|
||||
*/
|
||||
QUANTITY("Quantity"),
|
||||
QUANTITY("Quantity", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Range</b>
|
||||
*
|
||||
* A set of ordered Quantities defined by a low and high limit.
|
||||
*/
|
||||
RANGE("Range"),
|
||||
RANGE("Range", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Ratio</b>
|
||||
*
|
||||
* A relationship of two Quantity values - expressed as a numerator and a denominator.
|
||||
*/
|
||||
RATIO("Ratio"),
|
||||
RATIO("Ratio", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ResourceReference</b>
|
||||
*
|
||||
* A reference from one resource to another.
|
||||
*/
|
||||
RESOURCEREFERENCE("ResourceReference"),
|
||||
RESOURCEREFERENCE("ResourceReference", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>SampledData</b>
|
||||
*
|
||||
* A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
|
||||
*/
|
||||
SAMPLEDDATA("SampledData"),
|
||||
SAMPLEDDATA("SampledData", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Schedule</b>
|
||||
*
|
||||
* Specifies an event that may occur multiple times. Schedules are used for to reord when things are expected or requested to occur.
|
||||
*/
|
||||
SCHEDULE("Schedule"),
|
||||
SCHEDULE("Schedule", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>base64Binary</b>
|
||||
*
|
||||
* A stream of bytes
|
||||
*/
|
||||
BASE64BINARY("base64Binary"),
|
||||
BASE64BINARY("base64Binary", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>boolean</b>
|
||||
*
|
||||
* Value of "true" or "false"
|
||||
*/
|
||||
BOOLEAN("boolean"),
|
||||
BOOLEAN("boolean", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>code</b>
|
||||
*
|
||||
* A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents
|
||||
*/
|
||||
CODE("code"),
|
||||
CODE("code", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>date</b>
|
||||
*
|
||||
* A date, or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates.
|
||||
*/
|
||||
DATE("date"),
|
||||
DATE("date", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>dateTime</b>
|
||||
*
|
||||
* A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds may be provided but may also be ignored. Dates SHALL be valid dates.
|
||||
*/
|
||||
DATETIME("dateTime"),
|
||||
DATETIME("dateTime", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>decimal</b>
|
||||
*
|
||||
* A rational number with implicit precision
|
||||
*/
|
||||
DECIMAL("decimal"),
|
||||
DECIMAL("decimal", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>id</b>
|
||||
*
|
||||
* A whole number in the range 0 to 2^64-1, optionally represented in hex, a uuid, an oid or any other combination of lower-case letters a-z, numerals, "-" and ".", with a length limit of 36 characters
|
||||
*/
|
||||
ID("id"),
|
||||
ID("id", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>instant</b>
|
||||
*
|
||||
* An instant in time - known at least to the second
|
||||
*/
|
||||
INSTANT("instant"),
|
||||
INSTANT("instant", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>integer</b>
|
||||
*
|
||||
* A whole number
|
||||
*/
|
||||
INTEGER("integer"),
|
||||
INTEGER("integer", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>oid</b>
|
||||
*
|
||||
* An oid represented as a URI
|
||||
*/
|
||||
OID("oid"),
|
||||
OID("oid", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>string</b>
|
||||
*
|
||||
* A sequence of Unicode characters
|
||||
*/
|
||||
STRING("string"),
|
||||
STRING("string", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>uri</b>
|
||||
*
|
||||
* String of characters used to identify a name or a resource
|
||||
*/
|
||||
URI("uri"),
|
||||
URI("uri", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>uuid</b>
|
||||
*
|
||||
* A UUID, represented as a URI
|
||||
*/
|
||||
UUID("uuid"),
|
||||
UUID("uuid", "http://hl7.org/fhir/data-types"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -260,11 +260,19 @@ public enum DataTypeEnum {
|
|||
public static final String VALUESET_NAME = "DataType";
|
||||
|
||||
private static Map<String, DataTypeEnum> CODE_TO_ENUM = new HashMap<String, DataTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, DataTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DataTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (DataTypeEnum next : DataTypeEnum.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, DataTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,6 +283,13 @@ public enum DataTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -291,18 +306,34 @@ public enum DataTypeEnum {
|
|||
public String toCodeString(DataTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(DataTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, DataTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
DataTypeEnum(String theCode) {
|
||||
DataTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,56 @@ import java.util.Map;
|
|||
|
||||
public enum EventTimingEnum {
|
||||
|
||||
/**
|
||||
* Code Value: <b>HS</b>
|
||||
*/
|
||||
HS("HS", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>WAKE</b>
|
||||
*/
|
||||
WAKE("WAKE", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>AC</b>
|
||||
*/
|
||||
AC("AC", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ACM</b>
|
||||
*/
|
||||
ACM("ACM", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ACD</b>
|
||||
*/
|
||||
ACD("ACD", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ACV</b>
|
||||
*/
|
||||
ACV("ACV", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>PC</b>
|
||||
*/
|
||||
PC("PC", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>PCM</b>
|
||||
*/
|
||||
PCM("PCM", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>PCD</b>
|
||||
*/
|
||||
PCD("PCD", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>PCV</b>
|
||||
*/
|
||||
PCV("PCV", "http://hl7.org/fhir/v3/TimingEvent"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -22,11 +72,19 @@ public enum EventTimingEnum {
|
|||
public static final String VALUESET_NAME = "EventTiming";
|
||||
|
||||
private static Map<String, EventTimingEnum> CODE_TO_ENUM = new HashMap<String, EventTimingEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, EventTimingEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EventTimingEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (EventTimingEnum next : EventTimingEnum.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, EventTimingEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +95,13 @@ public enum EventTimingEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -53,18 +118,34 @@ public enum EventTimingEnum {
|
|||
public String toCodeString(EventTimingEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(EventTimingEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventTimingEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventTimingEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, EventTimingEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
EventTimingEnum(String theCode) {
|
||||
EventTimingEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,28 +12,28 @@ public enum ExtensionContextEnum {
|
|||
*
|
||||
* The context is all elements matching a particular resource element path.
|
||||
*/
|
||||
RESOURCE("resource"),
|
||||
RESOURCE("resource", "http://hl7.org/fhir/extension-context"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>datatype</b>
|
||||
*
|
||||
* The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name).
|
||||
*/
|
||||
DATATYPE("datatype"),
|
||||
DATATYPE("datatype", "http://hl7.org/fhir/extension-context"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>mapping</b>
|
||||
*
|
||||
* The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used.
|
||||
*/
|
||||
MAPPING("mapping"),
|
||||
MAPPING("mapping", "http://hl7.org/fhir/extension-context"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>extension</b>
|
||||
*
|
||||
* The context is a particular extension from a particular profile. Expressed as uri#name, where uri identifies the profile and #name identifies the extension code.
|
||||
*/
|
||||
EXTENSION("extension"),
|
||||
EXTENSION("extension", "http://hl7.org/fhir/extension-context"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -50,11 +50,19 @@ public enum ExtensionContextEnum {
|
|||
public static final String VALUESET_NAME = "ExtensionContext";
|
||||
|
||||
private static Map<String, ExtensionContextEnum> CODE_TO_ENUM = new HashMap<String, ExtensionContextEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ExtensionContextEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ExtensionContextEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ExtensionContextEnum next : ExtensionContextEnum.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, ExtensionContextEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +73,13 @@ public enum ExtensionContextEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -81,18 +96,34 @@ public enum ExtensionContextEnum {
|
|||
public String toCodeString(ExtensionContextEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ExtensionContextEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtensionContextEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtensionContextEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ExtensionContextEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ExtensionContextEnum(String theCode) {
|
||||
ExtensionContextEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,574 +12,574 @@ public enum FHIRDefinedTypeEnum {
|
|||
*
|
||||
* There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.
|
||||
*/
|
||||
ADDRESS("Address"),
|
||||
ADDRESS("Address", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Age</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive.
|
||||
*/
|
||||
AGE("Age"),
|
||||
AGE("Age", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Attachment</b>
|
||||
*
|
||||
* For referring to data content defined in other formats.
|
||||
*/
|
||||
ATTACHMENT("Attachment"),
|
||||
ATTACHMENT("Attachment", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>CodeableConcept</b>
|
||||
*
|
||||
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
|
||||
*/
|
||||
CODEABLECONCEPT("CodeableConcept"),
|
||||
CODEABLECONCEPT("CodeableConcept", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Coding</b>
|
||||
*
|
||||
* A reference to a code defined by a terminology system.
|
||||
*/
|
||||
CODING("Coding"),
|
||||
CODING("Coding", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Contact</b>
|
||||
*
|
||||
* All kinds of technology mediated contact details for a person or organization, including telephone, email, etc.
|
||||
*/
|
||||
CONTACT("Contact"),
|
||||
CONTACT("Contact", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Count</b>
|
||||
*
|
||||
* There SHALL be a code with a value of "1" if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number.
|
||||
*/
|
||||
COUNT("Count"),
|
||||
COUNT("Count", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Distance</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM.
|
||||
*/
|
||||
DISTANCE("Distance"),
|
||||
DISTANCE("Distance", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Duration</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM.
|
||||
*/
|
||||
DURATION("Duration"),
|
||||
DURATION("Duration", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Extension</b>
|
||||
*
|
||||
* Optional Extensions Element - found in all resources.
|
||||
*/
|
||||
EXTENSION("Extension"),
|
||||
EXTENSION("Extension", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>HumanName</b>
|
||||
*
|
||||
* A human's name with the ability to identify parts and usage.
|
||||
*/
|
||||
HUMANNAME("HumanName"),
|
||||
HUMANNAME("HumanName", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Identifier</b>
|
||||
*
|
||||
* A technical identifier - identifies some entity uniquely and unambiguously.
|
||||
*/
|
||||
IDENTIFIER("Identifier"),
|
||||
IDENTIFIER("Identifier", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Money</b>
|
||||
*
|
||||
* There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:std:iso:4217" - currency).
|
||||
*/
|
||||
MONEY("Money"),
|
||||
MONEY("Money", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Narrative</b>
|
||||
*
|
||||
* A human-readable formatted text, including images.
|
||||
*/
|
||||
NARRATIVE("Narrative"),
|
||||
NARRATIVE("Narrative", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Period</b>
|
||||
*
|
||||
* A time period defined by a start and end date and optionally time.
|
||||
*/
|
||||
PERIOD("Period"),
|
||||
PERIOD("Period", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Quantity</b>
|
||||
*
|
||||
* A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
|
||||
*/
|
||||
QUANTITY("Quantity"),
|
||||
QUANTITY("Quantity", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Range</b>
|
||||
*
|
||||
* A set of ordered Quantities defined by a low and high limit.
|
||||
*/
|
||||
RANGE("Range"),
|
||||
RANGE("Range", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Ratio</b>
|
||||
*
|
||||
* A relationship of two Quantity values - expressed as a numerator and a denominator.
|
||||
*/
|
||||
RATIO("Ratio"),
|
||||
RATIO("Ratio", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ResourceReference</b>
|
||||
*
|
||||
* A reference from one resource to another.
|
||||
*/
|
||||
RESOURCEREFERENCE("ResourceReference"),
|
||||
RESOURCEREFERENCE("ResourceReference", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>SampledData</b>
|
||||
*
|
||||
* A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
|
||||
*/
|
||||
SAMPLEDDATA("SampledData"),
|
||||
SAMPLEDDATA("SampledData", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Schedule</b>
|
||||
*
|
||||
* Specifies an event that may occur multiple times. Schedules are used for to reord when things are expected or requested to occur.
|
||||
*/
|
||||
SCHEDULE("Schedule"),
|
||||
SCHEDULE("Schedule", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>base64Binary</b>
|
||||
*
|
||||
* A stream of bytes
|
||||
*/
|
||||
BASE64BINARY("base64Binary"),
|
||||
BASE64BINARY("base64Binary", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>boolean</b>
|
||||
*
|
||||
* Value of "true" or "false"
|
||||
*/
|
||||
BOOLEAN("boolean"),
|
||||
BOOLEAN("boolean", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>code</b>
|
||||
*
|
||||
* A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents
|
||||
*/
|
||||
CODE("code"),
|
||||
CODE("code", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>date</b>
|
||||
*
|
||||
* A date, or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates.
|
||||
*/
|
||||
DATE("date"),
|
||||
DATE("date", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>dateTime</b>
|
||||
*
|
||||
* A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds may be provided but may also be ignored. Dates SHALL be valid dates.
|
||||
*/
|
||||
DATETIME("dateTime"),
|
||||
DATETIME("dateTime", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>decimal</b>
|
||||
*
|
||||
* A rational number with implicit precision
|
||||
*/
|
||||
DECIMAL("decimal"),
|
||||
DECIMAL("decimal", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>id</b>
|
||||
*
|
||||
* A whole number in the range 0 to 2^64-1, optionally represented in hex, a uuid, an oid or any other combination of lower-case letters a-z, numerals, "-" and ".", with a length limit of 36 characters
|
||||
*/
|
||||
ID("id"),
|
||||
ID("id", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>instant</b>
|
||||
*
|
||||
* An instant in time - known at least to the second
|
||||
*/
|
||||
INSTANT("instant"),
|
||||
INSTANT("instant", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>integer</b>
|
||||
*
|
||||
* A whole number
|
||||
*/
|
||||
INTEGER("integer"),
|
||||
INTEGER("integer", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>oid</b>
|
||||
*
|
||||
* An oid represented as a URI
|
||||
*/
|
||||
OID("oid"),
|
||||
OID("oid", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>string</b>
|
||||
*
|
||||
* A sequence of Unicode characters
|
||||
*/
|
||||
STRING("string"),
|
||||
STRING("string", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>uri</b>
|
||||
*
|
||||
* String of characters used to identify a name or a resource
|
||||
*/
|
||||
URI("uri"),
|
||||
URI("uri", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>uuid</b>
|
||||
*
|
||||
* A UUID, represented as a URI
|
||||
*/
|
||||
UUID("uuid"),
|
||||
UUID("uuid", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>AdverseReaction</b>
|
||||
*
|
||||
* Records an unexpected reaction suspected to be related to the exposure of the reaction subject to a substance.
|
||||
*/
|
||||
ADVERSEREACTION("AdverseReaction"),
|
||||
ADVERSEREACTION("AdverseReaction", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Alert</b>
|
||||
*
|
||||
* Prospective warnings of potential issues when providing care to the patient.
|
||||
*/
|
||||
ALERT("Alert"),
|
||||
ALERT("Alert", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>AllergyIntolerance</b>
|
||||
*
|
||||
* Indicates the patient has a susceptibility to an adverse reaction upon exposure to a specified substance.
|
||||
*/
|
||||
ALLERGYINTOLERANCE("AllergyIntolerance"),
|
||||
ALLERGYINTOLERANCE("AllergyIntolerance", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>CarePlan</b>
|
||||
*
|
||||
* Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.
|
||||
*/
|
||||
CAREPLAN("CarePlan"),
|
||||
CAREPLAN("CarePlan", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Composition</b>
|
||||
*
|
||||
* A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement.
|
||||
*/
|
||||
COMPOSITION("Composition"),
|
||||
COMPOSITION("Composition", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ConceptMap</b>
|
||||
*
|
||||
* A statement of relationships from one set of concepts to one or more other concept systems.
|
||||
*/
|
||||
CONCEPTMAP("ConceptMap"),
|
||||
CONCEPTMAP("ConceptMap", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Condition</b>
|
||||
*
|
||||
* Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a Diagnosis during an Encounter; populating a problem List or a Summary Statement, such as a Discharge Summary.
|
||||
*/
|
||||
CONDITION("Condition"),
|
||||
CONDITION("Condition", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Conformance</b>
|
||||
*
|
||||
* A conformance statement is a set of requirements for a desired implementation or a description of how a target application fulfills those requirements in a particular implementation.
|
||||
*/
|
||||
CONFORMANCE("Conformance"),
|
||||
CONFORMANCE("Conformance", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Device</b>
|
||||
*
|
||||
* This resource identifies an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.
|
||||
*/
|
||||
DEVICE("Device"),
|
||||
DEVICE("Device", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DeviceObservationReport</b>
|
||||
*
|
||||
* Describes the data produced by a device at a point in time.
|
||||
*/
|
||||
DEVICEOBSERVATIONREPORT("DeviceObservationReport"),
|
||||
DEVICEOBSERVATIONREPORT("DeviceObservationReport", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DiagnosticOrder</b>
|
||||
*
|
||||
* A request for a diagnostic investigation service to be performed.
|
||||
*/
|
||||
DIAGNOSTICORDER("DiagnosticOrder"),
|
||||
DIAGNOSTICORDER("DiagnosticOrder", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DiagnosticReport</b>
|
||||
*
|
||||
* The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports.
|
||||
*/
|
||||
DIAGNOSTICREPORT("DiagnosticReport"),
|
||||
DIAGNOSTICREPORT("DiagnosticReport", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DocumentManifest</b>
|
||||
*
|
||||
* A manifest that defines a set of documents.
|
||||
*/
|
||||
DOCUMENTMANIFEST("DocumentManifest"),
|
||||
DOCUMENTMANIFEST("DocumentManifest", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DocumentReference</b>
|
||||
*
|
||||
* A reference to a document.
|
||||
*/
|
||||
DOCUMENTREFERENCE("DocumentReference"),
|
||||
DOCUMENTREFERENCE("DocumentReference", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Encounter</b>
|
||||
*
|
||||
* An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
|
||||
*/
|
||||
ENCOUNTER("Encounter"),
|
||||
ENCOUNTER("Encounter", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>FamilyHistory</b>
|
||||
*
|
||||
* Significant health events and conditions for people related to the subject relevant in the context of care for the subject.
|
||||
*/
|
||||
FAMILYHISTORY("FamilyHistory"),
|
||||
FAMILYHISTORY("FamilyHistory", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Group</b>
|
||||
*
|
||||
* Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized. I.e. A collection of entities that isn't an Organization.
|
||||
*/
|
||||
GROUP("Group"),
|
||||
GROUP("Group", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ImagingStudy</b>
|
||||
*
|
||||
* Manifest of a set of images produced in study. The set of images may include every image in the study, or it may be an incomplete sample, such as a list of key images.
|
||||
*/
|
||||
IMAGINGSTUDY("ImagingStudy"),
|
||||
IMAGINGSTUDY("ImagingStudy", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Immunization</b>
|
||||
*
|
||||
* Immunization event information.
|
||||
*/
|
||||
IMMUNIZATION("Immunization"),
|
||||
IMMUNIZATION("Immunization", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ImmunizationRecommendation</b>
|
||||
*
|
||||
* A patient's point-of-time immunization status and recommendation with optional supporting justification.
|
||||
*/
|
||||
IMMUNIZATIONRECOMMENDATION("ImmunizationRecommendation"),
|
||||
IMMUNIZATIONRECOMMENDATION("ImmunizationRecommendation", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>List</b>
|
||||
*
|
||||
* A set of information summarized from a list of other resources.
|
||||
*/
|
||||
LIST("List"),
|
||||
LIST("List", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Location</b>
|
||||
*
|
||||
* Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated.
|
||||
*/
|
||||
LOCATION("Location"),
|
||||
LOCATION("Location", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Media</b>
|
||||
*
|
||||
* A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
|
||||
*/
|
||||
MEDIA("Media"),
|
||||
MEDIA("Media", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Medication</b>
|
||||
*
|
||||
* Primarily used for identification and definition of Medication, but also covers ingredients and packaging.
|
||||
*/
|
||||
MEDICATION("Medication"),
|
||||
MEDICATION("Medication", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationAdministration</b>
|
||||
*
|
||||
* Describes the event of a patient being given a dose of a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
|
||||
*/
|
||||
MEDICATIONADMINISTRATION("MedicationAdministration"),
|
||||
MEDICATIONADMINISTRATION("MedicationAdministration", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationDispense</b>
|
||||
*
|
||||
* Dispensing a medication to a named patient. This includes a description of the supply provided and the instructions for administering the medication.
|
||||
*/
|
||||
MEDICATIONDISPENSE("MedicationDispense"),
|
||||
MEDICATIONDISPENSE("MedicationDispense", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationPrescription</b>
|
||||
*
|
||||
* An order for both supply of the medication and the instructions for administration of the medicine to a patient.
|
||||
*/
|
||||
MEDICATIONPRESCRIPTION("MedicationPrescription"),
|
||||
MEDICATIONPRESCRIPTION("MedicationPrescription", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationStatement</b>
|
||||
*
|
||||
* A record of medication being taken by a patient, or that the medication has been given to a patient where the record is the result of a report from the patient or another clinician.
|
||||
*/
|
||||
MEDICATIONSTATEMENT("MedicationStatement"),
|
||||
MEDICATIONSTATEMENT("MedicationStatement", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MessageHeader</b>
|
||||
*
|
||||
* The header for a message exchange that is either requesting or responding to an action. The resource(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
|
||||
*/
|
||||
MESSAGEHEADER("MessageHeader"),
|
||||
MESSAGEHEADER("MessageHeader", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Observation</b>
|
||||
*
|
||||
* Measurements and simple assertions made about a patient, device or other subject.
|
||||
*/
|
||||
OBSERVATION("Observation"),
|
||||
OBSERVATION("Observation", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>OperationOutcome</b>
|
||||
*
|
||||
* A collection of error, warning or information messages that result from a system action.
|
||||
*/
|
||||
OPERATIONOUTCOME("OperationOutcome"),
|
||||
OPERATIONOUTCOME("OperationOutcome", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Order</b>
|
||||
*
|
||||
* A request to perform an action.
|
||||
*/
|
||||
ORDER("Order"),
|
||||
ORDER("Order", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>OrderResponse</b>
|
||||
*
|
||||
* A response to an order.
|
||||
*/
|
||||
ORDERRESPONSE("OrderResponse"),
|
||||
ORDERRESPONSE("OrderResponse", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Organization</b>
|
||||
*
|
||||
* A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.
|
||||
*/
|
||||
ORGANIZATION("Organization"),
|
||||
ORGANIZATION("Organization", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Other</b>
|
||||
*
|
||||
* Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest.
|
||||
*/
|
||||
OTHER("Other"),
|
||||
OTHER("Other", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Patient</b>
|
||||
*
|
||||
* Demographics and other administrative information about a person or animal receiving care or other health-related services.
|
||||
*/
|
||||
PATIENT("Patient"),
|
||||
PATIENT("Patient", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Practitioner</b>
|
||||
*
|
||||
* A person who is directly or indirectly involved in the provisioning of healthcare.
|
||||
*/
|
||||
PRACTITIONER("Practitioner"),
|
||||
PRACTITIONER("Practitioner", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Procedure</b>
|
||||
*
|
||||
* An action that is performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy.
|
||||
*/
|
||||
PROCEDURE("Procedure"),
|
||||
PROCEDURE("Procedure", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Profile</b>
|
||||
*
|
||||
* A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.
|
||||
*/
|
||||
PROFILE("Profile"),
|
||||
PROFILE("Profile", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Provenance</b>
|
||||
*
|
||||
* Provenance information that describes the activity that led to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.
|
||||
*/
|
||||
PROVENANCE("Provenance"),
|
||||
PROVENANCE("Provenance", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Query</b>
|
||||
*
|
||||
* A description of a query with a set of parameters.
|
||||
*/
|
||||
QUERY("Query"),
|
||||
QUERY("Query", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Questionnaire</b>
|
||||
*
|
||||
* A structured set of questions and their answers. The Questionnaire may contain questions, answers or both. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
|
||||
*/
|
||||
QUESTIONNAIRE("Questionnaire"),
|
||||
QUESTIONNAIRE("Questionnaire", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>RelatedPerson</b>
|
||||
*
|
||||
* Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
|
||||
*/
|
||||
RELATEDPERSON("RelatedPerson"),
|
||||
RELATEDPERSON("RelatedPerson", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>SecurityEvent</b>
|
||||
*
|
||||
* A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
|
||||
*/
|
||||
SECURITYEVENT("SecurityEvent"),
|
||||
SECURITYEVENT("SecurityEvent", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Specimen</b>
|
||||
*
|
||||
* Sample for analysis.
|
||||
*/
|
||||
SPECIMEN("Specimen"),
|
||||
SPECIMEN("Specimen", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Substance</b>
|
||||
*
|
||||
* A homogeneous material with a definite composition.
|
||||
*/
|
||||
SUBSTANCE("Substance"),
|
||||
SUBSTANCE("Substance", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Supply</b>
|
||||
*
|
||||
* A supply - a request for something, and provision of what is supplied.
|
||||
*/
|
||||
SUPPLY("Supply"),
|
||||
SUPPLY("Supply", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ValueSet</b>
|
||||
*
|
||||
* A value set specifies a set of codes drawn from one or more code systems.
|
||||
*/
|
||||
VALUESET("ValueSet"),
|
||||
VALUESET("ValueSet", "http://hl7.org/fhir/defined-types"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -596,11 +596,19 @@ public enum FHIRDefinedTypeEnum {
|
|||
public static final String VALUESET_NAME = "FHIRDefinedType";
|
||||
|
||||
private static Map<String, FHIRDefinedTypeEnum> CODE_TO_ENUM = new HashMap<String, FHIRDefinedTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, FHIRDefinedTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, FHIRDefinedTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (FHIRDefinedTypeEnum next : FHIRDefinedTypeEnum.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, FHIRDefinedTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -611,6 +619,13 @@ public enum FHIRDefinedTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -627,18 +642,34 @@ public enum FHIRDefinedTypeEnum {
|
|||
public String toCodeString(FHIRDefinedTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(FHIRDefinedTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FHIRDefinedTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FHIRDefinedTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, FHIRDefinedTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
FHIRDefinedTypeEnum(String theCode) {
|
||||
FHIRDefinedTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,42 +12,42 @@ public enum FilterOperatorEnum {
|
|||
*
|
||||
* The property value has the concept specified by the value.
|
||||
*/
|
||||
EQUALS("="),
|
||||
EQUALS("=", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>is-a</b>
|
||||
*
|
||||
* The property value has a concept that has an is-a relationship with the value.
|
||||
*/
|
||||
IS_A("is-a"),
|
||||
IS_A("is-a", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>is-not-a</b>
|
||||
*
|
||||
* The property value has a concept that does not have an is-a relationship with the value.
|
||||
*/
|
||||
IS_NOT_A("is-not-a"),
|
||||
IS_NOT_A("is-not-a", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>regex</b>
|
||||
*
|
||||
* The property value representation matches the regex specified in the value.
|
||||
*/
|
||||
REGEX("regex"),
|
||||
REGEX("regex", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>in</b>
|
||||
*
|
||||
* The property value is in the set of codes or concepts identified by the value.
|
||||
*/
|
||||
IN("in"),
|
||||
IN("in", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>not in</b>
|
||||
*
|
||||
* The property value is not in the set of codes or concepts identified by the value.
|
||||
*/
|
||||
NOT_IN("not in"),
|
||||
NOT_IN("not in", "http://hl7.org/fhir/filter-operator"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -64,11 +64,19 @@ public enum FilterOperatorEnum {
|
|||
public static final String VALUESET_NAME = "FilterOperator";
|
||||
|
||||
private static Map<String, FilterOperatorEnum> CODE_TO_ENUM = new HashMap<String, FilterOperatorEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, FilterOperatorEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, FilterOperatorEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (FilterOperatorEnum next : FilterOperatorEnum.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, FilterOperatorEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +87,13 @@ public enum FilterOperatorEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -95,18 +110,34 @@ public enum FilterOperatorEnum {
|
|||
public String toCodeString(FilterOperatorEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(FilterOperatorEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterOperatorEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterOperatorEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, FilterOperatorEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
FilterOperatorEnum(String theCode) {
|
||||
FilterOperatorEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,42 +12,42 @@ public enum GroupTypeEnum {
|
|||
*
|
||||
* Group contains "person" Patient resources.
|
||||
*/
|
||||
PERSON("person"),
|
||||
PERSON("person", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>animal</b>
|
||||
*
|
||||
* Group contains "animal" Patient resources.
|
||||
*/
|
||||
ANIMAL("animal"),
|
||||
ANIMAL("animal", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>practitioner</b>
|
||||
*
|
||||
* Group contains healthcare practitioner resources.
|
||||
*/
|
||||
PRACTITIONER("practitioner"),
|
||||
PRACTITIONER("practitioner", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>device</b>
|
||||
*
|
||||
* Group contains Device resources.
|
||||
*/
|
||||
DEVICE("device"),
|
||||
DEVICE("device", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>medication</b>
|
||||
*
|
||||
* Group contains Medication resources.
|
||||
*/
|
||||
MEDICATION("medication"),
|
||||
MEDICATION("medication", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>substance</b>
|
||||
*
|
||||
* Group contains Substance resources.
|
||||
*/
|
||||
SUBSTANCE("substance"),
|
||||
SUBSTANCE("substance", "http://hl7.org/fhir/group-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -64,11 +64,19 @@ public enum GroupTypeEnum {
|
|||
public static final String VALUESET_NAME = "GroupType";
|
||||
|
||||
private static Map<String, GroupTypeEnum> CODE_TO_ENUM = new HashMap<String, GroupTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, GroupTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, GroupTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (GroupTypeEnum next : GroupTypeEnum.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, GroupTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +87,13 @@ public enum GroupTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -95,18 +110,34 @@ public enum GroupTypeEnum {
|
|||
public String toCodeString(GroupTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(GroupTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GroupTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GroupTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, GroupTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
GroupTypeEnum(String theCode) {
|
||||
GroupTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public enum HierarchicalRelationshipTypeEnum {
|
|||
*
|
||||
* The target resource is the parent of the focal specimen resource.
|
||||
*/
|
||||
PARENT("parent"),
|
||||
PARENT("parent", "http://hl7.org/fhir/hierarchical-relationship-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Child</b><br/>
|
||||
|
@ -21,7 +21,7 @@ public enum HierarchicalRelationshipTypeEnum {
|
|||
*
|
||||
* The target resource is the child of the focal specimen resource.
|
||||
*/
|
||||
CHILD("child"),
|
||||
CHILD("child", "http://hl7.org/fhir/hierarchical-relationship-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -38,11 +38,19 @@ public enum HierarchicalRelationshipTypeEnum {
|
|||
public static final String VALUESET_NAME = "HierarchicalRelationshipType";
|
||||
|
||||
private static Map<String, HierarchicalRelationshipTypeEnum> CODE_TO_ENUM = new HashMap<String, HierarchicalRelationshipTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, HierarchicalRelationshipTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, HierarchicalRelationshipTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (HierarchicalRelationshipTypeEnum next : HierarchicalRelationshipTypeEnum.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, HierarchicalRelationshipTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,6 +61,13 @@ public enum HierarchicalRelationshipTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -69,18 +84,34 @@ public enum HierarchicalRelationshipTypeEnum {
|
|||
public String toCodeString(HierarchicalRelationshipTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(HierarchicalRelationshipTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HierarchicalRelationshipTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HierarchicalRelationshipTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, HierarchicalRelationshipTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
HierarchicalRelationshipTypeEnum(String theCode) {
|
||||
HierarchicalRelationshipTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,28 +12,28 @@ public enum IdentifierUseEnum {
|
|||
*
|
||||
* the identifier recommended for display and use in real-world interactions.
|
||||
*/
|
||||
USUAL("usual"),
|
||||
USUAL("usual", "http://hl7.org/fhir/identifier-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>official</b>
|
||||
*
|
||||
* the identifier considered to be most trusted for the identification of this item.
|
||||
*/
|
||||
OFFICIAL("official"),
|
||||
OFFICIAL("official", "http://hl7.org/fhir/identifier-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>temp</b>
|
||||
*
|
||||
* A temporary identifier.
|
||||
*/
|
||||
TEMP("temp"),
|
||||
TEMP("temp", "http://hl7.org/fhir/identifier-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>secondary</b>
|
||||
*
|
||||
* An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context.
|
||||
*/
|
||||
SECONDARY("secondary"),
|
||||
SECONDARY("secondary", "http://hl7.org/fhir/identifier-use"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -50,11 +50,19 @@ public enum IdentifierUseEnum {
|
|||
public static final String VALUESET_NAME = "IdentifierUse";
|
||||
|
||||
private static Map<String, IdentifierUseEnum> CODE_TO_ENUM = new HashMap<String, IdentifierUseEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, IdentifierUseEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, IdentifierUseEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (IdentifierUseEnum next : IdentifierUseEnum.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, IdentifierUseEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +73,13 @@ public enum IdentifierUseEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -81,18 +96,34 @@ public enum IdentifierUseEnum {
|
|||
public String toCodeString(IdentifierUseEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(IdentifierUseEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdentifierUseEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdentifierUseEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, IdentifierUseEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
IdentifierUseEnum(String theCode) {
|
||||
IdentifierUseEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum LinkTypeEnum {
|
|||
*
|
||||
* The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains the link.
|
||||
*/
|
||||
REPLACE("replace"),
|
||||
REPLACE("replace", "http://hl7.org/fhir/link-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>refer</b>
|
||||
*
|
||||
* The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information.
|
||||
*/
|
||||
REFER("refer"),
|
||||
REFER("refer", "http://hl7.org/fhir/link-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>seealso</b>
|
||||
*
|
||||
* The patient resource containing this link is in use and valid, but points to another patient resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other patient resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid.
|
||||
*/
|
||||
SEEALSO("seealso"),
|
||||
SEEALSO("seealso", "http://hl7.org/fhir/link-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum LinkTypeEnum {
|
|||
public static final String VALUESET_NAME = "LinkType";
|
||||
|
||||
private static Map<String, LinkTypeEnum> CODE_TO_ENUM = new HashMap<String, LinkTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, LinkTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, LinkTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (LinkTypeEnum next : LinkTypeEnum.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, LinkTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum LinkTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum LinkTypeEnum {
|
|||
public String toCodeString(LinkTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(LinkTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, LinkTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
LinkTypeEnum(String theCode) {
|
||||
LinkTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ public enum LocationModeEnum {
|
|||
*
|
||||
* The Location resource represents a specific instance of a Location.
|
||||
*/
|
||||
INSTANCE("instance"),
|
||||
INSTANCE("instance", "http://hl7.org/fhir/location-mode"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>kind</b>
|
||||
*
|
||||
* The Location represents a class of Locations.
|
||||
*/
|
||||
KIND("kind"),
|
||||
KIND("kind", "http://hl7.org/fhir/location-mode"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -36,11 +36,19 @@ public enum LocationModeEnum {
|
|||
public static final String VALUESET_NAME = "LocationMode";
|
||||
|
||||
private static Map<String, LocationModeEnum> CODE_TO_ENUM = new HashMap<String, LocationModeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, LocationModeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, LocationModeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (LocationModeEnum next : LocationModeEnum.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, LocationModeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +59,13 @@ public enum LocationModeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -67,18 +82,34 @@ public enum LocationModeEnum {
|
|||
public String toCodeString(LocationModeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(LocationModeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationModeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationModeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, LocationModeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
LocationModeEnum(String theCode) {
|
||||
LocationModeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum LocationStatusEnum {
|
|||
*
|
||||
* The location is operational.
|
||||
*/
|
||||
ACTIVE("active"),
|
||||
ACTIVE("active", "http://hl7.org/fhir/location-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>suspended</b>
|
||||
*
|
||||
* The location is temporarily closed.
|
||||
*/
|
||||
SUSPENDED("suspended"),
|
||||
SUSPENDED("suspended", "http://hl7.org/fhir/location-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>inactive</b>
|
||||
*
|
||||
* The location is no longer used.
|
||||
*/
|
||||
INACTIVE("inactive"),
|
||||
INACTIVE("inactive", "http://hl7.org/fhir/location-status"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum LocationStatusEnum {
|
|||
public static final String VALUESET_NAME = "LocationStatus";
|
||||
|
||||
private static Map<String, LocationStatusEnum> CODE_TO_ENUM = new HashMap<String, LocationStatusEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, LocationStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, LocationStatusEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (LocationStatusEnum next : LocationStatusEnum.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, LocationStatusEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum LocationStatusEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum LocationStatusEnum {
|
|||
public String toCodeString(LocationStatusEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(LocationStatusEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationStatusEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, LocationStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
LocationStatusEnum(String theCode) {
|
||||
LocationStatusEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,49 +11,49 @@ public enum LocationTypeEnum {
|
|||
* Display: <b>Building</b><br/>
|
||||
* Code Value: <b>bu</b>
|
||||
*/
|
||||
BUILDING("bu"),
|
||||
BUILDING("bu", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Wing</b><br/>
|
||||
* Code Value: <b>wi</b>
|
||||
*/
|
||||
WING("wi"),
|
||||
WING("wi", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Corridor</b><br/>
|
||||
* Code Value: <b>co</b>
|
||||
*/
|
||||
CORRIDOR("co"),
|
||||
CORRIDOR("co", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Room</b><br/>
|
||||
* Code Value: <b>ro</b>
|
||||
*/
|
||||
ROOM("ro"),
|
||||
ROOM("ro", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Vehicle</b><br/>
|
||||
* Code Value: <b>ve</b>
|
||||
*/
|
||||
VEHICLE("ve"),
|
||||
VEHICLE("ve", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>House</b><br/>
|
||||
* Code Value: <b>ho</b>
|
||||
*/
|
||||
HOUSE("ho"),
|
||||
HOUSE("ho", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Cabinet</b><br/>
|
||||
* Code Value: <b>ca</b>
|
||||
*/
|
||||
CABINET("ca"),
|
||||
CABINET("ca", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Road</b><br/>
|
||||
* Code Value: <b>rd</b>
|
||||
*/
|
||||
ROAD("rd"),
|
||||
ROAD("rd", "http://hl7.org/fhir/location-physical-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -70,11 +70,19 @@ public enum LocationTypeEnum {
|
|||
public static final String VALUESET_NAME = "LocationType";
|
||||
|
||||
private static Map<String, LocationTypeEnum> CODE_TO_ENUM = new HashMap<String, LocationTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, LocationTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, LocationTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (LocationTypeEnum next : LocationTypeEnum.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, LocationTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,6 +93,13 @@ public enum LocationTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -101,18 +116,34 @@ public enum LocationTypeEnum {
|
|||
public String toCodeString(LocationTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(LocationTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, LocationTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
LocationTypeEnum(String theCode) {
|
||||
LocationTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
|
||||
package ca.uhn.fhir.model.dstu.valueset;
|
||||
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum MaritalStatusCodesEnum {
|
||||
|
||||
/**
|
||||
* Display: <b>unmarried</b><br/>
|
||||
* Code Value: <b>U</b>
|
||||
*
|
||||
* The person is not presently married. The marital history is not known or stated
|
||||
*/
|
||||
UNMARRIED("U", "http://hl7.org/fhir/marital-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>A</b>
|
||||
*/
|
||||
A("A", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>D</b>
|
||||
*/
|
||||
D("D", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>I</b>
|
||||
*/
|
||||
I("I", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>L</b>
|
||||
*/
|
||||
L("L", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>M</b>
|
||||
*/
|
||||
M("M", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>P</b>
|
||||
*/
|
||||
P("P", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>S</b>
|
||||
*/
|
||||
S("S", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>T</b>
|
||||
*/
|
||||
T("T", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>W</b>
|
||||
*/
|
||||
W("W", "http://hl7.org/fhir/v3/MaritalStatus"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>UNK</b>
|
||||
*/
|
||||
UNK("UNK", "http://hl7.org/fhir/v3/NullFlavor"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* Identifier for this Value Set:
|
||||
* http://hl7.org/fhir/vs/marital-status
|
||||
*/
|
||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/marital-status";
|
||||
|
||||
/**
|
||||
* Name for this Value Set:
|
||||
* Marital Status Codes
|
||||
*/
|
||||
public static final String VALUESET_NAME = "Marital Status Codes";
|
||||
|
||||
private static Map<String, MaritalStatusCodesEnum> CODE_TO_ENUM = new HashMap<String, MaritalStatusCodesEnum>();
|
||||
private static Map<String, Map<String, MaritalStatusCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, MaritalStatusCodesEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (MaritalStatusCodesEnum next : MaritalStatusCodesEnum.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, MaritalStatusCodesEnum>());
|
||||
}
|
||||
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 MaritalStatusCodesEnum forCode(String theCode) {
|
||||
MaritalStatusCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts codes to their respective enumerated values
|
||||
*/
|
||||
public static final IValueSetEnumBinder<MaritalStatusCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<MaritalStatusCodesEnum>() {
|
||||
@Override
|
||||
public String toCodeString(MaritalStatusCodesEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(MaritalStatusCodesEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaritalStatusCodesEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaritalStatusCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, MaritalStatusCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MaritalStatusCodesEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -12,14 +12,14 @@ public enum MedicationKindEnum {
|
|||
*
|
||||
* The medication is a product.
|
||||
*/
|
||||
PRODUCT("product"),
|
||||
PRODUCT("product", "http://hl7.org/fhir/medication-kind"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>package</b>
|
||||
*
|
||||
* The medication is a package - a contained group of one of more products.
|
||||
*/
|
||||
PACKAGE("package"),
|
||||
PACKAGE("package", "http://hl7.org/fhir/medication-kind"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -36,11 +36,19 @@ public enum MedicationKindEnum {
|
|||
public static final String VALUESET_NAME = "MedicationKind";
|
||||
|
||||
private static Map<String, MedicationKindEnum> CODE_TO_ENUM = new HashMap<String, MedicationKindEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, MedicationKindEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, MedicationKindEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (MedicationKindEnum next : MedicationKindEnum.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, MedicationKindEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +59,13 @@ public enum MedicationKindEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -67,18 +82,34 @@ public enum MedicationKindEnum {
|
|||
public String toCodeString(MedicationKindEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(MedicationKindEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedicationKindEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedicationKindEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, MedicationKindEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MedicationKindEnum(String theCode) {
|
||||
MedicationKindEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,49 +12,49 @@ public enum NameUseEnum {
|
|||
*
|
||||
* Known as/conventional/the one you normally use.
|
||||
*/
|
||||
USUAL("usual"),
|
||||
USUAL("usual", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>official</b>
|
||||
*
|
||||
* The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called "legal name".
|
||||
*/
|
||||
OFFICIAL("official"),
|
||||
OFFICIAL("official", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>temp</b>
|
||||
*
|
||||
* A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations.
|
||||
*/
|
||||
TEMP("temp"),
|
||||
TEMP("temp", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>nickname</b>
|
||||
*
|
||||
* A name that is used to address the person in an informal manner, but is not part of their formal or usual name.
|
||||
*/
|
||||
NICKNAME("nickname"),
|
||||
NICKNAME("nickname", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>anonymous</b>
|
||||
*
|
||||
* Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons).
|
||||
*/
|
||||
ANONYMOUS("anonymous"),
|
||||
ANONYMOUS("anonymous", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>old</b>
|
||||
*
|
||||
* This name is no longer in use (or was never correct, but retained for records).
|
||||
*/
|
||||
OLD("old"),
|
||||
OLD("old", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>maiden</b>
|
||||
*
|
||||
* A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store "maiden" names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically.
|
||||
*/
|
||||
MAIDEN("maiden"),
|
||||
MAIDEN("maiden", "http://hl7.org/fhir/name-use"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -71,11 +71,19 @@ public enum NameUseEnum {
|
|||
public static final String VALUESET_NAME = "NameUse";
|
||||
|
||||
private static Map<String, NameUseEnum> CODE_TO_ENUM = new HashMap<String, NameUseEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, NameUseEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, NameUseEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (NameUseEnum next : NameUseEnum.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, NameUseEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +94,13 @@ public enum NameUseEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -102,18 +117,34 @@ public enum NameUseEnum {
|
|||
public String toCodeString(NameUseEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(NameUseEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameUseEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameUseEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, NameUseEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
NameUseEnum(String theCode) {
|
||||
NameUseEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package ca.uhn.fhir.model.dstu.valueset;
|
||||
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -13,7 +14,7 @@ public enum NarrativeStatusEnum {
|
|||
*
|
||||
* The contents of the narrative are entirely generated from the structured data in the resource.
|
||||
*/
|
||||
GENERATED("generated"),
|
||||
GENERATED("generated","http://hl7.org/fhir/narrative-status"),
|
||||
|
||||
/**
|
||||
* extensions
|
||||
|
@ -21,7 +22,7 @@ public enum NarrativeStatusEnum {
|
|||
*
|
||||
* The contents of the narrative are entirely generated from the structured data in the resource and some of the content is generated from extensions.
|
||||
*/
|
||||
EXTENSIONS("extensions"),
|
||||
EXTENSIONS("extensions","http://hl7.org/fhir/narrative-status"),
|
||||
|
||||
/**
|
||||
* additional
|
||||
|
@ -29,7 +30,7 @@ public enum NarrativeStatusEnum {
|
|||
*
|
||||
* The contents of the narrative contain additional information not found in the structured data.
|
||||
*/
|
||||
ADDITIONAL("additional"),
|
||||
ADDITIONAL("additional","http://hl7.org/fhir/narrative-status"),
|
||||
|
||||
/**
|
||||
* empty
|
||||
|
@ -37,7 +38,7 @@ public enum NarrativeStatusEnum {
|
|||
*
|
||||
* the contents of the narrative are some equivalent of "No human-readable text provided for this resource".
|
||||
*/
|
||||
EMPTY("empty"),
|
||||
EMPTY("empty","http://hl7.org/fhir/narrative-status"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -54,11 +55,19 @@ public enum NarrativeStatusEnum {
|
|||
public static final String VALUESET_NAME = "NarrativeStatus";
|
||||
|
||||
private static Map<String, NarrativeStatusEnum> CODE_TO_ENUM = new HashMap<String, NarrativeStatusEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, NarrativeStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, NarrativeStatusEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (NarrativeStatusEnum next : NarrativeStatusEnum.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, NarrativeStatusEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +78,13 @@ public enum NarrativeStatusEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -85,19 +101,34 @@ public enum NarrativeStatusEnum {
|
|||
public String toCodeString(NarrativeStatusEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(NarrativeStatusEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NarrativeStatusEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NarrativeStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, NarrativeStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
NarrativeStatusEnum(String theCode) {
|
||||
NarrativeStatusEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
|
||||
package ca.uhn.fhir.model.dstu.valueset;
|
||||
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum ObservationInterpretationCodesEnum {
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* Identifier for this Value Set:
|
||||
* http://hl7.org/fhir/vs/observation-interpretation
|
||||
*/
|
||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/observation-interpretation";
|
||||
|
||||
/**
|
||||
* Name for this Value Set:
|
||||
* Observation Interpretation Codes
|
||||
*/
|
||||
public static final String VALUESET_NAME = "Observation Interpretation Codes";
|
||||
|
||||
private static Map<String, ObservationInterpretationCodesEnum> CODE_TO_ENUM = new HashMap<String, ObservationInterpretationCodesEnum>();
|
||||
private static Map<String, Map<String, ObservationInterpretationCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ObservationInterpretationCodesEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ObservationInterpretationCodesEnum next : ObservationInterpretationCodesEnum.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, ObservationInterpretationCodesEnum>());
|
||||
}
|
||||
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 ObservationInterpretationCodesEnum forCode(String theCode) {
|
||||
ObservationInterpretationCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts codes to their respective enumerated values
|
||||
*/
|
||||
public static final IValueSetEnumBinder<ObservationInterpretationCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<ObservationInterpretationCodesEnum>() {
|
||||
@Override
|
||||
public String toCodeString(ObservationInterpretationCodesEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ObservationInterpretationCodesEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationInterpretationCodesEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationInterpretationCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ObservationInterpretationCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ObservationInterpretationCodesEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -12,49 +12,49 @@ public enum ObservationRelationshipTypeEnum {
|
|||
*
|
||||
* The target observation is a component of this observation (e.g. Systolic and Diastolic Blood Pressure).
|
||||
*/
|
||||
HAS_COMPONENT("has-component"),
|
||||
HAS_COMPONENT("has-component", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>has-member</b>
|
||||
*
|
||||
* This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.
|
||||
*/
|
||||
HAS_MEMBER("has-member"),
|
||||
HAS_MEMBER("has-member", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>derived-from</b>
|
||||
*
|
||||
* The target observation is part of the information from which this observation value is derived (e.g. calculated anion gap, Apgar score).
|
||||
*/
|
||||
DERIVED_FROM("derived-from"),
|
||||
DERIVED_FROM("derived-from", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>sequel-to</b>
|
||||
*
|
||||
* This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test).
|
||||
*/
|
||||
SEQUEL_TO("sequel-to"),
|
||||
SEQUEL_TO("sequel-to", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>replaces</b>
|
||||
*
|
||||
* This observation replaces a previous observation (i.e. a revised value). The target observation is now obsolete.
|
||||
*/
|
||||
REPLACES("replaces"),
|
||||
REPLACES("replaces", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>qualified-by</b>
|
||||
*
|
||||
* The value of the target observation qualifies (refines) the semantics of the source observation (e.g. a lipaemia measure target from a plasma measure).
|
||||
*/
|
||||
QUALIFIED_BY("qualified-by"),
|
||||
QUALIFIED_BY("qualified-by", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>interfered-by</b>
|
||||
*
|
||||
* The value of the target observation interferes (degardes quality, or prevents valid observation) with the semantics of the source observation (e.g. a hemolysis measure target from a plasma potassium measure which has no value).
|
||||
*/
|
||||
INTERFERED_BY("interfered-by"),
|
||||
INTERFERED_BY("interfered-by", "http://hl7.org/fhir/observation-relationshiptypes"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -71,11 +71,19 @@ public enum ObservationRelationshipTypeEnum {
|
|||
public static final String VALUESET_NAME = "ObservationRelationshipType";
|
||||
|
||||
private static Map<String, ObservationRelationshipTypeEnum> CODE_TO_ENUM = new HashMap<String, ObservationRelationshipTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ObservationRelationshipTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ObservationRelationshipTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ObservationRelationshipTypeEnum next : ObservationRelationshipTypeEnum.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, ObservationRelationshipTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +94,13 @@ public enum ObservationRelationshipTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -102,18 +117,34 @@ public enum ObservationRelationshipTypeEnum {
|
|||
public String toCodeString(ObservationRelationshipTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ObservationRelationshipTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationRelationshipTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationRelationshipTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ObservationRelationshipTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ObservationRelationshipTypeEnum(String theCode) {
|
||||
ObservationRelationshipTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,49 +12,49 @@ public enum ObservationReliabilityEnum {
|
|||
*
|
||||
* The result has no reliability concerns.
|
||||
*/
|
||||
OK("ok"),
|
||||
OK("ok", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ongoing</b>
|
||||
*
|
||||
* An early estimate of value; measurement is still occurring.
|
||||
*/
|
||||
ONGOING("ongoing"),
|
||||
ONGOING("ongoing", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>early</b>
|
||||
*
|
||||
* An early estimate of value; processing is still occurring.
|
||||
*/
|
||||
EARLY("early"),
|
||||
EARLY("early", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>questionable</b>
|
||||
*
|
||||
* The observation value should be treated with care.
|
||||
*/
|
||||
QUESTIONABLE("questionable"),
|
||||
QUESTIONABLE("questionable", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>calibrating</b>
|
||||
*
|
||||
* The result has been generated while calibration is occurring.
|
||||
*/
|
||||
CALIBRATING("calibrating"),
|
||||
CALIBRATING("calibrating", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>error</b>
|
||||
*
|
||||
* The observation could not be completed because of an error.
|
||||
*/
|
||||
ERROR("error"),
|
||||
ERROR("error", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>unknown</b>
|
||||
*
|
||||
* No observation value was available.
|
||||
*/
|
||||
UNKNOWN("unknown"),
|
||||
UNKNOWN("unknown", "http://hl7.org/fhir/observation-reliability"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -71,11 +71,19 @@ public enum ObservationReliabilityEnum {
|
|||
public static final String VALUESET_NAME = "ObservationReliability";
|
||||
|
||||
private static Map<String, ObservationReliabilityEnum> CODE_TO_ENUM = new HashMap<String, ObservationReliabilityEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ObservationReliabilityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ObservationReliabilityEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ObservationReliabilityEnum next : ObservationReliabilityEnum.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, ObservationReliabilityEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +94,13 @@ public enum ObservationReliabilityEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -102,18 +117,34 @@ public enum ObservationReliabilityEnum {
|
|||
public String toCodeString(ObservationReliabilityEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ObservationReliabilityEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationReliabilityEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationReliabilityEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ObservationReliabilityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ObservationReliabilityEnum(String theCode) {
|
||||
ObservationReliabilityEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,42 +12,42 @@ public enum ObservationStatusEnum {
|
|||
*
|
||||
* The existence of the observation is registered, but there is no result yet available.
|
||||
*/
|
||||
REGISTERED("registered"),
|
||||
REGISTERED("registered", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>preliminary</b>
|
||||
*
|
||||
* This is an initial or interim observation: data may be incomplete or unverified.
|
||||
*/
|
||||
PRELIMINARY("preliminary"),
|
||||
PRELIMINARY("preliminary", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>final</b>
|
||||
*
|
||||
* The observation is complete and verified by an authorized person.
|
||||
*/
|
||||
FINAL("final"),
|
||||
FINAL("final", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>amended</b>
|
||||
*
|
||||
* The observation has been modified subsequent to being Final, and is complete and verified by an authorized person.
|
||||
*/
|
||||
AMENDED("amended"),
|
||||
AMENDED("amended", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>cancelled</b>
|
||||
*
|
||||
* The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
|
||||
*/
|
||||
CANCELLED("cancelled"),
|
||||
CANCELLED("cancelled", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>entered in error</b>
|
||||
*
|
||||
* The observation has been withdrawn following previous Final release.
|
||||
*/
|
||||
ENTERED_IN_ERROR("entered in error"),
|
||||
ENTERED_IN_ERROR("entered in error", "http://hl7.org/fhir/observation-status"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -64,11 +64,19 @@ public enum ObservationStatusEnum {
|
|||
public static final String VALUESET_NAME = "ObservationStatus";
|
||||
|
||||
private static Map<String, ObservationStatusEnum> CODE_TO_ENUM = new HashMap<String, ObservationStatusEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ObservationStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ObservationStatusEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ObservationStatusEnum next : ObservationStatusEnum.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, ObservationStatusEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +87,13 @@ public enum ObservationStatusEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -95,18 +110,34 @@ public enum ObservationStatusEnum {
|
|||
public String toCodeString(ObservationStatusEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ObservationStatusEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationStatusEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservationStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ObservationStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ObservationStatusEnum(String theCode) {
|
||||
ObservationStatusEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,55 +11,55 @@ public enum OrganizationTypeEnum {
|
|||
* Display: <b>Healthcare Provider</b><br/>
|
||||
* Code Value: <b>prov</b>
|
||||
*/
|
||||
HEALTHCARE_PROVIDER("prov"),
|
||||
HEALTHCARE_PROVIDER("prov", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Hospital Department</b><br/>
|
||||
* Code Value: <b>dept</b>
|
||||
*/
|
||||
HOSPITAL_DEPARTMENT("dept"),
|
||||
HOSPITAL_DEPARTMENT("dept", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Intensive Care Unit</b><br/>
|
||||
* Code Value: <b>icu</b>
|
||||
*/
|
||||
INTENSIVE_CARE_UNIT("icu"),
|
||||
INTENSIVE_CARE_UNIT("icu", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Organizational team</b><br/>
|
||||
* Code Value: <b>team</b>
|
||||
*/
|
||||
ORGANIZATIONAL_TEAM("team"),
|
||||
ORGANIZATIONAL_TEAM("team", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Federal Government</b><br/>
|
||||
* Code Value: <b>fed</b>
|
||||
*/
|
||||
FEDERAL_GOVERNMENT("fed"),
|
||||
FEDERAL_GOVERNMENT("fed", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Insurance Company</b><br/>
|
||||
* Code Value: <b>ins</b>
|
||||
*/
|
||||
INSURANCE_COMPANY("ins"),
|
||||
INSURANCE_COMPANY("ins", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Educational Institute</b><br/>
|
||||
* Code Value: <b>edu</b>
|
||||
*/
|
||||
EDUCATIONAL_INSTITUTE("edu"),
|
||||
EDUCATIONAL_INSTITUTE("edu", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Religious Institution</b><br/>
|
||||
* Code Value: <b>reli</b>
|
||||
*/
|
||||
RELIGIOUS_INSTITUTION("reli"),
|
||||
RELIGIOUS_INSTITUTION("reli", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
/**
|
||||
* Display: <b>Pharmacy</b><br/>
|
||||
* Code Value: <b>pharm</b>
|
||||
*/
|
||||
PHARMACY("pharm"),
|
||||
PHARMACY("pharm", "http://hl7.org/fhir/organization-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -76,11 +76,19 @@ public enum OrganizationTypeEnum {
|
|||
public static final String VALUESET_NAME = "OrganizationType";
|
||||
|
||||
private static Map<String, OrganizationTypeEnum> CODE_TO_ENUM = new HashMap<String, OrganizationTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, OrganizationTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, OrganizationTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (OrganizationTypeEnum next : OrganizationTypeEnum.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, OrganizationTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +99,13 @@ public enum OrganizationTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -107,18 +122,34 @@ public enum OrganizationTypeEnum {
|
|||
public String toCodeString(OrganizationTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(OrganizationTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrganizationTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrganizationTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, OrganizationTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
OrganizationTypeEnum(String theCode) {
|
||||
OrganizationTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,34 +10,34 @@ public enum PractitionerRoleEnum {
|
|||
/**
|
||||
* Code Value: <b>doctor</b>
|
||||
*/
|
||||
DOCTOR("doctor"),
|
||||
DOCTOR("doctor", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>nurse</b>
|
||||
*/
|
||||
NURSE("nurse"),
|
||||
NURSE("nurse", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>pharmacist</b>
|
||||
*/
|
||||
PHARMACIST("pharmacist"),
|
||||
PHARMACIST("pharmacist", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>researcher</b>
|
||||
*/
|
||||
RESEARCHER("researcher"),
|
||||
RESEARCHER("researcher", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
/**
|
||||
* Display: <b>Teacher/educator</b><br/>
|
||||
* Code Value: <b>teacher</b>
|
||||
*/
|
||||
TEACHER_EDUCATOR("teacher"),
|
||||
TEACHER_EDUCATOR("teacher", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
/**
|
||||
* Display: <b>ICT professional</b><br/>
|
||||
* Code Value: <b>ict</b>
|
||||
*/
|
||||
ICT_PROFESSIONAL("ict"),
|
||||
ICT_PROFESSIONAL("ict", "http://hl7.org/fhir/practitioner-role"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -54,11 +54,19 @@ public enum PractitionerRoleEnum {
|
|||
public static final String VALUESET_NAME = "PractitionerRole";
|
||||
|
||||
private static Map<String, PractitionerRoleEnum> CODE_TO_ENUM = new HashMap<String, PractitionerRoleEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, PractitionerRoleEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, PractitionerRoleEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (PractitionerRoleEnum next : PractitionerRoleEnum.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, PractitionerRoleEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +77,13 @@ public enum PractitionerRoleEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -85,18 +100,34 @@ public enum PractitionerRoleEnum {
|
|||
public String toCodeString(PractitionerRoleEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(PractitionerRoleEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PractitionerRoleEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PractitionerRoleEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, PractitionerRoleEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
PractitionerRoleEnum(String theCode) {
|
||||
PractitionerRoleEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,31 +11,31 @@ public enum PractitionerSpecialtyEnum {
|
|||
* Display: <b>Cardiologist</b><br/>
|
||||
* Code Value: <b>cardio</b>
|
||||
*/
|
||||
CARDIOLOGIST("cardio"),
|
||||
CARDIOLOGIST("cardio", "http://hl7.org/fhir/practitioner-specialty"),
|
||||
|
||||
/**
|
||||
* Display: <b>Dentist</b><br/>
|
||||
* Code Value: <b>dent</b>
|
||||
*/
|
||||
DENTIST("dent"),
|
||||
DENTIST("dent", "http://hl7.org/fhir/practitioner-specialty"),
|
||||
|
||||
/**
|
||||
* Display: <b>Dietary consultant</b><br/>
|
||||
* Code Value: <b>dietary</b>
|
||||
*/
|
||||
DIETARY_CONSULTANT("dietary"),
|
||||
DIETARY_CONSULTANT("dietary", "http://hl7.org/fhir/practitioner-specialty"),
|
||||
|
||||
/**
|
||||
* Display: <b>Midwife</b><br/>
|
||||
* Code Value: <b>midw</b>
|
||||
*/
|
||||
MIDWIFE("midw"),
|
||||
MIDWIFE("midw", "http://hl7.org/fhir/practitioner-specialty"),
|
||||
|
||||
/**
|
||||
* Display: <b>Systems architect</b><br/>
|
||||
* Code Value: <b>sysarch</b>
|
||||
*/
|
||||
SYSTEMS_ARCHITECT("sysarch"),
|
||||
SYSTEMS_ARCHITECT("sysarch", "http://hl7.org/fhir/practitioner-specialty"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -52,11 +52,19 @@ public enum PractitionerSpecialtyEnum {
|
|||
public static final String VALUESET_NAME = "PractitionerSpecialty";
|
||||
|
||||
private static Map<String, PractitionerSpecialtyEnum> CODE_TO_ENUM = new HashMap<String, PractitionerSpecialtyEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, PractitionerSpecialtyEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, PractitionerSpecialtyEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (PractitionerSpecialtyEnum next : PractitionerSpecialtyEnum.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, PractitionerSpecialtyEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,6 +75,13 @@ public enum PractitionerSpecialtyEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -83,18 +98,34 @@ public enum PractitionerSpecialtyEnum {
|
|||
public String toCodeString(PractitionerSpecialtyEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(PractitionerSpecialtyEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PractitionerSpecialtyEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PractitionerSpecialtyEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, PractitionerSpecialtyEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
PractitionerSpecialtyEnum(String theCode) {
|
||||
PractitionerSpecialtyEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ public enum PropertyRepresentationEnum {
|
|||
*
|
||||
* In XML, this property is represented as an attribute not an element.
|
||||
*/
|
||||
XMLATTR("xmlAttr"),
|
||||
XMLATTR("xmlAttr", "http://hl7.org/fhir/property-representation"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -29,11 +29,19 @@ public enum PropertyRepresentationEnum {
|
|||
public static final String VALUESET_NAME = "PropertyRepresentation";
|
||||
|
||||
private static Map<String, PropertyRepresentationEnum> CODE_TO_ENUM = new HashMap<String, PropertyRepresentationEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, PropertyRepresentationEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, PropertyRepresentationEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (PropertyRepresentationEnum next : PropertyRepresentationEnum.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, PropertyRepresentationEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +52,13 @@ public enum PropertyRepresentationEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -60,18 +75,34 @@ public enum PropertyRepresentationEnum {
|
|||
public String toCodeString(PropertyRepresentationEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(PropertyRepresentationEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PropertyRepresentationEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PropertyRepresentationEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, PropertyRepresentationEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
PropertyRepresentationEnum(String theCode) {
|
||||
PropertyRepresentationEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,28 +12,28 @@ public enum QuantityCompararatorEnum {
|
|||
*
|
||||
* The actual value is less than the given value.
|
||||
*/
|
||||
LESSTHAN("<"),
|
||||
LESSTHAN("<", "http://hl7.org/fhir/quantity-comparator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b><=</b>
|
||||
*
|
||||
* The actual value is less than or equal to the given value.
|
||||
*/
|
||||
LESSTHAN_OR_EQUALS("<="),
|
||||
LESSTHAN_OR_EQUALS("<=", "http://hl7.org/fhir/quantity-comparator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>>=</b>
|
||||
*
|
||||
* The actual value is greater than or equal to the given value.
|
||||
*/
|
||||
GREATERTHAN_OR_EQUALS(">="),
|
||||
GREATERTHAN_OR_EQUALS(">=", "http://hl7.org/fhir/quantity-comparator"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>></b>
|
||||
*
|
||||
* The actual value is greater than the given value.
|
||||
*/
|
||||
GREATERTHAN(">"),
|
||||
GREATERTHAN(">", "http://hl7.org/fhir/quantity-comparator"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -50,11 +50,19 @@ public enum QuantityCompararatorEnum {
|
|||
public static final String VALUESET_NAME = "QuantityCompararator";
|
||||
|
||||
private static Map<String, QuantityCompararatorEnum> CODE_TO_ENUM = new HashMap<String, QuantityCompararatorEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, QuantityCompararatorEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, QuantityCompararatorEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (QuantityCompararatorEnum next : QuantityCompararatorEnum.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, QuantityCompararatorEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +73,13 @@ public enum QuantityCompararatorEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -81,18 +96,34 @@ public enum QuantityCompararatorEnum {
|
|||
public String toCodeString(QuantityCompararatorEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(QuantityCompararatorEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QuantityCompararatorEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QuantityCompararatorEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, QuantityCompararatorEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
QuantityCompararatorEnum(String theCode) {
|
||||
QuantityCompararatorEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum ResourceProfileStatusEnum {
|
|||
*
|
||||
* This profile is still under development.
|
||||
*/
|
||||
DRAFT("draft"),
|
||||
DRAFT("draft", "http://hl7.org/fhir/resource-profile-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>active</b>
|
||||
*
|
||||
* This profile is ready for normal use.
|
||||
*/
|
||||
ACTIVE("active"),
|
||||
ACTIVE("active", "http://hl7.org/fhir/resource-profile-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>retired</b>
|
||||
*
|
||||
* This profile has been deprecated, withdrawn or superseded and should no longer be used.
|
||||
*/
|
||||
RETIRED("retired"),
|
||||
RETIRED("retired", "http://hl7.org/fhir/resource-profile-status"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum ResourceProfileStatusEnum {
|
|||
public static final String VALUESET_NAME = "ResourceProfileStatus";
|
||||
|
||||
private static Map<String, ResourceProfileStatusEnum> CODE_TO_ENUM = new HashMap<String, ResourceProfileStatusEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ResourceProfileStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ResourceProfileStatusEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ResourceProfileStatusEnum next : ResourceProfileStatusEnum.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, ResourceProfileStatusEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum ResourceProfileStatusEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum ResourceProfileStatusEnum {
|
|||
public String toCodeString(ResourceProfileStatusEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ResourceProfileStatusEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceProfileStatusEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceProfileStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ResourceProfileStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ResourceProfileStatusEnum(String theCode) {
|
||||
ResourceProfileStatusEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,336 +12,336 @@ public enum ResourceTypeEnum {
|
|||
*
|
||||
* Records an unexpected reaction suspected to be related to the exposure of the reaction subject to a substance.
|
||||
*/
|
||||
ADVERSEREACTION("AdverseReaction"),
|
||||
ADVERSEREACTION("AdverseReaction", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Alert</b>
|
||||
*
|
||||
* Prospective warnings of potential issues when providing care to the patient.
|
||||
*/
|
||||
ALERT("Alert"),
|
||||
ALERT("Alert", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>AllergyIntolerance</b>
|
||||
*
|
||||
* Indicates the patient has a susceptibility to an adverse reaction upon exposure to a specified substance.
|
||||
*/
|
||||
ALLERGYINTOLERANCE("AllergyIntolerance"),
|
||||
ALLERGYINTOLERANCE("AllergyIntolerance", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>CarePlan</b>
|
||||
*
|
||||
* Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.
|
||||
*/
|
||||
CAREPLAN("CarePlan"),
|
||||
CAREPLAN("CarePlan", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Composition</b>
|
||||
*
|
||||
* A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement.
|
||||
*/
|
||||
COMPOSITION("Composition"),
|
||||
COMPOSITION("Composition", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ConceptMap</b>
|
||||
*
|
||||
* A statement of relationships from one set of concepts to one or more other concept systems.
|
||||
*/
|
||||
CONCEPTMAP("ConceptMap"),
|
||||
CONCEPTMAP("ConceptMap", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Condition</b>
|
||||
*
|
||||
* Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a Diagnosis during an Encounter; populating a problem List or a Summary Statement, such as a Discharge Summary.
|
||||
*/
|
||||
CONDITION("Condition"),
|
||||
CONDITION("Condition", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Conformance</b>
|
||||
*
|
||||
* A conformance statement is a set of requirements for a desired implementation or a description of how a target application fulfills those requirements in a particular implementation.
|
||||
*/
|
||||
CONFORMANCE("Conformance"),
|
||||
CONFORMANCE("Conformance", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Device</b>
|
||||
*
|
||||
* This resource identifies an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.
|
||||
*/
|
||||
DEVICE("Device"),
|
||||
DEVICE("Device", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DeviceObservationReport</b>
|
||||
*
|
||||
* Describes the data produced by a device at a point in time.
|
||||
*/
|
||||
DEVICEOBSERVATIONREPORT("DeviceObservationReport"),
|
||||
DEVICEOBSERVATIONREPORT("DeviceObservationReport", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DiagnosticOrder</b>
|
||||
*
|
||||
* A request for a diagnostic investigation service to be performed.
|
||||
*/
|
||||
DIAGNOSTICORDER("DiagnosticOrder"),
|
||||
DIAGNOSTICORDER("DiagnosticOrder", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DiagnosticReport</b>
|
||||
*
|
||||
* The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports.
|
||||
*/
|
||||
DIAGNOSTICREPORT("DiagnosticReport"),
|
||||
DIAGNOSTICREPORT("DiagnosticReport", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DocumentManifest</b>
|
||||
*
|
||||
* A manifest that defines a set of documents.
|
||||
*/
|
||||
DOCUMENTMANIFEST("DocumentManifest"),
|
||||
DOCUMENTMANIFEST("DocumentManifest", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>DocumentReference</b>
|
||||
*
|
||||
* A reference to a document.
|
||||
*/
|
||||
DOCUMENTREFERENCE("DocumentReference"),
|
||||
DOCUMENTREFERENCE("DocumentReference", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Encounter</b>
|
||||
*
|
||||
* An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
|
||||
*/
|
||||
ENCOUNTER("Encounter"),
|
||||
ENCOUNTER("Encounter", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>FamilyHistory</b>
|
||||
*
|
||||
* Significant health events and conditions for people related to the subject relevant in the context of care for the subject.
|
||||
*/
|
||||
FAMILYHISTORY("FamilyHistory"),
|
||||
FAMILYHISTORY("FamilyHistory", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Group</b>
|
||||
*
|
||||
* Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized. I.e. A collection of entities that isn't an Organization.
|
||||
*/
|
||||
GROUP("Group"),
|
||||
GROUP("Group", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ImagingStudy</b>
|
||||
*
|
||||
* Manifest of a set of images produced in study. The set of images may include every image in the study, or it may be an incomplete sample, such as a list of key images.
|
||||
*/
|
||||
IMAGINGSTUDY("ImagingStudy"),
|
||||
IMAGINGSTUDY("ImagingStudy", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Immunization</b>
|
||||
*
|
||||
* Immunization event information.
|
||||
*/
|
||||
IMMUNIZATION("Immunization"),
|
||||
IMMUNIZATION("Immunization", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ImmunizationRecommendation</b>
|
||||
*
|
||||
* A patient's point-of-time immunization status and recommendation with optional supporting justification.
|
||||
*/
|
||||
IMMUNIZATIONRECOMMENDATION("ImmunizationRecommendation"),
|
||||
IMMUNIZATIONRECOMMENDATION("ImmunizationRecommendation", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>List</b>
|
||||
*
|
||||
* A set of information summarized from a list of other resources.
|
||||
*/
|
||||
LIST("List"),
|
||||
LIST("List", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Location</b>
|
||||
*
|
||||
* Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated.
|
||||
*/
|
||||
LOCATION("Location"),
|
||||
LOCATION("Location", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Media</b>
|
||||
*
|
||||
* A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
|
||||
*/
|
||||
MEDIA("Media"),
|
||||
MEDIA("Media", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Medication</b>
|
||||
*
|
||||
* Primarily used for identification and definition of Medication, but also covers ingredients and packaging.
|
||||
*/
|
||||
MEDICATION("Medication"),
|
||||
MEDICATION("Medication", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationAdministration</b>
|
||||
*
|
||||
* Describes the event of a patient being given a dose of a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
|
||||
*/
|
||||
MEDICATIONADMINISTRATION("MedicationAdministration"),
|
||||
MEDICATIONADMINISTRATION("MedicationAdministration", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationDispense</b>
|
||||
*
|
||||
* Dispensing a medication to a named patient. This includes a description of the supply provided and the instructions for administering the medication.
|
||||
*/
|
||||
MEDICATIONDISPENSE("MedicationDispense"),
|
||||
MEDICATIONDISPENSE("MedicationDispense", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationPrescription</b>
|
||||
*
|
||||
* An order for both supply of the medication and the instructions for administration of the medicine to a patient.
|
||||
*/
|
||||
MEDICATIONPRESCRIPTION("MedicationPrescription"),
|
||||
MEDICATIONPRESCRIPTION("MedicationPrescription", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MedicationStatement</b>
|
||||
*
|
||||
* A record of medication being taken by a patient, or that the medication has been given to a patient where the record is the result of a report from the patient or another clinician.
|
||||
*/
|
||||
MEDICATIONSTATEMENT("MedicationStatement"),
|
||||
MEDICATIONSTATEMENT("MedicationStatement", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>MessageHeader</b>
|
||||
*
|
||||
* The header for a message exchange that is either requesting or responding to an action. The resource(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
|
||||
*/
|
||||
MESSAGEHEADER("MessageHeader"),
|
||||
MESSAGEHEADER("MessageHeader", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Observation</b>
|
||||
*
|
||||
* Measurements and simple assertions made about a patient, device or other subject.
|
||||
*/
|
||||
OBSERVATION("Observation"),
|
||||
OBSERVATION("Observation", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>OperationOutcome</b>
|
||||
*
|
||||
* A collection of error, warning or information messages that result from a system action.
|
||||
*/
|
||||
OPERATIONOUTCOME("OperationOutcome"),
|
||||
OPERATIONOUTCOME("OperationOutcome", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Order</b>
|
||||
*
|
||||
* A request to perform an action.
|
||||
*/
|
||||
ORDER("Order"),
|
||||
ORDER("Order", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>OrderResponse</b>
|
||||
*
|
||||
* A response to an order.
|
||||
*/
|
||||
ORDERRESPONSE("OrderResponse"),
|
||||
ORDERRESPONSE("OrderResponse", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Organization</b>
|
||||
*
|
||||
* A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.
|
||||
*/
|
||||
ORGANIZATION("Organization"),
|
||||
ORGANIZATION("Organization", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Other</b>
|
||||
*
|
||||
* Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest.
|
||||
*/
|
||||
OTHER("Other"),
|
||||
OTHER("Other", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Patient</b>
|
||||
*
|
||||
* Demographics and other administrative information about a person or animal receiving care or other health-related services.
|
||||
*/
|
||||
PATIENT("Patient"),
|
||||
PATIENT("Patient", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Practitioner</b>
|
||||
*
|
||||
* A person who is directly or indirectly involved in the provisioning of healthcare.
|
||||
*/
|
||||
PRACTITIONER("Practitioner"),
|
||||
PRACTITIONER("Practitioner", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Procedure</b>
|
||||
*
|
||||
* An action that is performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy.
|
||||
*/
|
||||
PROCEDURE("Procedure"),
|
||||
PROCEDURE("Procedure", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Profile</b>
|
||||
*
|
||||
* A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.
|
||||
*/
|
||||
PROFILE("Profile"),
|
||||
PROFILE("Profile", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Provenance</b>
|
||||
*
|
||||
* Provenance information that describes the activity that led to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.
|
||||
*/
|
||||
PROVENANCE("Provenance"),
|
||||
PROVENANCE("Provenance", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Query</b>
|
||||
*
|
||||
* A description of a query with a set of parameters.
|
||||
*/
|
||||
QUERY("Query"),
|
||||
QUERY("Query", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Questionnaire</b>
|
||||
*
|
||||
* A structured set of questions and their answers. The Questionnaire may contain questions, answers or both. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
|
||||
*/
|
||||
QUESTIONNAIRE("Questionnaire"),
|
||||
QUESTIONNAIRE("Questionnaire", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>RelatedPerson</b>
|
||||
*
|
||||
* Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
|
||||
*/
|
||||
RELATEDPERSON("RelatedPerson"),
|
||||
RELATEDPERSON("RelatedPerson", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>SecurityEvent</b>
|
||||
*
|
||||
* A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
|
||||
*/
|
||||
SECURITYEVENT("SecurityEvent"),
|
||||
SECURITYEVENT("SecurityEvent", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Specimen</b>
|
||||
*
|
||||
* Sample for analysis.
|
||||
*/
|
||||
SPECIMEN("Specimen"),
|
||||
SPECIMEN("Specimen", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Substance</b>
|
||||
*
|
||||
* A homogeneous material with a definite composition.
|
||||
*/
|
||||
SUBSTANCE("Substance"),
|
||||
SUBSTANCE("Substance", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>Supply</b>
|
||||
*
|
||||
* A supply - a request for something, and provision of what is supplied.
|
||||
*/
|
||||
SUPPLY("Supply"),
|
||||
SUPPLY("Supply", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>ValueSet</b>
|
||||
*
|
||||
* A value set specifies a set of codes drawn from one or more code systems.
|
||||
*/
|
||||
VALUESET("ValueSet"),
|
||||
VALUESET("ValueSet", "http://hl7.org/fhir/resource-types"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -358,11 +358,19 @@ public enum ResourceTypeEnum {
|
|||
public static final String VALUESET_NAME = "ResourceType";
|
||||
|
||||
private static Map<String, ResourceTypeEnum> CODE_TO_ENUM = new HashMap<String, ResourceTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ResourceTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ResourceTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ResourceTypeEnum next : ResourceTypeEnum.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, ResourceTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,6 +381,13 @@ public enum ResourceTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -389,18 +404,34 @@ public enum ResourceTypeEnum {
|
|||
public String toCodeString(ResourceTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ResourceTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ResourceTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ResourceTypeEnum(String theCode) {
|
||||
ResourceTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,49 +12,49 @@ public enum SearchParamTypeEnum {
|
|||
*
|
||||
* Search parameter SHALL be a number (a whole number, or a decimal).
|
||||
*/
|
||||
NUMBER("number"),
|
||||
NUMBER("number", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>date</b>
|
||||
*
|
||||
* Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
|
||||
*/
|
||||
DATE("date"),
|
||||
DATE("date", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>string</b>
|
||||
*
|
||||
* Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.
|
||||
*/
|
||||
STRING("string"),
|
||||
STRING("string", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>token</b>
|
||||
*
|
||||
* Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used.
|
||||
*/
|
||||
TOKEN("token"),
|
||||
TOKEN("token", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>reference</b>
|
||||
*
|
||||
* A reference to another resource.
|
||||
*/
|
||||
REFERENCE("reference"),
|
||||
REFERENCE("reference", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>composite</b>
|
||||
*
|
||||
* A composite search parameter that combines a search on two values together.
|
||||
*/
|
||||
COMPOSITE("composite"),
|
||||
COMPOSITE("composite", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>quantity</b>
|
||||
*
|
||||
* A search parameter that searches on a quantity.
|
||||
*/
|
||||
QUANTITY("quantity"),
|
||||
QUANTITY("quantity", "http://hl7.org/fhir/search-param-type"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -71,11 +71,19 @@ public enum SearchParamTypeEnum {
|
|||
public static final String VALUESET_NAME = "SearchParamType";
|
||||
|
||||
private static Map<String, SearchParamTypeEnum> CODE_TO_ENUM = new HashMap<String, SearchParamTypeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, SearchParamTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SearchParamTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (SearchParamTypeEnum next : SearchParamTypeEnum.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, SearchParamTypeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +94,13 @@ public enum SearchParamTypeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -102,18 +117,34 @@ public enum SearchParamTypeEnum {
|
|||
public String toCodeString(SearchParamTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(SearchParamTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchParamTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchParamTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, SearchParamTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SearchParamTypeEnum(String theCode) {
|
||||
SearchParamTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum SlicingRulesEnum {
|
|||
*
|
||||
* No additional content is allowed other than that described by the slices in this profile.
|
||||
*/
|
||||
CLOSED("closed"),
|
||||
CLOSED("closed", "http://hl7.org/fhir/resource-slicing-rules"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>open</b>
|
||||
*
|
||||
* Additional content is allowed anywhere in the list.
|
||||
*/
|
||||
OPEN("open"),
|
||||
OPEN("open", "http://hl7.org/fhir/resource-slicing-rules"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>openAtEnd</b>
|
||||
*
|
||||
* Additional content is allowed, but only at the end of the list.
|
||||
*/
|
||||
OPENATEND("openAtEnd"),
|
||||
OPENATEND("openAtEnd", "http://hl7.org/fhir/resource-slicing-rules"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum SlicingRulesEnum {
|
|||
public static final String VALUESET_NAME = "SlicingRules";
|
||||
|
||||
private static Map<String, SlicingRulesEnum> CODE_TO_ENUM = new HashMap<String, SlicingRulesEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, SlicingRulesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SlicingRulesEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (SlicingRulesEnum next : SlicingRulesEnum.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, SlicingRulesEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum SlicingRulesEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum SlicingRulesEnum {
|
|||
public String toCodeString(SlicingRulesEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(SlicingRulesEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SlicingRulesEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SlicingRulesEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, SlicingRulesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SlicingRulesEnum(String theCode) {
|
||||
SlicingRulesEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,71 @@ import java.util.Map;
|
|||
|
||||
public enum SpecimenCollectionMethodEnum {
|
||||
|
||||
/**
|
||||
* Code Value: <b>119295008</b>
|
||||
*/
|
||||
_119295008("119295008", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>413651001</b>
|
||||
*/
|
||||
_413651001("413651001", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>360020006</b>
|
||||
*/
|
||||
_360020006("360020006", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>430823004</b>
|
||||
*/
|
||||
_430823004("430823004", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>16404004</b>
|
||||
*/
|
||||
_16404004("16404004", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>67889009</b>
|
||||
*/
|
||||
_67889009("67889009", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>29240004</b>
|
||||
*/
|
||||
_29240004("29240004", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>45710003</b>
|
||||
*/
|
||||
_45710003("45710003", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>7800008</b>
|
||||
*/
|
||||
_7800008("7800008", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>258431006</b>
|
||||
*/
|
||||
_258431006("258431006", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>20255002</b>
|
||||
*/
|
||||
_20255002("20255002", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>386147002</b>
|
||||
*/
|
||||
_386147002("386147002", "http://snomed.info/sct"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>278450005</b>
|
||||
*/
|
||||
_278450005("278450005", "http://snomed.info/sct"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -22,11 +87,19 @@ public enum SpecimenCollectionMethodEnum {
|
|||
public static final String VALUESET_NAME = "SpecimenCollectionMethod";
|
||||
|
||||
private static Map<String, SpecimenCollectionMethodEnum> CODE_TO_ENUM = new HashMap<String, SpecimenCollectionMethodEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, SpecimenCollectionMethodEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SpecimenCollectionMethodEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (SpecimenCollectionMethodEnum next : SpecimenCollectionMethodEnum.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, SpecimenCollectionMethodEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +110,13 @@ public enum SpecimenCollectionMethodEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -53,18 +133,34 @@ public enum SpecimenCollectionMethodEnum {
|
|||
public String toCodeString(SpecimenCollectionMethodEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(SpecimenCollectionMethodEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecimenCollectionMethodEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecimenCollectionMethodEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, SpecimenCollectionMethodEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SpecimenCollectionMethodEnum(String theCode) {
|
||||
SpecimenCollectionMethodEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,11 +22,19 @@ public enum SpecimenTreatmentProcedureEnum {
|
|||
public static final String VALUESET_NAME = "SpecimenTreatmentProcedure";
|
||||
|
||||
private static Map<String, SpecimenTreatmentProcedureEnum> CODE_TO_ENUM = new HashMap<String, SpecimenTreatmentProcedureEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, SpecimenTreatmentProcedureEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SpecimenTreatmentProcedureEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (SpecimenTreatmentProcedureEnum next : SpecimenTreatmentProcedureEnum.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, SpecimenTreatmentProcedureEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +45,13 @@ public enum SpecimenTreatmentProcedureEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -53,18 +68,34 @@ public enum SpecimenTreatmentProcedureEnum {
|
|||
public String toCodeString(SpecimenTreatmentProcedureEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(SpecimenTreatmentProcedureEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecimenTreatmentProcedureEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecimenTreatmentProcedureEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, SpecimenTreatmentProcedureEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SpecimenTreatmentProcedureEnum(String theCode) {
|
||||
SpecimenTreatmentProcedureEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
|
||||
package ca.uhn.fhir.model.dstu.valueset;
|
||||
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum SubstanceTypeEnum {
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* Identifier for this Value Set:
|
||||
* http://hl7.org/fhir/vs/substance-type
|
||||
*/
|
||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/substance-type";
|
||||
|
||||
/**
|
||||
* Name for this Value Set:
|
||||
* Substance Type
|
||||
*/
|
||||
public static final String VALUESET_NAME = "Substance Type";
|
||||
|
||||
private static Map<String, SubstanceTypeEnum> CODE_TO_ENUM = new HashMap<String, SubstanceTypeEnum>();
|
||||
private static Map<String, Map<String, SubstanceTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SubstanceTypeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (SubstanceTypeEnum next : SubstanceTypeEnum.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, SubstanceTypeEnum>());
|
||||
}
|
||||
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 SubstanceTypeEnum forCode(String theCode) {
|
||||
SubstanceTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts codes to their respective enumerated values
|
||||
*/
|
||||
public static final IValueSetEnumBinder<SubstanceTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<SubstanceTypeEnum>() {
|
||||
@Override
|
||||
public String toCodeString(SubstanceTypeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(SubstanceTypeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubstanceTypeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubstanceTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, SubstanceTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SubstanceTypeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -7,6 +7,41 @@ import java.util.Map;
|
|||
|
||||
public enum UnitsOfTimeEnum {
|
||||
|
||||
/**
|
||||
* Code Value: <b>s</b>
|
||||
*/
|
||||
S("s", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>min</b>
|
||||
*/
|
||||
MIN("min", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>h</b>
|
||||
*/
|
||||
H("h", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>d</b>
|
||||
*/
|
||||
D("d", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>wk</b>
|
||||
*/
|
||||
WK("wk", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>mo</b>
|
||||
*/
|
||||
MO("mo", "http://unitsofmeasure.org"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>a</b>
|
||||
*/
|
||||
A("a", "http://unitsofmeasure.org"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -22,11 +57,19 @@ public enum UnitsOfTimeEnum {
|
|||
public static final String VALUESET_NAME = "UnitsOfTime";
|
||||
|
||||
private static Map<String, UnitsOfTimeEnum> CODE_TO_ENUM = new HashMap<String, UnitsOfTimeEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, UnitsOfTimeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, UnitsOfTimeEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (UnitsOfTimeEnum next : UnitsOfTimeEnum.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, UnitsOfTimeEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +80,13 @@ public enum UnitsOfTimeEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -53,18 +103,34 @@ public enum UnitsOfTimeEnum {
|
|||
public String toCodeString(UnitsOfTimeEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(UnitsOfTimeEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitsOfTimeEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitsOfTimeEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, UnitsOfTimeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
UnitsOfTimeEnum(String theCode) {
|
||||
UnitsOfTimeEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@ public enum ValueSetStatusEnum {
|
|||
*
|
||||
* This valueset is still under development.
|
||||
*/
|
||||
DRAFT("draft"),
|
||||
DRAFT("draft", "http://hl7.org/fhir/valueset-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>active</b>
|
||||
*
|
||||
* This valueset is ready for normal use.
|
||||
*/
|
||||
ACTIVE("active"),
|
||||
ACTIVE("active", "http://hl7.org/fhir/valueset-status"),
|
||||
|
||||
/**
|
||||
* Code Value: <b>retired</b>
|
||||
*
|
||||
* This valueset has been withdrawn or superceded and should no longer be used.
|
||||
*/
|
||||
RETIRED("retired"),
|
||||
RETIRED("retired", "http://hl7.org/fhir/valueset-status"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -43,11 +43,19 @@ public enum ValueSetStatusEnum {
|
|||
public static final String VALUESET_NAME = "ValueSetStatus";
|
||||
|
||||
private static Map<String, ValueSetStatusEnum> CODE_TO_ENUM = new HashMap<String, ValueSetStatusEnum>();
|
||||
private String myCode;
|
||||
private static Map<String, Map<String, ValueSetStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ValueSetStatusEnum>>();
|
||||
|
||||
private final String myCode;
|
||||
private final String mySystem;
|
||||
|
||||
static {
|
||||
for (ValueSetStatusEnum next : ValueSetStatusEnum.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, ValueSetStatusEnum>());
|
||||
}
|
||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +66,13 @@ public enum ValueSetStatusEnum {
|
|||
return myCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code system associated with this enumerated value
|
||||
*/
|
||||
public String getSystem() {
|
||||
return mySystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumerated value associated with this code
|
||||
*/
|
||||
|
@ -74,18 +89,34 @@ public enum ValueSetStatusEnum {
|
|||
public String toCodeString(ValueSetStatusEnum theEnum) {
|
||||
return theEnum.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toSystemString(ValueSetStatusEnum theEnum) {
|
||||
return theEnum.getSystem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueSetStatusEnum fromCodeString(String theCodeString) {
|
||||
return CODE_TO_ENUM.get(theCodeString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueSetStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
||||
Map<String, ValueSetStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
return map.get(theCodeString);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ValueSetStatusEnum(String theCode) {
|
||||
ValueSetStatusEnum(String theCode, String theSystem) {
|
||||
myCode = theCode;
|
||||
mySystem = theSystem;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ public class BoundCodeDt<T extends Enum<?>> extends CodeDt {
|
|||
public BoundCodeDt(IValueSetEnumBinder<T> theBinder) {
|
||||
myBinder = theBinder;
|
||||
}
|
||||
|
||||
|
||||
public BoundCodeDt(IValueSetEnumBinder<T> theBinder, T theValue) {
|
||||
myBinder = theBinder;
|
||||
setValueAsEnum(theValue);
|
||||
|
@ -20,8 +20,12 @@ public class BoundCodeDt<T extends Enum<?>> extends CodeDt {
|
|||
public void setValueAsEnum(T theValue) {
|
||||
setValue(myBinder.toCodeString(theValue));
|
||||
}
|
||||
|
||||
|
||||
public T getValueAsEnum() {
|
||||
return myBinder.fromCodeString(getValue());
|
||||
T retVal = myBinder.fromCodeString(getValue());
|
||||
if (retVal == null) {
|
||||
// TODO: throw special exception type?
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package ca.uhn.fhir.model.primitive;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
|
||||
import ca.uhn.fhir.model.dstu.composite.CodingDt;
|
||||
|
||||
@DatatypeDef(name = "CodeableConcept")
|
||||
public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt {
|
||||
|
||||
private IValueSetEnumBinder<T> myBinder;
|
||||
|
||||
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder) {
|
||||
myBinder = theBinder;
|
||||
}
|
||||
|
||||
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, T... theValues) {
|
||||
myBinder = theBinder;
|
||||
setValueAsEnum(theValues);
|
||||
}
|
||||
|
||||
public void setValueAsEnum(T... theValues) {
|
||||
getCoding().clear();
|
||||
if (theValues == null) {
|
||||
return;
|
||||
}
|
||||
for (T next : theValues) {
|
||||
getCoding().add(new BoundCodingDt<T>(myBinder, next));
|
||||
}
|
||||
}
|
||||
|
||||
public Set<T> getValueAsEnum() {
|
||||
Set<T> retVal = new HashSet<T>();
|
||||
for (CodingDt next : getCoding()) {
|
||||
if (next == null) {
|
||||
continue;
|
||||
}
|
||||
T nextT = myBinder.fromCodeString(defaultString(next.getCode().getValue()), defaultString(next.getSystem().getValueAsString()));
|
||||
if (nextT != null) {
|
||||
retVal.add(nextT);
|
||||
} else {
|
||||
// TODO: throw special exception type?
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package ca.uhn.fhir.model.primitive;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||
import ca.uhn.fhir.model.dstu.composite.CodingDt;
|
||||
|
||||
@DatatypeDef(name = "Coding")
|
||||
public class BoundCodingDt<T extends Enum<?>> extends CodingDt {
|
||||
|
||||
private IValueSetEnumBinder<T> myBinder;
|
||||
|
||||
public BoundCodingDt(IValueSetEnumBinder<T> theBinder) {
|
||||
myBinder = theBinder;
|
||||
}
|
||||
|
||||
public BoundCodingDt(IValueSetEnumBinder<T> theBinder, T theValue) {
|
||||
myBinder = theBinder;
|
||||
setValueAsEnum(theValue);
|
||||
}
|
||||
|
||||
public void setValueAsEnum(T theValue) {
|
||||
setCode(new BoundCodeDt<T>(myBinder, theValue));
|
||||
setSystem(myBinder.toSystemString(theValue));
|
||||
}
|
||||
|
||||
public T getValueAsEnum() {
|
||||
return myBinder.fromCodeString(defaultString(getCode().getValue()), defaultString(getSystem().getValueAsString()));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,20 +1,37 @@
|
|||
package ca.uhn.fhir.model.primitive;
|
||||
|
||||
import ca.uhn.fhir.model.api.BaseElement;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
import ca.uhn.fhir.model.api.BasePrimitive;
|
||||
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
|
||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
|
||||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
|
||||
@DatatypeDef(name = "code")
|
||||
public class CodeDt extends BasePrimitive<String> implements ICodedDatatype {
|
||||
public class CodeDt extends BasePrimitive<String> implements ICodedDatatype, Comparable<CodeDt> {
|
||||
|
||||
private String myValue;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public CodeDt() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor which accepts a string code
|
||||
*/
|
||||
@SimpleSetter()
|
||||
public CodeDt(@SimpleSetter.Parameter(name = "theCode") String theCode) {
|
||||
setValue(theCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String theValue) throws DataFormatException {
|
||||
if (theValue == null) {
|
||||
myValue = null;
|
||||
|
@ -34,4 +51,12 @@ public class CodeDt extends BasePrimitive<String> implements ICodedDatatype {
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(CodeDt theCode) {
|
||||
if (theCode == null) {
|
||||
return 1;
|
||||
}
|
||||
return defaultString(getValue()).compareTo(defaultString(theCode.getValue()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ca.uhn.fhir.model.primitive;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||
|
@ -35,6 +36,7 @@ public class DateTimeDt extends BaseDateTimeDt {
|
|||
public DateTimeDt(@SimpleSetter.Parameter(name = "theDate") Date theDate, @SimpleSetter.Parameter(name = "thePrecision") TemporalPrecisionEnum thePrecision) {
|
||||
setValue(theDate);
|
||||
setPrecision(thePrecision);
|
||||
setTimeZone(TimeZone.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,6 +46,7 @@ public class DateTimeDt extends BaseDateTimeDt {
|
|||
public DateTimeDt(@SimpleSetter.Parameter(name="theDate") Date theDate) {
|
||||
setValue(theDate);
|
||||
setPrecision(DEFAULT_PRECISION);
|
||||
setTimeZone(TimeZone.getDefault());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ public class InstantDt extends BaseDateTimeDt {
|
|||
public InstantDt(@SimpleSetter.Parameter(name = "theDate") Date theDate, @SimpleSetter.Parameter(name = "thePrecision") TemporalPrecisionEnum thePrecision) {
|
||||
setValue(theDate);
|
||||
setPrecision(thePrecision);
|
||||
setTimeZone(TimeZone.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,6 +43,7 @@ public class InstantDt extends BaseDateTimeDt {
|
|||
public InstantDt(@SimpleSetter.Parameter(name="theDate") Date theDate) {
|
||||
setValue(theDate);
|
||||
setPrecision(DEFAULT_PRECISION);
|
||||
setTimeZone(TimeZone.getDefault());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue