Add support for profiles and tags in meta for DSTU2
This commit is contained in:
parent
f45654494b
commit
823bb4ed82
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<version>0.9</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>hapi-fhir-android</artifactId>
|
<artifactId>hapi-fhir-android</artifactId>
|
||||||
|
@ -85,27 +85,36 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>${maven_assembly_plugin_version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<attach>true</attach>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>${project.basedir}/src/assembly/android-sources.xml</descriptor>
|
|
||||||
<descriptor>${project.basedir}/src/assembly/android-javadoc.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>DIST</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>${maven_assembly_plugin_version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<attach>true</attach>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>${project.basedir}/src/assembly/android-sources.xml</descriptor>
|
||||||
|
<descriptor>${project.basedir}/src/assembly/android-javadoc.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.phloc</groupId>
|
<groupId>com.phloc</groupId>
|
||||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.model.api;
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.apache.commons.lang3.StringUtils.*;
|
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -28,9 +28,9 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||||
|
@ -63,6 +63,196 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||||
*/
|
*/
|
||||||
public abstract class ResourceMetadataKeyEnum<T> {
|
public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present and populated with a date/time (as an instance of {@link InstantDt}), this value is an indication that the resource is in the deleted state. This key is only used in a limited number
|
||||||
|
* of scenarios, such as POSTing transaction bundles to a server, or returning resource history.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link InstantDt}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<InstantDt> DELETED_AT = new ResourceMetadataKeyEnum<InstantDt>("DELETED_AT") {
|
||||||
|
@Override
|
||||||
|
public InstantDt get(IResource theResource) {
|
||||||
|
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), DELETED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, InstantDt theObject) {
|
||||||
|
theResource.getResourceMetadata().put(DELETED_AT, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Denotes the search score which a given resource should match in a transaction. See the FHIR transaction definition for information about this. Corresponds to the value in
|
||||||
|
* <code>Bundle.entry.score</code> in a Bundle resource.
|
||||||
|
* <p>
|
||||||
|
* Note that search URL is only used in FHIR DSTU2 and later.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link DecimalDt}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<DecimalDt> ENTRY_SCORE = new ResourceMetadataKeyEnum<DecimalDt>("ENTRY_SCORE") {
|
||||||
|
@Override
|
||||||
|
public DecimalDt get(IResource theResource) {
|
||||||
|
return getDecimalFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_SCORE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, DecimalDt theObject) {
|
||||||
|
theResource.getResourceMetadata().put(ENTRY_SCORE, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present and populated with a {@link BundleEntrySearchModeEnum}, contains the "bundle entry search mode", which is the value of the status field in the Bundle entry containing this resource.
|
||||||
|
* The value for this key corresponds to field <code>Bundle.entry.search.mode</code>. This value can be set to provide a status value of "include" for included resources being returned by a
|
||||||
|
* server, or to "match" to indicate that the resource was returned because it matched the given search criteria.
|
||||||
|
* <p>
|
||||||
|
* Note that status is only used in FHIR DSTU2 and later.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link BundleEntrySearchModeEnum}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<BundleEntrySearchModeEnum> ENTRY_SEARCH_MODE = new ResourceMetadataKeyEnum<BundleEntrySearchModeEnum>("ENTRY_SEARCH_MODE") {
|
||||||
|
@Override
|
||||||
|
public BundleEntrySearchModeEnum get(IResource theResource) {
|
||||||
|
return getEnumFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_SEARCH_MODE, BundleEntrySearchModeEnum.class, BundleEntrySearchModeEnum.VALUESET_BINDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, BundleEntrySearchModeEnum theObject) {
|
||||||
|
theResource.getResourceMetadata().put(ENTRY_SEARCH_MODE, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present and populated with a {@link BundleEntryTransactionMethodEnum}, contains the "bundle entry transaction operation", which is the value of the status field in the Bundle entry
|
||||||
|
* containing this resource. The value for this key corresponds to field <code>Bundle.entry.transaction.operation</code>. This value can be set in resources being transmitted to a server to
|
||||||
|
* provide a status value of "create" or "update" to indicate behaviour the server should observe. It may also be set to similar values (or to "noop") in resources being returned by a server as a
|
||||||
|
* result of a transaction to indicate to the client what operation was actually performed.
|
||||||
|
* <p>
|
||||||
|
* Note that status is only used in FHIR DSTU2 and later.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link BundleEntryTransactionMethodEnum}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<BundleEntryTransactionMethodEnum> ENTRY_TRANSACTION_METHOD = new ResourceMetadataKeyEnum<BundleEntryTransactionMethodEnum>(
|
||||||
|
"ENTRY_TRANSACTION_OPERATION") {
|
||||||
|
@Override
|
||||||
|
public BundleEntryTransactionMethodEnum get(IResource theResource) {
|
||||||
|
return getEnumFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_TRANSACTION_METHOD, BundleEntryTransactionMethodEnum.class,
|
||||||
|
BundleEntryTransactionMethodEnum.VALUESET_BINDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, BundleEntryTransactionMethodEnum theObject) {
|
||||||
|
theResource.getResourceMetadata().put(ENTRY_TRANSACTION_METHOD, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present and populated with a string, provides the "alternate link" (the link element in the bundle entry with <code>rel="alternate"</code>). Server implementations may populate this with a
|
||||||
|
* complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient/1243") in which case the server will convert this to
|
||||||
|
* an absolute URL at runtime.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link String}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<String> LINK_ALTERNATE = new ResourceMetadataKeyEnum<String>("LINK_ALTERNATE") {
|
||||||
|
@Override
|
||||||
|
public String get(IResource theResource) {
|
||||||
|
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), LINK_ALTERNATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, String theObject) {
|
||||||
|
theResource.getResourceMetadata().put(LINK_ALTERNATE, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present and populated with a string, provides the "search link" (the link element in the bundle entry with <code>rel="search"</code>). Server implementations may populate this with a
|
||||||
|
* complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient?name=tester") in which case the server will convert
|
||||||
|
* this to an absolute URL at runtime.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link String}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<String> LINK_SEARCH = new ResourceMetadataKeyEnum<String>("LINK_SEARCH") {
|
||||||
|
@Override
|
||||||
|
public String get(IResource theResource) {
|
||||||
|
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), LINK_SEARCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, String theObject) {
|
||||||
|
theResource.getResourceMetadata().put(LINK_SEARCH, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for this key represents a previous ID used to identify this resource. This key is currently only used internally during transaction method processing.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link IdDt}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<IdDt> PREVIOUS_ID = new ResourceMetadataKeyEnum<IdDt>("PREVIOUS_ID") {
|
||||||
|
@Override
|
||||||
|
public IdDt get(IResource theResource) {
|
||||||
|
return getIdFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PREVIOUS_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, IdDt theObject) {
|
||||||
|
theResource.getResourceMetadata().put(PREVIOUS_ID, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for this key represents a {@link List} of profile IDs that this resource claims to conform to.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>List<IdDt></b>. Note that the returned list is <i>unmodifiable</i>, so you need to create a new list and call <code>put</code> to change its value.
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<List<IdDt>> PROFILES = new ResourceMetadataKeyEnum<List<IdDt>>("PROFILES") {
|
||||||
|
@Override
|
||||||
|
public List<IdDt> get(IResource theResource) {
|
||||||
|
return getIdListFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PROFILES);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, List<IdDt> theObject) {
|
||||||
|
theResource.getResourceMetadata().put(PROFILES, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for this key is the bundle entry <b>Published</b> time. This is defined by FHIR as "Time resource copied into the feed", which is generally best left to the current time.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link InstantDt}</b>
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* <b>Server Note</b>: In servers, it is generally advisable to leave this value <code>null</code>, in which case the server will substitute the current time automatically.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @see InstantDt
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<InstantDt> PUBLISHED = new ResourceMetadataKeyEnum<InstantDt>("PUBLISHED") {
|
||||||
|
@Override
|
||||||
|
public InstantDt get(IResource theResource) {
|
||||||
|
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PUBLISHED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, InstantDt theObject) {
|
||||||
|
theResource.getResourceMetadata().put(PUBLISHED, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static final ResourceMetadataKeyEnum<List<BaseCodingDt>> SECURITY_LABELS = new ResourceMetadataKeyEnum<List<BaseCodingDt>>("SECURITY_LABELS") {
|
public static final ResourceMetadataKeyEnum<List<BaseCodingDt>> SECURITY_LABELS = new ResourceMetadataKeyEnum<List<BaseCodingDt>>("SECURITY_LABELS") {
|
||||||
@Override
|
@Override
|
||||||
public List<BaseCodingDt> get(IResource resource) {
|
public List<BaseCodingDt> get(IResource resource) {
|
||||||
|
@ -92,89 +282,6 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If present and populated with a date/time (as an instance of {@link InstantDt}), this value is an indication that the resource is in the deleted state. This key is only used in a limited number
|
|
||||||
* of scenarios, such as POSTing transaction bundles to a server, or returning resource history.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link InstantDt}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<InstantDt> DELETED_AT = new ResourceMetadataKeyEnum<InstantDt>("DELETED_AT") {
|
|
||||||
@Override
|
|
||||||
public InstantDt get(IResource theResource) {
|
|
||||||
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), DELETED_AT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, InstantDt theObject) {
|
|
||||||
theResource.getResourceMetadata().put(DELETED_AT, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value for this key represents a {@link List} of profile IDs that this
|
|
||||||
* resource claims to conform to.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>List<IdDt></b>. Note that the returned list is
|
|
||||||
* <i>unmodifiable</i>, so you need to create a new list and call <code>put</code> to
|
|
||||||
* change its value.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<List<IdDt>> PROFILES = new ResourceMetadataKeyEnum<List<IdDt>>("PROFILES") {
|
|
||||||
@Override
|
|
||||||
public List<IdDt> get(IResource theResource) {
|
|
||||||
return getIdListFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PROFILES);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, List<IdDt> theObject) {
|
|
||||||
theResource.getResourceMetadata().put(PROFILES, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value for this key represents a previous ID used to identify this resource. This key is currently only used internally during transaction method processing.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link IdDt}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<IdDt> PREVIOUS_ID = new ResourceMetadataKeyEnum<IdDt>("PREVIOUS_ID") {
|
|
||||||
@Override
|
|
||||||
public IdDt get(IResource theResource) {
|
|
||||||
return getIdFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PREVIOUS_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, IdDt theObject) {
|
|
||||||
theResource.getResourceMetadata().put(PREVIOUS_ID, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value for this key is the bundle entry <b>Published</b> time. This is defined by FHIR as "Time resource copied into the feed", which is generally best left to the current time.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link InstantDt}</b>
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* <b>Server Note</b>: In servers, it is generally advisable to leave this value <code>null</code>, in which case the server will substitute the current time automatically.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @see InstantDt
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<InstantDt> PUBLISHED = new ResourceMetadataKeyEnum<InstantDt>("PUBLISHED") {
|
|
||||||
@Override
|
|
||||||
public InstantDt get(IResource theResource) {
|
|
||||||
return getInstantFromMetadataOrNullIfNone(theResource.getResourceMetadata(), PUBLISHED);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, InstantDt theObject) {
|
|
||||||
theResource.getResourceMetadata().put(PUBLISHED, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for this key is the list of tags associated with this resource
|
* The value for this key is the list of tags associated with this resource
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -245,6 +352,24 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for this key is the version ID of the resource object.
|
||||||
|
* <p>
|
||||||
|
* Values for this key are of type <b>{@link String}</b>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public static final ResourceMetadataKeyEnum<String> VERSION = new ResourceMetadataKeyEnum<String>("VERSION") {
|
||||||
|
@Override
|
||||||
|
public String get(IResource theResource) {
|
||||||
|
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(IResource theResource, String theObject) {
|
||||||
|
theResource.getResourceMetadata().put(VERSION, theObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for this key is the version ID of the resource object.
|
* The value for this key is the version ID of the resource object.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -266,141 +391,6 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* The value for this key is the version ID of the resource object.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link String}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<String> VERSION = new ResourceMetadataKeyEnum<String>("VERSION") {
|
|
||||||
@Override
|
|
||||||
public String get(IResource theResource) {
|
|
||||||
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, String theObject) {
|
|
||||||
theResource.getResourceMetadata().put(VERSION, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If present and populated with a string, provides the "search link" (the link element in the bundle entry with <code>rel="search"</code>). Server implementations may populate this with a
|
|
||||||
* complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient?name=tester") in which case the server will convert
|
|
||||||
* this to an absolute URL at runtime.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link String}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<String> LINK_SEARCH = new ResourceMetadataKeyEnum<String>("LINK_SEARCH") {
|
|
||||||
@Override
|
|
||||||
public String get(IResource theResource) {
|
|
||||||
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), LINK_SEARCH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, String theObject) {
|
|
||||||
theResource.getResourceMetadata().put(LINK_SEARCH, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If present and populated with a string, provides the "alternate link" (the link element in the bundle entry with <code>rel="alternate"</code>). Server implementations may populate this with a
|
|
||||||
* complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient/1243") in which case the server will convert this to
|
|
||||||
* an absolute URL at runtime.
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link String}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<String> LINK_ALTERNATE = new ResourceMetadataKeyEnum<String>("LINK_ALTERNATE") {
|
|
||||||
@Override
|
|
||||||
public String get(IResource theResource) {
|
|
||||||
return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), LINK_ALTERNATE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, String theObject) {
|
|
||||||
theResource.getResourceMetadata().put(LINK_ALTERNATE, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If present and populated with a {@link BundleEntrySearchModeEnum}, contains the "bundle entry search mode",
|
|
||||||
* which is the value of the status field in the Bundle entry containing this resource. The value for this key
|
|
||||||
* corresponds to field <code>Bundle.entry.search.mode</code>.
|
|
||||||
* This value can be
|
|
||||||
* set to provide a status value of "include" for included resources being returned by a server, or to
|
|
||||||
* "match" to indicate that the resource was returned because it matched the given search criteria.
|
|
||||||
* <p>
|
|
||||||
* Note that status is only used in FHIR DSTU2 and later.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link BundleEntrySearchModeEnum}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<BundleEntrySearchModeEnum> ENTRY_SEARCH_MODE = new ResourceMetadataKeyEnum<BundleEntrySearchModeEnum>("ENTRY_SEARCH_MODE") {
|
|
||||||
@Override
|
|
||||||
public BundleEntrySearchModeEnum get(IResource theResource) {
|
|
||||||
return getEnumFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_SEARCH_MODE, BundleEntrySearchModeEnum.class, BundleEntrySearchModeEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, BundleEntrySearchModeEnum theObject) {
|
|
||||||
theResource.getResourceMetadata().put(ENTRY_SEARCH_MODE, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If present and populated with a {@link BundleEntryTransactionMethodEnum}, contains the "bundle entry transaction operation",
|
|
||||||
* which is the value of the status field in the Bundle entry containing this resource. The value for this key
|
|
||||||
* corresponds to field <code>Bundle.entry.transaction.operation</code>.
|
|
||||||
* This value can be
|
|
||||||
* set in resources being transmitted to a server to provide a status value of "create" or "update" to indicate behaviour the
|
|
||||||
* server should observe. It may also be set to similar values (or to "noop") in resources being returned by
|
|
||||||
* a server as a result of a transaction to indicate to the client what operation was actually performed.
|
|
||||||
* <p>
|
|
||||||
* Note that status is only used in FHIR DSTU2 and later.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link BundleEntryTransactionMethodEnum}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<BundleEntryTransactionMethodEnum> ENTRY_TRANSACTION_METHOD = new ResourceMetadataKeyEnum<BundleEntryTransactionMethodEnum>("ENTRY_TRANSACTION_OPERATION") {
|
|
||||||
@Override
|
|
||||||
public BundleEntryTransactionMethodEnum get(IResource theResource) {
|
|
||||||
return getEnumFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_TRANSACTION_METHOD, BundleEntryTransactionMethodEnum.class, BundleEntryTransactionMethodEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, BundleEntryTransactionMethodEnum theObject) {
|
|
||||||
theResource.getResourceMetadata().put(ENTRY_TRANSACTION_METHOD, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Denotes the search score which a given resource should match in a transaction. See the
|
|
||||||
* FHIR transaction definition for information about this. Corresponds to
|
|
||||||
* the value in <code>Bundle.entry.score</code> in a Bundle resource.
|
|
||||||
* <p>
|
|
||||||
* Note that search URL is only used in FHIR DSTU2 and later.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* Values for this key are of type <b>{@link DecimalDt}</b>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final ResourceMetadataKeyEnum<DecimalDt> ENTRY_SCORE = new ResourceMetadataKeyEnum<DecimalDt>("ENTRY_SCORE") {
|
|
||||||
@Override
|
|
||||||
public DecimalDt get(IResource theResource) {
|
|
||||||
return getDecimalFromMetadataOrNullIfNone(theResource.getResourceMetadata(), ENTRY_SCORE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void put(IResource theResource, DecimalDt theObject) {
|
|
||||||
theResource.getResourceMetadata().put(ENTRY_SCORE, theObject);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private final String myValue;
|
private final String myValue;
|
||||||
|
|
||||||
public ResourceMetadataKeyEnum(String theValue) {
|
public ResourceMetadataKeyEnum(String theValue) {
|
||||||
|
@ -445,14 +435,53 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
return myValue;
|
return myValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static DecimalDt getDecimalFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<DecimalDt> theKey) {
|
||||||
|
Object retValObj = theResourceMetadata.get(theKey);
|
||||||
|
if (retValObj == null) {
|
||||||
|
return null;
|
||||||
|
} else if (retValObj instanceof DecimalDt) {
|
||||||
|
if (((DecimalDt) retValObj).isEmpty()) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return (DecimalDt) retValObj;
|
||||||
|
}
|
||||||
|
} else if (retValObj instanceof String) {
|
||||||
|
if (StringUtils.isBlank((String) retValObj)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new DecimalDt((String) retValObj);
|
||||||
|
} else if (retValObj instanceof Double) {
|
||||||
|
return new DecimalDt((Double) retValObj);
|
||||||
|
}
|
||||||
|
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
||||||
|
+ InstantDt.class.getCanonicalName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private static <T extends Enum<?>> T getEnumFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<T> theKey, Class<T> theEnumType,
|
||||||
|
IValueSetEnumBinder<T> theBinder) {
|
||||||
|
Object retValObj = theResourceMetadata.get(theKey);
|
||||||
|
if (retValObj == null) {
|
||||||
|
return null;
|
||||||
|
} else if (theEnumType.equals(retValObj.getClass())) {
|
||||||
|
return (T) retValObj;
|
||||||
|
} else if (retValObj instanceof String) {
|
||||||
|
return theBinder.fromCodeString((String) retValObj);
|
||||||
|
}
|
||||||
|
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
||||||
|
+ InstantDt.class.getCanonicalName());
|
||||||
|
}
|
||||||
|
|
||||||
private static IdDt getIdFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<?> theKey) {
|
private static IdDt getIdFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<?> theKey) {
|
||||||
return toId(theKey, theResourceMetadata.get(theKey));
|
return toId(theKey, theResourceMetadata.get(theKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<IdDt> getIdListFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<?> theKey) {
|
private static List<IdDt> getIdListFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<?> theKey) {
|
||||||
Object retValObj = theResourceMetadata.get(theKey);
|
Object retValObj = theResourceMetadata.get(theKey);
|
||||||
if (retValObj instanceof List) {
|
if (retValObj == null) {
|
||||||
List<?> retValList = (List<?>)retValObj;
|
return null;
|
||||||
|
} else if (retValObj instanceof List) {
|
||||||
|
List<?> retValList = (List<?>) retValObj;
|
||||||
for (Object next : retValList) {
|
for (Object next : retValList) {
|
||||||
if (!(next instanceof IdDt)) {
|
if (!(next instanceof IdDt)) {
|
||||||
List<IdDt> retVal = new ArrayList<IdDt>();
|
List<IdDt> retVal = new ArrayList<IdDt>();
|
||||||
|
@ -470,28 +499,6 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IdDt toId(ResourceMetadataKeyEnum<?> theKey, Object retValObj) {
|
|
||||||
if (retValObj == null) {
|
|
||||||
return null;
|
|
||||||
} else if (retValObj instanceof String) {
|
|
||||||
if (isNotBlank((String) retValObj)) {
|
|
||||||
return new IdDt((String) retValObj);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else if (retValObj instanceof IdDt) {
|
|
||||||
if (((IdDt) retValObj).isEmpty()) {
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return (IdDt) retValObj;
|
|
||||||
}
|
|
||||||
} else if (retValObj instanceof Number) {
|
|
||||||
return new IdDt(((Number) retValObj).toString());
|
|
||||||
}
|
|
||||||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
|
||||||
+ IdDt.class.getCanonicalName());
|
|
||||||
}
|
|
||||||
|
|
||||||
private static InstantDt getInstantFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<InstantDt> theKey) {
|
private static InstantDt getInstantFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<InstantDt> theKey) {
|
||||||
Object retValObj = theResourceMetadata.get(theKey);
|
Object retValObj = theResourceMetadata.get(theKey);
|
||||||
if (retValObj == null) {
|
if (retValObj == null) {
|
||||||
|
@ -529,44 +536,6 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
+ InstantDt.class.getCanonicalName());
|
+ InstantDt.class.getCanonicalName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static DecimalDt getDecimalFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<DecimalDt> theKey) {
|
|
||||||
Object retValObj = theResourceMetadata.get(theKey);
|
|
||||||
if (retValObj == null) {
|
|
||||||
return null;
|
|
||||||
} else if (retValObj instanceof DecimalDt) {
|
|
||||||
if (((DecimalDt) retValObj).isEmpty()) {
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return (DecimalDt) retValObj;
|
|
||||||
}
|
|
||||||
} else if (retValObj instanceof String) {
|
|
||||||
if (StringUtils.isBlank((String) retValObj)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new DecimalDt((String) retValObj);
|
|
||||||
} else if (retValObj instanceof Double) {
|
|
||||||
return new DecimalDt((Double) retValObj);
|
|
||||||
}
|
|
||||||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
|
||||||
+ InstantDt.class.getCanonicalName());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private static <T extends Enum<?>> T getEnumFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<T> theKey, Class<T> theEnumType, IValueSetEnumBinder<T> theBinder) {
|
|
||||||
Object retValObj = theResourceMetadata.get(theKey);
|
|
||||||
if (retValObj == null) {
|
|
||||||
return null;
|
|
||||||
} else if (theEnumType.equals(retValObj.getClass())) {
|
|
||||||
return (T) retValObj;
|
|
||||||
} else if (retValObj instanceof String) {
|
|
||||||
return theBinder.fromCodeString((String) retValObj);
|
|
||||||
}
|
|
||||||
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
|
||||||
+ InstantDt.class.getCanonicalName());
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String getStringFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<String> theKey) {
|
private static String getStringFromMetadataOrNullIfNone(Map<ResourceMetadataKeyEnum<?>, Object> theResourceMetadata, ResourceMetadataKeyEnum<String> theKey) {
|
||||||
Object retValObj = theResourceMetadata.get(theKey);
|
Object retValObj = theResourceMetadata.get(theKey);
|
||||||
if (retValObj == null) {
|
if (retValObj == null) {
|
||||||
|
@ -582,4 +551,26 @@ public abstract class ResourceMetadataKeyEnum<T> {
|
||||||
+ String.class.getCanonicalName());
|
+ String.class.getCanonicalName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IdDt toId(ResourceMetadataKeyEnum<?> theKey, Object retValObj) {
|
||||||
|
if (retValObj == null) {
|
||||||
|
return null;
|
||||||
|
} else if (retValObj instanceof String) {
|
||||||
|
if (isNotBlank((String) retValObj)) {
|
||||||
|
return new IdDt((String) retValObj);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if (retValObj instanceof IdDt) {
|
||||||
|
if (((IdDt) retValObj).isEmpty()) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return (IdDt) retValObj;
|
||||||
|
}
|
||||||
|
} else if (retValObj instanceof Number) {
|
||||||
|
return new IdDt(((Number) retValObj).toString());
|
||||||
|
}
|
||||||
|
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected "
|
||||||
|
+ IdDt.class.getCanonicalName());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.io.StringReader;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.IdentityHashMap;
|
import java.util.IdentityHashMap;
|
||||||
|
@ -73,7 +74,7 @@ public abstract class BaseParser implements IParser {
|
||||||
|
|
||||||
Set<String> allIds = new HashSet<String>();
|
Set<String> allIds = new HashSet<String>();
|
||||||
Map<String, IBaseResource> existingIdToContainedResource = null;
|
Map<String, IBaseResource> existingIdToContainedResource = null;
|
||||||
|
|
||||||
if (theTarget instanceof IResource) {
|
if (theTarget instanceof IResource) {
|
||||||
List<? extends IResource> containedResources = ((IResource) theTarget).getContained().getContainedResources();
|
List<? extends IResource> containedResources = ((IResource) theTarget).getContained().getContainedResources();
|
||||||
for (IResource next : containedResources) {
|
for (IResource next : containedResources) {
|
||||||
|
@ -182,7 +183,7 @@ public abstract class BaseParser implements IParser {
|
||||||
if (resource == null) {
|
if (resource == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String resourceBaseUrl = null;
|
String resourceBaseUrl = null;
|
||||||
if (resource.getId() != null && resource.getId().hasBaseUrl()) {
|
if (resource.getId() != null && resource.getId().hasBaseUrl()) {
|
||||||
if (!resource.getId().getBaseUrl().equals(bundleBaseUrl)) {
|
if (!resource.getId().getBaseUrl().equals(bundleBaseUrl)) {
|
||||||
|
@ -192,6 +193,8 @@ public abstract class BaseParser implements IParser {
|
||||||
return resourceBaseUrl;
|
return resourceBaseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract <T extends IBaseResource> T doParseResource(Class<T> theResourceType, Reader theReader) throws DataFormatException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String encodeBundleToString(Bundle theBundle) throws DataFormatException {
|
public String encodeBundleToString(Bundle theBundle) throws DataFormatException {
|
||||||
if (theBundle == null) {
|
if (theBundle == null) {
|
||||||
|
@ -241,8 +244,7 @@ public abstract class BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to <code>true</code> (default is <code>false</code>), narratives will not be included in the encoded
|
* If set to <code>true</code> (default is <code>false</code>), narratives will not be included in the encoded values.
|
||||||
* values.
|
|
||||||
*/
|
*/
|
||||||
public boolean getSuppressNarratives() {
|
public boolean getSuppressNarratives() {
|
||||||
return mySuppressNarratives;
|
return mySuppressNarratives;
|
||||||
|
@ -259,6 +261,54 @@ public abstract class BaseParser implements IParser {
|
||||||
return parseBundle(reader);
|
return parseBundle(reader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T extends IBaseResource> T parseResource(Class<T> theResourceType, Reader theReader) throws DataFormatException {
|
||||||
|
T retVal = doParseResource(theResourceType, theReader);
|
||||||
|
|
||||||
|
RuntimeResourceDefinition def = myContext.getResourceDefinition(retVal);
|
||||||
|
if ("Bundle".equals(def.getName())) {
|
||||||
|
List<IBase> base = def.getChildByName("base").getAccessor().getValues(retVal);
|
||||||
|
if (base != null && base.size() > 0) {
|
||||||
|
IPrimitiveType<?> baseType = (IPrimitiveType<?>) base.get(0);
|
||||||
|
IResource res = ((IResource) retVal);
|
||||||
|
res.setId(new IdDt(baseType.getValueAsString(), def.getName(), res.getId().getIdPart(), res.getId().getVersionIdPart()));
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseRuntimeChildDefinition entryChild = def.getChildByName("entry");
|
||||||
|
BaseRuntimeElementCompositeDefinition<?> entryDef = (BaseRuntimeElementCompositeDefinition<?>) entryChild.getChildByName("entry");
|
||||||
|
List<IBase> entries = entryChild.getAccessor().getValues(retVal);
|
||||||
|
if (entries != null) {
|
||||||
|
for (IBase nextEntry : entries) {
|
||||||
|
List<IBase> entryBase = entryDef.getChildByName("base").getAccessor().getValues(nextEntry);
|
||||||
|
|
||||||
|
if (entryBase == null || entryBase.isEmpty()) {
|
||||||
|
entryBase = base;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entryBase != null && entryBase.size() > 0) {
|
||||||
|
IPrimitiveType<?> baseType = (IPrimitiveType<?>) entryBase.get(0);
|
||||||
|
|
||||||
|
List<IBase> entryResources = entryDef.getChildByName("resource").getAccessor().getValues(nextEntry);
|
||||||
|
if (entryResources != null && entryResources.size() > 0) {
|
||||||
|
IResource res = (IResource) entryResources.get(0);
|
||||||
|
RuntimeResourceDefinition resDef = myContext.getResourceDefinition(res);
|
||||||
|
String versionIdPart = res.getId().getVersionIdPart();
|
||||||
|
if (isBlank(versionIdPart)) {
|
||||||
|
versionIdPart = ResourceMetadataKeyEnum.VERSION.get(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
res.setId(new IdDt(baseType.getValueAsString(), resDef.getName(), res.getId().getIdPart(), versionIdPart));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("cast")
|
@SuppressWarnings("cast")
|
||||||
@Override
|
@Override
|
||||||
public <T extends IBaseResource> T parseResource(Class<T> theResourceType, String theMessageString) {
|
public <T extends IBaseResource> T parseResource(Class<T> theResourceType, String theMessageString) {
|
||||||
|
@ -271,57 +321,6 @@ public abstract class BaseParser implements IParser {
|
||||||
return parseResource(null, theReader);
|
return parseResource(null, theReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract <T extends IBaseResource> T doParseResource(Class<T> theResourceType, Reader theReader) throws DataFormatException;
|
|
||||||
|
|
||||||
public <T extends IBaseResource> T parseResource(Class<T> theResourceType, Reader theReader) throws DataFormatException {
|
|
||||||
T retVal = doParseResource(theResourceType, theReader);
|
|
||||||
|
|
||||||
RuntimeResourceDefinition def = myContext.getResourceDefinition(retVal);
|
|
||||||
if ("Bundle".equals(def.getName())) {
|
|
||||||
List<IBase> base = def.getChildByName("base").getAccessor().getValues(retVal);
|
|
||||||
if (base != null && base.size() > 0) {
|
|
||||||
IPrimitiveType<?> baseType = (IPrimitiveType<?>) base.get(0);
|
|
||||||
IResource res = ((IResource)retVal);
|
|
||||||
res.setId(new IdDt(baseType.getValueAsString(), def.getName(), res.getId().getIdPart(), res.getId().getVersionIdPart()));
|
|
||||||
}
|
|
||||||
|
|
||||||
BaseRuntimeChildDefinition entryChild = def.getChildByName("entry");
|
|
||||||
BaseRuntimeElementCompositeDefinition<?> entryDef = (BaseRuntimeElementCompositeDefinition<?>) entryChild.getChildByName("entry");
|
|
||||||
List<IBase> entries = entryChild.getAccessor().getValues(retVal);
|
|
||||||
if (entries != null) {
|
|
||||||
for (IBase nextEntry : entries) {
|
|
||||||
List<IBase> entryBase = entryDef.getChildByName("base").getAccessor().getValues(nextEntry);
|
|
||||||
|
|
||||||
if (entryBase == null || entryBase.isEmpty()) {
|
|
||||||
entryBase = base;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entryBase != null && entryBase.size() > 0) {
|
|
||||||
IPrimitiveType<?> baseType = (IPrimitiveType<?>) entryBase.get(0);
|
|
||||||
|
|
||||||
List<IBase> entryResources = entryDef.getChildByName("resource").getAccessor().getValues(nextEntry);
|
|
||||||
if (entryResources != null && entryResources.size() > 0) {
|
|
||||||
IResource res = (IResource) entryResources.get(0);
|
|
||||||
RuntimeResourceDefinition resDef = myContext.getResourceDefinition(res);
|
|
||||||
String versionIdPart = res.getId().getVersionIdPart();
|
|
||||||
if (isBlank(versionIdPart)) {
|
|
||||||
versionIdPart = ResourceMetadataKeyEnum.VERSION.get(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
res.setId(new IdDt(baseType.getValueAsString(), resDef.getName(), res.getId().getIdPart(), versionIdPart));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IResource parseResource(String theMessageString) throws ConfigurationException, DataFormatException {
|
public IResource parseResource(String theMessageString) throws ConfigurationException, DataFormatException {
|
||||||
return parseResource(null, theMessageString);
|
return parseResource(null, theMessageString);
|
||||||
|
@ -354,6 +353,14 @@ public abstract class BaseParser implements IParser {
|
||||||
throw new DataFormatException(nextChild + " has no child of type " + theType);
|
throw new DataFormatException(nextChild + " has no child of type " + theType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static <T> List<T> extractMetadataListNotNull(IResource resource, ResourceMetadataKeyEnum<List<T>> key) {
|
||||||
|
List<T> securityLabels = key.get(resource);
|
||||||
|
if (securityLabels == null) {
|
||||||
|
securityLabels = Collections.emptyList();
|
||||||
|
}
|
||||||
|
return securityLabels;
|
||||||
|
}
|
||||||
|
|
||||||
static class ContainedResources {
|
static class ContainedResources {
|
||||||
private long myNextContainedId = 1;
|
private long myNextContainedId = 1;
|
||||||
|
|
||||||
|
@ -368,8 +375,8 @@ public abstract class BaseParser implements IParser {
|
||||||
IdDt newId;
|
IdDt newId;
|
||||||
if (theResource instanceof IResource && ((IResource) theResource).getId().isLocal()) {
|
if (theResource instanceof IResource && ((IResource) theResource).getId().isLocal()) {
|
||||||
newId = ((IResource) theResource).getId();
|
newId = ((IResource) theResource).getId();
|
||||||
} else if (theResource instanceof IAnyResource && ((IAnyResource)theResource).getId() != null && ((IAnyResource)theResource).getId().startsWith("#")) {
|
} else if (theResource instanceof IAnyResource && ((IAnyResource) theResource).getId() != null && ((IAnyResource) theResource).getId().startsWith("#")) {
|
||||||
newId = new IdDt(((IAnyResource)theResource).getId());
|
newId = new IdDt(((IAnyResource) theResource).getId());
|
||||||
} else {
|
} else {
|
||||||
// TODO: make this configurable between the two below (and something else?)
|
// TODO: make this configurable between the two below (and something else?)
|
||||||
// newId = new IdDt(UUID.randomUUID().toString());
|
// newId = new IdDt(UUID.randomUUID().toString());
|
||||||
|
|
|
@ -96,6 +96,7 @@ import ca.uhn.fhir.model.base.composite.BaseNarrativeDt;
|
||||||
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
|
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
import ca.uhn.fhir.model.primitive.IntegerDt;
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
import ca.uhn.fhir.model.primitive.StringDt;
|
||||||
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
||||||
|
@ -671,14 +672,30 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
|
|
||||||
if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1) && theResource instanceof IResource) {
|
if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1) && theResource instanceof IResource) {
|
||||||
IResource resource = (IResource) theResource;
|
IResource resource = (IResource) theResource;
|
||||||
List<BaseCodingDt> securityLabels = ResourceMetadataKeyEnum.SECURITY_LABELS.get(resource);
|
|
||||||
if (securityLabels == null) {
|
InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED);
|
||||||
securityLabels = Collections.emptyList();
|
IdDt resourceId = resource.getId();
|
||||||
|
String versionIdPart = resourceId.getVersionIdPart();
|
||||||
|
if (isBlank(versionIdPart)) {
|
||||||
|
versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource);
|
||||||
}
|
}
|
||||||
if (!ElementUtil.isEmpty(resource.getId().getVersionIdPart(), ResourceMetadataKeyEnum.UPDATED.get(resource), securityLabels)) {
|
List<BaseCodingDt> securityLabels = extractMetadataListNotNull(resource, ResourceMetadataKeyEnum.SECURITY_LABELS);
|
||||||
|
List<IdDt> profiles = extractMetadataListNotNull(resource, ResourceMetadataKeyEnum.PROFILES);
|
||||||
|
TagList tags = ResourceMetadataKeyEnum.TAG_LIST.get(resource);
|
||||||
|
if (ElementUtil.isEmpty(versionIdPart, updated, securityLabels, profiles) == false) {
|
||||||
theEventWriter.writeStartObject("meta");
|
theEventWriter.writeStartObject("meta");
|
||||||
writeOptionalTagWithTextNode(theEventWriter, "versionId", resource.getId().getVersionIdPart());
|
writeOptionalTagWithTextNode(theEventWriter, "versionId", resource.getId().getVersionIdPart());
|
||||||
writeOptionalTagWithTextNode(theEventWriter, "lastUpdated", ResourceMetadataKeyEnum.UPDATED.get(resource));
|
writeOptionalTagWithTextNode(theEventWriter, "lastUpdated", ResourceMetadataKeyEnum.UPDATED.get(resource));
|
||||||
|
|
||||||
|
if (profiles != null && profiles.isEmpty()==false) {
|
||||||
|
theEventWriter.writeStartArray("profile");
|
||||||
|
for (IdDt profile : profiles) {
|
||||||
|
if (profile != null && isNotBlank(profile.getValue())) {
|
||||||
|
theEventWriter.write(profile.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
theEventWriter.writeEnd();
|
||||||
|
}
|
||||||
|
|
||||||
if (securityLabels.isEmpty()==false) {
|
if (securityLabels.isEmpty()==false) {
|
||||||
theEventWriter.writeStartArray("security");
|
theEventWriter.writeStartArray("security");
|
||||||
|
@ -690,6 +707,19 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
theEventWriter.writeEnd();
|
theEventWriter.writeEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tags != null && tags.isEmpty()==false) {
|
||||||
|
theEventWriter.writeStartArray("tag");
|
||||||
|
for (Tag tag : tags) {
|
||||||
|
theEventWriter.writeStartObject();
|
||||||
|
writeOptionalTagWithTextNode(theEventWriter, "system", tag.getScheme());
|
||||||
|
writeOptionalTagWithTextNode(theEventWriter, "code", tag.getTerm());
|
||||||
|
writeOptionalTagWithTextNode(theEventWriter, "display", tag.getLabel());
|
||||||
|
theEventWriter.writeEnd();
|
||||||
|
}
|
||||||
|
theEventWriter.writeEnd();
|
||||||
|
}
|
||||||
|
|
||||||
theEventWriter.writeEnd(); //end meta
|
theEventWriter.writeEnd(); //end meta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1716,6 +1716,23 @@ class ParserState<T> {
|
||||||
BaseRuntimeElementCompositeDefinition<?> codinfDef = (BaseRuntimeElementCompositeDefinition<?>) myContext.getElementDefinition(securityLabel.getClass());
|
BaseRuntimeElementCompositeDefinition<?> codinfDef = (BaseRuntimeElementCompositeDefinition<?>) myContext.getElementDefinition(securityLabel.getClass());
|
||||||
push(new SecurityLabelElementStateHapi(getPreResourceState(), codinfDef, securityLabel));
|
push(new SecurityLabelElementStateHapi(getPreResourceState(), codinfDef, securityLabel));
|
||||||
securityLabels.add(securityLabel);
|
securityLabels.add(securityLabel);
|
||||||
|
} else if (theLocalPart.equals("profile")) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
List<IdDt> profiles = (List<IdDt>) myMap.get(ResourceMetadataKeyEnum.PROFILES);
|
||||||
|
if (profiles == null) {
|
||||||
|
profiles = new ArrayList<IdDt>();
|
||||||
|
myMap.put(ResourceMetadataKeyEnum.PROFILES, profiles);
|
||||||
|
}
|
||||||
|
IdDt profile = new IdDt();
|
||||||
|
push(new PrimitiveState(getPreResourceState(), profile));
|
||||||
|
profiles.add(profile);
|
||||||
|
} else if (theLocalPart.equals("tag")) {
|
||||||
|
TagList tagList = (TagList) myMap.get(ResourceMetadataKeyEnum.TAG_LIST);
|
||||||
|
if (tagList == null) {
|
||||||
|
tagList = new TagList();
|
||||||
|
myMap.put(ResourceMetadataKeyEnum.TAG_LIST, tagList);
|
||||||
|
}
|
||||||
|
push(new TagState(tagList));
|
||||||
} else {
|
} else {
|
||||||
throw new DataFormatException("Unexpected element '" + theLocalPart + "' found in 'meta' element");
|
throw new DataFormatException("Unexpected element '" + theLocalPart + "' found in 'meta' element");
|
||||||
}
|
}
|
||||||
|
@ -2371,11 +2388,14 @@ class ParserState<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
|
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
|
||||||
if (Tag.ATTR_TERM.equals(theLocalPart)) {
|
/*
|
||||||
|
* We allow for both the DSTU1 and DSTU2 names here
|
||||||
|
*/
|
||||||
|
if (Tag.ATTR_TERM.equals(theLocalPart) || "code".equals(theLocalPart)) {
|
||||||
mySubState = TERM;
|
mySubState = TERM;
|
||||||
} else if (Tag.ATTR_SCHEME.equals(theLocalPart)) {
|
} else if (Tag.ATTR_SCHEME.equals(theLocalPart) || "system".equals(theLocalPart)) {
|
||||||
mySubState = SCHEME;
|
mySubState = SCHEME;
|
||||||
} else if (Tag.ATTR_LABEL.equals(theLocalPart)) {
|
} else if (Tag.ATTR_LABEL.equals(theLocalPart) || "display".equals(theLocalPart)) {
|
||||||
mySubState = LABEL;
|
mySubState = LABEL;
|
||||||
} else {
|
} else {
|
||||||
throw new DataFormatException("Unexpected element: " + theLocalPart);
|
throw new DataFormatException("Unexpected element: " + theLocalPart);
|
||||||
|
|
|
@ -86,6 +86,7 @@ import ca.uhn.fhir.model.primitive.StringDt;
|
||||||
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
||||||
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
||||||
import ca.uhn.fhir.rest.server.Constants;
|
import ca.uhn.fhir.rest.server.Constants;
|
||||||
|
import ca.uhn.fhir.util.ElementUtil;
|
||||||
import ca.uhn.fhir.util.NonPrettyPrintWriterWrapper;
|
import ca.uhn.fhir.util.NonPrettyPrintWriterWrapper;
|
||||||
import ca.uhn.fhir.util.PrettyPrintWriterWrapper;
|
import ca.uhn.fhir.util.PrettyPrintWriterWrapper;
|
||||||
import ca.uhn.fhir.util.XmlUtil;
|
import ca.uhn.fhir.util.XmlUtil;
|
||||||
|
@ -106,8 +107,7 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
private boolean myPrettyPrint;
|
private boolean myPrettyPrint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not use this constructor, the recommended way to obtain a new instance of the XML parser is to invoke
|
* Do not use this constructor, the recommended way to obtain a new instance of the XML parser is to invoke {@link FhirContext#newXmlParser()}.
|
||||||
* {@link FhirContext#newXmlParser()}.
|
|
||||||
*/
|
*/
|
||||||
public XmlParser(FhirContext theContext) {
|
public XmlParser(FhirContext theContext) {
|
||||||
super(theContext);
|
super(theContext);
|
||||||
|
@ -436,7 +436,8 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
theEventWriter.close();
|
theEventWriter.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition<?> childDef, String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition<?> childDef,
|
||||||
|
String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
||||||
if (nextValue.isEmpty()) {
|
if (nextValue.isEmpty()) {
|
||||||
if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) {
|
if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) {
|
||||||
// We still want to go in..
|
// We still want to go in..
|
||||||
|
@ -480,10 +481,9 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
case CONTAINED_RESOURCES: {
|
case CONTAINED_RESOURCES: {
|
||||||
BaseContainedDt value = (BaseContainedDt) nextValue;
|
BaseContainedDt value = (BaseContainedDt) nextValue;
|
||||||
/*
|
/*
|
||||||
* Disable per #103 for (IResource next : value.getContainedResources()) { if
|
* Disable per #103 for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { continue; }
|
||||||
* (getContainedResources().getResourceId(next) != null) { continue; }
|
* theEventWriter.writeStartElement("contained"); encodeResourceToXmlStreamWriter(next, theEventWriter, true, fixContainedResourceId(next.getId().getValue()));
|
||||||
* theEventWriter.writeStartElement("contained"); encodeResourceToXmlStreamWriter(next, theEventWriter,
|
* theEventWriter.writeEndElement(); }
|
||||||
* true, fixContainedResourceId(next.getId().getValue())); theEventWriter.writeEndElement(); }
|
|
||||||
*/
|
*/
|
||||||
for (IBaseResource next : getContainedResources().getContainedResources()) {
|
for (IBaseResource next : getContainedResources().getContainedResources()) {
|
||||||
IdDt resourceId = getContainedResources().getResourceId(next);
|
IdDt resourceId = getContainedResources().getResourceId(next);
|
||||||
|
@ -515,7 +515,8 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeCompositeElementChildrenToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List<? extends BaseRuntimeChildDefinition> children, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
private void encodeCompositeElementChildrenToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List<? extends BaseRuntimeChildDefinition> children,
|
||||||
|
boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
||||||
for (BaseRuntimeChildDefinition nextChild : children) {
|
for (BaseRuntimeChildDefinition nextChild : children) {
|
||||||
if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) {
|
if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -596,7 +597,8 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeCompositeElementToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition<?> theElementDefinition, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
private void encodeCompositeElementToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition<?> theElementDefinition,
|
||||||
|
boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
||||||
encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource);
|
encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource);
|
||||||
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getExtensions(), theIncludedResource);
|
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getExtensions(), theIncludedResource);
|
||||||
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getChildren(), theIncludedResource);
|
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getChildren(), theIncludedResource);
|
||||||
|
@ -619,9 +621,8 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is just to work around the fact that casting java.util.List<ca.uhn.fhir.model.api.ExtensionDt> to
|
* This is just to work around the fact that casting java.util.List<ca.uhn.fhir.model.api.ExtensionDt> to java.util.List<? extends org.hl7.fhir.instance.model.api.IBaseExtension<?>> seems to be
|
||||||
* java.util.List<? extends org.hl7.fhir.instance.model.api.IBaseExtension<?>> seems to be rejected by the compiler
|
* rejected by the compiler some of the time.
|
||||||
* some of the time.
|
|
||||||
*/
|
*/
|
||||||
private <Q extends IBaseExtension<?>> List<IBaseExtension<?>> toBaseExtensionList(final List<Q> theList) {
|
private <Q extends IBaseExtension<?>> List<IBaseExtension<?>> toBaseExtensionList(final List<Q> theList) {
|
||||||
List<IBaseExtension<?>> retVal = new ArrayList<IBaseExtension<?>>(theList.size());
|
List<IBaseExtension<?>> retVal = new ArrayList<IBaseExtension<?>>(theList.size());
|
||||||
|
@ -644,10 +645,11 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition<?> resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter,
|
||||||
|
BaseRuntimeElementCompositeDefinition<?> resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
||||||
/*
|
/*
|
||||||
* DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy
|
* DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy way to make that happen, but hopefully this won't matter as much once we use the
|
||||||
* way to make that happen, but hopefully this won't matter as much once we use the HL7 structures
|
* HL7 structures
|
||||||
*/
|
*/
|
||||||
|
|
||||||
List<BaseRuntimeChildDefinition> preExtensionChildren = new ArrayList<BaseRuntimeChildDefinition>();
|
List<BaseRuntimeChildDefinition> preExtensionChildren = new ArrayList<BaseRuntimeChildDefinition>();
|
||||||
|
@ -743,26 +745,39 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
|
|
||||||
InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED);
|
InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED);
|
||||||
IdDt resourceId = resource.getId();
|
IdDt resourceId = resource.getId();
|
||||||
List<BaseCodingDt> securityLabels = ResourceMetadataKeyEnum.SECURITY_LABELS.get(resource);
|
String versionIdPart = resourceId.getVersionIdPart();
|
||||||
if (securityLabels == null) {
|
if (isBlank(versionIdPart)) {
|
||||||
securityLabels = Collections.emptyList();
|
versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource);
|
||||||
}
|
}
|
||||||
if ((resourceId != null && isNotBlank(resourceId.getVersionIdPart())) || (updated != null && !updated.isEmpty()) || !securityLabels.isEmpty()) {
|
List<BaseCodingDt> securityLabels = extractMetadataListNotNull(resource, ResourceMetadataKeyEnum.SECURITY_LABELS);
|
||||||
|
List<IdDt> profiles = extractMetadataListNotNull(resource, ResourceMetadataKeyEnum.PROFILES);
|
||||||
|
TagList tags = ResourceMetadataKeyEnum.TAG_LIST.get(resource);
|
||||||
|
if (ElementUtil.isEmpty(versionIdPart, updated, securityLabels, profiles) == false) {
|
||||||
theEventWriter.writeStartElement("meta");
|
theEventWriter.writeStartElement("meta");
|
||||||
String versionIdPart = resourceId.getVersionIdPart();
|
|
||||||
if (isBlank(versionIdPart)) {
|
|
||||||
versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource);
|
|
||||||
}
|
|
||||||
writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart);
|
writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart);
|
||||||
if (updated != null) {
|
if (updated != null) {
|
||||||
writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString());
|
writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString());
|
||||||
}
|
}
|
||||||
|
for (IdDt profile : profiles) {
|
||||||
|
theEventWriter.writeStartElement("profile");
|
||||||
|
theEventWriter.writeAttribute("value", profile.getValue());
|
||||||
|
theEventWriter.writeEndElement();
|
||||||
|
}
|
||||||
for (BaseCodingDt securityLabel : securityLabels) {
|
for (BaseCodingDt securityLabel : securityLabels) {
|
||||||
theEventWriter.writeStartElement("security");
|
theEventWriter.writeStartElement("security");
|
||||||
BaseRuntimeElementCompositeDefinition<?> def = (BaseRuntimeElementCompositeDefinition<?>) myContext.getElementDefinition(securityLabel.getClass());
|
BaseRuntimeElementCompositeDefinition<?> def = (BaseRuntimeElementCompositeDefinition<?>) myContext.getElementDefinition(securityLabel.getClass());
|
||||||
encodeCompositeElementChildrenToStreamWriter(resource, securityLabel, theEventWriter, def.getChildren(), theContainedResource);
|
encodeCompositeElementChildrenToStreamWriter(resource, securityLabel, theEventWriter, def.getChildren(), theContainedResource);
|
||||||
theEventWriter.writeEndElement();
|
theEventWriter.writeEndElement();
|
||||||
}
|
}
|
||||||
|
if (tags != null) {
|
||||||
|
for (Tag tag : tags) {
|
||||||
|
theEventWriter.writeStartElement("tag");
|
||||||
|
writeOptionalTagWithValue(theEventWriter, "system", tag.getScheme());
|
||||||
|
writeOptionalTagWithValue(theEventWriter, "code", tag.getTerm());
|
||||||
|
writeOptionalTagWithValue(theEventWriter, "display", tag.getLabel());
|
||||||
|
theEventWriter.writeEndElement();
|
||||||
|
}
|
||||||
|
}
|
||||||
theEventWriter.writeEndElement();
|
theEventWriter.writeEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -829,7 +844,8 @@ public class XmlParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeUndeclaredExtensions(IBaseResource theResource, XMLStreamWriter theWriter, List<? extends IBaseExtension<?>> theExtensions, String tagName, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
|
private void encodeUndeclaredExtensions(IBaseResource theResource, XMLStreamWriter theWriter, List<? extends IBaseExtension<?>> theExtensions, String tagName, boolean theIncludedResource)
|
||||||
|
throws XMLStreamException, DataFormatException {
|
||||||
for (IBaseExtension<?> next : theExtensions) {
|
for (IBaseExtension<?> next : theExtensions) {
|
||||||
if (next == null) {
|
if (next == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<dependent-module archiveName="hapi-fhir-jpaserver-base-0.9.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-jpaserver-base/hapi-fhir-jpaserver-base">
|
<dependent-module archiveName="hapi-fhir-jpaserver-base-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-jpaserver-base/hapi-fhir-jpaserver-base">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
<dependent-module archiveName="hapi-fhir-base-0.9.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-base/hapi-fhir-base">
|
<dependent-module archiveName="hapi-fhir-base-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-base/hapi-fhir-base">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
<dependent-module archiveName="hapi-fhir-structures-dstu-0.9.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu/hapi-fhir-structures-dstu">
|
<dependent-module archiveName="hapi-fhir-structures-dstu-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu/hapi-fhir-structures-dstu">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
<dependent-module archiveName="hapi-fhir-structures-dstu2-0.9.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu2/hapi-fhir-structures-dstu2">
|
<dependent-module archiveName="hapi-fhir-structures-dstu2-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu2/hapi-fhir-structures-dstu2">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
<dependent-module deploy-path="/" handle="module:/overlay/prj/hapi-fhir-testpage-overlay?includes=**/**&excludes=META-INF/MANIFEST.MF">
|
<dependent-module deploy-path="/" handle="module:/overlay/prj/hapi-fhir-testpage-overlay?includes=**/**&excludes=META-INF/MANIFEST.MF">
|
||||||
|
|
|
@ -35,5 +35,6 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry combineaccessrules="false" kind="src" path="/hapi-fhir-base"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -19,7 +19,10 @@ import ca.uhn.fhir.context.ConfigurationException;
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.model.api.Bundle;
|
import ca.uhn.fhir.model.api.Bundle;
|
||||||
import ca.uhn.fhir.model.api.ExtensionDt;
|
import ca.uhn.fhir.model.api.ExtensionDt;
|
||||||
|
import ca.uhn.fhir.model.api.IResource;
|
||||||
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
|
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
|
||||||
|
import ca.uhn.fhir.model.api.Tag;
|
||||||
|
import ca.uhn.fhir.model.api.TagList;
|
||||||
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
||||||
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
|
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
|
||||||
import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
|
import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
|
||||||
|
@ -50,6 +53,63 @@ public class JsonParserTest {
|
||||||
assertEquals("{\"resourceType\":\"Binary\",\"id\":\"11\",\"meta\":{\"versionId\":\"22\"},\"contentType\":\"foo\",\"content\":\"AQIDBA==\"}", val);
|
assertEquals("{\"resourceType\":\"Binary\",\"id\":\"11\",\"meta\":{\"versionId\":\"22\"},\"contentType\":\"foo\",\"content\":\"AQIDBA==\"}", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEncodeAndParseMetaProfileAndTags() {
|
||||||
|
Patient p = new Patient();
|
||||||
|
p.addName().addFamily("FAMILY");
|
||||||
|
|
||||||
|
List<IdDt> profiles = new ArrayList<IdDt>();
|
||||||
|
profiles.add(new IdDt("http://foo/Profile1"));
|
||||||
|
profiles.add(new IdDt("http://foo/Profile2"));
|
||||||
|
ResourceMetadataKeyEnum.PROFILES.put(p, profiles);
|
||||||
|
|
||||||
|
TagList tagList = new TagList();
|
||||||
|
tagList.addTag("scheme1", "term1", "label1");
|
||||||
|
tagList.addTag("scheme2", "term2", "label2");
|
||||||
|
ResourceMetadataKeyEnum.TAG_LIST.put(p, tagList);
|
||||||
|
|
||||||
|
String enc = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(p);
|
||||||
|
ourLog.info(enc);
|
||||||
|
|
||||||
|
//@formatter:off
|
||||||
|
assertThat(enc, stringContainsInOrder("\"meta\":{",
|
||||||
|
"\"profile\":[",
|
||||||
|
"\"http://foo/Profile1\",",
|
||||||
|
"\"http://foo/Profile2\"",
|
||||||
|
"],",
|
||||||
|
"\"tag\":[",
|
||||||
|
"{",
|
||||||
|
"\"system\":\"scheme1\",",
|
||||||
|
"\"code\":\"term1\",",
|
||||||
|
"\"display\":\"label1\"",
|
||||||
|
"},",
|
||||||
|
"{",
|
||||||
|
"\"system\":\"scheme2\",",
|
||||||
|
"\"code\":\"term2\",",
|
||||||
|
"\"display\":\"label2\"",
|
||||||
|
"}",
|
||||||
|
"]",
|
||||||
|
"},"));
|
||||||
|
//@formatter:on
|
||||||
|
|
||||||
|
Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc);
|
||||||
|
List<IdDt> gotLabels = ResourceMetadataKeyEnum.PROFILES.get(parsed);
|
||||||
|
|
||||||
|
assertEquals(2,gotLabels.size());
|
||||||
|
|
||||||
|
IdDt label = (IdDt) gotLabels.get(0);
|
||||||
|
assertEquals("http://foo/Profile1", label.getValue());
|
||||||
|
label = (IdDt) gotLabels.get(1);
|
||||||
|
assertEquals("http://foo/Profile2", label.getValue());
|
||||||
|
|
||||||
|
tagList = ResourceMetadataKeyEnum.TAG_LIST.get(parsed);
|
||||||
|
assertEquals(2, tagList.size());
|
||||||
|
|
||||||
|
assertEquals(new Tag("scheme1", "term1", "label1"), tagList.get(0));
|
||||||
|
assertEquals(new Tag("scheme2", "term2", "label2"), tagList.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEncodeAndParseSecurityLabels() {
|
public void testEncodeAndParseSecurityLabels() {
|
||||||
Patient p = new Patient();
|
Patient p = new Patient();
|
||||||
|
@ -351,7 +411,11 @@ public class JsonParserTest {
|
||||||
FhirContext ctx = FhirContext.forDstu2();
|
FhirContext ctx = FhirContext.forDstu2();
|
||||||
Bundle b = ctx.newJsonParser().parseBundle(text);
|
Bundle b = ctx.newJsonParser().parseBundle(text);
|
||||||
|
|
||||||
assertEquals(Patient.class, b.getEntries().get(0).getResource().getClass());
|
IResource patient = b.getEntries().get(0).getResource();
|
||||||
|
assertEquals(Patient.class, patient.getClass());
|
||||||
|
|
||||||
|
assertNull(ResourceMetadataKeyEnum.TAG_LIST.get(patient));
|
||||||
|
assertNull(ResourceMetadataKeyEnum.PROFILES.get(patient));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -21,6 +21,8 @@ import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.model.api.Bundle;
|
import ca.uhn.fhir.model.api.Bundle;
|
||||||
import ca.uhn.fhir.model.api.ExtensionDt;
|
import ca.uhn.fhir.model.api.ExtensionDt;
|
||||||
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
|
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
|
||||||
|
import ca.uhn.fhir.model.api.Tag;
|
||||||
|
import ca.uhn.fhir.model.api.TagList;
|
||||||
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
||||||
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
|
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
|
||||||
import ca.uhn.fhir.model.dstu2.composite.DurationDt;
|
import ca.uhn.fhir.model.dstu2.composite.DurationDt;
|
||||||
|
@ -36,6 +38,7 @@ import ca.uhn.fhir.model.dstu2.resource.Patient;
|
||||||
import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum;
|
import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum;
|
||||||
import ca.uhn.fhir.model.primitive.DateDt;
|
import ca.uhn.fhir.model.primitive.DateDt;
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||||
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
import ca.uhn.fhir.model.primitive.StringDt;
|
||||||
|
|
||||||
|
@ -86,7 +89,7 @@ public class XmlParserTest {
|
||||||
"<valueSet>",
|
"<valueSet>",
|
||||||
"<reference value=\"ValueSet2\"/>",
|
"<reference value=\"ValueSet2\"/>",
|
||||||
"</valueSet>",
|
"</valueSet>",
|
||||||
"</security>",
|
"</security>",
|
||||||
"</meta>",
|
"</meta>",
|
||||||
"<name>",
|
"<name>",
|
||||||
"<family value=\"FAMILY\"/>",
|
"<family value=\"FAMILY\"/>",
|
||||||
|
@ -116,6 +119,64 @@ public class XmlParserTest {
|
||||||
assertEquals("ValueSet2", label.getValueSet().getReference().getValue());
|
assertEquals("ValueSet2", label.getValueSet().getReference().getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEncodeAndParseMetaProfileAndTags() {
|
||||||
|
Patient p = new Patient();
|
||||||
|
p.addName().addFamily("FAMILY");
|
||||||
|
|
||||||
|
List<IdDt> profiles = new ArrayList<IdDt>();
|
||||||
|
profiles.add(new IdDt("http://foo/Profile1"));
|
||||||
|
profiles.add(new IdDt("http://foo/Profile2"));
|
||||||
|
ResourceMetadataKeyEnum.PROFILES.put(p, profiles);
|
||||||
|
|
||||||
|
TagList tagList = new TagList();
|
||||||
|
tagList.addTag("scheme1", "term1", "label1");
|
||||||
|
tagList.addTag("scheme2", "term2", "label2");
|
||||||
|
ResourceMetadataKeyEnum.TAG_LIST.put(p, tagList);
|
||||||
|
|
||||||
|
String enc = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(p);
|
||||||
|
ourLog.info(enc);
|
||||||
|
|
||||||
|
//@formatter:off
|
||||||
|
assertThat(enc, stringContainsInOrder("<Patient xmlns=\"http://hl7.org/fhir\">",
|
||||||
|
"<meta>",
|
||||||
|
"<meta>",
|
||||||
|
"<profile value=\"http://foo/Profile1\"/>",
|
||||||
|
"<profile value=\"http://foo/Profile2\"/>",
|
||||||
|
"<tag>",
|
||||||
|
"<system value=\"scheme1\"/>",
|
||||||
|
"<code value=\"term1\"/>",
|
||||||
|
"<display value=\"label1\"/>",
|
||||||
|
"</tag>",
|
||||||
|
"<tag>",
|
||||||
|
"<system value=\"scheme2\"/>",
|
||||||
|
"<code value=\"term2\"/>",
|
||||||
|
"<display value=\"label2\"/>",
|
||||||
|
"</tag>",
|
||||||
|
"</meta>",
|
||||||
|
"</meta>",
|
||||||
|
"<name>",
|
||||||
|
"<family value=\"FAMILY\"/>",
|
||||||
|
"</name>",
|
||||||
|
"</Patient>"));
|
||||||
|
//@formatter:on
|
||||||
|
|
||||||
|
Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc);
|
||||||
|
List<IdDt> gotLabels = ResourceMetadataKeyEnum.PROFILES.get(parsed);
|
||||||
|
|
||||||
|
assertEquals(2,gotLabels.size());
|
||||||
|
|
||||||
|
IdDt label = (IdDt) gotLabels.get(0);
|
||||||
|
assertEquals("http://foo/Profile1", label.getValue());
|
||||||
|
label = (IdDt) gotLabels.get(1);
|
||||||
|
assertEquals("http://foo/Profile2", label.getValue());
|
||||||
|
|
||||||
|
tagList = ResourceMetadataKeyEnum.TAG_LIST.get(parsed);
|
||||||
|
assertEquals(2, tagList.size());
|
||||||
|
|
||||||
|
assertEquals(new Tag("scheme1", "term1", "label1"), tagList.get(0));
|
||||||
|
assertEquals(new Tag("scheme2", "term2", "label2"), tagList.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDuration() {
|
public void testDuration() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -22,17 +22,22 @@
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--
|
<!--
|
||||||
|
Because Tinder is a part of the HAPI FHIR build process (it generates
|
||||||
|
a bunch of the actual HAPI structure code), but also uses HAPI FHIR
|
||||||
|
in order to run (e.g. to load ValueSet resources), we keep the dependencies
|
||||||
|
for the structures
|
||||||
|
a version behind the main library. This is weird, but it works.
|
||||||
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||||
<version>0.8</version>
|
<version>0.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir-structures-dev</artifactId>
|
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||||
<version>0.8</version>
|
<version>0.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
|
|
@ -1,125 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.hl7.fhir.instance.model.IBaseResource;
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseExtension;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.context.ConfigurationException;
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
|
||||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
|
||||||
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
|
||||||
import ca.uhn.fhir.model.api.IFhirVersion;
|
|
||||||
import ca.uhn.fhir.model.api.IResource;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseContainedDt;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.ContainedDt;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Profile;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.rest.server.IResourceProvider;
|
|
||||||
import ca.uhn.fhir.rest.server.IServerConformanceProvider;
|
|
||||||
import ca.uhn.fhir.rest.server.IVersionSpecificBundleFactory;
|
|
||||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
|
||||||
|
|
||||||
public class FhirDev implements IFhirVersion {
|
|
||||||
|
|
||||||
private String myId;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) {
|
|
||||||
Profile retVal = new Profile();
|
|
||||||
|
|
||||||
RuntimeResourceDefinition def = theRuntimeResourceDefinition;
|
|
||||||
|
|
||||||
myId = def.getId();
|
|
||||||
if (StringUtils.isBlank(myId)) {
|
|
||||||
myId = theRuntimeResourceDefinition.getName().toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
retVal.setId(new IdDt(myId));
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FhirVersionEnum getVersion() {
|
|
||||||
return FhirVersionEnum.DEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public InputStream getFhirVersionPropertiesFile() {
|
|
||||||
InputStream str = FhirDev.class.getResourceAsStream("/ca/uhn/fhir/model/dev/fhirversion.properties");
|
|
||||||
if (str == null) {
|
|
||||||
str = FhirDev.class.getResourceAsStream("ca/uhn/fhir/model/dev/fhirversion.properties");
|
|
||||||
}
|
|
||||||
if (str == null) {
|
|
||||||
throw new ConfigurationException("Can not find model property file on classpath: " + "/ca/uhn/fhir/model/dev/model.properties");
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPathToSchemaDefinitions() {
|
|
||||||
return "ca/uhn/fhir/model/dev/schema";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<? extends BaseResourceReferenceDt> getResourceReferenceType() {
|
|
||||||
return ResourceReferenceDt.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<? extends BaseContainedDt> getContainedType() {
|
|
||||||
return ContainedDt.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IResourceProvider createServerProfilesProvider(RestfulServer theRestfulServer) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IServerConformanceProvider<? extends IBaseResource> createServerConformanceProvider(RestfulServer theRestfulServer) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseCodingDt newCodingDt() {
|
|
||||||
return new CodingDt();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IVersionSpecificBundleFactory newBundleFactory(FhirContext theContext) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,607 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
|
|
||||||
import ca.uhn.fhir.model.api.ICompositeDatatype;
|
|
||||||
import ca.uhn.fhir.model.api.IElement;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Child;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Description;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>AddressDt</b> Datatype
|
|
||||||
* (Address)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to be able to record postal addresses, along with notes about their use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="AddressDt")
|
|
||||||
public class AddressDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public AddressDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Address.use",
|
|
||||||
formalDefinition="The purpose of this address"
|
|
||||||
)
|
|
||||||
private BoundCodeDt<AddressUseEnum> myUse;
|
|
||||||
|
|
||||||
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Address.text",
|
|
||||||
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="Address.line",
|
|
||||||
formalDefinition="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information"
|
|
||||||
)
|
|
||||||
private java.util.List<StringDt> myLine;
|
|
||||||
|
|
||||||
@Child(name="city", type=StringDt.class, order=3, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Address.city",
|
|
||||||
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="Address.state",
|
|
||||||
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="postalCode", type=StringDt.class, order=5, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Address.postalCode",
|
|
||||||
formalDefinition="A postal code designating a region defined by the postal service."
|
|
||||||
)
|
|
||||||
private StringDt myPostalCode;
|
|
||||||
|
|
||||||
@Child(name="country", type=StringDt.class, order=6, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Address.country",
|
|
||||||
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="Address.period",
|
|
||||||
formalDefinition="Time period when address was/is in use"
|
|
||||||
)
|
|
||||||
private PeriodDt myPeriod;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myLine, myCity, myState, myPostalCode, myCountry, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myLine, myCity, myState, myPostalCode, myCountry, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (Address.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<AddressUseEnum> getUseElement() {
|
|
||||||
if (myUse == null) {
|
|
||||||
myUse = new BoundCodeDt<AddressUseEnum>(AddressUseEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myUse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (Address.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUse() {
|
|
||||||
return getUseElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (Address.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setUse(BoundCodeDt<AddressUseEnum> theValue) {
|
|
||||||
myUse = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (Address.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setUse(AddressUseEnum theValue) {
|
|
||||||
getUseElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (Address.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getTextElement() {
|
|
||||||
if (myText == null) {
|
|
||||||
myText = new StringDt();
|
|
||||||
}
|
|
||||||
return myText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (Address.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getText() {
|
|
||||||
return getTextElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>text</b> (Address.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setText(StringDt theValue) {
|
|
||||||
myText = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>text</b> (Address.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the address
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setText( String theString) {
|
|
||||||
myText = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>line</b> (Address.line).
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<StringDt> getLine() {
|
|
||||||
if (myLine == null) {
|
|
||||||
myLine = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
return myLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>line</b> (Address.line)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setLine(java.util.List<StringDt> theValue) {
|
|
||||||
myLine = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>line</b> (Address.line)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt addLine() {
|
|
||||||
StringDt newType = new StringDt();
|
|
||||||
getLine().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>line</b> (Address.line),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getLineFirstRep() {
|
|
||||||
if (getLine().isEmpty()) {
|
|
||||||
return addLine();
|
|
||||||
}
|
|
||||||
return getLine().get(0);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds a new value for <b>line</b> (Address.line)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return Returns a reference to this object, to allow for simple chaining.
|
|
||||||
*/
|
|
||||||
public AddressDt addLine( String theString) {
|
|
||||||
if (myLine == null) {
|
|
||||||
myLine = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
myLine.add(new StringDt(theString));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>city</b> (Address.city).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The name of the city, town, village or other community or delivery center.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getCityElement() {
|
|
||||||
if (myCity == null) {
|
|
||||||
myCity = new StringDt();
|
|
||||||
}
|
|
||||||
return myCity;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>city</b> (Address.city).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The name of the city, town, village or other community or delivery center.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getCity() {
|
|
||||||
return getCityElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>city</b> (Address.city)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The name of the city, town, village or other community or delivery center.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setCity(StringDt theValue) {
|
|
||||||
myCity = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>city</b> (Address.city)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The name of the city, town, village or other community or delivery center.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setCity( String theString) {
|
|
||||||
myCity = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>state</b> (Address.state).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getStateElement() {
|
|
||||||
if (myState == null) {
|
|
||||||
myState = new StringDt();
|
|
||||||
}
|
|
||||||
return myState;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>state</b> (Address.state).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getState() {
|
|
||||||
return getStateElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>state</b> (Address.state)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setState(StringDt theValue) {
|
|
||||||
myState = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>state</b> (Address.state)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setState( String theString) {
|
|
||||||
myState = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>postalCode</b> (Address.postalCode).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A postal code designating a region defined by the postal service.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getPostalCodeElement() {
|
|
||||||
if (myPostalCode == null) {
|
|
||||||
myPostalCode = new StringDt();
|
|
||||||
}
|
|
||||||
return myPostalCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>postalCode</b> (Address.postalCode).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A postal code designating a region defined by the postal service.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getPostalCode() {
|
|
||||||
return getPostalCodeElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>postalCode</b> (Address.postalCode)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A postal code designating a region defined by the postal service.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setPostalCode(StringDt theValue) {
|
|
||||||
myPostalCode = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>postalCode</b> (Address.postalCode)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A postal code designating a region defined by the postal service.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setPostalCode( String theString) {
|
|
||||||
myPostalCode = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>country</b> (Address.country).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Country - a nation as commonly understood or generally accepted
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getCountryElement() {
|
|
||||||
if (myCountry == null) {
|
|
||||||
myCountry = new StringDt();
|
|
||||||
}
|
|
||||||
return myCountry;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>country</b> (Address.country).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Country - a nation as commonly understood or generally accepted
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getCountry() {
|
|
||||||
return getCountryElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>country</b> (Address.country)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Country - a nation as commonly understood or generally accepted
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setCountry(StringDt theValue) {
|
|
||||||
myCountry = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>country</b> (Address.country)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Country - a nation as commonly understood or generally accepted
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setCountry( String theString) {
|
|
||||||
myCountry = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (Address.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period when address was/is in use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt getPeriod() {
|
|
||||||
if (myPeriod == null) {
|
|
||||||
myPeriod = new PeriodDt();
|
|
||||||
}
|
|
||||||
return myPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>period</b> (Address.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period when address was/is in use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AddressDt setPeriod(PeriodDt theValue) {
|
|
||||||
myPeriod = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DatatypeDef(name="AgeDt")
|
|
||||||
public class AgeDt extends QuantityDt {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,577 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>AttachmentDt</b> Datatype
|
|
||||||
* (Attachment)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* For referring to data content defined in other formats.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="AttachmentDt")
|
|
||||||
public class AttachmentDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public AttachmentDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="contentType", type=CodeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Attachment.contentType",
|
|
||||||
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="Attachment.language",
|
|
||||||
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="Attachment.data",
|
|
||||||
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="Attachment.url",
|
|
||||||
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="Attachment.size",
|
|
||||||
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="Attachment.hash",
|
|
||||||
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="Attachment.title",
|
|
||||||
formalDefinition="A label or set of text to display in place of the data"
|
|
||||||
)
|
|
||||||
private StringDt myTitle;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>contentType</b> (Attachment.contentType).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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 CodeDt getContentTypeElement() {
|
|
||||||
if (myContentType == null) {
|
|
||||||
myContentType = new CodeDt();
|
|
||||||
}
|
|
||||||
return myContentType;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>contentType</b> (Attachment.contentType).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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 String getContentType() {
|
|
||||||
return getContentTypeElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>contentType</b> (Attachment.contentType)
|
|
||||||
*
|
|
||||||
* <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 AttachmentDt setContentType(CodeDt theValue) {
|
|
||||||
myContentType = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>contentType</b> (Attachment.contentType)
|
|
||||||
*
|
|
||||||
* <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 AttachmentDt setContentType( String theCode) {
|
|
||||||
myContentType = new CodeDt(theCode);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>language</b> (Attachment.language).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The human language of the content. The value can be any valid value according to BCP 47
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodeDt getLanguageElement() {
|
|
||||||
if (myLanguage == null) {
|
|
||||||
myLanguage = new CodeDt();
|
|
||||||
}
|
|
||||||
return myLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>language</b> (Attachment.language).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The human language of the content. The value can be any valid value according to BCP 47
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getLanguage() {
|
|
||||||
return getLanguageElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>language</b> (Attachment.language)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The human language of the content. The value can be any valid value according to BCP 47
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setLanguage(CodeDt theValue) {
|
|
||||||
myLanguage = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>language</b> (Attachment.language)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The human language of the content. The value can be any valid value according to BCP 47
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setLanguage( String theCode) {
|
|
||||||
myLanguage = new CodeDt(theCode);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>data</b> (Attachment.data).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Base64BinaryDt getDataElement() {
|
|
||||||
if (myData == null) {
|
|
||||||
myData = new Base64BinaryDt();
|
|
||||||
}
|
|
||||||
return myData;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>data</b> (Attachment.data).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public byte[] getData() {
|
|
||||||
return getDataElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>data</b> (Attachment.data)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setData(Base64BinaryDt theValue) {
|
|
||||||
myData = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>data</b> (Attachment.data)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setData( byte[] theBytes) {
|
|
||||||
myData = new Base64BinaryDt(theBytes);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>url</b> (Attachment.url).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* An alternative location where the data can be accessed
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public UriDt getUrlElement() {
|
|
||||||
if (myUrl == null) {
|
|
||||||
myUrl = new UriDt();
|
|
||||||
}
|
|
||||||
return myUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>url</b> (Attachment.url).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* An alternative location where the data can be accessed
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUrl() {
|
|
||||||
return getUrlElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>url</b> (Attachment.url)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* An alternative location where the data can be accessed
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setUrl(UriDt theValue) {
|
|
||||||
myUrl = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>url</b> (Attachment.url)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* An alternative location where the data can be accessed
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setUrl( String theUri) {
|
|
||||||
myUrl = new UriDt(theUri);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>size</b> (Attachment.size).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of bytes of data that make up this attachment.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IntegerDt getSizeElement() {
|
|
||||||
if (mySize == null) {
|
|
||||||
mySize = new IntegerDt();
|
|
||||||
}
|
|
||||||
return mySize;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>size</b> (Attachment.size).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of bytes of data that make up this attachment.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Integer getSize() {
|
|
||||||
return getSizeElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>size</b> (Attachment.size)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of bytes of data that make up this attachment.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setSize(IntegerDt theValue) {
|
|
||||||
mySize = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>size</b> (Attachment.size)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of bytes of data that make up this attachment.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setSize( int theInteger) {
|
|
||||||
mySize = new IntegerDt(theInteger);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>hash</b> (Attachment.hash).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The calculated hash of the data using SHA-1. Represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Base64BinaryDt getHashElement() {
|
|
||||||
if (myHash == null) {
|
|
||||||
myHash = new Base64BinaryDt();
|
|
||||||
}
|
|
||||||
return myHash;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>hash</b> (Attachment.hash).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The calculated hash of the data using SHA-1. Represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public byte[] getHash() {
|
|
||||||
return getHashElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>hash</b> (Attachment.hash)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The calculated hash of the data using SHA-1. Represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setHash(Base64BinaryDt theValue) {
|
|
||||||
myHash = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>hash</b> (Attachment.hash)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The calculated hash of the data using SHA-1. Represented using base64
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setHash( byte[] theBytes) {
|
|
||||||
myHash = new Base64BinaryDt(theBytes);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>title</b> (Attachment.title).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A label or set of text to display in place of the data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getTitleElement() {
|
|
||||||
if (myTitle == null) {
|
|
||||||
myTitle = new StringDt();
|
|
||||||
}
|
|
||||||
return myTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>title</b> (Attachment.title).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A label or set of text to display in place of the data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getTitle() {
|
|
||||||
return getTitleElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>title</b> (Attachment.title)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A label or set of text to display in place of the data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setTitle(StringDt theValue) {
|
|
||||||
myTitle = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>title</b> (Attachment.title)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A label or set of text to display in place of the data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public AttachmentDt setTitle( String theString) {
|
|
||||||
myTitle = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import static org.apache.commons.lang3.StringUtils.defaultString;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.IBoundCodeableConcept;
|
|
||||||
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
@DatatypeDef(name = "CodeableConcept", isSpecialization = true)
|
|
||||||
public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt implements IBoundCodeableConcept {
|
|
||||||
|
|
||||||
private IValueSetEnumBinder<T> myBinder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder) {
|
|
||||||
myBinder = theBinder;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, T theValue) {
|
|
||||||
myBinder = theBinder;
|
|
||||||
setValueAsEnum(theValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, Collection<T> theValues) {
|
|
||||||
myBinder = theBinder;
|
|
||||||
setValueAsEnum(theValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the {@link #getCoding()} to contain a coding with the code and
|
|
||||||
* system defined by the given enumerated types, AND clearing any existing
|
|
||||||
* codings first. If theValue is null, existing codings are cleared and no
|
|
||||||
* codings are added.
|
|
||||||
*
|
|
||||||
* @param theValues
|
|
||||||
* The value to add, or <code>null</code>
|
|
||||||
*/
|
|
||||||
public void setValueAsEnum(Collection<T> theValues) {
|
|
||||||
getCoding().clear();
|
|
||||||
if (theValues != null) {
|
|
||||||
for (T next : theValues) {
|
|
||||||
getCoding().add(new CodingDt(myBinder.toSystemString(next), myBinder.toCodeString(next)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the {@link #getCoding()} to contain a coding with the code and
|
|
||||||
* system defined by the given enumerated type, AND clearing any existing
|
|
||||||
* codings first. If theValue is null, existing codings are cleared and no
|
|
||||||
* codings are added.
|
|
||||||
*
|
|
||||||
* @param theValue
|
|
||||||
* The value to add, or <code>null</code>
|
|
||||||
*/
|
|
||||||
public void setValueAsEnum(T theValue) {
|
|
||||||
getCoding().clear();
|
|
||||||
if (theValue == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loops through the {@link #getCoding() codings} in this codeable concept
|
|
||||||
* and returns the first bound enumerated type that matches. <b>Use
|
|
||||||
* caution</b> using this method, see the return description for more
|
|
||||||
* information.
|
|
||||||
*
|
|
||||||
* @return Returns the bound enumerated type, or <code>null</code> if none
|
|
||||||
* are found. Note that a null return value doesn't neccesarily
|
|
||||||
* imply that this Codeable Concept has no codes, only that it has
|
|
||||||
* no codes that match the enum.
|
|
||||||
*/
|
|
||||||
public Set<T> getValueAsEnum() {
|
|
||||||
Set<T> retVal = new HashSet<T>();
|
|
||||||
for (CodingDt next : getCoding()) {
|
|
||||||
if (next == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
T nextT = myBinder.fromCodeString(defaultString(next.getCodeElement().getValue()), defaultString(next.getSystemElement().getValueAsString()));
|
|
||||||
if (nextT != null) {
|
|
||||||
retVal.add(nextT);
|
|
||||||
} else {
|
|
||||||
// TODO: throw special exception type?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,243 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>CodeableConceptDt</b> Datatype
|
|
||||||
* (CodeableConcept)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="CodeableConceptDt")
|
|
||||||
public class CodeableConceptDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public CodeableConceptDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor which creates a CodeableConceptDt with one coding repetition, containing
|
|
||||||
* the given system and code
|
|
||||||
*/
|
|
||||||
public CodeableConceptDt(String theSystem, String theCode) {
|
|
||||||
addCoding().setSystem(theSystem).setCode(theCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="CodeableConcept.coding",
|
|
||||||
formalDefinition="A reference to a code defined by a terminology system"
|
|
||||||
)
|
|
||||||
private java.util.List<CodingDt> myCoding;
|
|
||||||
|
|
||||||
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="CodeableConcept.text",
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCoding, myText);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCoding, myText);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>coding</b> (CodeableConcept.coding).
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<CodingDt> getCoding() {
|
|
||||||
if (myCoding == null) {
|
|
||||||
myCoding = new java.util.ArrayList<CodingDt>();
|
|
||||||
}
|
|
||||||
return myCoding;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>coding</b> (CodeableConcept.coding)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference to a code defined by a terminology system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodeableConceptDt setCoding(java.util.List<CodingDt> theValue) {
|
|
||||||
myCoding = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>coding</b> (CodeableConcept.coding)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference to a code defined by a terminology system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt addCoding() {
|
|
||||||
CodingDt newType = new CodingDt();
|
|
||||||
getCoding().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>coding</b> (CodeableConcept.coding),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference to a code defined by a terminology system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt getCodingFirstRep() {
|
|
||||||
if (getCoding().isEmpty()) {
|
|
||||||
return addCoding();
|
|
||||||
}
|
|
||||||
return getCoding().get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (CodeableConcept.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getTextElement() {
|
|
||||||
if (myText == null) {
|
|
||||||
myText = new StringDt();
|
|
||||||
}
|
|
||||||
return myText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (CodeableConcept.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getText() {
|
|
||||||
return getTextElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>text</b> (CodeableConcept.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodeableConceptDt setText(StringDt theValue) {
|
|
||||||
myText = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>text</b> (CodeableConcept.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodeableConceptDt setText( String theString) {
|
|
||||||
myText = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,497 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>CodingDt</b> Datatype
|
|
||||||
* (Coding)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference to a code defined by a terminology system
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* References to codes are very common in healthcare models
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="CodingDt")
|
|
||||||
public class CodingDt
|
|
||||||
extends BaseCodingDt implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public CodingDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new Coding with the given system and code
|
|
||||||
*/
|
|
||||||
public CodingDt(String theSystem, String theCode) {
|
|
||||||
setSystem(theSystem);
|
|
||||||
setCode(theCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy constructor: Creates a new Coding with the system and code copied out of the given coding
|
|
||||||
*/
|
|
||||||
public CodingDt(BaseCodingDt theCoding) {
|
|
||||||
this(theCoding.getSystemElement().getValueAsString(), theCoding.getCodeElement().getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Coding.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="Coding.version",
|
|
||||||
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="Coding.code",
|
|
||||||
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="Coding.display",
|
|
||||||
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="Coding.primary",
|
|
||||||
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, type={
|
|
||||||
ca.uhn.fhir.model.dev.resource.ValueSet.class })
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Coding.valueSet",
|
|
||||||
formalDefinition="The set of possible coded values this coding was chosen from or constrained by"
|
|
||||||
)
|
|
||||||
private ResourceReferenceDt myValueSet;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Coding.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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public UriDt getSystemElement() {
|
|
||||||
if (mySystem == null) {
|
|
||||||
mySystem = new UriDt();
|
|
||||||
}
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Coding.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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return getSystemElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>system</b> (Coding.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setSystem(UriDt theValue) {
|
|
||||||
mySystem = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>system</b> (Coding.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setSystem( String theUri) {
|
|
||||||
mySystem = new UriDt(theUri);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>version</b> (Coding.version).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getVersionElement() {
|
|
||||||
if (myVersion == null) {
|
|
||||||
myVersion = new StringDt();
|
|
||||||
}
|
|
||||||
return myVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>version</b> (Coding.version).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getVersion() {
|
|
||||||
return getVersionElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>version</b> (Coding.version)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setVersion(StringDt theValue) {
|
|
||||||
myVersion = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>version</b> (Coding.version)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setVersion( String theString) {
|
|
||||||
myVersion = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>code</b> (Coding.code).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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 CodeDt getCodeElement() {
|
|
||||||
if (myCode == null) {
|
|
||||||
myCode = new CodeDt();
|
|
||||||
}
|
|
||||||
return myCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>code</b> (Coding.code).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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 String getCode() {
|
|
||||||
return getCodeElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>code</b> (Coding.code)
|
|
||||||
*
|
|
||||||
* <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 CodingDt setCode(CodeDt theValue) {
|
|
||||||
myCode = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>code</b> (Coding.code)
|
|
||||||
*
|
|
||||||
* <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 CodingDt setCode( String theCode) {
|
|
||||||
myCode = new CodeDt(theCode);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>display</b> (Coding.display).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getDisplayElement() {
|
|
||||||
if (myDisplay == null) {
|
|
||||||
myDisplay = new StringDt();
|
|
||||||
}
|
|
||||||
return myDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>display</b> (Coding.display).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getDisplay() {
|
|
||||||
return getDisplayElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>display</b> (Coding.display)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setDisplay(StringDt theValue) {
|
|
||||||
myDisplay = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>display</b> (Coding.display)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setDisplay( String theString) {
|
|
||||||
myDisplay = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>primary</b> (Coding.primary).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BooleanDt getPrimaryElement() {
|
|
||||||
if (myPrimary == null) {
|
|
||||||
myPrimary = new BooleanDt();
|
|
||||||
}
|
|
||||||
return myPrimary;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>primary</b> (Coding.primary).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Boolean getPrimary() {
|
|
||||||
return getPrimaryElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>primary</b> (Coding.primary)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setPrimary(BooleanDt theValue) {
|
|
||||||
myPrimary = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>primary</b> (Coding.primary)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setPrimary( boolean theBoolean) {
|
|
||||||
myPrimary = new BooleanDt(theBoolean);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>valueSet</b> (Coding.valueSet).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The set of possible coded values this coding was chosen from or constrained by
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt getValueSet() {
|
|
||||||
if (myValueSet == null) {
|
|
||||||
myValueSet = new ResourceReferenceDt();
|
|
||||||
}
|
|
||||||
return myValueSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>valueSet</b> (Coding.valueSet)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The set of possible coded values this coding was chosen from or constrained by
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodingDt setValueSet(ResourceReferenceDt theValue) {
|
|
||||||
myValueSet = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,343 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>ContactPointDt</b> Datatype
|
|
||||||
* (ContactPoint)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="ContactPointDt")
|
|
||||||
public class ContactPointDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public ContactPointDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="system", type=CodeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="ContactPoint.system",
|
|
||||||
formalDefinition="Telecommunications form for contact point - what communications system is required to make use of the contact"
|
|
||||||
)
|
|
||||||
private BoundCodeDt<ContactPointSystemEnum> mySystem;
|
|
||||||
|
|
||||||
@Child(name="value", type=StringDt.class, order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="ContactPoint.value",
|
|
||||||
formalDefinition="The actual contact point 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="ContactPoint.use",
|
|
||||||
formalDefinition="Identifies the purpose for the contact point"
|
|
||||||
)
|
|
||||||
private BoundCodeDt<ContactPointUseEnum> myUse;
|
|
||||||
|
|
||||||
@Child(name="period", type=PeriodDt.class, order=3, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="ContactPoint.period",
|
|
||||||
formalDefinition="Time period when the contact point was/is in use"
|
|
||||||
)
|
|
||||||
private PeriodDt myPeriod;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myValue, myUse, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myValue, myUse, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (ContactPoint.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Telecommunications form for contact point - what communications system is required to make use of the contact
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<ContactPointSystemEnum> getSystemElement() {
|
|
||||||
if (mySystem == null) {
|
|
||||||
mySystem = new BoundCodeDt<ContactPointSystemEnum>(ContactPointSystemEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (ContactPoint.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Telecommunications form for contact point - what communications system is required to make use of the contact
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return getSystemElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>system</b> (ContactPoint.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Telecommunications form for contact point - what communications system is required to make use of the contact
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setSystem(BoundCodeDt<ContactPointSystemEnum> theValue) {
|
|
||||||
mySystem = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>system</b> (ContactPoint.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Telecommunications form for contact point - what communications system is required to make use of the contact
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setSystem(ContactPointSystemEnum theValue) {
|
|
||||||
getSystemElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (ContactPoint.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getValueElement() {
|
|
||||||
if (myValue == null) {
|
|
||||||
myValue = new StringDt();
|
|
||||||
}
|
|
||||||
return myValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (ContactPoint.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getValue() {
|
|
||||||
return getValueElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>value</b> (ContactPoint.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setValue(StringDt theValue) {
|
|
||||||
myValue = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>value</b> (ContactPoint.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setValue( String theString) {
|
|
||||||
myValue = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (ContactPoint.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for the contact point
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<ContactPointUseEnum> getUseElement() {
|
|
||||||
if (myUse == null) {
|
|
||||||
myUse = new BoundCodeDt<ContactPointUseEnum>(ContactPointUseEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myUse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (ContactPoint.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for the contact point
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUse() {
|
|
||||||
return getUseElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (ContactPoint.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for the contact point
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setUse(BoundCodeDt<ContactPointUseEnum> theValue) {
|
|
||||||
myUse = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (ContactPoint.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for the contact point
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setUse(ContactPointUseEnum theValue) {
|
|
||||||
getUseElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (ContactPoint.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period when the contact point was/is in use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt getPeriod() {
|
|
||||||
if (myPeriod == null) {
|
|
||||||
myPeriod = new PeriodDt();
|
|
||||||
}
|
|
||||||
return myPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>period</b> (ContactPoint.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period when the contact point was/is in use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ContactPointDt setPeriod(PeriodDt theValue) {
|
|
||||||
myPeriod = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR - Core Library
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.IResource;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Child;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseContainedDt;
|
|
||||||
|
|
||||||
@DatatypeDef(name = "contained")
|
|
||||||
public class ContainedDt extends BaseContainedDt {
|
|
||||||
|
|
||||||
@Child(name = "resource", type = IResource.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
|
||||||
private List<IResource> myContainedResources;
|
|
||||||
|
|
||||||
public List<IResource> getContainedResources() {
|
|
||||||
if (myContainedResources == null) {
|
|
||||||
myContainedResources = new ArrayList<IResource>();
|
|
||||||
}
|
|
||||||
return myContainedResources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContainedResources(List<IResource> theContainedResources) {
|
|
||||||
myContainedResources = theContainedResources;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return myContainedResources == null || myContainedResources.size() == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DatatypeDef(name="CountDt")
|
|
||||||
public class CountDt extends QuantityDt {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DatatypeDef(name="DistanceDt")
|
|
||||||
public class DistanceDt extends QuantityDt {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DatatypeDef(name="DurationDt")
|
|
||||||
public class DurationDt extends QuantityDt {
|
|
||||||
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,624 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>HumanNameDt</b> Datatype
|
|
||||||
* (HumanName)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human's name with the ability to identify parts and usage
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to be able to record names, along with notes about their use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="HumanNameDt")
|
|
||||||
public class HumanNameDt
|
|
||||||
extends BaseHumanNameDt implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public HumanNameDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="HumanName.use",
|
|
||||||
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="HumanName.text",
|
|
||||||
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="HumanName.family",
|
|
||||||
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 java.util.List<StringDt> myFamily;
|
|
||||||
|
|
||||||
@Child(name="given", type=StringDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="HumanName.given",
|
|
||||||
formalDefinition="Given name"
|
|
||||||
)
|
|
||||||
private java.util.List<StringDt> myGiven;
|
|
||||||
|
|
||||||
@Child(name="prefix", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="HumanName.prefix",
|
|
||||||
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 java.util.List<StringDt> myPrefix;
|
|
||||||
|
|
||||||
@Child(name="suffix", type=StringDt.class, order=5, min=0, max=Child.MAX_UNLIMITED)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="HumanName.suffix",
|
|
||||||
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 java.util.List<StringDt> mySuffix;
|
|
||||||
|
|
||||||
@Child(name="period", type=PeriodDt.class, order=6, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="HumanName.period",
|
|
||||||
formalDefinition="Indicates the period of time when this name was valid for the named person."
|
|
||||||
)
|
|
||||||
private PeriodDt myPeriod;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (HumanName.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for this name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<NameUseEnum> getUseElement() {
|
|
||||||
if (myUse == null) {
|
|
||||||
myUse = new BoundCodeDt<NameUseEnum>(NameUseEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myUse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (HumanName.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for this name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUse() {
|
|
||||||
return getUseElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (HumanName.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for this name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setUse(BoundCodeDt<NameUseEnum> theValue) {
|
|
||||||
myUse = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (HumanName.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the purpose for this name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setUse(NameUseEnum theValue) {
|
|
||||||
getUseElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (HumanName.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getTextElement() {
|
|
||||||
if (myText == null) {
|
|
||||||
myText = new StringDt();
|
|
||||||
}
|
|
||||||
return myText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>text</b> (HumanName.text).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getText() {
|
|
||||||
return getTextElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>text</b> (HumanName.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setText(StringDt theValue) {
|
|
||||||
myText = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>text</b> (HumanName.text)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A full text representation of the name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setText( String theString) {
|
|
||||||
myText = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>family</b> (HumanName.family).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<StringDt> getFamily() {
|
|
||||||
if (myFamily == null) {
|
|
||||||
myFamily = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
return myFamily;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>family</b> (HumanName.family)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setFamily(java.util.List<StringDt> theValue) {
|
|
||||||
myFamily = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>family</b> (HumanName.family)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt addFamily() {
|
|
||||||
StringDt newType = new StringDt();
|
|
||||||
getFamily().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>family</b> (HumanName.family),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getFamilyFirstRep() {
|
|
||||||
if (getFamily().isEmpty()) {
|
|
||||||
return addFamily();
|
|
||||||
}
|
|
||||||
return getFamily().get(0);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds a new value for <b>family</b> (HumanName.family)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return Returns a reference to this object, to allow for simple chaining.
|
|
||||||
*/
|
|
||||||
public HumanNameDt addFamily( String theString) {
|
|
||||||
if (myFamily == null) {
|
|
||||||
myFamily = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
myFamily.add(new StringDt(theString));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>given</b> (HumanName.given).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Given name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<StringDt> getGiven() {
|
|
||||||
if (myGiven == null) {
|
|
||||||
myGiven = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
return myGiven;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>given</b> (HumanName.given)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Given name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setGiven(java.util.List<StringDt> theValue) {
|
|
||||||
myGiven = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>given</b> (HumanName.given)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Given name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt addGiven() {
|
|
||||||
StringDt newType = new StringDt();
|
|
||||||
getGiven().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>given</b> (HumanName.given),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Given name
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getGivenFirstRep() {
|
|
||||||
if (getGiven().isEmpty()) {
|
|
||||||
return addGiven();
|
|
||||||
}
|
|
||||||
return getGiven().get(0);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds a new value for <b>given</b> (HumanName.given)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Given name
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return Returns a reference to this object, to allow for simple chaining.
|
|
||||||
*/
|
|
||||||
public HumanNameDt addGiven( String theString) {
|
|
||||||
if (myGiven == null) {
|
|
||||||
myGiven = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
myGiven.add(new StringDt(theString));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>prefix</b> (HumanName.prefix).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<StringDt> getPrefix() {
|
|
||||||
if (myPrefix == null) {
|
|
||||||
myPrefix = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
return myPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>prefix</b> (HumanName.prefix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setPrefix(java.util.List<StringDt> theValue) {
|
|
||||||
myPrefix = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>prefix</b> (HumanName.prefix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt addPrefix() {
|
|
||||||
StringDt newType = new StringDt();
|
|
||||||
getPrefix().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>prefix</b> (HumanName.prefix),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getPrefixFirstRep() {
|
|
||||||
if (getPrefix().isEmpty()) {
|
|
||||||
return addPrefix();
|
|
||||||
}
|
|
||||||
return getPrefix().get(0);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds a new value for <b>prefix</b> (HumanName.prefix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return Returns a reference to this object, to allow for simple chaining.
|
|
||||||
*/
|
|
||||||
public HumanNameDt addPrefix( String theString) {
|
|
||||||
if (myPrefix == null) {
|
|
||||||
myPrefix = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
myPrefix.add(new StringDt(theString));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>suffix</b> (HumanName.suffix).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<StringDt> getSuffix() {
|
|
||||||
if (mySuffix == null) {
|
|
||||||
mySuffix = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
return mySuffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>suffix</b> (HumanName.suffix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setSuffix(java.util.List<StringDt> theValue) {
|
|
||||||
mySuffix = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>suffix</b> (HumanName.suffix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt addSuffix() {
|
|
||||||
StringDt newType = new StringDt();
|
|
||||||
getSuffix().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>suffix</b> (HumanName.suffix),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getSuffixFirstRep() {
|
|
||||||
if (getSuffix().isEmpty()) {
|
|
||||||
return addSuffix();
|
|
||||||
}
|
|
||||||
return getSuffix().get(0);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds a new value for <b>suffix</b> (HumanName.suffix)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return Returns a reference to this object, to allow for simple chaining.
|
|
||||||
*/
|
|
||||||
public HumanNameDt addSuffix( String theString) {
|
|
||||||
if (mySuffix == null) {
|
|
||||||
mySuffix = new java.util.ArrayList<StringDt>();
|
|
||||||
}
|
|
||||||
mySuffix.add(new StringDt(theString));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (HumanName.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates the period of time when this name was valid for the named person.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt getPeriod() {
|
|
||||||
if (myPeriod == null) {
|
|
||||||
myPeriod = new PeriodDt();
|
|
||||||
}
|
|
||||||
return myPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>period</b> (HumanName.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates the period of time when this name was valid for the named person.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public HumanNameDt setPeriod(PeriodDt theValue) {
|
|
||||||
myPeriod = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,479 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>IdentifierDt</b> Datatype
|
|
||||||
* (Identifier)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A technical identifier - identifies some entity uniquely and unambiguously
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to be able to identify things with confidence and be sure that the identification is not subject to misinterpretation
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="IdentifierDt")
|
|
||||||
public class IdentifierDt
|
|
||||||
extends BaseIdentifierDt implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public IdentifierDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new identifier with the given system and value
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) {
|
|
||||||
setSystem(theSystem);
|
|
||||||
setValue(theValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new identifier with the given system and value
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) {
|
|
||||||
setUse(theUse);
|
|
||||||
setSystem(theSystem);
|
|
||||||
setValue(theValue);
|
|
||||||
setLabel(theLabel);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "IdentifierDt[" + getValueAsQueryToken() + "]";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Identifier.use",
|
|
||||||
formalDefinition="The purpose of this identifier"
|
|
||||||
)
|
|
||||||
private BoundCodeDt<IdentifierUseEnum> myUse;
|
|
||||||
|
|
||||||
@Child(name="label", type=StringDt.class, order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Identifier.label",
|
|
||||||
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="Identifier.system",
|
|
||||||
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="Identifier.value",
|
|
||||||
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="Identifier.period",
|
|
||||||
formalDefinition="Time period during which identifier is/was valid for use"
|
|
||||||
)
|
|
||||||
private PeriodDt myPeriod;
|
|
||||||
|
|
||||||
@Child(name="assigner", order=5, min=0, max=1, type={
|
|
||||||
ca.uhn.fhir.model.dev.resource.Organization.class })
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Identifier.assigner",
|
|
||||||
formalDefinition="Organization that issued/manages the identifier"
|
|
||||||
)
|
|
||||||
private ResourceReferenceDt myAssigner;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (Identifier.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<IdentifierUseEnum> getUseElement() {
|
|
||||||
if (myUse == null) {
|
|
||||||
myUse = new BoundCodeDt<IdentifierUseEnum>(IdentifierUseEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myUse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>use</b> (Identifier.use).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUse() {
|
|
||||||
return getUseElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (Identifier.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setUse(BoundCodeDt<IdentifierUseEnum> theValue) {
|
|
||||||
myUse = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>use</b> (Identifier.use)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The purpose of this identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setUse(IdentifierUseEnum theValue) {
|
|
||||||
getUseElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>label</b> (Identifier.label).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getLabelElement() {
|
|
||||||
if (myLabel == null) {
|
|
||||||
myLabel = new StringDt();
|
|
||||||
}
|
|
||||||
return myLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>label</b> (Identifier.label).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getLabel() {
|
|
||||||
return getLabelElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>label</b> (Identifier.label)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setLabel(StringDt theValue) {
|
|
||||||
myLabel = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>label</b> (Identifier.label)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setLabel( String theString) {
|
|
||||||
myLabel = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Identifier.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Establishes the namespace in which set of possible id values is unique.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public UriDt getSystemElement() {
|
|
||||||
if (mySystem == null) {
|
|
||||||
mySystem = new UriDt();
|
|
||||||
}
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Identifier.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Establishes the namespace in which set of possible id values is unique.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return getSystemElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>system</b> (Identifier.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Establishes the namespace in which set of possible id values is unique.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setSystem(UriDt theValue) {
|
|
||||||
mySystem = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>system</b> (Identifier.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Establishes the namespace in which set of possible id values is unique.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setSystem( String theUri) {
|
|
||||||
mySystem = new UriDt(theUri);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (Identifier.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getValueElement() {
|
|
||||||
if (myValue == null) {
|
|
||||||
myValue = new StringDt();
|
|
||||||
}
|
|
||||||
return myValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (Identifier.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getValue() {
|
|
||||||
return getValueElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>value</b> (Identifier.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setValue(StringDt theValue) {
|
|
||||||
myValue = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>value</b> (Identifier.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setValue( String theString) {
|
|
||||||
myValue = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (Identifier.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period during which identifier is/was valid for use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt getPeriod() {
|
|
||||||
if (myPeriod == null) {
|
|
||||||
myPeriod = new PeriodDt();
|
|
||||||
}
|
|
||||||
return myPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>period</b> (Identifier.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Time period during which identifier is/was valid for use
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setPeriod(PeriodDt theValue) {
|
|
||||||
myPeriod = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>assigner</b> (Identifier.assigner).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Organization that issued/manages the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt getAssigner() {
|
|
||||||
if (myAssigner == null) {
|
|
||||||
myAssigner = new ResourceReferenceDt();
|
|
||||||
}
|
|
||||||
return myAssigner;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>assigner</b> (Identifier.assigner)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Organization that issued/manages the identifier
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdentifierDt setAssigner(ResourceReferenceDt theValue) {
|
|
||||||
myAssigner = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR Structures - DEV (FHIR Latest)
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DatatypeDef(name="MoneyDt")
|
|
||||||
public class MoneyDt extends QuantityDt {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,175 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR - Core Library
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
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.DatatypeDef;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseNarrativeDt;
|
|
||||||
import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>Narrative</b> Datatype
|
|
||||||
* (A human-readable formatted text, including images)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human-readable formatted text, including images
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
*
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="Narrative")
|
|
||||||
public class NarrativeDt extends BaseNarrativeDt<NarrativeStatusEnum> {
|
|
||||||
|
|
||||||
@Child(name="status", type=CodeDt.class, order=0, min=1, max=1)
|
|
||||||
private BoundCodeDt<NarrativeStatusEnum> myStatus;
|
|
||||||
|
|
||||||
@Child(name="div", type=XhtmlDt.class, order=1, min=1, max=1)
|
|
||||||
private XhtmlDt myDiv;
|
|
||||||
|
|
||||||
public NarrativeDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
public NarrativeDt(XhtmlDt theDiv, NarrativeStatusEnum theStatus) {
|
|
||||||
setDiv(theDiv);
|
|
||||||
setStatus(theStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.isEmpty( myStatus, myDiv );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( theType, myStatus, myDiv );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>status</b> (generated | extensions | additional).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<NarrativeStatusEnum> getStatus() {
|
|
||||||
if (myStatus == null) {
|
|
||||||
myStatus = new BoundCodeDt<NarrativeStatusEnum>(NarrativeStatusEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>status</b> (generated | extensions | additional)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public void setStatus(BoundCodeDt<NarrativeStatusEnum> theValue) {
|
|
||||||
myStatus = theValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>status</b> (generated | extensions | additional)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public void setStatus(NarrativeStatusEnum theValue) {
|
|
||||||
getStatus().setValueAsEnum(theValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>div</b> (Limited xhtml content).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual narrative content, a stripped down version of XHTML
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public XhtmlDt getDiv() {
|
|
||||||
if (myDiv == null) {
|
|
||||||
myDiv = new XhtmlDt();
|
|
||||||
}
|
|
||||||
return myDiv;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>div</b> (Limited xhtml content)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The actual narrative content, a stripped down version of XHTML
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public void setDiv(XhtmlDt theValue) {
|
|
||||||
myDiv = theValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value using a textual DIV (or simple text block which will be
|
|
||||||
* converted to XHTML)
|
|
||||||
*/
|
|
||||||
public void setDiv(String theTextDiv) {
|
|
||||||
myDiv = new XhtmlDt(theTextDiv);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,262 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>PeriodDt</b> Datatype
|
|
||||||
* (Period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A time period defined by a start and end date and optionally time.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
*
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="PeriodDt")
|
|
||||||
public class PeriodDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public PeriodDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="start", type=DateTimeDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Period.start",
|
|
||||||
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="Period.end",
|
|
||||||
formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing"
|
|
||||||
)
|
|
||||||
private DateTimeDt myEnd;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStart, myEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStart, myEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>start</b> (Period.start).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The start of the period. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DateTimeDt getStartElement() {
|
|
||||||
if (myStart == null) {
|
|
||||||
myStart = new DateTimeDt();
|
|
||||||
}
|
|
||||||
return myStart;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>start</b> (Period.start).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The start of the period. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Date getStart() {
|
|
||||||
return getStartElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>start</b> (Period.start)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The start of the period. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setStart(DateTimeDt theValue) {
|
|
||||||
myStart = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>start</b> (Period.start)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The start of the period. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
|
|
||||||
myStart = new DateTimeDt(theDate, thePrecision);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>start</b> (Period.start)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The start of the period. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setStartWithSecondsPrecision( Date theDate) {
|
|
||||||
myStart = new DateTimeDt(theDate);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>end</b> (Period.end).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The end of the period. If the end of the period is missing, it means that the period is ongoing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DateTimeDt getEndElement() {
|
|
||||||
if (myEnd == null) {
|
|
||||||
myEnd = new DateTimeDt();
|
|
||||||
}
|
|
||||||
return myEnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>end</b> (Period.end).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The end of the period. If the end of the period is missing, it means that the period is ongoing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Date getEnd() {
|
|
||||||
return getEndElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>end</b> (Period.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The end of the period. If the end of the period is missing, it means that the period is ongoing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setEnd(DateTimeDt theValue) {
|
|
||||||
myEnd = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>end</b> (Period.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The end of the period. If the end of the period is missing, it means that the period is ongoing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
|
|
||||||
myEnd = new DateTimeDt(theDate, thePrecision);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>end</b> (Period.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The end of the period. If the end of the period is missing, it means that the period is ongoing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt setEndWithSecondsPrecision( Date theDate) {
|
|
||||||
myEnd = new DateTimeDt(theDate);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,529 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>QuantityDt</b> Datatype
|
|
||||||
* (Quantity)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</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
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="QuantityDt")
|
|
||||||
public class QuantityDt
|
|
||||||
extends BaseQuantityDt implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public QuantityDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
|
|
||||||
setValue(theValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
|
|
||||||
setValue(theValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue,
|
|
||||||
@SimpleSetter.Parameter(name = "theUnits") String theUnits) {
|
|
||||||
setValue(theValue);
|
|
||||||
setComparator(theComparator);
|
|
||||||
setUnits(theUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue,
|
|
||||||
@SimpleSetter.Parameter(name = "theUnits") String theUnits) {
|
|
||||||
setValue(theValue);
|
|
||||||
setComparator(theComparator);
|
|
||||||
setUnits(theUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
|
|
||||||
setValue(theValue);
|
|
||||||
setComparator(theComparator);
|
|
||||||
setSystem(theSystem);
|
|
||||||
setUnits(theUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
@SimpleSetter
|
|
||||||
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
|
|
||||||
setValue(theValue);
|
|
||||||
setComparator(theComparator);
|
|
||||||
setSystem(theSystem);
|
|
||||||
setUnits(theUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="value", type=DecimalDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Quantity.value",
|
|
||||||
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="Quantity.comparator",
|
|
||||||
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<QuantityComparatorEnum> myComparator;
|
|
||||||
|
|
||||||
@Child(name="units", type=StringDt.class, order=2, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Quantity.units",
|
|
||||||
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="Quantity.system",
|
|
||||||
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="Quantity.code",
|
|
||||||
formalDefinition="A computer processable form of the units in some unit representation system"
|
|
||||||
)
|
|
||||||
private CodeDt myCode;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (Quantity.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getValueElement() {
|
|
||||||
if (myValue == null) {
|
|
||||||
myValue = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>value</b> (Quantity.value).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getValue() {
|
|
||||||
return getValueElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>value</b> (Quantity.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setValue(DecimalDt theValue) {
|
|
||||||
myValue = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>value</b> (Quantity.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setValue( long theValue) {
|
|
||||||
myValue = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>value</b> (Quantity.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setValue( double theValue) {
|
|
||||||
myValue = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>value</b> (Quantity.value)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setValue( java.math.BigDecimal theValue) {
|
|
||||||
myValue = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>comparator</b> (Quantity.comparator).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<QuantityComparatorEnum> getComparatorElement() {
|
|
||||||
if (myComparator == null) {
|
|
||||||
myComparator = new BoundCodeDt<QuantityComparatorEnum>(QuantityComparatorEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myComparator;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>comparator</b> (Quantity.comparator).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getComparator() {
|
|
||||||
return getComparatorElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>comparator</b> (Quantity.comparator)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setComparator(BoundCodeDt<QuantityComparatorEnum> theValue) {
|
|
||||||
myComparator = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>comparator</b> (Quantity.comparator)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setComparator(QuantityComparatorEnum theValue) {
|
|
||||||
getComparatorElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>units</b> (Quantity.units).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human-readable form of the units
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getUnitsElement() {
|
|
||||||
if (myUnits == null) {
|
|
||||||
myUnits = new StringDt();
|
|
||||||
}
|
|
||||||
return myUnits;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>units</b> (Quantity.units).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human-readable form of the units
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUnits() {
|
|
||||||
return getUnitsElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>units</b> (Quantity.units)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human-readable form of the units
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setUnits(StringDt theValue) {
|
|
||||||
myUnits = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>units</b> (Quantity.units)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A human-readable form of the units
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setUnits( String theString) {
|
|
||||||
myUnits = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Quantity.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the system that provides the coded form of the unit
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public UriDt getSystemElement() {
|
|
||||||
if (mySystem == null) {
|
|
||||||
mySystem = new UriDt();
|
|
||||||
}
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>system</b> (Quantity.system).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the system that provides the coded form of the unit
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return getSystemElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>system</b> (Quantity.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the system that provides the coded form of the unit
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setSystem(UriDt theValue) {
|
|
||||||
mySystem = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>system</b> (Quantity.system)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The identification of the system that provides the coded form of the unit
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setSystem( String theUri) {
|
|
||||||
mySystem = new UriDt(theUri);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>code</b> (Quantity.code).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A computer processable form of the units in some unit representation system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public CodeDt getCodeElement() {
|
|
||||||
if (myCode == null) {
|
|
||||||
myCode = new CodeDt();
|
|
||||||
}
|
|
||||||
return myCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>code</b> (Quantity.code).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A computer processable form of the units in some unit representation system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getCode() {
|
|
||||||
return getCodeElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>code</b> (Quantity.code)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A computer processable form of the units in some unit representation system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setCode(CodeDt theValue) {
|
|
||||||
myCode = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>code</b> (Quantity.code)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A computer processable form of the units in some unit representation system
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt setCode( String theCode) {
|
|
||||||
myCode = new CodeDt(theCode);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,180 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>RangeDt</b> Datatype
|
|
||||||
* (Range)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A set of ordered Quantities defined by a low and high limit.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to be able to specify ranges of values
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="RangeDt")
|
|
||||||
public class RangeDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public RangeDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Range.low",
|
|
||||||
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="Range.high",
|
|
||||||
formalDefinition="The high limit. The boundary is inclusive."
|
|
||||||
)
|
|
||||||
private QuantityDt myHigh;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLow, myHigh);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>low</b> (Range.low).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The low limit. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt getLow() {
|
|
||||||
if (myLow == null) {
|
|
||||||
myLow = new QuantityDt();
|
|
||||||
}
|
|
||||||
return myLow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>low</b> (Range.low)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The low limit. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public RangeDt setLow(QuantityDt theValue) {
|
|
||||||
myLow = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>high</b> (Range.high).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The high limit. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt getHigh() {
|
|
||||||
if (myHigh == null) {
|
|
||||||
myHigh = new QuantityDt();
|
|
||||||
}
|
|
||||||
return myHigh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>high</b> (Range.high)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The high limit. The boundary is inclusive.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public RangeDt setHigh(QuantityDt theValue) {
|
|
||||||
myHigh = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,180 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>RatioDt</b> Datatype
|
|
||||||
* (Ratio)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A relationship of two Quantity values - expressed as a numerator and a denominator.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to able to capture ratios for some measurements (titers) and some rates (costs)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="RatioDt")
|
|
||||||
public class RatioDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public RatioDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="numerator", type=QuantityDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Ratio.numerator",
|
|
||||||
formalDefinition="The value of the numerator"
|
|
||||||
)
|
|
||||||
private QuantityDt myNumerator;
|
|
||||||
|
|
||||||
@Child(name="denominator", type=QuantityDt.class, order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Ratio.denominator",
|
|
||||||
formalDefinition="The value of the denominator"
|
|
||||||
)
|
|
||||||
private QuantityDt myDenominator;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumerator, myDenominator);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumerator, myDenominator);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>numerator</b> (Ratio.numerator).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the numerator
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt getNumerator() {
|
|
||||||
if (myNumerator == null) {
|
|
||||||
myNumerator = new QuantityDt();
|
|
||||||
}
|
|
||||||
return myNumerator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>numerator</b> (Ratio.numerator)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the numerator
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public RatioDt setNumerator(QuantityDt theValue) {
|
|
||||||
myNumerator = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>denominator</b> (Ratio.denominator).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the denominator
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt getDenominator() {
|
|
||||||
if (myDenominator == null) {
|
|
||||||
myDenominator = new QuantityDt();
|
|
||||||
}
|
|
||||||
return myDenominator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>denominator</b> (Ratio.denominator)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The value of the denominator
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public RatioDt setDenominator(QuantityDt theValue) {
|
|
||||||
myDenominator = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,236 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>ReferenceDt</b> Datatype
|
|
||||||
* (Reference)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference from one resource to another
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
*
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="ReferenceDt")
|
|
||||||
public class ReferenceDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public ReferenceDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="reference", type=StringDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Reference.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="Reference.display",
|
|
||||||
formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference"
|
|
||||||
)
|
|
||||||
private StringDt myDisplay;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myReference, myDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>reference</b> (Reference.reference).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getReferenceElement() {
|
|
||||||
if (myReference == null) {
|
|
||||||
myReference = new StringDt();
|
|
||||||
}
|
|
||||||
return myReference;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>reference</b> (Reference.reference).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getReference() {
|
|
||||||
return getReferenceElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>reference</b> (Reference.reference)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ReferenceDt setReference(StringDt theValue) {
|
|
||||||
myReference = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>reference</b> (Reference.reference)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ReferenceDt setReference( String theString) {
|
|
||||||
myReference = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>display</b> (Reference.display).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getDisplayElement() {
|
|
||||||
if (myDisplay == null) {
|
|
||||||
myDisplay = new StringDt();
|
|
||||||
}
|
|
||||||
return myDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>display</b> (Reference.display).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getDisplay() {
|
|
||||||
return getDisplayElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>display</b> (Reference.display)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ReferenceDt setDisplay(StringDt theValue) {
|
|
||||||
myDisplay = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>display</b> (Reference.display)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ReferenceDt setDisplay( String theString) {
|
|
||||||
myDisplay = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,234 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR - Core Library
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.ICompositeDatatype;
|
|
||||||
import ca.uhn.fhir.model.api.IElement;
|
|
||||||
import ca.uhn.fhir.model.api.IResource;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Child;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Description;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
|
|
||||||
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>ResourceReferenceDt</b> Datatype
|
|
||||||
* (A reference from one resource to another)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A reference from one resource to another
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
*
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="ResourceReferenceDt")
|
|
||||||
public class ResourceReferenceDt
|
|
||||||
extends BaseResourceReferenceDt implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor which creates a resource reference containing the actual resource in question.
|
|
||||||
* <p>
|
|
||||||
* <b> When using this in a server:</b> Generally if this is serialized, it will be serialized as a contained
|
|
||||||
* resource, so this should not be used if the intent is not to actually supply the referenced resource. This is not
|
|
||||||
* a hard-and-fast rule however, as the server can be configured to not serialized this resource, or to load an ID
|
|
||||||
* and contain even if this constructor is not used.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param theResource
|
|
||||||
* The resource instance
|
|
||||||
*/
|
|
||||||
@SimpleSetter()
|
|
||||||
public ResourceReferenceDt(IResource theResource) {
|
|
||||||
super(theResource);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute
|
|
||||||
* URL)
|
|
||||||
*
|
|
||||||
* @param theId
|
|
||||||
* The reference itself
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt(String theId) {
|
|
||||||
setReference(new IdDt(theId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute
|
|
||||||
* URL)
|
|
||||||
*
|
|
||||||
* @param theResourceId
|
|
||||||
* The reference itself
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt(IdDt theResourceId) {
|
|
||||||
setReference(theResourceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Child(name="reference", type=IdDt.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 IdDt 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;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myReference, myDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IdDt getReference() {
|
|
||||||
if (myReference == null) {
|
|
||||||
myReference = new IdDt();
|
|
||||||
}
|
|
||||||
return myReference;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>reference</b> (Relative, internal or absolute URL reference)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt setReference(IdDt theValue) {
|
|
||||||
myReference = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>reference</b> (Relative, internal or absolute URL reference)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt setReference( String theId) {
|
|
||||||
myReference = new IdDt(theId);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>display</b> (Text alternative for the resource).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getDisplay() {
|
|
||||||
if (myDisplay == null) {
|
|
||||||
myDisplay = new StringDt();
|
|
||||||
}
|
|
||||||
return myDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>display</b> (Text alternative for the resource)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt setDisplay(StringDt theValue) {
|
|
||||||
myDisplay = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>display</b> (Text alternative for the resource)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Plain text narrative that identifies the resource in addition to the resource reference
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public ResourceReferenceDt setDisplay( String theString) {
|
|
||||||
myDisplay = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public StringDt getDisplayElement() {
|
|
||||||
return getDisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,652 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>SampledDataDt</b> Datatype
|
|
||||||
* (SampledData)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* There is a need for a concise way to handle the data produced by devices that sample a physical state at a high frequency
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="SampledDataDt")
|
|
||||||
public class SampledDataDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public SampledDataDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="origin", type=QuantityDt.class, order=0, min=1, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="SampledData.origin",
|
|
||||||
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="SampledData.period",
|
|
||||||
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="SampledData.factor",
|
|
||||||
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="SampledData.lowerLimit",
|
|
||||||
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="SampledData.upperLimit",
|
|
||||||
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="SampledData.dimensions",
|
|
||||||
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="SampledData.data",
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>origin</b> (SampledData.origin).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public QuantityDt getOrigin() {
|
|
||||||
if (myOrigin == null) {
|
|
||||||
myOrigin = new QuantityDt();
|
|
||||||
}
|
|
||||||
return myOrigin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>origin</b> (SampledData.origin)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setOrigin(QuantityDt theValue) {
|
|
||||||
myOrigin = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (SampledData.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getPeriodElement() {
|
|
||||||
if (myPeriod == null) {
|
|
||||||
myPeriod = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>period</b> (SampledData.period).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getPeriod() {
|
|
||||||
return getPeriodElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>period</b> (SampledData.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setPeriod(DecimalDt theValue) {
|
|
||||||
myPeriod = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>period</b> (SampledData.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setPeriod( long theValue) {
|
|
||||||
myPeriod = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>period</b> (SampledData.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setPeriod( double theValue) {
|
|
||||||
myPeriod = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>period</b> (SampledData.period)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The length of time between sampling times, measured in milliseconds
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setPeriod( java.math.BigDecimal theValue) {
|
|
||||||
myPeriod = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>factor</b> (SampledData.factor).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getFactorElement() {
|
|
||||||
if (myFactor == null) {
|
|
||||||
myFactor = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>factor</b> (SampledData.factor).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getFactor() {
|
|
||||||
return getFactorElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>factor</b> (SampledData.factor)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setFactor(DecimalDt theValue) {
|
|
||||||
myFactor = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>factor</b> (SampledData.factor)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setFactor( long theValue) {
|
|
||||||
myFactor = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>factor</b> (SampledData.factor)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setFactor( double theValue) {
|
|
||||||
myFactor = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>factor</b> (SampledData.factor)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A correction factor that is applied to the sampled data points before they are added to the origin
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setFactor( java.math.BigDecimal theValue) {
|
|
||||||
myFactor = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>lowerLimit</b> (SampledData.lowerLimit).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getLowerLimitElement() {
|
|
||||||
if (myLowerLimit == null) {
|
|
||||||
myLowerLimit = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myLowerLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>lowerLimit</b> (SampledData.lowerLimit).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getLowerLimit() {
|
|
||||||
return getLowerLimitElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>lowerLimit</b> (SampledData.lowerLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setLowerLimit(DecimalDt theValue) {
|
|
||||||
myLowerLimit = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>lowerLimit</b> (SampledData.lowerLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setLowerLimit( long theValue) {
|
|
||||||
myLowerLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>lowerLimit</b> (SampledData.lowerLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setLowerLimit( double theValue) {
|
|
||||||
myLowerLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>lowerLimit</b> (SampledData.lowerLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setLowerLimit( java.math.BigDecimal theValue) {
|
|
||||||
myLowerLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>upperLimit</b> (SampledData.upperLimit).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getUpperLimitElement() {
|
|
||||||
if (myUpperLimit == null) {
|
|
||||||
myUpperLimit = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myUpperLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>upperLimit</b> (SampledData.upperLimit).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getUpperLimit() {
|
|
||||||
return getUpperLimitElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>upperLimit</b> (SampledData.upperLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setUpperLimit(DecimalDt theValue) {
|
|
||||||
myUpperLimit = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>upperLimit</b> (SampledData.upperLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setUpperLimit( long theValue) {
|
|
||||||
myUpperLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>upperLimit</b> (SampledData.upperLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setUpperLimit( double theValue) {
|
|
||||||
myUpperLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>upperLimit</b> (SampledData.upperLimit)
|
|
||||||
*
|
|
||||||
* <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)
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setUpperLimit( java.math.BigDecimal theValue) {
|
|
||||||
myUpperLimit = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>dimensions</b> (SampledData.dimensions).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IntegerDt getDimensionsElement() {
|
|
||||||
if (myDimensions == null) {
|
|
||||||
myDimensions = new IntegerDt();
|
|
||||||
}
|
|
||||||
return myDimensions;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>dimensions</b> (SampledData.dimensions).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Integer getDimensions() {
|
|
||||||
return getDimensionsElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>dimensions</b> (SampledData.dimensions)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setDimensions(IntegerDt theValue) {
|
|
||||||
myDimensions = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>dimensions</b> (SampledData.dimensions)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setDimensions( int theInteger) {
|
|
||||||
myDimensions = new IntegerDt(theInteger);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>data</b> (SampledData.data).
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public StringDt getDataElement() {
|
|
||||||
if (myData == null) {
|
|
||||||
myData = new StringDt();
|
|
||||||
}
|
|
||||||
return myData;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>data</b> (SampledData.data).
|
|
||||||
* 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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getData() {
|
|
||||||
return getDataElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>data</b> (SampledData.data)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setData(StringDt theValue) {
|
|
||||||
myData = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>data</b> (SampledData.data)
|
|
||||||
*
|
|
||||||
* <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
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public SampledDataDt setData( String theString) {
|
|
||||||
myData = new StringDt(theString);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,683 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.composite;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import java.util.*;
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import ca.uhn.fhir.model.primitive.*;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.*;
|
|
||||||
import ca.uhn.fhir.model.base.composite.*;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AddressUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.AggregationModeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.BindingConformanceEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.CodingDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ConstraintSeverityEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointSystemEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.ContactPointUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.DataTypeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.EventTimingEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.IdentifierUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.NameUseEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.Organization;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.PeriodDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.PropertyRepresentationEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.QuantityDt;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.SlicingRulesEnum;
|
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.valueset.UnitsOfTimeEnum;
|
|
||||||
import ca.uhn.fhir.model.dev.resource.ValueSet;
|
|
||||||
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BooleanDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.DecimalDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IntegerDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAPI/FHIR <b>TimingDt</b> Datatype
|
|
||||||
* (Timing)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Requirements:</b>
|
|
||||||
* Need to able to track proposed timing schedules. There are several different ways to do this: one or more specified times, a simple rules like three times a day, or before/after meals
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@DatatypeDef(name="TimingDt")
|
|
||||||
public class TimingDt
|
|
||||||
extends BaseIdentifiableElement implements ICompositeDatatype
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public TimingDt() {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name="event", type=PeriodDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Timing.event",
|
|
||||||
formalDefinition="Identifies specific time periods when the event should occur"
|
|
||||||
)
|
|
||||||
private java.util.List<PeriodDt> myEvent;
|
|
||||||
|
|
||||||
@Child(name="repeat", order=1, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Timing.repeat",
|
|
||||||
formalDefinition="Identifies a repeating pattern to the intended time periods."
|
|
||||||
)
|
|
||||||
private Repeat myRepeat;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myEvent, myRepeat);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEvent, myRepeat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>event</b> (Timing.event).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies specific time periods when the event should occur
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public java.util.List<PeriodDt> getEvent() {
|
|
||||||
if (myEvent == null) {
|
|
||||||
myEvent = new java.util.ArrayList<PeriodDt>();
|
|
||||||
}
|
|
||||||
return myEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>event</b> (Timing.event)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies specific time periods when the event should occur
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public TimingDt setEvent(java.util.List<PeriodDt> theValue) {
|
|
||||||
myEvent = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds and returns a new value for <b>event</b> (Timing.event)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies specific time periods when the event should occur
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt addEvent() {
|
|
||||||
PeriodDt newType = new PeriodDt();
|
|
||||||
getEvent().add(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the first repetition for <b>event</b> (Timing.event),
|
|
||||||
* creating it if it does not already exist.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies specific time periods when the event should occur
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public PeriodDt getEventFirstRep() {
|
|
||||||
if (getEvent().isEmpty()) {
|
|
||||||
return addEvent();
|
|
||||||
}
|
|
||||||
return getEvent().get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>repeat</b> (Timing.repeat).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies a repeating pattern to the intended time periods.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat getRepeat() {
|
|
||||||
if (myRepeat == null) {
|
|
||||||
myRepeat = new Repeat();
|
|
||||||
}
|
|
||||||
return myRepeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>repeat</b> (Timing.repeat)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies a repeating pattern to the intended time periods.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public TimingDt setRepeat(Repeat theValue) {
|
|
||||||
myRepeat = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Block class for child element: <b>Timing.repeat</b> (Timing.repeat)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies a repeating pattern to the intended time periods.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@Block()
|
|
||||||
public static class Repeat
|
|
||||||
extends BaseIdentifiableElement implements IResourceBlock {
|
|
||||||
|
|
||||||
@Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1)
|
|
||||||
@Description(
|
|
||||||
shortDefinition="Timing.repeat.frequency",
|
|
||||||
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="Timing.repeat.when",
|
|
||||||
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="Timing.repeat.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="Timing.repeat.units",
|
|
||||||
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="Timing.repeat.count",
|
|
||||||
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="Timing.repeat.end",
|
|
||||||
formalDefinition="When to stop repeating the timing schedule"
|
|
||||||
)
|
|
||||||
private DateTimeDt myEnd;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myFrequency, myWhen, myDuration, myUnits, myCount, myEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myFrequency, myWhen, myDuration, myUnits, myCount, myEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>frequency</b> (Timing.repeat.frequency).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates how often the event should occur.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IntegerDt getFrequencyElement() {
|
|
||||||
if (myFrequency == null) {
|
|
||||||
myFrequency = new IntegerDt();
|
|
||||||
}
|
|
||||||
return myFrequency;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>frequency</b> (Timing.repeat.frequency).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates how often the event should occur.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Integer getFrequency() {
|
|
||||||
return getFrequencyElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>frequency</b> (Timing.repeat.frequency)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates how often the event should occur.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setFrequency(IntegerDt theValue) {
|
|
||||||
myFrequency = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>frequency</b> (Timing.repeat.frequency)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Indicates how often the event should occur.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setFrequency( int theInteger) {
|
|
||||||
myFrequency = new IntegerDt(theInteger);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>when</b> (Timing.repeat.when).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the occurrence of daily life that determines timing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<EventTimingEnum> getWhenElement() {
|
|
||||||
if (myWhen == null) {
|
|
||||||
myWhen = new BoundCodeDt<EventTimingEnum>(EventTimingEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myWhen;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>when</b> (Timing.repeat.when).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the occurrence of daily life that determines timing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getWhen() {
|
|
||||||
return getWhenElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>when</b> (Timing.repeat.when)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the occurrence of daily life that determines timing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setWhen(BoundCodeDt<EventTimingEnum> theValue) {
|
|
||||||
myWhen = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>when</b> (Timing.repeat.when)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* Identifies the occurrence of daily life that determines timing
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setWhen(EventTimingEnum theValue) {
|
|
||||||
getWhenElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>duration</b> (Timing.repeat.duration).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DecimalDt getDurationElement() {
|
|
||||||
if (myDuration == null) {
|
|
||||||
myDuration = new DecimalDt();
|
|
||||||
}
|
|
||||||
return myDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>duration</b> (Timing.repeat.duration).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BigDecimal getDuration() {
|
|
||||||
return getDurationElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>duration</b> (Timing.repeat.duration)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setDuration(DecimalDt theValue) {
|
|
||||||
myDuration = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>duration</b> (Timing.repeat.duration)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setDuration( long theValue) {
|
|
||||||
myDuration = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>duration</b> (Timing.repeat.duration)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setDuration( double theValue) {
|
|
||||||
myDuration = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>duration</b> (Timing.repeat.duration)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* How long each repetition should last
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setDuration( java.math.BigDecimal theValue) {
|
|
||||||
myDuration = new DecimalDt(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>units</b> (Timing.repeat.units).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The units of time for the duration
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public BoundCodeDt<UnitsOfTimeEnum> getUnitsElement() {
|
|
||||||
if (myUnits == null) {
|
|
||||||
myUnits = new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER);
|
|
||||||
}
|
|
||||||
return myUnits;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>units</b> (Timing.repeat.units).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The units of time for the duration
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public String getUnits() {
|
|
||||||
return getUnitsElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>units</b> (Timing.repeat.units)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The units of time for the duration
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setUnits(BoundCodeDt<UnitsOfTimeEnum> theValue) {
|
|
||||||
myUnits = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>units</b> (Timing.repeat.units)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The units of time for the duration
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setUnits(UnitsOfTimeEnum theValue) {
|
|
||||||
getUnitsElement().setValueAsEnum(theValue);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>count</b> (Timing.repeat.count).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A total count of the desired number of repetitions
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public IntegerDt getCountElement() {
|
|
||||||
if (myCount == null) {
|
|
||||||
myCount = new IntegerDt();
|
|
||||||
}
|
|
||||||
return myCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>count</b> (Timing.repeat.count).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A total count of the desired number of repetitions
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Integer getCount() {
|
|
||||||
return getCountElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>count</b> (Timing.repeat.count)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A total count of the desired number of repetitions
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setCount(IntegerDt theValue) {
|
|
||||||
myCount = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>count</b> (Timing.repeat.count)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* A total count of the desired number of repetitions
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setCount( int theInteger) {
|
|
||||||
myCount = new IntegerDt(theInteger);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>end</b> (Timing.repeat.end).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* When to stop repeating the timing schedule
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public DateTimeDt getEndElement() {
|
|
||||||
if (myEnd == null) {
|
|
||||||
myEnd = new DateTimeDt();
|
|
||||||
}
|
|
||||||
return myEnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value(s) for <b>end</b> (Timing.repeat.end).
|
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* When to stop repeating the timing schedule
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Date getEnd() {
|
|
||||||
return getEndElement().getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>end</b> (Timing.repeat.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* When to stop repeating the timing schedule
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setEnd(DateTimeDt theValue) {
|
|
||||||
myEnd = theValue;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>end</b> (Timing.repeat.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* When to stop repeating the timing schedule
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
|
|
||||||
myEnd = new DateTimeDt(theDate, thePrecision);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value for <b>end</b> (Timing.repeat.end)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* When to stop repeating the timing schedule
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public Repeat setEndWithSecondsPrecision( Date theDate) {
|
|
||||||
myEnd = new DateTimeDt(theDate);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,164 +0,0 @@
|
||||||
package ca.uhn.fhir.model.dev.resource;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR - Core Library
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2015 University Health Network
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.BaseElement;
|
|
||||||
import ca.uhn.fhir.model.api.IResource;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.Child;
|
|
||||||
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
|
|
||||||
import ca.uhn.fhir.model.base.resource.ResourceMetadataMap;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.ContainedDt;
|
|
||||||
import ca.uhn.fhir.model.dev.composite.NarrativeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.CodeDt;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.rest.gclient.StringClientParam;
|
|
||||||
import ca.uhn.fhir.util.ElementUtil;
|
|
||||||
|
|
||||||
public abstract class BaseResource extends BaseElement implements IResource {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search parameter constant for <b>_language</b>
|
|
||||||
*/
|
|
||||||
@SearchParamDefinition(name="_language", path="", description="The language of the resource", type="string" )
|
|
||||||
public static final String SP_RES_LANGUAGE = "_language";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search parameter constant for <b>_id</b>
|
|
||||||
*/
|
|
||||||
@SearchParamDefinition(name="_id", path="", description="The ID of the resource", type="string" )
|
|
||||||
public static final String SP_RES_ID = "_id";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>Fluent Client</b> search parameter constant for <b>_id</b>
|
|
||||||
* <p>
|
|
||||||
* Description: <b>the _id of a resource</b><br>
|
|
||||||
* Type: <b>string</b><br>
|
|
||||||
* Path: <b>Resource._id</b><br>
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public static final StringClientParam RES_ID = new StringClientParam(BaseResource.SP_RES_ID);
|
|
||||||
|
|
||||||
|
|
||||||
@Child(name = "contained", order = 2, min = 0, max = 1)
|
|
||||||
private ContainedDt myContained;
|
|
||||||
|
|
||||||
private IdDt myId;
|
|
||||||
|
|
||||||
@Child(name = "language", order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
|
||||||
private CodeDt myLanguage;
|
|
||||||
|
|
||||||
private ResourceMetadataMap myResourceMetadata;
|
|
||||||
|
|
||||||
@Child(name = "text", order = 1, min = 0, max = 1)
|
|
||||||
private NarrativeDt myText;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContainedDt getContained() {
|
|
||||||
if (myContained == null) {
|
|
||||||
myContained = new ContainedDt();
|
|
||||||
}
|
|
||||||
return myContained;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IdDt getId() {
|
|
||||||
if (myId == null) {
|
|
||||||
myId = new IdDt();
|
|
||||||
}
|
|
||||||
return myId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CodeDt getLanguage() {
|
|
||||||
if (myLanguage == null) {
|
|
||||||
myLanguage = new CodeDt();
|
|
||||||
}
|
|
||||||
return myLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResourceMetadataMap getResourceMetadata() {
|
|
||||||
if (myResourceMetadata == null) {
|
|
||||||
myResourceMetadata = new ResourceMetadataMap();
|
|
||||||
}
|
|
||||||
return myResourceMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public NarrativeDt getText() {
|
|
||||||
if (myText == null) {
|
|
||||||
myText = new NarrativeDt();
|
|
||||||
}
|
|
||||||
return myText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContained(ContainedDt theContained) {
|
|
||||||
myContained = theContained;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(IdDt theId) {
|
|
||||||
myId = theId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String theId) {
|
|
||||||
if (theId == null) {
|
|
||||||
myId = null;
|
|
||||||
} else {
|
|
||||||
myId = new IdDt(theId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setLanguage(CodeDt theLanguage) {
|
|
||||||
myLanguage = theLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setResourceMetadata(ResourceMetadataMap theMap) {
|
|
||||||
Validate.notNull(theMap, "The Map must not be null");
|
|
||||||
myResourceMetadata = theMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setText(NarrativeDt theText) {
|
|
||||||
myText = theText;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
|
|
||||||
b.append("id", getId().toUnqualified());
|
|
||||||
return b.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Intended to be called by extending classes {@link #isEmpty()} implementations, returns <code>true</code> if all
|
|
||||||
* content in this superclass instance is empty per the semantics of {@link #isEmpty()}.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected boolean isBaseEmpty() {
|
|
||||||
return super.isBaseEmpty() && ElementUtil.isEmpty(myLanguage, myText, myId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AddressUseEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>home</b>
|
|
||||||
*
|
|
||||||
* A communication address at a 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", "http://hl7.org/fhir/address-use"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>temp</b>
|
|
||||||
*
|
|
||||||
* A temporary address. The period can provide more detailed information.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/address-use"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/address-use
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/address-use";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AddressUse
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AddressUse";
|
|
||||||
|
|
||||||
private static Map<String, AddressUseEnum> CODE_TO_ENUM = new HashMap<String, AddressUseEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 AddressUseEnum forCode(String theCode) {
|
|
||||||
AddressUseEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AddressUseEnum> VALUESET_BINDER = new IValueSetEnumBinder<AddressUseEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdministrativeGenderEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>male</b>
|
|
||||||
*
|
|
||||||
* Male
|
|
||||||
*/
|
|
||||||
MALE("male", "http://hl7.org/fhir/administrative-gender"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>female</b>
|
|
||||||
*
|
|
||||||
* Female
|
|
||||||
*/
|
|
||||||
FEMALE("female", "http://hl7.org/fhir/administrative-gender"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>other</b>
|
|
||||||
*
|
|
||||||
* Other
|
|
||||||
*/
|
|
||||||
OTHER("other", "http://hl7.org/fhir/administrative-gender"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unknown</b>
|
|
||||||
*
|
|
||||||
* Unknown
|
|
||||||
*/
|
|
||||||
UNKNOWN("unknown", "http://hl7.org/fhir/administrative-gender"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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:
|
|
||||||
* AdministrativeGender
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdministrativeGender";
|
|
||||||
|
|
||||||
private static Map<String, AdministrativeGenderEnum> CODE_TO_ENUM = new HashMap<String, AdministrativeGenderEnum>();
|
|
||||||
private static Map<String, Map<String, AdministrativeGenderEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdministrativeGenderEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdministrativeGenderEnum next : AdministrativeGenderEnum.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, AdministrativeGenderEnum>());
|
|
||||||
}
|
|
||||||
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 AdministrativeGenderEnum forCode(String theCode) {
|
|
||||||
AdministrativeGenderEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdministrativeGenderEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdministrativeGenderEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdministrativeGenderEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdministrativeGenderEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdministrativeGenderEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdministrativeGenderEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdministrativeGenderEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdministrativeGenderEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,162 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdmitSourceEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Transferred from other hospital</b><br/>
|
|
||||||
* Code Value: <b>hosp-trans</b>
|
|
||||||
*/
|
|
||||||
TRANSFERRED_FROM_OTHER_HOSPITAL("hosp-trans", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>From accident/emergency department</b><br/>
|
|
||||||
* Code Value: <b>emd</b>
|
|
||||||
*/
|
|
||||||
FROM_ACCIDENT_EMERGENCY_DEPARTMENT("emd", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>From outpatient department</b><br/>
|
|
||||||
* Code Value: <b>outp</b>
|
|
||||||
*/
|
|
||||||
FROM_OUTPATIENT_DEPARTMENT("outp", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Born in hospital</b><br/>
|
|
||||||
* Code Value: <b>born</b>
|
|
||||||
*/
|
|
||||||
BORN_IN_HOSPITAL("born", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>General Practitioner referral</b><br/>
|
|
||||||
* Code Value: <b>gp</b>
|
|
||||||
*/
|
|
||||||
GENERAL_PRACTITIONER_REFERRAL("gp", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Medical Practitioner/physician referral</b><br/>
|
|
||||||
* Code Value: <b>mp</b>
|
|
||||||
*/
|
|
||||||
MEDICAL_PRACTITIONER_PHYSICIAN_REFERRAL("mp", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>From nursing home</b><br/>
|
|
||||||
* Code Value: <b>nursing</b>
|
|
||||||
*/
|
|
||||||
FROM_NURSING_HOME("nursing", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>From psychiatric hospital</b><br/>
|
|
||||||
* Code Value: <b>psych</b>
|
|
||||||
*/
|
|
||||||
FROM_PSYCHIATRIC_HOSPITAL("psych", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>From rehabilitation facility</b><br/>
|
|
||||||
* Code Value: <b>rehab</b>
|
|
||||||
*/
|
|
||||||
FROM_REHABILITATION_FACILITY("rehab", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Other</b><br/>
|
|
||||||
* Code Value: <b>other</b>
|
|
||||||
*/
|
|
||||||
OTHER("other", "http://hl7.org/fhir/admit-source"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/encounter-admit-source
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-admit-source";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdmitSource
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdmitSource";
|
|
||||||
|
|
||||||
private static Map<String, AdmitSourceEnum> CODE_TO_ENUM = new HashMap<String, AdmitSourceEnum>();
|
|
||||||
private static Map<String, Map<String, AdmitSourceEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdmitSourceEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdmitSourceEnum next : AdmitSourceEnum.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, AdmitSourceEnum>());
|
|
||||||
}
|
|
||||||
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 AdmitSourceEnum forCode(String theCode) {
|
|
||||||
AdmitSourceEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdmitSourceEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdmitSourceEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdmitSourceEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdmitSourceEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdmitSourceEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdmitSourceEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdmitSourceEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdmitSourceEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskCategoryEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Food</b><br/>
|
|
||||||
* Code Value: <b>food</b>
|
|
||||||
*
|
|
||||||
* Any substance consumed to provide nutritional support for the body.
|
|
||||||
*/
|
|
||||||
FOOD("food", "http://hl7.org/fhir/reaction-risk-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Medication</b><br/>
|
|
||||||
* Code Value: <b>medication</b>
|
|
||||||
*
|
|
||||||
* Substances administered to achieve a physiological effect.
|
|
||||||
*/
|
|
||||||
MEDICATION("medication", "http://hl7.org/fhir/reaction-risk-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Environment</b><br/>
|
|
||||||
* Code Value: <b>environment</b>
|
|
||||||
*
|
|
||||||
* Substances that are encountered in the environment.
|
|
||||||
*/
|
|
||||||
ENVIRONMENT("environment", "http://hl7.org/fhir/reaction-risk-category"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-category
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-category";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskCategory
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskCategory";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskCategoryEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskCategoryEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskCategoryEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskCategoryEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskCategoryEnum next : AdverseReactionRiskCategoryEnum.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, AdverseReactionRiskCategoryEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskCategoryEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskCategoryEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskCategoryEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskCategoryEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskCategoryEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskCategoryEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCategoryEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCategoryEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskCategoryEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskCategoryEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskCertaintyEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Unlikely</b><br/>
|
|
||||||
* Code Value: <b>unlikely</b>
|
|
||||||
*
|
|
||||||
* There is a low level of clinical certainty that the reaction was caused by the identified Substance.
|
|
||||||
*/
|
|
||||||
UNLIKELY("unlikely", "http://hl7.org/fhir/reaction-risk-certainty"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Likely</b><br/>
|
|
||||||
* Code Value: <b>likely</b>
|
|
||||||
*
|
|
||||||
* There is a high level of clinical certainty that the reaction was caused by the identified Substance.
|
|
||||||
*/
|
|
||||||
LIKELY("likely", "http://hl7.org/fhir/reaction-risk-certainty"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Confirmed</b><br/>
|
|
||||||
* Code Value: <b>confirmed</b>
|
|
||||||
*
|
|
||||||
* There is a very high level of clinical certainty that the reaction was due to the identified Substance, which may include clinical evidence by testing or rechallenge.
|
|
||||||
*/
|
|
||||||
CONFIRMED("confirmed", "http://hl7.org/fhir/reaction-risk-certainty"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-certainty
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-certainty";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskCertainty
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskCertainty";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskCertaintyEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskCertaintyEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskCertaintyEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskCertaintyEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskCertaintyEnum next : AdverseReactionRiskCertaintyEnum.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, AdverseReactionRiskCertaintyEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskCertaintyEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskCertaintyEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskCertaintyEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskCertaintyEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskCertaintyEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskCertaintyEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCertaintyEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCertaintyEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskCertaintyEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskCertaintyEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskCriticalityEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Low Risk</b><br/>
|
|
||||||
* Code Value: <b>low</b>
|
|
||||||
*
|
|
||||||
* The potential clinical impact of a future reaction is estimated as low risk. Future exposure to the Substance is considered a relative contra-indication.
|
|
||||||
*/
|
|
||||||
LOW_RISK("low", "http://hl7.org/fhir/reaction-risk-criticality"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>High Risk</b><br/>
|
|
||||||
* Code Value: <b>high</b>
|
|
||||||
*
|
|
||||||
* The potential clinical impact of a future reaction is estimated as high risk. Future exposure to the Substance may be considered an absolute contra-indication.
|
|
||||||
*/
|
|
||||||
HIGH_RISK("high", "http://hl7.org/fhir/reaction-risk-criticality"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-criticality
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-criticality";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskCriticality
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskCriticality";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskCriticalityEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskCriticalityEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskCriticalityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskCriticalityEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskCriticalityEnum next : AdverseReactionRiskCriticalityEnum.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, AdverseReactionRiskCriticalityEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskCriticalityEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskCriticalityEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskCriticalityEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskCriticalityEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskCriticalityEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskCriticalityEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCriticalityEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskCriticalityEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskCriticalityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskCriticalityEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskSeverityEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Mild</b><br/>
|
|
||||||
* Code Value: <b>mild</b>
|
|
||||||
*
|
|
||||||
* Causes mild physiological effects.
|
|
||||||
*/
|
|
||||||
MILD("mild", "http://hl7.org/fhir/reaction-risk-severity"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Moderate</b><br/>
|
|
||||||
* Code Value: <b>moderate</b>
|
|
||||||
*
|
|
||||||
* Causes moderate physiological effects.
|
|
||||||
*/
|
|
||||||
MODERATE("moderate", "http://hl7.org/fhir/reaction-risk-severity"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Severe</b><br/>
|
|
||||||
* Code Value: <b>severe</b>
|
|
||||||
*
|
|
||||||
* Causes severe physiological effects.
|
|
||||||
*/
|
|
||||||
SEVERE("severe", "http://hl7.org/fhir/reaction-risk-severity"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-severity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-severity";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskSeverity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskSeverity";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskSeverityEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskSeverityEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskSeverityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskSeverityEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskSeverityEnum next : AdverseReactionRiskSeverityEnum.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, AdverseReactionRiskSeverityEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskSeverityEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskSeverityEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskSeverityEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskSeverityEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskSeverityEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskSeverityEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskSeverityEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskSeverityEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskSeverityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskSeverityEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,134 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Unconfirmed</b><br/>
|
|
||||||
* Code Value: <b>unconfirmed</b>
|
|
||||||
*
|
|
||||||
* A low level of certainty about the propensity for a reaction to the identified Substance.
|
|
||||||
*/
|
|
||||||
UNCONFIRMED("unconfirmed", "http://hl7.org/fhir/reaction-risk-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Confirmed</b><br/>
|
|
||||||
* Code Value: <b>confirmed</b>
|
|
||||||
*
|
|
||||||
* A high level of certainty about the propensity for a reaction to the identified Substance, which may include clinical evidence by testing or rechallenge.
|
|
||||||
*/
|
|
||||||
CONFIRMED("confirmed", "http://hl7.org/fhir/reaction-risk-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Resolved</b><br/>
|
|
||||||
* Code Value: <b>resolved</b>
|
|
||||||
*
|
|
||||||
* A reaction to the identified Substance has been clinically reassessed by testing or rechallenge and considered to be resolved.
|
|
||||||
*/
|
|
||||||
RESOLVED("resolved", "http://hl7.org/fhir/reaction-risk-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Refuted</b><br/>
|
|
||||||
* Code Value: <b>refuted</b>
|
|
||||||
*
|
|
||||||
* A propensity for a reaction to the identified Substance has been disproven with a high level of clinical certainty, which may include testing or rechallenge, and is refuted.
|
|
||||||
*/
|
|
||||||
REFUTED("refuted", "http://hl7.org/fhir/reaction-risk-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskStatus";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskStatusEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskStatusEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskStatusEnum next : AdverseReactionRiskStatusEnum.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, AdverseReactionRiskStatusEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskStatusEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AdverseReactionRiskTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Immune Mediated</b><br/>
|
|
||||||
* Code Value: <b>immune</b>
|
|
||||||
*
|
|
||||||
* Immune mediated reaction, including allergic reactions and hypersensitivities.
|
|
||||||
*/
|
|
||||||
IMMUNE_MEDIATED("immune", "http://hl7.org/fhir/reaction-risk-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Non-immune mediated</b><br/>
|
|
||||||
* Code Value: <b>non-immune</b>
|
|
||||||
*
|
|
||||||
* A non-immune mediated reaction, which can include pseudoallergic reactions, side effects, intolerances, drug toxicities (eg to Gentamicin), drug-drug interactions, food-drug interactions, and drug-disease interactions.
|
|
||||||
*/
|
|
||||||
NON_IMMUNE_MEDIATED("non-immune", "http://hl7.org/fhir/reaction-risk-type"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/reaction-risk-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/reaction-risk-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AdverseReactionRiskType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AdverseReactionRiskType";
|
|
||||||
|
|
||||||
private static Map<String, AdverseReactionRiskTypeEnum> CODE_TO_ENUM = new HashMap<String, AdverseReactionRiskTypeEnum>();
|
|
||||||
private static Map<String, Map<String, AdverseReactionRiskTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AdverseReactionRiskTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AdverseReactionRiskTypeEnum next : AdverseReactionRiskTypeEnum.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, AdverseReactionRiskTypeEnum>());
|
|
||||||
}
|
|
||||||
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 AdverseReactionRiskTypeEnum forCode(String theCode) {
|
|
||||||
AdverseReactionRiskTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AdverseReactionRiskTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<AdverseReactionRiskTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AdverseReactionRiskTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AdverseReactionRiskTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdverseReactionRiskTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AdverseReactionRiskTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AdverseReactionRiskTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AggregationModeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>contained</b>
|
|
||||||
*
|
|
||||||
* The reference is a local reference to a contained resource.
|
|
||||||
*/
|
|
||||||
CONTAINED("contained", "http://hl7.org/fhir/resource-aggregation-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>referenced</b>
|
|
||||||
*
|
|
||||||
* The reference to a resource that has to be resolved externally to the resource that includes the reference.
|
|
||||||
*/
|
|
||||||
REFERENCED("referenced", "http://hl7.org/fhir/resource-aggregation-mode"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/resource-aggregation-mode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/resource-aggregation-mode";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AggregationMode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AggregationMode";
|
|
||||||
|
|
||||||
private static Map<String, AggregationModeEnum> CODE_TO_ENUM = new HashMap<String, AggregationModeEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 AggregationModeEnum forCode(String theCode) {
|
|
||||||
AggregationModeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AggregationModeEnum> VALUESET_BINDER = new IValueSetEnumBinder<AggregationModeEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AlertStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>active</b>
|
|
||||||
*
|
|
||||||
* A current alert that should be displayed to a user. A system may use the category to determine which roles should view the alert.
|
|
||||||
*/
|
|
||||||
ACTIVE("active", "http://hl7.org/fhir/alert-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>inactive</b>
|
|
||||||
*
|
|
||||||
* The alert does not need to be displayed any more.
|
|
||||||
*/
|
|
||||||
INACTIVE("inactive", "http://hl7.org/fhir/alert-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>entered in error</b>
|
|
||||||
*
|
|
||||||
* The alert was added in error, and should no longer be displayed.
|
|
||||||
*/
|
|
||||||
ENTERED_IN_ERROR("entered in error", "http://hl7.org/fhir/alert-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/alert-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/alert-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AlertStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AlertStatus";
|
|
||||||
|
|
||||||
private static Map<String, AlertStatusEnum> CODE_TO_ENUM = new HashMap<String, AlertStatusEnum>();
|
|
||||||
private static Map<String, Map<String, AlertStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AlertStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AlertStatusEnum next : AlertStatusEnum.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, AlertStatusEnum>());
|
|
||||||
}
|
|
||||||
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 AlertStatusEnum forCode(String theCode) {
|
|
||||||
AlertStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AlertStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<AlertStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AlertStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AlertStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AlertStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AlertStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AlertStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AlertStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AnimalSpeciesEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Dog</b><br/>
|
|
||||||
* Code Value: <b>canislf</b>
|
|
||||||
*
|
|
||||||
* Canis lupus familiaris
|
|
||||||
*/
|
|
||||||
DOG("canislf", "http://hl7.org/fhir/animal-species"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Sheep</b><br/>
|
|
||||||
* Code Value: <b>ovisa</b>
|
|
||||||
*
|
|
||||||
* Ovis aries
|
|
||||||
*/
|
|
||||||
SHEEP("ovisa", "http://hl7.org/fhir/animal-species"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Domestic Canary</b><br/>
|
|
||||||
* Code Value: <b>serinuscd</b>
|
|
||||||
*
|
|
||||||
* Serinus canaria domestica
|
|
||||||
*/
|
|
||||||
DOMESTIC_CANARY("serinuscd", "http://hl7.org/fhir/animal-species"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/animal-species
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/animal-species";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AnimalSpecies
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AnimalSpecies";
|
|
||||||
|
|
||||||
private static Map<String, AnimalSpeciesEnum> CODE_TO_ENUM = new HashMap<String, AnimalSpeciesEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 AnimalSpeciesEnum forCode(String theCode) {
|
|
||||||
AnimalSpeciesEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AnimalSpeciesEnum> VALUESET_BINDER = new IValueSetEnumBinder<AnimalSpeciesEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,200 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AnswerFormatEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>boolean</b>
|
|
||||||
*
|
|
||||||
* Answer is a yes/no answer.
|
|
||||||
*/
|
|
||||||
BOOLEAN("boolean", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>decimal</b>
|
|
||||||
*
|
|
||||||
* Answer is a floating point number.
|
|
||||||
*/
|
|
||||||
DECIMAL("decimal", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>integer</b>
|
|
||||||
*
|
|
||||||
* Answer is an integer.
|
|
||||||
*/
|
|
||||||
INTEGER("integer", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>date</b>
|
|
||||||
*
|
|
||||||
* Answer is a date.
|
|
||||||
*/
|
|
||||||
DATE("date", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>dateTime</b>
|
|
||||||
*
|
|
||||||
* Answer is a date and time.
|
|
||||||
*/
|
|
||||||
DATETIME("dateTime", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>instant</b>
|
|
||||||
*
|
|
||||||
* Answer is a system timestamp.
|
|
||||||
*/
|
|
||||||
INSTANT("instant", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>time</b>
|
|
||||||
*
|
|
||||||
* Answer is a time independent of date.
|
|
||||||
*/
|
|
||||||
TIME("time", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>string</b>
|
|
||||||
*
|
|
||||||
* Answer is a short (few words to short sentence) free-text entry.
|
|
||||||
*/
|
|
||||||
STRING("string", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>text</b>
|
|
||||||
*
|
|
||||||
* Answer is a long (potentially multi-paragram) free-text entry.
|
|
||||||
*/
|
|
||||||
TEXT("text", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>choice</b>
|
|
||||||
*
|
|
||||||
* Answer is a choice from a list of options.
|
|
||||||
*/
|
|
||||||
CHOICE("choice", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>open-choice</b>
|
|
||||||
*
|
|
||||||
* Answer is a choice from a list of options or a free-text entry.
|
|
||||||
*/
|
|
||||||
OPEN_CHOICE("open-choice", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>attachment</b>
|
|
||||||
*
|
|
||||||
* Answer is binary content such as a image, PDF, etc.
|
|
||||||
*/
|
|
||||||
ATTACHMENT("attachment", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>reference</b>
|
|
||||||
*
|
|
||||||
* Answer is a reference to another resource (practitioner, organization, etc.).
|
|
||||||
*/
|
|
||||||
REFERENCE("reference", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>quantity</b>
|
|
||||||
*
|
|
||||||
* Answer is a combination of a numeric value and unit.
|
|
||||||
*/
|
|
||||||
QUANTITY("quantity", "http://hl7.org/fhir/answer-format"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/answer-format
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/answer-format";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AnswerFormat
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AnswerFormat";
|
|
||||||
|
|
||||||
private static Map<String, AnswerFormatEnum> CODE_TO_ENUM = new HashMap<String, AnswerFormatEnum>();
|
|
||||||
private static Map<String, Map<String, AnswerFormatEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AnswerFormatEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AnswerFormatEnum next : AnswerFormatEnum.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, AnswerFormatEnum>());
|
|
||||||
}
|
|
||||||
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 AnswerFormatEnum forCode(String theCode) {
|
|
||||||
AnswerFormatEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AnswerFormatEnum> VALUESET_BINDER = new IValueSetEnumBinder<AnswerFormatEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AnswerFormatEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AnswerFormatEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AnswerFormatEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AnswerFormatEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AnswerFormatEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AnswerFormatEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum AppointmentStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>busy</b>
|
|
||||||
*
|
|
||||||
* The participant(s) will be unavailable during this appointment.
|
|
||||||
*/
|
|
||||||
BUSY("busy", "http://hl7.org/fhir/appointmentstatus"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>free</b>
|
|
||||||
*
|
|
||||||
* The participant(s) will still be available during this appointment.
|
|
||||||
*/
|
|
||||||
FREE("free", "http://hl7.org/fhir/appointmentstatus"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>tentative</b>
|
|
||||||
*
|
|
||||||
* This appointment has not been confirmed, and may become available.
|
|
||||||
*/
|
|
||||||
TENTATIVE("tentative", "http://hl7.org/fhir/appointmentstatus"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>outofoffice</b>
|
|
||||||
*
|
|
||||||
* The participant(s) will not be at the usual location.
|
|
||||||
*/
|
|
||||||
OUTOFOFFICE("outofoffice", "http://hl7.org/fhir/appointmentstatus"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/appointmentstatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/appointmentstatus";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* AppointmentStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "AppointmentStatus";
|
|
||||||
|
|
||||||
private static Map<String, AppointmentStatusEnum> CODE_TO_ENUM = new HashMap<String, AppointmentStatusEnum>();
|
|
||||||
private static Map<String, Map<String, AppointmentStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, AppointmentStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (AppointmentStatusEnum next : AppointmentStatusEnum.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, AppointmentStatusEnum>());
|
|
||||||
}
|
|
||||||
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 AppointmentStatusEnum forCode(String theCode) {
|
|
||||||
AppointmentStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<AppointmentStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<AppointmentStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(AppointmentStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(AppointmentStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AppointmentStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AppointmentStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, AppointmentStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
AppointmentStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum BindingConformanceEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>required</b>
|
|
||||||
*
|
|
||||||
* 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", "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", "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", "http://hl7.org/fhir/binding-conformance"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/binding-conformance
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/binding-conformance";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* BindingConformance
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "BindingConformance";
|
|
||||||
|
|
||||||
private static Map<String, BindingConformanceEnum> CODE_TO_ENUM = new HashMap<String, BindingConformanceEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 BindingConformanceEnum forCode(String theCode) {
|
|
||||||
BindingConformanceEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<BindingConformanceEnum> VALUESET_BINDER = new IValueSetEnumBinder<BindingConformanceEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,151 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CarePlanActivityCategoryEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>diet</b>
|
|
||||||
*
|
|
||||||
* Plan for the patient to consume food of a specified nature.
|
|
||||||
*/
|
|
||||||
DIET("diet", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>drug</b>
|
|
||||||
*
|
|
||||||
* Plan for the patient to consume/receive a drug, vaccine or other product.
|
|
||||||
*/
|
|
||||||
DRUG("drug", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>encounter</b>
|
|
||||||
*
|
|
||||||
* Plan to meet or communicate with the patient (in-patient, out-patient, phone call, etc.).
|
|
||||||
*/
|
|
||||||
ENCOUNTER("encounter", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>observation</b>
|
|
||||||
*
|
|
||||||
* Plan to capture information about a patient (vitals, labs, diagnostic images, etc.).
|
|
||||||
*/
|
|
||||||
OBSERVATION("observation", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>procedure</b>
|
|
||||||
*
|
|
||||||
* Plan to modify the patient in some way (surgery, physiotherapy, education, counseling, etc.).
|
|
||||||
*/
|
|
||||||
PROCEDURE("procedure", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>supply</b>
|
|
||||||
*
|
|
||||||
* Plan to provide something to the patient (medication, medical supply, etc.).
|
|
||||||
*/
|
|
||||||
SUPPLY("supply", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>other</b>
|
|
||||||
*
|
|
||||||
* Some other form of action.
|
|
||||||
*/
|
|
||||||
OTHER("other", "http://hl7.org/fhir/care-plan-activity-category"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/care-plan-activity-category
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/care-plan-activity-category";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CarePlanActivityCategory
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CarePlanActivityCategory";
|
|
||||||
|
|
||||||
private static Map<String, CarePlanActivityCategoryEnum> CODE_TO_ENUM = new HashMap<String, CarePlanActivityCategoryEnum>();
|
|
||||||
private static Map<String, Map<String, CarePlanActivityCategoryEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CarePlanActivityCategoryEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CarePlanActivityCategoryEnum next : CarePlanActivityCategoryEnum.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, CarePlanActivityCategoryEnum>());
|
|
||||||
}
|
|
||||||
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 CarePlanActivityCategoryEnum forCode(String theCode) {
|
|
||||||
CarePlanActivityCategoryEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CarePlanActivityCategoryEnum> VALUESET_BINDER = new IValueSetEnumBinder<CarePlanActivityCategoryEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CarePlanActivityCategoryEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CarePlanActivityCategoryEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanActivityCategoryEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanActivityCategoryEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CarePlanActivityCategoryEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CarePlanActivityCategoryEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,144 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CarePlanActivityStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>not started</b>
|
|
||||||
*
|
|
||||||
* Activity is planned but no action has yet been taken.
|
|
||||||
*/
|
|
||||||
NOT_STARTED("not started", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>scheduled</b>
|
|
||||||
*
|
|
||||||
* Appointment or other booking has occurred but activity has not yet begun.
|
|
||||||
*/
|
|
||||||
SCHEDULED("scheduled", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>in progress</b>
|
|
||||||
*
|
|
||||||
* Activity has been started but is not yet complete.
|
|
||||||
*/
|
|
||||||
IN_PROGRESS("in progress", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>on hold</b>
|
|
||||||
*
|
|
||||||
* Activity was started but has temporarily ceased with an expectation of resumption at a future time.
|
|
||||||
*/
|
|
||||||
ON_HOLD("on hold", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>completed</b>
|
|
||||||
*
|
|
||||||
* The activities have been completed (more or less) as planned.
|
|
||||||
*/
|
|
||||||
COMPLETED("completed", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>cancelled</b>
|
|
||||||
*
|
|
||||||
* The activities have been ended prior to completion (perhaps even before they were started).
|
|
||||||
*/
|
|
||||||
CANCELLED("cancelled", "http://hl7.org/fhir/care-plan-activity-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/care-plan-activity-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/care-plan-activity-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CarePlanActivityStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CarePlanActivityStatus";
|
|
||||||
|
|
||||||
private static Map<String, CarePlanActivityStatusEnum> CODE_TO_ENUM = new HashMap<String, CarePlanActivityStatusEnum>();
|
|
||||||
private static Map<String, Map<String, CarePlanActivityStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CarePlanActivityStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CarePlanActivityStatusEnum next : CarePlanActivityStatusEnum.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, CarePlanActivityStatusEnum>());
|
|
||||||
}
|
|
||||||
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 CarePlanActivityStatusEnum forCode(String theCode) {
|
|
||||||
CarePlanActivityStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CarePlanActivityStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<CarePlanActivityStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CarePlanActivityStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CarePlanActivityStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanActivityStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanActivityStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CarePlanActivityStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CarePlanActivityStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CarePlanGoalStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>in progress</b>
|
|
||||||
*
|
|
||||||
* The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again).
|
|
||||||
*/
|
|
||||||
IN_PROGRESS("in progress", "http://hl7.org/fhir/care-plan-goal-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>achieved</b>
|
|
||||||
*
|
|
||||||
* The goal has been met and no further action is needed.
|
|
||||||
*/
|
|
||||||
ACHIEVED("achieved", "http://hl7.org/fhir/care-plan-goal-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>sustaining</b>
|
|
||||||
*
|
|
||||||
* The goal has been met, but ongoing activity is needed to sustain the goal objective.
|
|
||||||
*/
|
|
||||||
SUSTAINING("sustaining", "http://hl7.org/fhir/care-plan-goal-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>cancelled</b>
|
|
||||||
*
|
|
||||||
* The goal is no longer being sought.
|
|
||||||
*/
|
|
||||||
CANCELLED("cancelled", "http://hl7.org/fhir/care-plan-goal-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/care-plan-goal-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/care-plan-goal-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CarePlanGoalStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CarePlanGoalStatus";
|
|
||||||
|
|
||||||
private static Map<String, CarePlanGoalStatusEnum> CODE_TO_ENUM = new HashMap<String, CarePlanGoalStatusEnum>();
|
|
||||||
private static Map<String, Map<String, CarePlanGoalStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CarePlanGoalStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CarePlanGoalStatusEnum next : CarePlanGoalStatusEnum.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, CarePlanGoalStatusEnum>());
|
|
||||||
}
|
|
||||||
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 CarePlanGoalStatusEnum forCode(String theCode) {
|
|
||||||
CarePlanGoalStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CarePlanGoalStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<CarePlanGoalStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CarePlanGoalStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CarePlanGoalStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanGoalStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanGoalStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CarePlanGoalStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CarePlanGoalStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CarePlanStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>planned</b>
|
|
||||||
*
|
|
||||||
* The plan is in development or awaiting use but is not yet intended to be acted upon.
|
|
||||||
*/
|
|
||||||
PLANNED("planned", "http://hl7.org/fhir/care-plan-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>active</b>
|
|
||||||
*
|
|
||||||
* The plan is intended to be followed and used as part of patient care.
|
|
||||||
*/
|
|
||||||
ACTIVE("active", "http://hl7.org/fhir/care-plan-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>completed</b>
|
|
||||||
*
|
|
||||||
* The plan is no longer in use and is not expected to be followed or used in patient care.
|
|
||||||
*/
|
|
||||||
COMPLETED("completed", "http://hl7.org/fhir/care-plan-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/care-plan-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/care-plan-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CarePlanStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CarePlanStatus";
|
|
||||||
|
|
||||||
private static Map<String, CarePlanStatusEnum> CODE_TO_ENUM = new HashMap<String, CarePlanStatusEnum>();
|
|
||||||
private static Map<String, Map<String, CarePlanStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CarePlanStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CarePlanStatusEnum next : CarePlanStatusEnum.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, CarePlanStatusEnum>());
|
|
||||||
}
|
|
||||||
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 CarePlanStatusEnum forCode(String theCode) {
|
|
||||||
CarePlanStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CarePlanStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<CarePlanStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CarePlanStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CarePlanStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CarePlanStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CarePlanStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CarePlanStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CausalityExpectationEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>likely</b>
|
|
||||||
*
|
|
||||||
* Likely that this specific exposure caused the reaction.
|
|
||||||
*/
|
|
||||||
LIKELY("likely", "http://hl7.org/fhir/causalityExpectation"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unlikely</b>
|
|
||||||
*
|
|
||||||
* Unlikely that this specific exposure caused the reaction - the exposure is being linked to for information purposes.
|
|
||||||
*/
|
|
||||||
UNLIKELY("unlikely", "http://hl7.org/fhir/causalityExpectation"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>confirmed</b>
|
|
||||||
*
|
|
||||||
* It has been confirmed that this exposure was one of the causes of the reaction.
|
|
||||||
*/
|
|
||||||
CONFIRMED("confirmed", "http://hl7.org/fhir/causalityExpectation"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unknown</b>
|
|
||||||
*
|
|
||||||
* It is unknown whether this exposure had anything to do with the reaction.
|
|
||||||
*/
|
|
||||||
UNKNOWN("unknown", "http://hl7.org/fhir/causalityExpectation"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/causalityExpectation
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/causalityExpectation";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CausalityExpectation
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CausalityExpectation";
|
|
||||||
|
|
||||||
private static Map<String, CausalityExpectationEnum> CODE_TO_ENUM = new HashMap<String, CausalityExpectationEnum>();
|
|
||||||
private static Map<String, Map<String, CausalityExpectationEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CausalityExpectationEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CausalityExpectationEnum next : CausalityExpectationEnum.values()) {
|
|
||||||
CODE_TO_ENUM.put(next.getCode(), next);
|
|
||||||
|
|
||||||
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
|
|
||||||
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, CausalityExpectationEnum>());
|
|
||||||
}
|
|
||||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the code associated with this enumerated value
|
|
||||||
*/
|
|
||||||
public String getCode() {
|
|
||||||
return myCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the code system associated with this enumerated value
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the enumerated value associated with this code
|
|
||||||
*/
|
|
||||||
public CausalityExpectationEnum forCode(String theCode) {
|
|
||||||
CausalityExpectationEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CausalityExpectationEnum> VALUESET_BINDER = new IValueSetEnumBinder<CausalityExpectationEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CausalityExpectationEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CausalityExpectationEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CausalityExpectationEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CausalityExpectationEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CausalityExpectationEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CausalityExpectationEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CompositionAttestationModeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>personal</b>
|
|
||||||
*
|
|
||||||
* The person authenticated the content in their personal capacity.
|
|
||||||
*/
|
|
||||||
PERSONAL("personal", "http://hl7.org/fhir/composition-attestation-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>professional</b>
|
|
||||||
*
|
|
||||||
* The person authenticated the content in their professional capacity.
|
|
||||||
*/
|
|
||||||
PROFESSIONAL("professional", "http://hl7.org/fhir/composition-attestation-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>legal</b>
|
|
||||||
*
|
|
||||||
* The person authenticated the content and accepted legal responsibility for its content.
|
|
||||||
*/
|
|
||||||
LEGAL("legal", "http://hl7.org/fhir/composition-attestation-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>official</b>
|
|
||||||
*
|
|
||||||
* The organization authenticated the content as consistent with their policies and procedures.
|
|
||||||
*/
|
|
||||||
OFFICIAL("official", "http://hl7.org/fhir/composition-attestation-mode"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/composition-attestation-mode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/composition-attestation-mode";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CompositionAttestationMode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CompositionAttestationMode";
|
|
||||||
|
|
||||||
private static Map<String, CompositionAttestationModeEnum> CODE_TO_ENUM = new HashMap<String, CompositionAttestationModeEnum>();
|
|
||||||
private static Map<String, Map<String, CompositionAttestationModeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CompositionAttestationModeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CompositionAttestationModeEnum next : CompositionAttestationModeEnum.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, CompositionAttestationModeEnum>());
|
|
||||||
}
|
|
||||||
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 CompositionAttestationModeEnum forCode(String theCode) {
|
|
||||||
CompositionAttestationModeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CompositionAttestationModeEnum> VALUESET_BINDER = new IValueSetEnumBinder<CompositionAttestationModeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CompositionAttestationModeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CompositionAttestationModeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompositionAttestationModeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompositionAttestationModeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CompositionAttestationModeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CompositionAttestationModeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,137 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum CompositionStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>preliminary</b>
|
|
||||||
*
|
|
||||||
* This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.
|
|
||||||
*/
|
|
||||||
PRELIMINARY("preliminary", "http://hl7.org/fhir/composition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>final</b>
|
|
||||||
*
|
|
||||||
* The composition or document is complete and verified by an appropriate person, and no further work is planned.
|
|
||||||
*/
|
|
||||||
FINAL("final", "http://hl7.org/fhir/composition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>appended</b>
|
|
||||||
*
|
|
||||||
* The composition or document has been modified subsequent to being released as "final", and is complete and verified by an authorized person. The modifications added new information to the composition or document, but did not revise existing content.
|
|
||||||
*/
|
|
||||||
APPENDED("appended", "http://hl7.org/fhir/composition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>amended</b>
|
|
||||||
*
|
|
||||||
* The composition or document has been modified subsequent to being released as "final", and is complete and verified by an authorized person.
|
|
||||||
*/
|
|
||||||
AMENDED("amended", "http://hl7.org/fhir/composition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>entered in error</b>
|
|
||||||
*
|
|
||||||
* The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid.
|
|
||||||
*/
|
|
||||||
ENTERED_IN_ERROR("entered in error", "http://hl7.org/fhir/composition-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/composition-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/composition-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* CompositionStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "CompositionStatus";
|
|
||||||
|
|
||||||
private static Map<String, CompositionStatusEnum> CODE_TO_ENUM = new HashMap<String, CompositionStatusEnum>();
|
|
||||||
private static Map<String, Map<String, CompositionStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, CompositionStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (CompositionStatusEnum next : CompositionStatusEnum.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, CompositionStatusEnum>());
|
|
||||||
}
|
|
||||||
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 CompositionStatusEnum forCode(String theCode) {
|
|
||||||
CompositionStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<CompositionStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<CompositionStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(CompositionStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(CompositionStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompositionStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompositionStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, CompositionStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
CompositionStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,144 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ConceptMapEquivalenceEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>equal</b>
|
|
||||||
*
|
|
||||||
* The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identifical or irrelevant (i.e. intensionally identical).
|
|
||||||
*/
|
|
||||||
EQUAL("equal", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>equivalent</b>
|
|
||||||
*
|
|
||||||
* The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).
|
|
||||||
*/
|
|
||||||
EQUIVALENT("equivalent", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>wider</b>
|
|
||||||
*
|
|
||||||
* The target mapping is wider in meaning than the source concept.
|
|
||||||
*/
|
|
||||||
WIDER("wider", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>narrower</b>
|
|
||||||
*
|
|
||||||
* The target mapping is narrower in meaning that the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when atempting to use these mappings operationally.
|
|
||||||
*/
|
|
||||||
NARROWER("narrower", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>inexact</b>
|
|
||||||
*
|
|
||||||
* The target mapping overlaps with the source concept, but both source and target cover additional meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when atempting to use these mappings operationally.
|
|
||||||
*/
|
|
||||||
INEXACT("inexact", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unmatched</b>
|
|
||||||
*
|
|
||||||
* There is no match for this concept in the destination concept system.
|
|
||||||
*/
|
|
||||||
UNMATCHED("unmatched", "http://hl7.org/fhir/concept-equivalence"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/concept-equivalence
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/concept-equivalence";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ConceptMapEquivalence
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ConceptMapEquivalence";
|
|
||||||
|
|
||||||
private static Map<String, ConceptMapEquivalenceEnum> CODE_TO_ENUM = new HashMap<String, ConceptMapEquivalenceEnum>();
|
|
||||||
private static Map<String, Map<String, ConceptMapEquivalenceEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ConceptMapEquivalenceEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ConceptMapEquivalenceEnum next : ConceptMapEquivalenceEnum.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, ConceptMapEquivalenceEnum>());
|
|
||||||
}
|
|
||||||
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 ConceptMapEquivalenceEnum forCode(String theCode) {
|
|
||||||
ConceptMapEquivalenceEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ConceptMapEquivalenceEnum> VALUESET_BINDER = new IValueSetEnumBinder<ConceptMapEquivalenceEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ConceptMapEquivalenceEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ConceptMapEquivalenceEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConceptMapEquivalenceEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConceptMapEquivalenceEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ConceptMapEquivalenceEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ConceptMapEquivalenceEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ConditionStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>provisional</b>
|
|
||||||
*
|
|
||||||
* This is a tentative diagnosis - still a candidate that is under consideration.
|
|
||||||
*/
|
|
||||||
PROVISIONAL("provisional", "http://hl7.org/fhir/condition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>working</b>
|
|
||||||
*
|
|
||||||
* The patient is being treated on the basis that this is the condition, but it is still not confirmed.
|
|
||||||
*/
|
|
||||||
WORKING("working", "http://hl7.org/fhir/condition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>confirmed</b>
|
|
||||||
*
|
|
||||||
* There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.
|
|
||||||
*/
|
|
||||||
CONFIRMED("confirmed", "http://hl7.org/fhir/condition-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>refuted</b>
|
|
||||||
*
|
|
||||||
* This condition has been ruled out by diagnostic and clinical evidence.
|
|
||||||
*/
|
|
||||||
REFUTED("refuted", "http://hl7.org/fhir/condition-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/condition-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/condition-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ConditionStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ConditionStatus";
|
|
||||||
|
|
||||||
private static Map<String, ConditionStatusEnum> CODE_TO_ENUM = new HashMap<String, ConditionStatusEnum>();
|
|
||||||
private static Map<String, Map<String, ConditionStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ConditionStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ConditionStatusEnum next : ConditionStatusEnum.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, ConditionStatusEnum>());
|
|
||||||
}
|
|
||||||
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 ConditionStatusEnum forCode(String theCode) {
|
|
||||||
ConditionStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ConditionStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<ConditionStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ConditionStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ConditionStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConditionStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConditionStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ConditionStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ConditionStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ConformanceEventModeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>sender</b>
|
|
||||||
*
|
|
||||||
* The application sends requests and receives responses.
|
|
||||||
*/
|
|
||||||
SENDER("sender", "http://hl7.org/fhir/message-conformance-event-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>receiver</b>
|
|
||||||
*
|
|
||||||
* The application receives requests and sends responses.
|
|
||||||
*/
|
|
||||||
RECEIVER("receiver", "http://hl7.org/fhir/message-conformance-event-mode"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/message-conformance-event-mode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/message-conformance-event-mode";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ConformanceEventMode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ConformanceEventMode";
|
|
||||||
|
|
||||||
private static Map<String, ConformanceEventModeEnum> CODE_TO_ENUM = new HashMap<String, ConformanceEventModeEnum>();
|
|
||||||
private static Map<String, Map<String, ConformanceEventModeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ConformanceEventModeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ConformanceEventModeEnum next : ConformanceEventModeEnum.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, ConformanceEventModeEnum>());
|
|
||||||
}
|
|
||||||
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 ConformanceEventModeEnum forCode(String theCode) {
|
|
||||||
ConformanceEventModeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ConformanceEventModeEnum> VALUESET_BINDER = new IValueSetEnumBinder<ConformanceEventModeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ConformanceEventModeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ConformanceEventModeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConformanceEventModeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConformanceEventModeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ConformanceEventModeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ConformanceEventModeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ConformanceStatementStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>draft</b>
|
|
||||||
*
|
|
||||||
* This conformance statement is still under development.
|
|
||||||
*/
|
|
||||||
DRAFT("draft", "http://hl7.org/fhir/conformance-statement-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>active</b>
|
|
||||||
*
|
|
||||||
* This conformance statement is ready for use in production systems.
|
|
||||||
*/
|
|
||||||
ACTIVE("active", "http://hl7.org/fhir/conformance-statement-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>retired</b>
|
|
||||||
*
|
|
||||||
* This conformance statement has been withdrawn or superceded and should no longer be used.
|
|
||||||
*/
|
|
||||||
RETIRED("retired", "http://hl7.org/fhir/conformance-statement-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/conformance-statement-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/conformance-statement-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ConformanceStatementStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ConformanceStatementStatus";
|
|
||||||
|
|
||||||
private static Map<String, ConformanceStatementStatusEnum> CODE_TO_ENUM = new HashMap<String, ConformanceStatementStatusEnum>();
|
|
||||||
private static Map<String, Map<String, ConformanceStatementStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ConformanceStatementStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ConformanceStatementStatusEnum next : ConformanceStatementStatusEnum.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, ConformanceStatementStatusEnum>());
|
|
||||||
}
|
|
||||||
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 ConformanceStatementStatusEnum forCode(String theCode) {
|
|
||||||
ConformanceStatementStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ConformanceStatementStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<ConformanceStatementStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ConformanceStatementStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ConformanceStatementStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConformanceStatementStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConformanceStatementStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ConformanceStatementStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ConformanceStatementStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ConstraintSeverityEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>error</b>
|
|
||||||
*
|
|
||||||
* If the constraint is violated, the resource is not conformant.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/constraint-severity"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/constraint-severity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/constraint-severity";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ConstraintSeverity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ConstraintSeverity";
|
|
||||||
|
|
||||||
private static Map<String, ConstraintSeverityEnum> CODE_TO_ENUM = new HashMap<String, ConstraintSeverityEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 ConstraintSeverityEnum forCode(String theCode) {
|
|
||||||
ConstraintSeverityEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ConstraintSeverityEnum> VALUESET_BINDER = new IValueSetEnumBinder<ConstraintSeverityEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ContactPointSystemEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>phone</b>
|
|
||||||
*
|
|
||||||
* 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", "http://hl7.org/fhir/contact-point-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", "http://hl7.org/fhir/contact-point-system"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>email</b>
|
|
||||||
*
|
|
||||||
* The value is an email address.
|
|
||||||
*/
|
|
||||||
EMAIL("email", "http://hl7.org/fhir/contact-point-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", "http://hl7.org/fhir/contact-point-system"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/contact-point-system
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/contact-point-system";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ContactPointSystem
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ContactPointSystem";
|
|
||||||
|
|
||||||
private static Map<String, ContactPointSystemEnum> CODE_TO_ENUM = new HashMap<String, ContactPointSystemEnum>();
|
|
||||||
private static Map<String, Map<String, ContactPointSystemEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContactPointSystemEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ContactPointSystemEnum next : ContactPointSystemEnum.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, ContactPointSystemEnum>());
|
|
||||||
}
|
|
||||||
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 ContactPointSystemEnum forCode(String theCode) {
|
|
||||||
ContactPointSystemEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ContactPointSystemEnum> VALUESET_BINDER = new IValueSetEnumBinder<ContactPointSystemEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ContactPointSystemEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ContactPointSystemEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContactPointSystemEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContactPointSystemEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ContactPointSystemEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ContactPointSystemEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,137 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ContactPointUseEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>home</b>
|
|
||||||
*
|
|
||||||
* A communication contact point 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", "http://hl7.org/fhir/contact-point-use"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>work</b>
|
|
||||||
*
|
|
||||||
* An office contact point. First choice for business related contacts during business hours.
|
|
||||||
*/
|
|
||||||
WORK("work", "http://hl7.org/fhir/contact-point-use"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>temp</b>
|
|
||||||
*
|
|
||||||
* A temporary contact point. The period can provide more detailed information.
|
|
||||||
*/
|
|
||||||
TEMP("temp", "http://hl7.org/fhir/contact-point-use"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>old</b>
|
|
||||||
*
|
|
||||||
* This contact point is no longer in use (or was never correct, but retained for records).
|
|
||||||
*/
|
|
||||||
OLD("old", "http://hl7.org/fhir/contact-point-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", "http://hl7.org/fhir/contact-point-use"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/contact-point-use
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/contact-point-use";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ContactPointUse
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ContactPointUse";
|
|
||||||
|
|
||||||
private static Map<String, ContactPointUseEnum> CODE_TO_ENUM = new HashMap<String, ContactPointUseEnum>();
|
|
||||||
private static Map<String, Map<String, ContactPointUseEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContactPointUseEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ContactPointUseEnum next : ContactPointUseEnum.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, ContactPointUseEnum>());
|
|
||||||
}
|
|
||||||
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 ContactPointUseEnum forCode(String theCode) {
|
|
||||||
ContactPointUseEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ContactPointUseEnum> VALUESET_BINDER = new IValueSetEnumBinder<ContactPointUseEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ContactPointUseEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ContactPointUseEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContactPointUseEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContactPointUseEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ContactPointUseEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ContactPointUseEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ContractSubtypeCodesEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>disclosure-CA</b>
|
|
||||||
*/
|
|
||||||
DISCLOSURE_CA("disclosure-CA", "http://www.hl7.org/fhir/contractsubtypecodes"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>disclosure-US</b>
|
|
||||||
*/
|
|
||||||
DISCLOSURE_US("disclosure-US", "http://www.hl7.org/fhir/contractsubtypecodes"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/contract-subtype
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/contract-subtype";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* Contract Subtype Codes
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "Contract Subtype Codes";
|
|
||||||
|
|
||||||
private static Map<String, ContractSubtypeCodesEnum> CODE_TO_ENUM = new HashMap<String, ContractSubtypeCodesEnum>();
|
|
||||||
private static Map<String, Map<String, ContractSubtypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContractSubtypeCodesEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ContractSubtypeCodesEnum next : ContractSubtypeCodesEnum.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, ContractSubtypeCodesEnum>());
|
|
||||||
}
|
|
||||||
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 ContractSubtypeCodesEnum forCode(String theCode) {
|
|
||||||
ContractSubtypeCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ContractSubtypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<ContractSubtypeCodesEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ContractSubtypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ContractSubtypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractSubtypeCodesEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractSubtypeCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ContractSubtypeCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ContractSubtypeCodesEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,117 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ContractTermTypeCodesEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OralHealth-Basic</b>
|
|
||||||
*/
|
|
||||||
ORALHEALTH_BASIC("OralHealth-Basic", "http://www.hl7.org/fhir/contracttermsubtypecodes"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OralHealth-Major</b>
|
|
||||||
*/
|
|
||||||
ORALHEALTH_MAJOR("OralHealth-Major", "http://www.hl7.org/fhir/contracttermsubtypecodes"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OralHealth-Orthodontic</b>
|
|
||||||
*/
|
|
||||||
ORALHEALTH_ORTHODONTIC("OralHealth-Orthodontic", "http://www.hl7.org/fhir/contracttermsubtypecodes"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/contract-term-subtype
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/contract-term-subtype";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* Contract Term Type Codes
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "Contract Term Type Codes";
|
|
||||||
|
|
||||||
private static Map<String, ContractTermTypeCodesEnum> CODE_TO_ENUM = new HashMap<String, ContractTermTypeCodesEnum>();
|
|
||||||
private static Map<String, Map<String, ContractTermTypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContractTermTypeCodesEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ContractTermTypeCodesEnum next : ContractTermTypeCodesEnum.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, ContractTermTypeCodesEnum>());
|
|
||||||
}
|
|
||||||
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 ContractTermTypeCodesEnum forCode(String theCode) {
|
|
||||||
ContractTermTypeCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ContractTermTypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<ContractTermTypeCodesEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ContractTermTypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ContractTermTypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractTermTypeCodesEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractTermTypeCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ContractTermTypeCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ContractTermTypeCodesEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ContractTypeCodesEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>privacy</b>
|
|
||||||
*/
|
|
||||||
PRIVACY("privacy", "http://www.hl7.org/fhir/contracttypecodes"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>disclosure</b>
|
|
||||||
*/
|
|
||||||
DISCLOSURE("disclosure", "http://www.hl7.org/fhir/contracttypecodes"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/contract-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/contract-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* Contract Type Codes
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "Contract Type Codes";
|
|
||||||
|
|
||||||
private static Map<String, ContractTypeCodesEnum> CODE_TO_ENUM = new HashMap<String, ContractTypeCodesEnum>();
|
|
||||||
private static Map<String, Map<String, ContractTypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ContractTypeCodesEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ContractTypeCodesEnum next : ContractTypeCodesEnum.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, ContractTypeCodesEnum>());
|
|
||||||
}
|
|
||||||
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 ContractTypeCodesEnum forCode(String theCode) {
|
|
||||||
ContractTypeCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ContractTypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<ContractTypeCodesEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ContractTypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ContractTypeCodesEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractTypeCodesEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractTypeCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ContractTypeCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ContractTypeCodesEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,158 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DataAbsentReasonEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unknown</b>
|
|
||||||
*
|
|
||||||
* The value is not known
|
|
||||||
*/
|
|
||||||
UNKNOWN("unknown", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>asked</b>
|
|
||||||
*
|
|
||||||
* The source human does not know the value
|
|
||||||
*/
|
|
||||||
ASKED("asked", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>temp</b>
|
|
||||||
*
|
|
||||||
* There is reason to expect (from the workflow) that the value may become known
|
|
||||||
*/
|
|
||||||
TEMP("temp", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>notasked</b>
|
|
||||||
*
|
|
||||||
* The workflow didn't lead to this value being known
|
|
||||||
*/
|
|
||||||
NOTASKED("notasked", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>masked</b>
|
|
||||||
*
|
|
||||||
* The information is not available due to security, privacy or related reasons
|
|
||||||
*/
|
|
||||||
MASKED("masked", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>unsupported</b>
|
|
||||||
*
|
|
||||||
* The source system wasn't capable of supporting this element
|
|
||||||
*/
|
|
||||||
UNSUPPORTED("unsupported", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>astext</b>
|
|
||||||
*
|
|
||||||
* The content of the data is represented in the resource narrative
|
|
||||||
*/
|
|
||||||
ASTEXT("astext", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>error</b>
|
|
||||||
*
|
|
||||||
* Some system or workflow process error means that the information is not available
|
|
||||||
*/
|
|
||||||
ERROR("error", "http://hl7.org/fhir/data-absent-reason"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/data-absent-reason
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/data-absent-reason";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DataAbsentReason
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DataAbsentReason";
|
|
||||||
|
|
||||||
private static Map<String, DataAbsentReasonEnum> CODE_TO_ENUM = new HashMap<String, DataAbsentReasonEnum>();
|
|
||||||
private static Map<String, Map<String, DataAbsentReasonEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DataAbsentReasonEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DataAbsentReasonEnum next : DataAbsentReasonEnum.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, DataAbsentReasonEnum>());
|
|
||||||
}
|
|
||||||
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 DataAbsentReasonEnum forCode(String theCode) {
|
|
||||||
DataAbsentReasonEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DataAbsentReasonEnum> VALUESET_BINDER = new IValueSetEnumBinder<DataAbsentReasonEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DataAbsentReasonEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DataAbsentReasonEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataAbsentReasonEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataAbsentReasonEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DataAbsentReasonEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DataAbsentReasonEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,109 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DataElementGranularityEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>comparable</b>
|
|
||||||
*
|
|
||||||
* The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required).
|
|
||||||
*/
|
|
||||||
COMPARABLE("comparable", "http://hl7.org/fhir/dataelement-granularity"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/dataelement-granularity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/dataelement-granularity";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DataElementGranularity
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DataElementGranularity";
|
|
||||||
|
|
||||||
private static Map<String, DataElementGranularityEnum> CODE_TO_ENUM = new HashMap<String, DataElementGranularityEnum>();
|
|
||||||
private static Map<String, Map<String, DataElementGranularityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DataElementGranularityEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DataElementGranularityEnum next : DataElementGranularityEnum.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, DataElementGranularityEnum>());
|
|
||||||
}
|
|
||||||
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 DataElementGranularityEnum forCode(String theCode) {
|
|
||||||
DataElementGranularityEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DataElementGranularityEnum> VALUESET_BINDER = new IValueSetEnumBinder<DataElementGranularityEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DataElementGranularityEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DataElementGranularityEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataElementGranularityEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataElementGranularityEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DataElementGranularityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DataElementGranularityEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,347 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DataTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Address</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.
|
|
||||||
*/
|
|
||||||
ADDRESS("Address", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Age</b>
|
|
||||||
*
|
|
||||||
* A duration (length of time) with a UCUM code
|
|
||||||
*/
|
|
||||||
AGE("Age", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Attachment</b>
|
|
||||||
*
|
|
||||||
* For referring to data content defined in other formats.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Coding</b>
|
|
||||||
*
|
|
||||||
* A reference to a code defined by a terminology system.
|
|
||||||
*/
|
|
||||||
CODING("Coding", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>ContactPoint</b>
|
|
||||||
*
|
|
||||||
* Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
|
|
||||||
*/
|
|
||||||
CONTACTPOINT("ContactPoint", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Count</b>
|
|
||||||
*
|
|
||||||
* A count of a discrete element (no unit)
|
|
||||||
*/
|
|
||||||
COUNT("Count", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Distance</b>
|
|
||||||
*
|
|
||||||
* A measure of distance
|
|
||||||
*/
|
|
||||||
DISTANCE("Distance", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Duration</b>
|
|
||||||
*
|
|
||||||
* A length of time
|
|
||||||
*/
|
|
||||||
DURATION("Duration", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Extension</b>
|
|
||||||
*
|
|
||||||
* Optional Extensions Element - found in all resources.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Identifier</b>
|
|
||||||
*
|
|
||||||
* A technical identifier - identifies some entity uniquely and unambiguously.
|
|
||||||
*/
|
|
||||||
IDENTIFIER("Identifier", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Money</b>
|
|
||||||
*
|
|
||||||
* An amount of money. With regard to precision, see [[X]]
|
|
||||||
*/
|
|
||||||
MONEY("Money", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Narrative</b>
|
|
||||||
*
|
|
||||||
* A human-readable formatted text, including images.
|
|
||||||
*/
|
|
||||||
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", "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", "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", "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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Reference</b>
|
|
||||||
*
|
|
||||||
* A reference from one resource to another.
|
|
||||||
*/
|
|
||||||
REFERENCE("Reference", "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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Timing</b>
|
|
||||||
*
|
|
||||||
* Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.
|
|
||||||
*/
|
|
||||||
TIMING("Timing", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>base64Binary</b>
|
|
||||||
*
|
|
||||||
* A stream of bytes
|
|
||||||
*/
|
|
||||||
BASE64BINARY("base64Binary", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>boolean</b>
|
|
||||||
*
|
|
||||||
* Value of "true" or "false"
|
|
||||||
*/
|
|
||||||
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", "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", "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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>decimal</b>
|
|
||||||
*
|
|
||||||
* A rational number with implicit precision
|
|
||||||
*/
|
|
||||||
DECIMAL("decimal", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>id</b>
|
|
||||||
*
|
|
||||||
* Any combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Systems SHALL send ids as lower-case but SHOULD interpret them case-insensitively.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>integer</b>
|
|
||||||
*
|
|
||||||
* A whole number
|
|
||||||
*/
|
|
||||||
INTEGER("integer", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>oid</b>
|
|
||||||
*
|
|
||||||
* An oid represented as a URI
|
|
||||||
*/
|
|
||||||
OID("oid", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>string</b>
|
|
||||||
*
|
|
||||||
* A sequence of Unicode characters
|
|
||||||
*/
|
|
||||||
STRING("string", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>time</b>
|
|
||||||
*
|
|
||||||
* A time during the day, with no date specified
|
|
||||||
*/
|
|
||||||
TIME("time", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>uri</b>
|
|
||||||
*
|
|
||||||
* String of characters used to identify a name or a resource
|
|
||||||
*/
|
|
||||||
URI("uri", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>uuid</b>
|
|
||||||
*
|
|
||||||
* A UUID, represented as a URI
|
|
||||||
*/
|
|
||||||
UUID("uuid", "http://hl7.org/fhir/data-types"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/data-types
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/data-types";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DataType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DataType";
|
|
||||||
|
|
||||||
private static Map<String, DataTypeEnum> CODE_TO_ENUM = new HashMap<String, DataTypeEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 DataTypeEnum forCode(String theCode) {
|
|
||||||
DataTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DataTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<DataTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,134 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DiagnosticOrderPriorityEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Routine</b><br/>
|
|
||||||
* Code Value: <b>routine</b>
|
|
||||||
*
|
|
||||||
* The order has a normal priority.
|
|
||||||
*/
|
|
||||||
ROUTINE("routine", "http://hl7.org/fhir/diagnostic-order-priority"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Urgent</b><br/>
|
|
||||||
* Code Value: <b>urgent</b>
|
|
||||||
*
|
|
||||||
* The order should be urgently.
|
|
||||||
*/
|
|
||||||
URGENT("urgent", "http://hl7.org/fhir/diagnostic-order-priority"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Stat</b><br/>
|
|
||||||
* Code Value: <b>stat</b>
|
|
||||||
*
|
|
||||||
* The order is time-critical.
|
|
||||||
*/
|
|
||||||
STAT("stat", "http://hl7.org/fhir/diagnostic-order-priority"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>ASAP</b><br/>
|
|
||||||
* Code Value: <b>asap</b>
|
|
||||||
*
|
|
||||||
* The order should be acted on as soon as possible.
|
|
||||||
*/
|
|
||||||
ASAP("asap", "http://hl7.org/fhir/diagnostic-order-priority"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/diagnostic-order-priority
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/diagnostic-order-priority";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DiagnosticOrderPriority
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DiagnosticOrderPriority";
|
|
||||||
|
|
||||||
private static Map<String, DiagnosticOrderPriorityEnum> CODE_TO_ENUM = new HashMap<String, DiagnosticOrderPriorityEnum>();
|
|
||||||
private static Map<String, Map<String, DiagnosticOrderPriorityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DiagnosticOrderPriorityEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DiagnosticOrderPriorityEnum next : DiagnosticOrderPriorityEnum.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, DiagnosticOrderPriorityEnum>());
|
|
||||||
}
|
|
||||||
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 DiagnosticOrderPriorityEnum forCode(String theCode) {
|
|
||||||
DiagnosticOrderPriorityEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DiagnosticOrderPriorityEnum> VALUESET_BINDER = new IValueSetEnumBinder<DiagnosticOrderPriorityEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DiagnosticOrderPriorityEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DiagnosticOrderPriorityEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticOrderPriorityEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticOrderPriorityEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DiagnosticOrderPriorityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DiagnosticOrderPriorityEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,165 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DiagnosticOrderStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>requested</b>
|
|
||||||
*
|
|
||||||
* The request has been placed.
|
|
||||||
*/
|
|
||||||
REQUESTED("requested", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>received</b>
|
|
||||||
*
|
|
||||||
* The receiving system has received the order, but not yet decided whether it will be performed.
|
|
||||||
*/
|
|
||||||
RECEIVED("received", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>accepted</b>
|
|
||||||
*
|
|
||||||
* The receiving system has accepted the order, but work has not yet commenced.
|
|
||||||
*/
|
|
||||||
ACCEPTED("accepted", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>in progress</b>
|
|
||||||
*
|
|
||||||
* The work to fulfill the order is happening.
|
|
||||||
*/
|
|
||||||
IN_PROGRESS("in progress", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>review</b>
|
|
||||||
*
|
|
||||||
* The work is complete, and the outcomes are being reviewed for approval.
|
|
||||||
*/
|
|
||||||
REVIEW("review", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>completed</b>
|
|
||||||
*
|
|
||||||
* The work has been complete, the report(s) released, and no further work is planned.
|
|
||||||
*/
|
|
||||||
COMPLETED("completed", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>suspended</b>
|
|
||||||
*
|
|
||||||
* The request has been held by originating system/user request.
|
|
||||||
*/
|
|
||||||
SUSPENDED("suspended", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>rejected</b>
|
|
||||||
*
|
|
||||||
* The receiving system has declined to fulfill the request.
|
|
||||||
*/
|
|
||||||
REJECTED("rejected", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>failed</b>
|
|
||||||
*
|
|
||||||
* The diagnostic investigation was attempted, but due to some procedural error, it could not be completed.
|
|
||||||
*/
|
|
||||||
FAILED("failed", "http://hl7.org/fhir/diagnostic-order-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/diagnostic-order-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/diagnostic-order-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DiagnosticOrderStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DiagnosticOrderStatus";
|
|
||||||
|
|
||||||
private static Map<String, DiagnosticOrderStatusEnum> CODE_TO_ENUM = new HashMap<String, DiagnosticOrderStatusEnum>();
|
|
||||||
private static Map<String, Map<String, DiagnosticOrderStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DiagnosticOrderStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DiagnosticOrderStatusEnum next : DiagnosticOrderStatusEnum.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, DiagnosticOrderStatusEnum>());
|
|
||||||
}
|
|
||||||
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 DiagnosticOrderStatusEnum forCode(String theCode) {
|
|
||||||
DiagnosticOrderStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DiagnosticOrderStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<DiagnosticOrderStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DiagnosticOrderStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DiagnosticOrderStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticOrderStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticOrderStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DiagnosticOrderStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DiagnosticOrderStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,158 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DiagnosticReportStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>registered</b>
|
|
||||||
*
|
|
||||||
* The existence of the report is registered, but there is nothing yet available.
|
|
||||||
*/
|
|
||||||
REGISTERED("registered", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>partial</b>
|
|
||||||
*
|
|
||||||
* This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified.
|
|
||||||
*/
|
|
||||||
PARTIAL("partial", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>final</b>
|
|
||||||
*
|
|
||||||
* The report is complete and verified by an authorized person.
|
|
||||||
*/
|
|
||||||
FINAL("final", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>corrected</b>
|
|
||||||
*
|
|
||||||
* The report has been modified subsequent to being Final, and is complete and verified by an authorized person.
|
|
||||||
*/
|
|
||||||
CORRECTED("corrected", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>amended</b>
|
|
||||||
*
|
|
||||||
* The report has been modified subsequent to being Final, and is complete and verified by an authorized person, and data has been changed.
|
|
||||||
*/
|
|
||||||
AMENDED("amended", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>appended</b>
|
|
||||||
*
|
|
||||||
* The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed.
|
|
||||||
*/
|
|
||||||
APPENDED("appended", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>cancelled</b>
|
|
||||||
*
|
|
||||||
* The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
|
|
||||||
*/
|
|
||||||
CANCELLED("cancelled", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>entered in error</b>
|
|
||||||
*
|
|
||||||
* The report has been withdrawn following previous Final release.
|
|
||||||
*/
|
|
||||||
ENTERED_IN_ERROR("entered in error", "http://hl7.org/fhir/diagnostic-report-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/diagnostic-report-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/diagnostic-report-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DiagnosticReportStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DiagnosticReportStatus";
|
|
||||||
|
|
||||||
private static Map<String, DiagnosticReportStatusEnum> CODE_TO_ENUM = new HashMap<String, DiagnosticReportStatusEnum>();
|
|
||||||
private static Map<String, Map<String, DiagnosticReportStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DiagnosticReportStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DiagnosticReportStatusEnum next : DiagnosticReportStatusEnum.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, DiagnosticReportStatusEnum>());
|
|
||||||
}
|
|
||||||
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 DiagnosticReportStatusEnum forCode(String theCode) {
|
|
||||||
DiagnosticReportStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DiagnosticReportStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<DiagnosticReportStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DiagnosticReportStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DiagnosticReportStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticReportStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagnosticReportStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DiagnosticReportStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DiagnosticReportStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DocumentModeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>producer</b>
|
|
||||||
*
|
|
||||||
* The application produces documents of the specified type.
|
|
||||||
*/
|
|
||||||
PRODUCER("producer", "http://hl7.org/fhir/document-mode"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>consumer</b>
|
|
||||||
*
|
|
||||||
* The application consumes documents of the specified type.
|
|
||||||
*/
|
|
||||||
CONSUMER("consumer", "http://hl7.org/fhir/document-mode"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/document-mode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/document-mode";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DocumentMode
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DocumentMode";
|
|
||||||
|
|
||||||
private static Map<String, DocumentModeEnum> CODE_TO_ENUM = new HashMap<String, DocumentModeEnum>();
|
|
||||||
private static Map<String, Map<String, DocumentModeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DocumentModeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DocumentModeEnum next : DocumentModeEnum.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, DocumentModeEnum>());
|
|
||||||
}
|
|
||||||
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 DocumentModeEnum forCode(String theCode) {
|
|
||||||
DocumentModeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DocumentModeEnum> VALUESET_BINDER = new IValueSetEnumBinder<DocumentModeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DocumentModeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DocumentModeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentModeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentModeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DocumentModeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DocumentModeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DocumentReferenceStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>current</b>
|
|
||||||
*
|
|
||||||
* This is the current reference for this document.
|
|
||||||
*/
|
|
||||||
CURRENT("current", "http://hl7.org/fhir/document-reference-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>superceded</b>
|
|
||||||
*
|
|
||||||
* This reference has been superseded by another reference.
|
|
||||||
*/
|
|
||||||
SUPERCEDED("superceded", "http://hl7.org/fhir/document-reference-status"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>entered in error</b>
|
|
||||||
*
|
|
||||||
* This reference was created in error.
|
|
||||||
*/
|
|
||||||
ENTERED_IN_ERROR("entered in error", "http://hl7.org/fhir/document-reference-status"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/document-reference-status
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/document-reference-status";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DocumentReferenceStatus
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DocumentReferenceStatus";
|
|
||||||
|
|
||||||
private static Map<String, DocumentReferenceStatusEnum> CODE_TO_ENUM = new HashMap<String, DocumentReferenceStatusEnum>();
|
|
||||||
private static Map<String, Map<String, DocumentReferenceStatusEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DocumentReferenceStatusEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DocumentReferenceStatusEnum next : DocumentReferenceStatusEnum.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, DocumentReferenceStatusEnum>());
|
|
||||||
}
|
|
||||||
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 DocumentReferenceStatusEnum forCode(String theCode) {
|
|
||||||
DocumentReferenceStatusEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DocumentReferenceStatusEnum> VALUESET_BINDER = new IValueSetEnumBinder<DocumentReferenceStatusEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DocumentReferenceStatusEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DocumentReferenceStatusEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentReferenceStatusEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentReferenceStatusEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DocumentReferenceStatusEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DocumentReferenceStatusEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum DocumentRelationshipTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>replaces</b>
|
|
||||||
*
|
|
||||||
* This document logically replaces or supercedes the target document.
|
|
||||||
*/
|
|
||||||
REPLACES("replaces", "http://hl7.org/fhir/document-relationship-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>transforms</b>
|
|
||||||
*
|
|
||||||
* This document was generated by transforming the target document (e.g. format or language conversion).
|
|
||||||
*/
|
|
||||||
TRANSFORMS("transforms", "http://hl7.org/fhir/document-relationship-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>signs</b>
|
|
||||||
*
|
|
||||||
* This document is a signature of the target document.
|
|
||||||
*/
|
|
||||||
SIGNS("signs", "http://hl7.org/fhir/document-relationship-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>appends</b>
|
|
||||||
*
|
|
||||||
* This document adds additional information to the target document.
|
|
||||||
*/
|
|
||||||
APPENDS("appends", "http://hl7.org/fhir/document-relationship-type"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/document-relationship-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/document-relationship-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* DocumentRelationshipType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "DocumentRelationshipType";
|
|
||||||
|
|
||||||
private static Map<String, DocumentRelationshipTypeEnum> CODE_TO_ENUM = new HashMap<String, DocumentRelationshipTypeEnum>();
|
|
||||||
private static Map<String, Map<String, DocumentRelationshipTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, DocumentRelationshipTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (DocumentRelationshipTypeEnum next : DocumentRelationshipTypeEnum.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, DocumentRelationshipTypeEnum>());
|
|
||||||
}
|
|
||||||
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 DocumentRelationshipTypeEnum forCode(String theCode) {
|
|
||||||
DocumentRelationshipTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<DocumentRelationshipTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<DocumentRelationshipTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(DocumentRelationshipTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(DocumentRelationshipTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentRelationshipTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DocumentRelationshipTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, DocumentRelationshipTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
DocumentRelationshipTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,158 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EncounterClassEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>inpatient</b>
|
|
||||||
*
|
|
||||||
* An encounter during which the patient is hospitalized and stays overnight.
|
|
||||||
*/
|
|
||||||
INPATIENT("inpatient", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>outpatient</b>
|
|
||||||
*
|
|
||||||
* An encounter during which the patient is not hospitalized overnight.
|
|
||||||
*/
|
|
||||||
OUTPATIENT("outpatient", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>ambulatory</b>
|
|
||||||
*
|
|
||||||
* An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit.
|
|
||||||
*/
|
|
||||||
AMBULATORY("ambulatory", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>emergency</b>
|
|
||||||
*
|
|
||||||
* An encounter where the patient needs urgent care.
|
|
||||||
*/
|
|
||||||
EMERGENCY("emergency", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>home</b>
|
|
||||||
*
|
|
||||||
* An encounter where the practitioner visits the patient at his/her home.
|
|
||||||
*/
|
|
||||||
HOME("home", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>field</b>
|
|
||||||
*
|
|
||||||
* An encounter taking place outside the regular environment for giving care.
|
|
||||||
*/
|
|
||||||
FIELD("field", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>daytime</b>
|
|
||||||
*
|
|
||||||
* An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight.
|
|
||||||
*/
|
|
||||||
DAYTIME("daytime", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>virtual</b>
|
|
||||||
*
|
|
||||||
* An encounter that takes place where the patient and practitioner do not physically meet but use electronic means for contact.
|
|
||||||
*/
|
|
||||||
VIRTUAL("virtual", "http://hl7.org/fhir/encounter-class"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/encounter-class
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-class";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EncounterClass
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EncounterClass";
|
|
||||||
|
|
||||||
private static Map<String, EncounterClassEnum> CODE_TO_ENUM = new HashMap<String, EncounterClassEnum>();
|
|
||||||
private static Map<String, Map<String, EncounterClassEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EncounterClassEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EncounterClassEnum next : EncounterClassEnum.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, EncounterClassEnum>());
|
|
||||||
}
|
|
||||||
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 EncounterClassEnum forCode(String theCode) {
|
|
||||||
EncounterClassEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EncounterClassEnum> VALUESET_BINDER = new IValueSetEnumBinder<EncounterClassEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EncounterClassEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EncounterClassEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterClassEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterClassEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EncounterClassEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EncounterClassEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EncounterReasonCodesEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/encounter-reason
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-reason";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* Encounter Reason Codes
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "Encounter Reason Codes";
|
|
||||||
|
|
||||||
private static Map<String, EncounterReasonCodesEnum> CODE_TO_ENUM = new HashMap<String, EncounterReasonCodesEnum>();
|
|
||||||
private static Map<String, Map<String, EncounterReasonCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EncounterReasonCodesEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EncounterReasonCodesEnum next : EncounterReasonCodesEnum.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, EncounterReasonCodesEnum>());
|
|
||||||
}
|
|
||||||
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 EncounterReasonCodesEnum forCode(String theCode) {
|
|
||||||
EncounterReasonCodesEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EncounterReasonCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<EncounterReasonCodesEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EncounterReasonCodesEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EncounterReasonCodesEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterReasonCodesEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterReasonCodesEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EncounterReasonCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EncounterReasonCodesEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,137 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EncounterStateEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>planned</b>
|
|
||||||
*
|
|
||||||
* The Encounter has not yet started.
|
|
||||||
*/
|
|
||||||
PLANNED("planned", "http://hl7.org/fhir/encounter-state"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>in progress</b>
|
|
||||||
*
|
|
||||||
* The Encounter has begun and the patient is present / the practitioner and the patient are meeting.
|
|
||||||
*/
|
|
||||||
IN_PROGRESS("in progress", "http://hl7.org/fhir/encounter-state"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>onleave</b>
|
|
||||||
*
|
|
||||||
* The Encounter has begun, but the patient is temporarily on leave.
|
|
||||||
*/
|
|
||||||
ONLEAVE("onleave", "http://hl7.org/fhir/encounter-state"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>finished</b>
|
|
||||||
*
|
|
||||||
* The Encounter has ended.
|
|
||||||
*/
|
|
||||||
FINISHED("finished", "http://hl7.org/fhir/encounter-state"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>cancelled</b>
|
|
||||||
*
|
|
||||||
* The Encounter has ended before it has begun.
|
|
||||||
*/
|
|
||||||
CANCELLED("cancelled", "http://hl7.org/fhir/encounter-state"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/encounter-state
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-state";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EncounterState
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EncounterState";
|
|
||||||
|
|
||||||
private static Map<String, EncounterStateEnum> CODE_TO_ENUM = new HashMap<String, EncounterStateEnum>();
|
|
||||||
private static Map<String, Map<String, EncounterStateEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EncounterStateEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EncounterStateEnum next : EncounterStateEnum.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, EncounterStateEnum>());
|
|
||||||
}
|
|
||||||
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 EncounterStateEnum forCode(String theCode) {
|
|
||||||
EncounterStateEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EncounterStateEnum> VALUESET_BINDER = new IValueSetEnumBinder<EncounterStateEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EncounterStateEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EncounterStateEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterStateEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterStateEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EncounterStateEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EncounterStateEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EncounterTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Annual diabetes mellitus screening</b><br/>
|
|
||||||
* Code Value: <b>ADMS</b>
|
|
||||||
*/
|
|
||||||
ANNUAL_DIABETES_MELLITUS_SCREENING("ADMS", "http://hl7.org/fhir/encounter-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Bone drilling/bone marrow punction in clinic</b><br/>
|
|
||||||
* Code Value: <b>BD/BM-clin</b>
|
|
||||||
*/
|
|
||||||
BONE_DRILLING_BONE_MARROW_PUNCTION_IN_CLINIC("BD/BM-clin", "http://hl7.org/fhir/encounter-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Infant colon screening - 60 minutes</b><br/>
|
|
||||||
* Code Value: <b>CCS60</b>
|
|
||||||
*/
|
|
||||||
INFANT_COLON_SCREENING___60_MINUTES("CCS60", "http://hl7.org/fhir/encounter-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Outpatient Kenacort injection</b><br/>
|
|
||||||
* Code Value: <b>OKI</b>
|
|
||||||
*/
|
|
||||||
OUTPATIENT_KENACORT_INJECTION("OKI", "http://hl7.org/fhir/encounter-type"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/encounter-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EncounterType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EncounterType";
|
|
||||||
|
|
||||||
private static Map<String, EncounterTypeEnum> CODE_TO_ENUM = new HashMap<String, EncounterTypeEnum>();
|
|
||||||
private static Map<String, Map<String, EncounterTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EncounterTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EncounterTypeEnum next : EncounterTypeEnum.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, EncounterTypeEnum>());
|
|
||||||
}
|
|
||||||
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 EncounterTypeEnum forCode(String theCode) {
|
|
||||||
EncounterTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EncounterTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<EncounterTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EncounterTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EncounterTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EncounterTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EncounterTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EncounterTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EnteralFormulaAdditiveTypeEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/entformula-additive
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/entformula-additive";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EnteralFormulaAdditiveType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EnteralFormulaAdditiveType";
|
|
||||||
|
|
||||||
private static Map<String, EnteralFormulaAdditiveTypeEnum> CODE_TO_ENUM = new HashMap<String, EnteralFormulaAdditiveTypeEnum>();
|
|
||||||
private static Map<String, Map<String, EnteralFormulaAdditiveTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EnteralFormulaAdditiveTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EnteralFormulaAdditiveTypeEnum next : EnteralFormulaAdditiveTypeEnum.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, EnteralFormulaAdditiveTypeEnum>());
|
|
||||||
}
|
|
||||||
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 EnteralFormulaAdditiveTypeEnum forCode(String theCode) {
|
|
||||||
EnteralFormulaAdditiveTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EnteralFormulaAdditiveTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<EnteralFormulaAdditiveTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EnteralFormulaAdditiveTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EnteralFormulaAdditiveTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnteralFormulaAdditiveTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnteralFormulaAdditiveTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EnteralFormulaAdditiveTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EnteralFormulaAdditiveTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EnteralFormulaTypeEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/entformula-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/entformula-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EnteralFormulaType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EnteralFormulaType";
|
|
||||||
|
|
||||||
private static Map<String, EnteralFormulaTypeEnum> CODE_TO_ENUM = new HashMap<String, EnteralFormulaTypeEnum>();
|
|
||||||
private static Map<String, Map<String, EnteralFormulaTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, EnteralFormulaTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (EnteralFormulaTypeEnum next : EnteralFormulaTypeEnum.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, EnteralFormulaTypeEnum>());
|
|
||||||
}
|
|
||||||
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 EnteralFormulaTypeEnum forCode(String theCode) {
|
|
||||||
EnteralFormulaTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EnteralFormulaTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<EnteralFormulaTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(EnteralFormulaTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(EnteralFormulaTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnteralFormulaTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnteralFormulaTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, EnteralFormulaTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
EnteralFormulaTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum EventTimingEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/event-timing
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/event-timing";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* EventTiming
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "EventTiming";
|
|
||||||
|
|
||||||
private static Map<String, EventTimingEnum> CODE_TO_ENUM = new HashMap<String, EventTimingEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 EventTimingEnum forCode(String theCode) {
|
|
||||||
EventTimingEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<EventTimingEnum> VALUESET_BINDER = new IValueSetEnumBinder<EventTimingEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ExcludeFoodModifierEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/exclude-food-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/exclude-food-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ExcludeFoodModifier
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ExcludeFoodModifier";
|
|
||||||
|
|
||||||
private static Map<String, ExcludeFoodModifierEnum> CODE_TO_ENUM = new HashMap<String, ExcludeFoodModifierEnum>();
|
|
||||||
private static Map<String, Map<String, ExcludeFoodModifierEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ExcludeFoodModifierEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ExcludeFoodModifierEnum next : ExcludeFoodModifierEnum.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, ExcludeFoodModifierEnum>());
|
|
||||||
}
|
|
||||||
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 ExcludeFoodModifierEnum forCode(String theCode) {
|
|
||||||
ExcludeFoodModifierEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ExcludeFoodModifierEnum> VALUESET_BINDER = new IValueSetEnumBinder<ExcludeFoodModifierEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ExcludeFoodModifierEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ExcludeFoodModifierEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExcludeFoodModifierEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExcludeFoodModifierEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ExcludeFoodModifierEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ExcludeFoodModifierEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ExposureTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>drugadmin</b>
|
|
||||||
*
|
|
||||||
* Drug Administration.
|
|
||||||
*/
|
|
||||||
DRUGADMIN("drugadmin", "http://hl7.org/fhir/exposureType"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>immuniz</b>
|
|
||||||
*
|
|
||||||
* Immunization.
|
|
||||||
*/
|
|
||||||
IMMUNIZ("immuniz", "http://hl7.org/fhir/exposureType"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>coincidental</b>
|
|
||||||
*
|
|
||||||
* In the same area as the substance.
|
|
||||||
*/
|
|
||||||
COINCIDENTAL("coincidental", "http://hl7.org/fhir/exposureType"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/exposureType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/exposureType";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* ExposureType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "ExposureType";
|
|
||||||
|
|
||||||
private static Map<String, ExposureTypeEnum> CODE_TO_ENUM = new HashMap<String, ExposureTypeEnum>();
|
|
||||||
private static Map<String, Map<String, ExposureTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ExposureTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ExposureTypeEnum next : ExposureTypeEnum.values()) {
|
|
||||||
CODE_TO_ENUM.put(next.getCode(), next);
|
|
||||||
|
|
||||||
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
|
|
||||||
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, ExposureTypeEnum>());
|
|
||||||
}
|
|
||||||
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the code associated with this enumerated value
|
|
||||||
*/
|
|
||||||
public String getCode() {
|
|
||||||
return myCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the code system associated with this enumerated value
|
|
||||||
*/
|
|
||||||
public String getSystem() {
|
|
||||||
return mySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the enumerated value associated with this code
|
|
||||||
*/
|
|
||||||
public ExposureTypeEnum forCode(String theCode) {
|
|
||||||
ExposureTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<ExposureTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<ExposureTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(ExposureTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(ExposureTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExposureTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExposureTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, ExposureTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
ExposureTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,823 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum FHIRDefinedTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Address</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.
|
|
||||||
*/
|
|
||||||
ADDRESS("Address", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Age</b>
|
|
||||||
*
|
|
||||||
* A duration (length of time) with a UCUM code
|
|
||||||
*/
|
|
||||||
AGE("Age", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Attachment</b>
|
|
||||||
*
|
|
||||||
* For referring to data content defined in other formats.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Coding</b>
|
|
||||||
*
|
|
||||||
* A reference to a code defined by a terminology system.
|
|
||||||
*/
|
|
||||||
CODING("Coding", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>ContactPoint</b>
|
|
||||||
*
|
|
||||||
* Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
|
|
||||||
*/
|
|
||||||
CONTACTPOINT("ContactPoint", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Count</b>
|
|
||||||
*
|
|
||||||
* A count of a discrete element (no unit)
|
|
||||||
*/
|
|
||||||
COUNT("Count", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Distance</b>
|
|
||||||
*
|
|
||||||
* A measure of distance
|
|
||||||
*/
|
|
||||||
DISTANCE("Distance", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Duration</b>
|
|
||||||
*
|
|
||||||
* A length of time
|
|
||||||
*/
|
|
||||||
DURATION("Duration", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Extension</b>
|
|
||||||
*
|
|
||||||
* Optional Extensions Element - found in all resources.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Identifier</b>
|
|
||||||
*
|
|
||||||
* A technical identifier - identifies some entity uniquely and unambiguously.
|
|
||||||
*/
|
|
||||||
IDENTIFIER("Identifier", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Money</b>
|
|
||||||
*
|
|
||||||
* An amount of money. With regard to precision, see [[X]]
|
|
||||||
*/
|
|
||||||
MONEY("Money", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Narrative</b>
|
|
||||||
*
|
|
||||||
* A human-readable formatted text, including images.
|
|
||||||
*/
|
|
||||||
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", "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", "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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Reference</b>
|
|
||||||
*
|
|
||||||
* A reference from one resource to another.
|
|
||||||
*/
|
|
||||||
REFERENCE("Reference", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Timing</b>
|
|
||||||
*
|
|
||||||
* Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.
|
|
||||||
*/
|
|
||||||
TIMING("Timing", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>base64Binary</b>
|
|
||||||
*
|
|
||||||
* A stream of bytes
|
|
||||||
*/
|
|
||||||
BASE64BINARY("base64Binary", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>boolean</b>
|
|
||||||
*
|
|
||||||
* Value of "true" or "false"
|
|
||||||
*/
|
|
||||||
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", "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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>decimal</b>
|
|
||||||
*
|
|
||||||
* A rational number with implicit precision
|
|
||||||
*/
|
|
||||||
DECIMAL("decimal", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>id</b>
|
|
||||||
*
|
|
||||||
* Any combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Systems SHALL send ids as lower-case but SHOULD interpret them case-insensitively.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>integer</b>
|
|
||||||
*
|
|
||||||
* A whole number
|
|
||||||
*/
|
|
||||||
INTEGER("integer", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>oid</b>
|
|
||||||
*
|
|
||||||
* An oid represented as a URI
|
|
||||||
*/
|
|
||||||
OID("oid", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>string</b>
|
|
||||||
*
|
|
||||||
* A sequence of Unicode characters
|
|
||||||
*/
|
|
||||||
STRING("string", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>time</b>
|
|
||||||
*
|
|
||||||
* A time during the day, with no date specified
|
|
||||||
*/
|
|
||||||
TIME("time", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>uri</b>
|
|
||||||
*
|
|
||||||
* String of characters used to identify a name or a resource
|
|
||||||
*/
|
|
||||||
URI("uri", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>uuid</b>
|
|
||||||
*
|
|
||||||
* A UUID, represented as a URI
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>AdverseReactionRisk</b>
|
|
||||||
*
|
|
||||||
* Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
|
|
||||||
*/
|
|
||||||
ADVERSEREACTIONRISK("AdverseReactionRisk", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Alert</b>
|
|
||||||
*
|
|
||||||
* Prospective warnings of potential issues when providing care to the patient.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Appointment</b>
|
|
||||||
*
|
|
||||||
* A scheduled healthcare event for a patient and/or practitioner(s) where a service may take place at a specific date/time.
|
|
||||||
*/
|
|
||||||
APPOINTMENT("Appointment", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>AppointmentResponse</b>
|
|
||||||
*
|
|
||||||
* A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
|
|
||||||
*/
|
|
||||||
APPOINTMENTRESPONSE("AppointmentResponse", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Availability</b>
|
|
||||||
*
|
|
||||||
* (informative) A container for slot(s) of time that may be available for booking appointments.
|
|
||||||
*/
|
|
||||||
AVAILABILITY("Availability", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Basic</b>
|
|
||||||
*
|
|
||||||
* Basic is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest.
|
|
||||||
*/
|
|
||||||
BASIC("Basic", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>ClaimResponse</b>
|
|
||||||
*
|
|
||||||
* This resource provides the adjudication details from the processing of a Claim resource.
|
|
||||||
*/
|
|
||||||
CLAIMRESPONSE("ClaimResponse", "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", "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 concepts - either code systems or data elements, or classes in class models.
|
|
||||||
*/
|
|
||||||
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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Contract</b>
|
|
||||||
*
|
|
||||||
* A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
|
|
||||||
*/
|
|
||||||
CONTRACT("Contract", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Contraindication</b>
|
|
||||||
*
|
|
||||||
* Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient. E.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
|
|
||||||
*/
|
|
||||||
CONTRAINDICATION("Contraindication", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Coverage</b>
|
|
||||||
*
|
|
||||||
* Financial instrument which may be used to pay for or reimburse for health care products and services.
|
|
||||||
*/
|
|
||||||
COVERAGE("Coverage", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>DataElement</b>
|
|
||||||
*
|
|
||||||
* The formal description of a single piece of information that can be gathered and reported.
|
|
||||||
*/
|
|
||||||
DATAELEMENT("DataElement", "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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>DiagnosticOrder</b>
|
|
||||||
*
|
|
||||||
* A request for a diagnostic investigation service to be performed.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>DocumentManifest</b>
|
|
||||||
*
|
|
||||||
* A manifest that defines a set of documents.
|
|
||||||
*/
|
|
||||||
DOCUMENTMANIFEST("DocumentManifest", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>DocumentReference</b>
|
|
||||||
*
|
|
||||||
* A reference to a document.
|
|
||||||
*/
|
|
||||||
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", "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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>HealthcareService</b>
|
|
||||||
*
|
|
||||||
* (informative) The details of a Healthcare Service available at a location.
|
|
||||||
*/
|
|
||||||
HEALTHCARESERVICE("HealthcareService", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Immunization</b>
|
|
||||||
*
|
|
||||||
* Immunization event information.
|
|
||||||
*/
|
|
||||||
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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>List</b>
|
|
||||||
*
|
|
||||||
* A set of information summarized from a list of other resources.
|
|
||||||
*/
|
|
||||||
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", "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", "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", "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", "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", "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", "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", "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 Reference(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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Namespace</b>
|
|
||||||
*
|
|
||||||
* A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types.
|
|
||||||
*/
|
|
||||||
NAMESPACE("Namespace", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>NutritionOrder</b>
|
|
||||||
*
|
|
||||||
* A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
|
|
||||||
*/
|
|
||||||
NUTRITIONORDER("NutritionOrder", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OperationDefinition</b>
|
|
||||||
*
|
|
||||||
* A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
|
|
||||||
*/
|
|
||||||
OPERATIONDEFINITION("OperationDefinition", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OralHealthClaim</b>
|
|
||||||
*
|
|
||||||
* A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
|
|
||||||
*/
|
|
||||||
ORALHEALTHCLAIM("OralHealthClaim", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Order</b>
|
|
||||||
*
|
|
||||||
* A request to perform an action.
|
|
||||||
*/
|
|
||||||
ORDER("Order", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>OrderResponse</b>
|
|
||||||
*
|
|
||||||
* A response to an order.
|
|
||||||
*/
|
|
||||||
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", "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", "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", "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", "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", "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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Query</b>
|
|
||||||
*
|
|
||||||
* A description of a query with a set of parameters.
|
|
||||||
*/
|
|
||||||
QUERY("Query", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Questionnaire</b>
|
|
||||||
*
|
|
||||||
* A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
|
|
||||||
*/
|
|
||||||
QUESTIONNAIRE("Questionnaire", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>QuestionnaireAnswers</b>
|
|
||||||
*
|
|
||||||
* A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
|
|
||||||
*/
|
|
||||||
QUESTIONNAIREANSWERS("QuestionnaireAnswers", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>ReferralRequest</b>
|
|
||||||
*
|
|
||||||
* Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organisation.
|
|
||||||
*/
|
|
||||||
REFERRALREQUEST("ReferralRequest", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>RiskAssessment</b>
|
|
||||||
*
|
|
||||||
* An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
|
|
||||||
*/
|
|
||||||
RISKASSESSMENT("RiskAssessment", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Slot</b>
|
|
||||||
*
|
|
||||||
* (informative) A slot of time on a schedule that may be available for booking appointments.
|
|
||||||
*/
|
|
||||||
SLOT("Slot", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Specimen</b>
|
|
||||||
*
|
|
||||||
* Sample for analysis.
|
|
||||||
*/
|
|
||||||
SPECIMEN("Specimen", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Subscription</b>
|
|
||||||
*
|
|
||||||
* Todo.
|
|
||||||
*/
|
|
||||||
SUBSCRIPTION("Subscription", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>Substance</b>
|
|
||||||
*
|
|
||||||
* A homogeneous material with a definite composition.
|
|
||||||
*/
|
|
||||||
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", "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", "http://hl7.org/fhir/defined-types"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/defined-types
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/defined-types";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* FHIRDefinedType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "FHIRDefinedType";
|
|
||||||
|
|
||||||
private static Map<String, FHIRDefinedTypeEnum> CODE_TO_ENUM = new HashMap<String, FHIRDefinedTypeEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 FHIRDefinedTypeEnum forCode(String theCode) {
|
|
||||||
FHIRDefinedTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<FHIRDefinedTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<FHIRDefinedTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,144 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum FilterOperatorEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>=</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code equals the provided value.
|
|
||||||
*/
|
|
||||||
EQUALS("=", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>is-a</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code has an is-a relationship with the provided value.
|
|
||||||
*/
|
|
||||||
IS_A("is-a", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>is-not-a</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code does not have an is-a relationship with the provided value.
|
|
||||||
*/
|
|
||||||
IS_NOT_A("is-not-a", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>regex</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code matches the regex specified in the provided value.
|
|
||||||
*/
|
|
||||||
REGEX("regex", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>in</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).
|
|
||||||
*/
|
|
||||||
IN("in", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>not in</b>
|
|
||||||
*
|
|
||||||
* The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).
|
|
||||||
*/
|
|
||||||
NOT_IN("not in", "http://hl7.org/fhir/filter-operator"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/filter-operator
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/filter-operator";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* FilterOperator
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "FilterOperator";
|
|
||||||
|
|
||||||
private static Map<String, FilterOperatorEnum> CODE_TO_ENUM = new HashMap<String, FilterOperatorEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 FilterOperatorEnum forCode(String theCode) {
|
|
||||||
FilterOperatorEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<FilterOperatorEnum> VALUESET_BINDER = new IValueSetEnumBinder<FilterOperatorEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum FluidConsistencyTypeEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/consistency-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/consistency-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* FluidConsistencyType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "FluidConsistencyType";
|
|
||||||
|
|
||||||
private static Map<String, FluidConsistencyTypeEnum> CODE_TO_ENUM = new HashMap<String, FluidConsistencyTypeEnum>();
|
|
||||||
private static Map<String, Map<String, FluidConsistencyTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, FluidConsistencyTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (FluidConsistencyTypeEnum next : FluidConsistencyTypeEnum.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, FluidConsistencyTypeEnum>());
|
|
||||||
}
|
|
||||||
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 FluidConsistencyTypeEnum forCode(String theCode) {
|
|
||||||
FluidConsistencyTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<FluidConsistencyTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<FluidConsistencyTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(FluidConsistencyTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(FluidConsistencyTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FluidConsistencyTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FluidConsistencyTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, FluidConsistencyTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
FluidConsistencyTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum FoodTypeEnum {
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/food-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/food-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* FoodType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "FoodType";
|
|
||||||
|
|
||||||
private static Map<String, FoodTypeEnum> CODE_TO_ENUM = new HashMap<String, FoodTypeEnum>();
|
|
||||||
private static Map<String, Map<String, FoodTypeEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, FoodTypeEnum>>();
|
|
||||||
|
|
||||||
private final String myCode;
|
|
||||||
private final String mySystem;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (FoodTypeEnum next : FoodTypeEnum.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, FoodTypeEnum>());
|
|
||||||
}
|
|
||||||
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 FoodTypeEnum forCode(String theCode) {
|
|
||||||
FoodTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<FoodTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<FoodTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
public String toCodeString(FoodTypeEnum theEnum) {
|
|
||||||
return theEnum.getCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toSystemString(FoodTypeEnum theEnum) {
|
|
||||||
return theEnum.getSystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FoodTypeEnum fromCodeString(String theCodeString) {
|
|
||||||
return CODE_TO_ENUM.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FoodTypeEnum fromCodeString(String theCodeString, String theSystemString) {
|
|
||||||
Map<String, FoodTypeEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
|
|
||||||
if (map == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return map.get(theCodeString);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
FoodTypeEnum(String theCode, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,144 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum GroupTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>person</b>
|
|
||||||
*
|
|
||||||
* Group contains "person" Patient resources.
|
|
||||||
*/
|
|
||||||
PERSON("person", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>animal</b>
|
|
||||||
*
|
|
||||||
* Group contains "animal" Patient resources.
|
|
||||||
*/
|
|
||||||
ANIMAL("animal", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>practitioner</b>
|
|
||||||
*
|
|
||||||
* Group contains healthcare practitioner resources.
|
|
||||||
*/
|
|
||||||
PRACTITIONER("practitioner", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>device</b>
|
|
||||||
*
|
|
||||||
* Group contains Device resources.
|
|
||||||
*/
|
|
||||||
DEVICE("device", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>medication</b>
|
|
||||||
*
|
|
||||||
* Group contains Medication resources.
|
|
||||||
*/
|
|
||||||
MEDICATION("medication", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Value: <b>substance</b>
|
|
||||||
*
|
|
||||||
* Group contains Substance resources.
|
|
||||||
*/
|
|
||||||
SUBSTANCE("substance", "http://hl7.org/fhir/group-type"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/group-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/group-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* GroupType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "GroupType";
|
|
||||||
|
|
||||||
private static Map<String, GroupTypeEnum> CODE_TO_ENUM = new HashMap<String, GroupTypeEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 GroupTypeEnum forCode(String theCode) {
|
|
||||||
GroupTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<GroupTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<GroupTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
|
|
||||||
package ca.uhn.fhir.model.dev.valueset;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.*;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum HierarchicalRelationshipTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Parent</b><br/>
|
|
||||||
* Code Value: <b>parent</b>
|
|
||||||
*
|
|
||||||
* The target resource is the parent of the focal specimen resource.
|
|
||||||
*/
|
|
||||||
PARENT("parent", "http://hl7.org/fhir/hierarchical-relationship-type"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display: <b>Child</b><br/>
|
|
||||||
* Code Value: <b>child</b>
|
|
||||||
*
|
|
||||||
* The target resource is the child of the focal specimen resource.
|
|
||||||
*/
|
|
||||||
CHILD("child", "http://hl7.org/fhir/hierarchical-relationship-type"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for this Value Set:
|
|
||||||
* http://hl7.org/fhir/vs/hierarchical-relationship-type
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/hierarchical-relationship-type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Name for this Value Set:
|
|
||||||
* HierarchicalRelationshipType
|
|
||||||
*/
|
|
||||||
public static final String VALUESET_NAME = "HierarchicalRelationshipType";
|
|
||||||
|
|
||||||
private static Map<String, HierarchicalRelationshipTypeEnum> CODE_TO_ENUM = new HashMap<String, HierarchicalRelationshipTypeEnum>();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 HierarchicalRelationshipTypeEnum forCode(String theCode) {
|
|
||||||
HierarchicalRelationshipTypeEnum retVal = CODE_TO_ENUM.get(theCode);
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts codes to their respective enumerated values
|
|
||||||
*/
|
|
||||||
public static final IValueSetEnumBinder<HierarchicalRelationshipTypeEnum> VALUESET_BINDER = new IValueSetEnumBinder<HierarchicalRelationshipTypeEnum>() {
|
|
||||||
@Override
|
|
||||||
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, String theSystem) {
|
|
||||||
myCode = theCode;
|
|
||||||
mySystem = theSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue