Merge branch 'master' of github.com:jamesagnew/hapi-fhir
This commit is contained in:
commit
e61aeea85a
|
@ -115,7 +115,7 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IBase> ext
|
|||
}
|
||||
} while (current != null);
|
||||
|
||||
Set<Field> fields = new HashSet<Field>();
|
||||
Set<Field> fields = new HashSet<>();
|
||||
for (Class<? extends IBase> nextClass : classes) {
|
||||
int fieldIndexInClass = 0;
|
||||
for (Field next : nextClass.getDeclaredFields()) {
|
||||
|
@ -181,11 +181,17 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IBase> ext
|
|||
if (IBase.class.isAssignableFrom(next.getElementType())) {
|
||||
if (next.getElementType().isInterface() == false && Modifier.isAbstract(next.getElementType().getModifiers()) == false) {
|
||||
theScanAlso.add((Class<? extends IBase>) next.getElementType());
|
||||
if (theScanAlso.toString().contains("ExtensionDt")) {
|
||||
theScanAlso.toString();//FIXME: remove
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Class<? extends IBase> nextChildType : next.getChoiceTypes()) {
|
||||
if (nextChildType.isInterface() == false && Modifier.isAbstract(nextChildType.getModifiers()) == false) {
|
||||
theScanAlso.add(nextChildType);
|
||||
if (theScanAlso.toString().contains("ExtensionDt")) {
|
||||
theScanAlso.toString();//FIXME: remove
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,17 +19,6 @@ package ca.uhn.fhir.context;
|
|||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.hl7.fhir.instance.model.api.*;
|
||||
|
||||
import ca.uhn.fhir.context.RuntimeSearchParam.RuntimeSearchParamStatusEnum;
|
||||
import ca.uhn.fhir.model.api.*;
|
||||
|
@ -38,6 +27,19 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt;
|
|||
import ca.uhn.fhir.model.primitive.XhtmlDt;
|
||||
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
|
||||
import ca.uhn.fhir.util.ReflectionUtil;
|
||||
import org.hl7.fhir.instance.model.api.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
class ModelScanner {
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ModelScanner.class);
|
||||
|
@ -67,32 +69,6 @@ class ModelScanner {
|
|||
init(theExistingDefinitions, toScan);
|
||||
}
|
||||
|
||||
static Class<?> determineElementType(Field next) {
|
||||
Class<?> nextElementType = next.getType();
|
||||
if (List.class.equals(nextElementType)) {
|
||||
nextElementType = ReflectionUtil.getGenericCollectionTypeOfField(next);
|
||||
} else if (Collection.class.isAssignableFrom(nextElementType)) {
|
||||
throw new ConfigurationException("Field '" + next.getName() + "' in type '" + next.getClass().getCanonicalName() + "' is a Collection - Only java.util.List curently supported");
|
||||
}
|
||||
return nextElementType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static IValueSetEnumBinder<Enum<?>> getBoundCodeBinder(Field theNext) {
|
||||
Class<?> bound = getGenericCollectionTypeOfCodedField(theNext);
|
||||
if (bound == null) {
|
||||
throw new ConfigurationException("Field '" + theNext + "' has no parameter for " + BoundCodeDt.class.getSimpleName() + " to determine enum type");
|
||||
}
|
||||
|
||||
String fieldName = "VALUESET_BINDER";
|
||||
try {
|
||||
Field bindingField = bound.getField(fieldName);
|
||||
return (IValueSetEnumBinder<Enum<?>>) bindingField.get(null);
|
||||
} catch (Exception e) {
|
||||
throw new ConfigurationException("Field '" + theNext + "' has type parameter " + bound.getCanonicalName() + " but this class has no valueset binding field (must have a field called " + fieldName + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> getClassToElementDefinitions() {
|
||||
return myClassToElementDefinitions;
|
||||
}
|
||||
|
@ -137,11 +113,7 @@ class ModelScanner {
|
|||
for (Class<? extends IBase> nextClass : typesToScan) {
|
||||
scan(nextClass);
|
||||
}
|
||||
for (Iterator<Class<? extends IBase>> iter = myScanAlso.iterator(); iter.hasNext();) {
|
||||
if (myClassToElementDefinitions.containsKey(iter.next())) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
myScanAlso.removeIf(theClass -> myClassToElementDefinitions.containsKey(theClass));
|
||||
typesToScan.clear();
|
||||
typesToScan.addAll(myScanAlso);
|
||||
myScanAlso.clear();
|
||||
|
@ -177,16 +149,6 @@ class ModelScanner {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* There are two implementations of all of the annotations (e.g. {@link Child} since the HL7.org ones will eventually replace the HAPI
|
||||
* ones. Annotations can't extend each other or implement interfaces or anything like that, so rather than duplicate all of the annotation processing code this method just creates an interface
|
||||
* Proxy to simulate the HAPI annotations if the HL7.org ones are found instead.
|
||||
*/
|
||||
static <T extends Annotation> T pullAnnotation(AnnotatedElement theTarget, Class<T> theAnnotationType) {
|
||||
T retVal = theTarget.getAnnotation(theAnnotationType);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
private void scan(Class<? extends IBase> theClass) throws ConfigurationException {
|
||||
BaseRuntimeElementDefinition<?> existingDef = myClassToElementDefinitions.get(theClass);
|
||||
if (existingDef != null) {
|
||||
|
@ -212,7 +174,7 @@ class ModelScanner {
|
|||
Class<? extends ICompositeType> resClass = (Class<? extends ICompositeType>) theClass;
|
||||
scanCompositeDatatype(resClass, datatypeDefinition);
|
||||
} else if (IPrimitiveType.class.isAssignableFrom(theClass)) {
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings({"unchecked"})
|
||||
Class<? extends IPrimitiveType<?>> resClass = (Class<? extends IPrimitiveType<?>>) theClass;
|
||||
scanPrimitiveDatatype(resClass, datatypeDefinition);
|
||||
}
|
||||
|
@ -246,7 +208,16 @@ class ModelScanner {
|
|||
throw new ConfigurationException("Block type @" + Block.class.getSimpleName() + " annotation contains no name: " + theClass.getCanonicalName());
|
||||
}
|
||||
|
||||
// Just in case someone messes up when upgrading from DSTU2
|
||||
if (myContext.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) {
|
||||
if (BaseIdentifiableElement.class.isAssignableFrom(theClass)) {
|
||||
throw new ConfigurationException("@Block class for version " + myContext.getVersion().getVersion().name() + " should not extend " + BaseIdentifiableElement.class.getSimpleName() + ": " + theClass.getName());
|
||||
}
|
||||
}
|
||||
|
||||
RuntimeResourceBlockDefinition blockDef = new RuntimeResourceBlockDefinition(resourceName, theClass, isStandardType(theClass), myContext, myClassToElementDefinitions);
|
||||
blockDef.populateScanAlso(myScanAlso);
|
||||
|
||||
myClassToElementDefinitions.put(theClass, blockDef);
|
||||
}
|
||||
|
||||
|
@ -272,14 +243,6 @@ class ModelScanner {
|
|||
elementDef.populateScanAlso(myScanAlso);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static Class<? extends Enum<?>> determineEnumTypeForBoundField(Field next) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<? extends Enum<?>> enumType = (Class<? extends Enum<?>>) ReflectionUtil.getGenericCollectionTypeOfFieldWithSecondOrderForList(next);
|
||||
return enumType;
|
||||
}
|
||||
|
||||
private String scanPrimitiveDatatype(Class<? extends IPrimitiveType<?>> theClass, DatatypeDef theDatatypeDefinition) {
|
||||
ourLog.debug("Scanning resource class: {}", theClass.getName());
|
||||
|
||||
|
@ -442,7 +405,7 @@ class ModelScanner {
|
|||
RuntimeSearchParam param = nameToParam.get(nextName);
|
||||
if (param == null) {
|
||||
ourLog.warn("Search parameter {}.{} declares that it is a composite with compositeOf value '{}' but that is not a valid parametr name itself. Valid values are: {}",
|
||||
new Object[] { theResourceDef.getName(), searchParam.name(), nextName, nameToParam.keySet() });
|
||||
new Object[]{theResourceDef.getName(), searchParam.name(), nextName, nameToParam.keySet()});
|
||||
continue;
|
||||
}
|
||||
compositeOf.add(param);
|
||||
|
@ -466,6 +429,48 @@ class ModelScanner {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
static Class<?> determineElementType(Field next) {
|
||||
Class<?> nextElementType = next.getType();
|
||||
if (List.class.equals(nextElementType)) {
|
||||
nextElementType = ReflectionUtil.getGenericCollectionTypeOfField(next);
|
||||
} else if (Collection.class.isAssignableFrom(nextElementType)) {
|
||||
throw new ConfigurationException("Field '" + next.getName() + "' in type '" + next.getClass().getCanonicalName() + "' is a Collection - Only java.util.List curently supported");
|
||||
}
|
||||
return nextElementType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static IValueSetEnumBinder<Enum<?>> getBoundCodeBinder(Field theNext) {
|
||||
Class<?> bound = getGenericCollectionTypeOfCodedField(theNext);
|
||||
if (bound == null) {
|
||||
throw new ConfigurationException("Field '" + theNext + "' has no parameter for " + BoundCodeDt.class.getSimpleName() + " to determine enum type");
|
||||
}
|
||||
|
||||
String fieldName = "VALUESET_BINDER";
|
||||
try {
|
||||
Field bindingField = bound.getField(fieldName);
|
||||
return (IValueSetEnumBinder<Enum<?>>) bindingField.get(null);
|
||||
} catch (Exception e) {
|
||||
throw new ConfigurationException("Field '" + theNext + "' has type parameter " + bound.getCanonicalName() + " but this class has no valueset binding field (must have a field called " + fieldName + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* There are two implementations of all of the annotations (e.g. {@link Child} since the HL7.org ones will eventually replace the HAPI
|
||||
* ones. Annotations can't extend each other or implement interfaces or anything like that, so rather than duplicate all of the annotation processing code this method just creates an interface
|
||||
* Proxy to simulate the HAPI annotations if the HL7.org ones are found instead.
|
||||
*/
|
||||
static <T extends Annotation> T pullAnnotation(AnnotatedElement theTarget, Class<T> theAnnotationType) {
|
||||
T retVal = theTarget.getAnnotation(theAnnotationType);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
static Class<? extends Enum<?>> determineEnumTypeForBoundField(Field next) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<? extends Enum<?>> enumType = (Class<? extends Enum<?>>) ReflectionUtil.getGenericCollectionTypeOfFieldWithSecondOrderForList(next);
|
||||
return enumType;
|
||||
}
|
||||
|
||||
private static Class<?> getGenericCollectionTypeOfCodedField(Field next) {
|
||||
Class<?> type;
|
||||
ParameterizedType collectionType = (ParameterizedType) next.getGenericType();
|
||||
|
|
|
@ -149,9 +149,9 @@ public class RuntimeChildUndeclaredExtensionDefinition extends BaseRuntimeChildD
|
|||
|
||||
@Override
|
||||
void sealAndInitialize(FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
|
||||
Map<String, BaseRuntimeElementDefinition<?>> datatypeAttributeNameToDefinition = new HashMap<String, BaseRuntimeElementDefinition<?>>();
|
||||
myDatatypeToAttributeName = new HashMap<Class<? extends IBase>, String>();
|
||||
myDatatypeToDefinition = new HashMap<Class<? extends IBase>, BaseRuntimeElementDefinition<?>>();
|
||||
Map<String, BaseRuntimeElementDefinition<?>> datatypeAttributeNameToDefinition = new HashMap<>();
|
||||
myDatatypeToAttributeName = new HashMap<>();
|
||||
myDatatypeToDefinition = new HashMap<>();
|
||||
|
||||
for (BaseRuntimeElementDefinition<?> next : theClassToElementDefinitions.values()) {
|
||||
if (next instanceof IRuntimeDatatypeDefinition) {
|
||||
|
|
|
@ -25,6 +25,7 @@ public enum VersionEnum {
|
|||
V3_3_0,
|
||||
V3_4_0,
|
||||
V3_5_0,
|
||||
V3_6_0
|
||||
V3_6_0,
|
||||
V3_7_0
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
|
@ -189,7 +188,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf-spring4</artifactId>
|
||||
<artifactId>thymeleaf-spring5</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Dependencies for Schematron -->
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf-spring4</artifactId>
|
||||
<artifactId>thymeleaf-spring5</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- For UCUM: TODO we should replace this with org.fhir UCUM -->
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.core.task.AsyncTaskExecutor;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
import org.springframework.orm.hibernate5.HibernateExceptionTranslator;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
|
@ -162,7 +163,7 @@ public abstract class BaseConfig implements SchedulingConfigurer {
|
|||
return new SubscriptionWebsocketInterceptor();
|
||||
}
|
||||
|
||||
@Bean(name = TASK_EXECUTOR_NAME)
|
||||
@Bean()
|
||||
public TaskScheduler taskScheduler() {
|
||||
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
||||
retVal.setConcurrentExecutor(scheduledExecutorService());
|
||||
|
@ -170,6 +171,14 @@ public abstract class BaseConfig implements SchedulingConfigurer {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Bean(name = TASK_EXECUTOR_NAME)
|
||||
public AsyncTaskExecutor taskExecutor() {
|
||||
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
||||
retVal.setConcurrentExecutor(scheduledExecutorService());
|
||||
retVal.setScheduledExecutor(scheduledExecutorService());
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public IResourceReindexingSvc resourceReindexingSvc() {
|
||||
return new ResourceReindexingSvcImpl();
|
||||
|
|
|
@ -37,6 +37,7 @@ import javax.xml.stream.events.Characters;
|
|||
import javax.xml.stream.events.XMLEvent;
|
||||
|
||||
import ca.uhn.fhir.jpa.dao.data.*;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.NotImplementedException;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.http.NameValuePair;
|
||||
|
@ -255,6 +256,8 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
|
|||
protected IResourceIndexedSearchParamStringDao myResourceIndexedSearchParamStringDao;
|
||||
@Autowired()
|
||||
protected IResourceIndexedSearchParamTokenDao myResourceIndexedSearchParamTokenDao;
|
||||
@Autowired
|
||||
protected IResourceLinkDao myResourceLinkDao;
|
||||
@Autowired()
|
||||
protected IResourceIndexedSearchParamDateDao myResourceIndexedSearchParamDateDao;
|
||||
@Autowired()
|
||||
|
@ -328,6 +331,7 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
|
|||
|
||||
protected ExpungeOutcome doExpunge(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions) {
|
||||
TransactionTemplate txTemplate = new TransactionTemplate(myPlatformTransactionManager);
|
||||
txTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
|
||||
ourLog.info("Expunge: ResourceName[{}] Id[{}] Version[{}] Options[{}]", theResourceName, theResourceId, theVersion, theExpungeOptions);
|
||||
|
||||
if (!getConfig().isExpungeEnabled()) {
|
||||
|
@ -367,11 +371,14 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
|
|||
});
|
||||
|
||||
/*
|
||||
* Delete any search result cache entries pointing to the given resource
|
||||
* Delete any search result cache entries pointing to the given resource. We do
|
||||
* this in batches to avoid sending giant batches of parameters to the DB
|
||||
*/
|
||||
if (resourceIds.getContent().size() > 0) {
|
||||
List<List<Long>> partitions = Lists.partition(resourceIds.getContent(), 800);
|
||||
for (List<Long> nextPartition : partitions) {
|
||||
ourLog.info("Expunging any search results pointing to {} resources", nextPartition.size());
|
||||
txTemplate.execute(t -> {
|
||||
mySearchResultDao.deleteByResourceIds(resourceIds.getContent());
|
||||
mySearchResultDao.deleteByResourceIds(nextPartition);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
@ -438,7 +445,7 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
|
|||
|
||||
ourLog.info("** BEGINNING GLOBAL $expunge **");
|
||||
TransactionTemplate txTemplate = new TransactionTemplate(myPlatformTransactionManager);
|
||||
txTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRED);
|
||||
txTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
|
||||
txTemplate.execute(t -> {
|
||||
doExpungeEverythingQuery("UPDATE " + ResourceHistoryTable.class.getSimpleName() + " d SET d.myForcedId = null");
|
||||
doExpungeEverythingQuery("UPDATE " + ResourceTable.class.getSimpleName() + " d SET d.myForcedId = null");
|
||||
|
@ -521,6 +528,8 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
|
|||
myResourceIndexedSearchParamQuantityDao.deleteAll(resource.getParamsQuantity());
|
||||
myResourceIndexedSearchParamStringDao.deleteAll(resource.getParamsString());
|
||||
myResourceIndexedSearchParamTokenDao.deleteAll(resource.getParamsToken());
|
||||
myResourceLinkDao.deleteAll(resource.getResourceLinks());
|
||||
myResourceLinkDao.deleteAll(resource.getResourceLinksAsTarget());
|
||||
|
||||
myResourceTagDao.deleteAll(resource.getTags());
|
||||
resource.getTags().clear();
|
||||
|
|
|
@ -65,7 +65,7 @@ public abstract class BaseHapiFhirSystemDao<T, MT> extends BaseHapiFhirDao<IBase
|
|||
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRED)
|
||||
@Transactional(propagation = Propagation.NEVER)
|
||||
public ExpungeOutcome expunge(ExpungeOptions theExpungeOptions) {
|
||||
return doExpunge(null, null, null, theExpungeOptions);
|
||||
}
|
||||
|
|
|
@ -25,5 +25,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||
import ca.uhn.fhir.jpa.entity.ResourceLink;
|
||||
|
||||
public interface IResourceLinkDao extends JpaRepository<ResourceLink, Long> {
|
||||
// nothing
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -185,27 +185,33 @@ public class ResourceTable extends BaseHasResource implements Serializable {
|
|||
@IndexedEmbedded()
|
||||
@OptimisticLock(excluded = true)
|
||||
private Collection<ResourceLink> myResourceLinks;
|
||||
|
||||
@OneToMany(mappedBy = "myTargetResource", cascade = {}, fetch = FetchType.LAZY, orphanRemoval = false)
|
||||
@IndexedEmbedded()
|
||||
@OptimisticLock(excluded = true)
|
||||
private Collection<ResourceLink> myResourceLinksAsTarget;
|
||||
@Column(name = "RES_TYPE", length = RESTYPE_LEN)
|
||||
@Field
|
||||
@OptimisticLock(excluded = true)
|
||||
private String myResourceType;
|
||||
|
||||
@OneToMany(mappedBy = "myResource", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
|
||||
@OptimisticLock(excluded = true)
|
||||
private Collection<SearchParamPresent> mySearchParamPresents;
|
||||
|
||||
@OneToMany(mappedBy = "myResource", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
|
||||
@OptimisticLock(excluded = true)
|
||||
private Set<ResourceTag> myTags;
|
||||
|
||||
@Transient
|
||||
private transient boolean myUnchangedInCurrentOperation;
|
||||
|
||||
@Version
|
||||
@Column(name = "RES_VER")
|
||||
private long myVersion;
|
||||
|
||||
public Collection<ResourceLink> getResourceLinksAsTarget() {
|
||||
if (myResourceLinksAsTarget == null) {
|
||||
myResourceLinksAsTarget = new ArrayList<>();
|
||||
}
|
||||
return myResourceLinksAsTarget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceTag addTag(TagDefinition theTag) {
|
||||
for (ResourceTag next : getTags()) {
|
||||
|
|
|
@ -20,17 +20,17 @@ package ca.uhn.fhir.jpa.subscription.email;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.util.StopWatch;
|
||||
import ca.uhn.fhir.rest.api.Constants;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
import ca.uhn.fhir.util.StopWatch;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
import org.thymeleaf.context.Context;
|
||||
import org.thymeleaf.spring4.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring4.dialect.SpringStandardDialect;
|
||||
import org.thymeleaf.spring5.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring5.dialect.SpringStandardDialect;
|
||||
import org.thymeleaf.templatemode.TemplateMode;
|
||||
import org.thymeleaf.templateresolver.StringTemplateResolver;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
|
|||
import ca.uhn.fhirtest.config.*;
|
||||
import ca.uhn.hapi.converters.server.VersionedApiConverterInterceptor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hl7.fhir.r4.hapi.rest.server.GraphQLProvider;
|
||||
import org.springframework.web.context.ContextLoaderListener;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
||||
|
@ -147,6 +148,7 @@ public class TestRestfulServer extends RestfulServer {
|
|||
confProvider.setImplementationDescription(implDesc);
|
||||
setServerConformanceProvider(confProvider);
|
||||
plainProviders.add(myAppCtx.getBean(TerminologyUploaderProviderR4.class));
|
||||
plainProviders.add(myAppCtx.getBean(GraphQLProvider.class));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -154,4 +154,7 @@ public class TestR4Config extends BaseJavaConfigR4 {
|
|||
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
|
||||
return new PropertySourcesPlaceholderConfigurer();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class ExceptionHandlingInterceptor extends InterceptorAdapter {
|
|||
if (statusCode < 500) {
|
||||
ourLog.warn("Failure during REST processing: {}", theException.toString());
|
||||
} else {
|
||||
ourLog.warn("Failure during REST processing: {}", theException);
|
||||
ourLog.warn("Failure during REST processing", theException);
|
||||
}
|
||||
|
||||
BaseServerResponseException baseServerResponseException = (BaseServerResponseException) theException;
|
||||
|
|
|
@ -0,0 +1,238 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IExtension;
|
||||
import ca.uhn.fhir.model.api.annotation.*;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ResourceDef(name = "ResourceWithExtensionsA", id="0001")
|
||||
public class CustomDstu3ClassWithDstu2Base extends DomainResource {
|
||||
|
||||
/*
|
||||
* NB: several unit tests depend on the structure here
|
||||
* so check the unit tests immediately after any changes
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Child(name = "foo1", type = StringType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://foo/#f1", definedLocally=true, isModifier=false)
|
||||
private List<StringType> myFoo1;
|
||||
|
||||
@Child(name = "foo2", type = StringType.class, order = 1, min = 0, max = 1)
|
||||
@Extension(url = "http://foo/#f2", definedLocally=true, isModifier=true)
|
||||
private StringType myFoo2;
|
||||
|
||||
@Child(name = "bar1", type = Bar1.class, order = 2, min = 1, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1", definedLocally=true, isModifier=false)
|
||||
private List<Bar1> myBar1;
|
||||
|
||||
@Child(name = "bar2", type = Bar1.class, order = 3, min = 1, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b2", definedLocally=true, isModifier=false)
|
||||
private Bar1 myBar2;
|
||||
|
||||
@Child(name="baz", type = CodeableConcept.class, order = 4)
|
||||
@Extension(url= "http://baz/#baz", definedLocally=true, isModifier=false)
|
||||
@Description(shortDefinition = "Contains a codeable concept")
|
||||
private CodeableConcept myBaz;
|
||||
|
||||
@Child(name = "identifier", type = Identifier.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
private List<Identifier> myIdentifier;
|
||||
|
||||
public List<Bar1> getBar1() {
|
||||
return myBar1;
|
||||
}
|
||||
|
||||
public Bar1 getBar2() {
|
||||
return myBar2;
|
||||
}
|
||||
|
||||
public List<StringType> getFoo1() {
|
||||
return myFoo1;
|
||||
}
|
||||
|
||||
public StringType getFoo2() {
|
||||
return myFoo2;
|
||||
}
|
||||
|
||||
public CodeableConcept getBaz() { return myBaz; }
|
||||
|
||||
public List<Identifier> getIdentifier() {
|
||||
return myIdentifier;
|
||||
}
|
||||
|
||||
public void setBar1(List<Bar1> theBar1) {
|
||||
myBar1 = theBar1;
|
||||
}
|
||||
|
||||
public void setBar2(Bar1 theBar2) {
|
||||
myBar2 = theBar2;
|
||||
}
|
||||
|
||||
public void setFoo1(List<StringType> theFoo1) {
|
||||
myFoo1 = theFoo1;
|
||||
}
|
||||
|
||||
public void setFoo2(StringType theFoo2) {
|
||||
myFoo2 = theFoo2;
|
||||
}
|
||||
|
||||
public void setBaz(CodeableConcept myBaz) { this.myBaz = myBaz; }
|
||||
|
||||
public void setIdentifier(List<Identifier> theValue) {
|
||||
myIdentifier = theValue;
|
||||
}
|
||||
|
||||
@Block(name = "Bar1")
|
||||
public static class Bar1 extends BaseIdentifiableElement implements IExtension {
|
||||
|
||||
public Bar1() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Child(name = "bar11", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/1", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar11;
|
||||
|
||||
@Child(name = "bar12", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2", definedLocally=true, isModifier=false)
|
||||
private List<Bar2> myBar12;
|
||||
|
||||
private IdType myId;
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // not implemented
|
||||
}
|
||||
|
||||
|
||||
public List<DateType> getBar11() {
|
||||
return myBar11;
|
||||
}
|
||||
|
||||
public List<Bar2> getBar12() {
|
||||
return myBar12;
|
||||
}
|
||||
|
||||
public void setBar11(List<DateType> theBar11) {
|
||||
myBar11 = theBar11;
|
||||
}
|
||||
|
||||
public void setBar12(List<Bar2> theBar12) {
|
||||
myBar12 = theBar12;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Block(name = "Bar2")
|
||||
public static class Bar2 extends BaseIdentifiableElement implements IExtension {
|
||||
|
||||
@Child(name = "bar121", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/1", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar121;
|
||||
|
||||
@Child(name = "bar122", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/2", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar122;
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // not implemented
|
||||
}
|
||||
|
||||
|
||||
public List<DateType> getBar121() {
|
||||
return myBar121;
|
||||
}
|
||||
|
||||
public List<DateType> getBar122() {
|
||||
return myBar122;
|
||||
}
|
||||
|
||||
public void setBar121(List<DateType> theBar121) {
|
||||
myBar121 = theBar121;
|
||||
}
|
||||
|
||||
public void setBar122(List<DateType> theBar122) {
|
||||
myBar122 = theBar122;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdType getIdElement() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodeType getLanguageElement() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource setId(String theId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Meta getMeta() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource setIdElement(IdType theIdType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fhirType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void listChildren(List<Property> theResult) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainResource copy() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceType getResourceType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -3,16 +3,12 @@ package ca.uhn.fhir.context;
|
|||
import ca.uhn.fhir.rest.client.MyPatientWithExtensions;
|
||||
import ca.uhn.fhir.util.OperationOutcomeUtil;
|
||||
import ca.uhn.fhir.util.TestUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender;
|
||||
import org.hl7.fhir.dstu3.model.Patient;
|
||||
import org.hl7.fhir.dstu3.model.Reference;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
@ -148,6 +144,34 @@ public class FhirContextDstu3Test {
|
|||
assertEquals(null, genderChild.getBoundEnumType());
|
||||
}
|
||||
|
||||
/**
|
||||
* See #944
|
||||
*/
|
||||
@Test
|
||||
public void testNullPointerException() {
|
||||
Bundle bundle = new Bundle();
|
||||
MyEpisodeOfCareFHIR myEpisodeOfCare = new MyEpisodeOfCareFHIR();
|
||||
_MyReferralInformationComponent myReferralInformation = new _MyReferralInformationComponent();
|
||||
myReferralInformation._setReferralType(new Coding("someSystem", "someCode", "someDisplay"));
|
||||
myReferralInformation._setFreeChoice(new Coding("someSystem2", "someCode", "someDisplay2"));
|
||||
myReferralInformation._setReceived(new DateTimeType(createDate(2017, Calendar.JULY, 31)));
|
||||
myReferralInformation._setReferringOrganisation(new Reference().setReference("someReference").setDisplay("someDisplay3"));
|
||||
myEpisodeOfCare._setReferralInformation(myReferralInformation);
|
||||
bundle.addEntry().setResource(myEpisodeOfCare);
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
ctx.newXmlParser().encodeResourceToString(bundle);
|
||||
}
|
||||
|
||||
private static Date createDate(
|
||||
int year,
|
||||
int month,
|
||||
int day) {
|
||||
Calendar CAL = Calendar.getInstance();
|
||||
CAL.clear();
|
||||
CAL.set(year, month, day);
|
||||
return CAL.getTime();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClassClearContext() {
|
||||
TestUtil.clearAllStaticFieldsForUnitTest();
|
||||
|
|
|
@ -1,29 +1,21 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.*;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
import ca.uhn.fhir.util.TestUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class ModelScannerDstu3Test {
|
||||
|
||||
@AfterClass
|
||||
public static void afterClassClearContext() {
|
||||
TestUtil.clearAllStaticFieldsForUnitTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScanBundle() {
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
|
@ -44,7 +36,9 @@ public class ModelScannerDstu3Test {
|
|||
}
|
||||
}
|
||||
|
||||
/** This failed at one point */
|
||||
/**
|
||||
* This failed at one point
|
||||
*/
|
||||
@Test
|
||||
public void testCarePlan() throws DataFormatException {
|
||||
FhirContext.forDstu3().getResourceDefinition(CarePlan.class);
|
||||
|
@ -106,6 +100,17 @@ public class ModelScannerDstu3Test {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScanDstu3TypeWithDstu2Backend() throws DataFormatException {
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
try {
|
||||
ctx.getResourceDefinition(CustomDstu3ClassWithDstu2Base.class);
|
||||
fail();
|
||||
} catch (ConfigurationException e) {
|
||||
assertEquals("@Block class for version DSTU3 should not extend BaseIdentifiableElement: ca.uhn.fhir.context.CustomDstu3ClassWithDstu2Base$Bar1", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Re-enable this when Claim's compartment defs are cleaned up
|
||||
*/
|
||||
|
@ -130,21 +135,40 @@ public class ModelScannerDstu3Test {
|
|||
}
|
||||
}
|
||||
|
||||
@ResourceDef(name = "Patient")
|
||||
public static class CompartmentForNonReferenceParam extends Patient {
|
||||
/**
|
||||
* See #504
|
||||
*/
|
||||
@Test
|
||||
public void testBinaryMayNotHaveExtensions() {
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
try {
|
||||
ctx.getResourceDefinition(LetterTemplate.class);
|
||||
fail();
|
||||
} catch (ConfigurationException e) {
|
||||
assertEquals("Class \"class ca.uhn.fhir.context.ModelScannerDstu3Test$LetterTemplate\" is invalid. This resource type is not a DomainResource, it must not have extensions", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
class NoResourceDef extends Patient {
|
||||
@SearchParamDefinition(name = "foo", path = "Patient.telecom", type = "bar")
|
||||
public static final String SP_TELECOM = "foo";
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SearchParamDefinition(name = "foo", path = "Patient.telecom", type = "string", providesMembershipIn = { @Compartment(name = "Patient"), @Compartment(name = "Device") })
|
||||
}
|
||||
|
||||
@ResourceDef(name = "Patient")
|
||||
public static class CompartmentForNonReferenceParam extends Patient {
|
||||
@SearchParamDefinition(name = "foo", path = "Patient.telecom", type = "string", providesMembershipIn = {@Compartment(name = "Patient"), @Compartment(name = "Device")})
|
||||
public static final String SP_TELECOM = "foo";
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
||||
@ResourceDef(name = "Patient")
|
||||
public static class InvalidParamType extends Patient {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SearchParamDefinition(name = "foo", path = "Patient.telecom", type = "bar")
|
||||
public static final String SP_TELECOM = "foo";
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
||||
|
@ -204,28 +228,6 @@ public class ModelScannerDstu3Test {
|
|||
|
||||
}
|
||||
|
||||
class NoResourceDef extends Patient {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SearchParamDefinition(name = "foo", path = "Patient.telecom", type = "bar")
|
||||
public static final String SP_TELECOM = "foo";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* See #504
|
||||
*/
|
||||
@Test
|
||||
public void testBinaryMayNotHaveExtensions() {
|
||||
FhirContext ctx = FhirContext.forDstu3();
|
||||
try {
|
||||
ctx.getResourceDefinition(LetterTemplate.class);
|
||||
fail();
|
||||
} catch (ConfigurationException e) {
|
||||
assertEquals("Class \"class ca.uhn.fhir.context.ModelScannerDstu3Test$LetterTemplate\" is invalid. This resource type is not a DomainResource, it must not have extensions", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ResourceDef(name = "Binary", id = "letter-template", profile = "http://www.something.org/StructureDefinition/letter-template")
|
||||
public static class LetterTemplate extends Binary {
|
||||
|
||||
|
@ -239,13 +241,18 @@ public class ModelScannerDstu3Test {
|
|||
public LetterTemplate() {
|
||||
}
|
||||
|
||||
public void setName(StringDt name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
public StringDt getName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
public void setName(StringDt name) {
|
||||
myName = name;
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClassClearContext() {
|
||||
TestUtil.clearAllStaticFieldsForUnitTest();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,867 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ResourceDef(name = MyEpisodeOfCareFHIR.FHIR_RESOURCE_NAME, id = MyEpisodeOfCareFHIR.FHIR_PROFILE_NAME, profile = MyEpisodeOfCareFHIR.FHIR_PROFILE_URI)
|
||||
public class MyEpisodeOfCareFHIR extends EpisodeOfCare {
|
||||
|
||||
public static final String FHIR_RESOURCE_NAME = "EpisodeOfCare";
|
||||
public static final String FHIR_PROFILE_NAME = "MyEpisodeOfCare";
|
||||
public static final String FHIR_PROFILE_URI = "http://myfhir.dk/p/MyEpisodeOfCare";
|
||||
/**
|
||||
* dischargeTo (extension)
|
||||
*/
|
||||
@Child(name = FIELD_DISCHARGETO, min = 0, max = 1, type = {StringType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Discharge to")
|
||||
@Extension(url = EXTURL_DISCHARGETO, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.StringType ourDischargeTo;
|
||||
public static final String EXTURL_DISCHARGETO = "http://myfhir.dk/x/MyEpisodeOfCare-discharge-to";
|
||||
public static final String FIELD_DISCHARGETO = "dischargeTo";
|
||||
/**
|
||||
* dischargeDisposition (extension)
|
||||
*/
|
||||
@Child(name = FIELD_DISCHARGEDISPOSITION, min = 0, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Category or kind of location after discharge.")
|
||||
@Extension(url = EXTURL_DISCHARGEDISPOSITION, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourDischargeDisposition;
|
||||
public static final String EXTURL_DISCHARGEDISPOSITION = "http://myfhir.dk/x/MyEpisodeOfCare-discharge-disposition";
|
||||
public static final String FIELD_DISCHARGEDISPOSITION = "dischargeDisposition";
|
||||
/**
|
||||
* previous (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PREVIOUS, min = 0, max = 1, type = {_PreviousComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Previous reference between episode of care.")
|
||||
@Extension(url = EXTURL_PREVIOUS, definedLocally = false, isModifier = false)
|
||||
protected _PreviousComponent ourPrevious;
|
||||
public static final String EXTURL_PREVIOUS = "http://myfhir.dk/x/MyEpisodeOfCare-previous";
|
||||
public static final String FIELD_PREVIOUS = "previous";
|
||||
/**
|
||||
* referralInformation (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERRALINFORMATION, min = 1, max = 1, type = {_MyReferralInformationComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Referral information related to this episode of care.")
|
||||
@Extension(url = EXTURL_REFERRALINFORMATION, definedLocally = false, isModifier = false)
|
||||
protected _MyReferralInformationComponent ourReferralInformation;
|
||||
public static final String EXTURL_REFERRALINFORMATION = "http://myfhir.dk/x/MyEpisodeOfCare-referral-information";
|
||||
public static final String FIELD_REFERRALINFORMATION = "referralInformation";
|
||||
/**
|
||||
* eventMarker (extension)
|
||||
*/
|
||||
@Child(name = FIELD_EVENTMARKER, min = 0, max = Child.MAX_UNLIMITED, type = {_EventMarkerComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Marks specific times on an episode of care with clinical or administrative relevance.")
|
||||
@Extension(url = EXTURL_EVENTMARKER, definedLocally = false, isModifier = false)
|
||||
protected List<_EventMarkerComponent> ourEventMarker;
|
||||
public static final String EXTURL_EVENTMARKER = "http://myfhir.dk/x/MyEpisodeOfCare-event-marker";
|
||||
public static final String FIELD_EVENTMARKER = "eventMarker";
|
||||
/**
|
||||
* payor (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PAYOR, min = 0, max = Child.MAX_UNLIMITED, type = {_PayorComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Payor information for time periods")
|
||||
@Extension(url = EXTURL_PAYOR, definedLocally = false, isModifier = false)
|
||||
protected List<_PayorComponent> ourPayor;
|
||||
public static final String EXTURL_PAYOR = "http://myfhir.dk/x/MyEpisodeOfCare-payor";
|
||||
public static final String FIELD_PAYOR = "payor";
|
||||
/**
|
||||
* healthIssue (extension)
|
||||
*/
|
||||
@Child(name = FIELD_HEALTHISSUE, min = 0, max = 1, type = {Condition.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The health issue this episode of care is related to.")
|
||||
@Extension(url = EXTURL_HEALTHISSUE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourHealthIssue;
|
||||
public static final String EXTURL_HEALTHISSUE = "http://myfhir.dk/x/MyEpisodeOfCare-health-issue";
|
||||
public static final String FIELD_HEALTHISSUE = "healthIssue";
|
||||
/**
|
||||
* identifier
|
||||
*/
|
||||
@Child(name = FIELD_IDENTIFIER, min = 0, max = Child.MAX_UNLIMITED, order = Child.REPLACE_PARENT, type = {Identifier.class})
|
||||
@Description(shortDefinition = "Business Identifier(s) relevant for this EpisodeOfCare", formalDefinition = "Identifiers which the episode of care is known by.")
|
||||
protected List<org.hl7.fhir.dstu3.model.Identifier> ourIdentifier;
|
||||
public static final String FIELD_IDENTIFIER = "identifier";
|
||||
/**
|
||||
* status
|
||||
*/
|
||||
@Child(name = FIELD_STATUS, min = 1, max = 1, order = Child.REPLACE_PARENT, modifier = true, summary = true, type = {CodeType.class})
|
||||
@Description(shortDefinition = "planned | waitlist | active | onhold | finished | cancelled | entered-in-error", formalDefinition = "Status of the episode of care.")
|
||||
protected org.hl7.fhir.dstu3.model.Enumeration<EpisodeOfCareStatus> ourStatus;
|
||||
public static final String FIELD_STATUS = "status";
|
||||
/**
|
||||
* patient
|
||||
*/
|
||||
@Child(name = FIELD_PATIENT, min = 1, max = 1, order = Child.REPLACE_PARENT, summary = true, type = {Patient.class})
|
||||
@Description(shortDefinition = "The patient who is the focus of this episode of care", formalDefinition = "The patient who is the subject of this episode of care.")
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourPatient;
|
||||
public static final String FIELD_PATIENT = "patient";
|
||||
/**
|
||||
* managingOrganization
|
||||
*/
|
||||
@Child(name = FIELD_MANAGINGORGANIZATION, min = 0, max = 1, order = Child.REPLACE_PARENT, summary = true, type = {Organization.class})
|
||||
@Description(shortDefinition = "Organization that assumes care", formalDefinition = "The organization that assumes care.")
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourManagingOrganization;
|
||||
public static final String FIELD_MANAGINGORGANIZATION = "managingOrganization";
|
||||
/**
|
||||
* period
|
||||
*/
|
||||
@Child(name = FIELD_PERIOD, min = 1, max = 1, order = Child.REPLACE_PARENT, summary = true, type = {Period.class})
|
||||
@Description(shortDefinition = "Interval during responsibility is assumed", formalDefinition = "The start and end time of the episode of care.")
|
||||
protected Period ourPeriod;
|
||||
public static final String FIELD_PERIOD = "period";
|
||||
/**
|
||||
* careManager
|
||||
*/
|
||||
@Child(name = FIELD_CAREMANAGER, min = 0, max = 1, order = Child.REPLACE_PARENT, type = {Practitioner.class})
|
||||
@Description(shortDefinition = "Care manager/care co-ordinator for the patient", formalDefinition = "Care manager")
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourCareManager;
|
||||
public static final String FIELD_CAREMANAGER = "careManager";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "statusHistory", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourStatusHistory;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "type", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourType;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "diagnosis", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourDiagnosis;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "referralRequest", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourReferralRequest;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "team", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourTeam;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Child(name = "account", min = 0, max = 0, order = Child.REPLACE_PARENT)
|
||||
@Deprecated
|
||||
protected ca.uhn.fhir.model.api.IElement ourAccount;
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourDischargeTo, ourDischargeDisposition, ourPrevious, ourReferralInformation, ourEventMarker, ourPayor, ourHealthIssue, ourIdentifier, ourStatus, ourPatient, ourManagingOrganization, ourPeriod, ourCareManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyEpisodeOfCareFHIR copy() {
|
||||
MyEpisodeOfCareFHIR dst = new MyEpisodeOfCareFHIR();
|
||||
copyValues(dst);
|
||||
dst.ourDischargeTo = ourDischargeTo == null ? null : ourDischargeTo.copy();
|
||||
dst.ourDischargeDisposition = ourDischargeDisposition == null ? null : ourDischargeDisposition.copy();
|
||||
dst.ourPrevious = ourPrevious == null ? null : ourPrevious.copy();
|
||||
dst.ourReferralInformation = ourReferralInformation == null ? null : ourReferralInformation.copy();
|
||||
if (ourEventMarker != null) {
|
||||
dst.ourEventMarker = new ArrayList<_EventMarkerComponent>();
|
||||
for (_EventMarkerComponent i : ourEventMarker) {
|
||||
dst.ourEventMarker.add(i.copy());
|
||||
}
|
||||
}
|
||||
if (ourPayor != null) {
|
||||
dst.ourPayor = new ArrayList<_PayorComponent>();
|
||||
for (_PayorComponent i : ourPayor) {
|
||||
dst.ourPayor.add(i.copy());
|
||||
}
|
||||
}
|
||||
dst.ourHealthIssue = ourHealthIssue == null ? null : ourHealthIssue.copy();
|
||||
if (ourIdentifier != null) {
|
||||
dst.ourIdentifier = new ArrayList<org.hl7.fhir.dstu3.model.Identifier>();
|
||||
for (org.hl7.fhir.dstu3.model.Identifier i : ourIdentifier) {
|
||||
dst.ourIdentifier.add(i.copy());
|
||||
}
|
||||
}
|
||||
dst.ourStatus = ourStatus == null ? null : ourStatus.copy();
|
||||
dst.ourPatient = ourPatient == null ? null : ourPatient.copy();
|
||||
dst.ourManagingOrganization = ourManagingOrganization == null ? null : ourManagingOrganization.copy();
|
||||
dst.ourPeriod = ourPeriod == null ? null : ourPeriod.copy();
|
||||
dst.ourCareManager = ourCareManager == null ? null : ourCareManager.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof MyEpisodeOfCareFHIR)) {
|
||||
return false;
|
||||
}
|
||||
MyEpisodeOfCareFHIR that = (MyEpisodeOfCareFHIR) other;
|
||||
return compareDeep(ourDischargeTo, that.ourDischargeTo, true) && compareDeep(ourDischargeDisposition, that.ourDischargeDisposition, true) && compareDeep(ourPrevious, that.ourPrevious, true) && compareDeep(ourReferralInformation, that.ourReferralInformation, true)
|
||||
&& compareDeep(ourEventMarker, that.ourEventMarker, true) && compareDeep(ourPayor, that.ourPayor, true) && compareDeep(ourHealthIssue, that.ourHealthIssue, true) && compareDeep(ourIdentifier, that.ourIdentifier, true) && compareDeep(ourStatus, that.ourStatus, true)
|
||||
&& compareDeep(ourPatient, that.ourPatient, true) && compareDeep(ourManagingOrganization, that.ourManagingOrganization, true) && compareDeep(ourPeriod, that.ourPeriod, true) && compareDeep(ourCareManager, that.ourCareManager, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof MyEpisodeOfCareFHIR)) {
|
||||
return false;
|
||||
}
|
||||
MyEpisodeOfCareFHIR that = (MyEpisodeOfCareFHIR) other;
|
||||
return compareValues(ourDischargeTo, that.ourDischargeTo, true) && compareValues(ourStatus, that.ourStatus, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.StringType _getDischargeTo() {
|
||||
if (ourDischargeTo == null)
|
||||
ourDischargeTo = new org.hl7.fhir.dstu3.model.StringType();
|
||||
return ourDischargeTo;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setDischargeTo(org.hl7.fhir.dstu3.model.StringType theValue) {
|
||||
ourDischargeTo = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getDischargeDisposition() {
|
||||
if (ourDischargeDisposition == null)
|
||||
ourDischargeDisposition = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourDischargeDisposition;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setDischargeDisposition(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourDischargeDisposition = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public _PreviousComponent _getPrevious() {
|
||||
if (ourPrevious == null)
|
||||
ourPrevious = new _PreviousComponent();
|
||||
return ourPrevious;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setPrevious(_PreviousComponent theValue) {
|
||||
ourPrevious = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _getReferralInformation() {
|
||||
if (ourReferralInformation == null)
|
||||
ourReferralInformation = new _MyReferralInformationComponent();
|
||||
return ourReferralInformation;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setReferralInformation(_MyReferralInformationComponent theValue) {
|
||||
ourReferralInformation = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<_EventMarkerComponent> _getEventMarker() {
|
||||
if (ourEventMarker == null)
|
||||
ourEventMarker = new ArrayList<>();
|
||||
return ourEventMarker;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setEventMarker(List<_EventMarkerComponent> theValue) {
|
||||
ourEventMarker = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<_PayorComponent> _getPayor() {
|
||||
if (ourPayor == null)
|
||||
ourPayor = new ArrayList<>();
|
||||
return ourPayor;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setPayor(List<_PayorComponent> theValue) {
|
||||
ourPayor = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getHealthIssue() {
|
||||
if (ourHealthIssue == null)
|
||||
ourHealthIssue = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourHealthIssue;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setHealthIssue(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourHealthIssue = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<org.hl7.fhir.dstu3.model.Identifier> _getIdentifier() {
|
||||
if (ourIdentifier == null)
|
||||
ourIdentifier = new ArrayList<>();
|
||||
return ourIdentifier;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setIdentifier(List<org.hl7.fhir.dstu3.model.Identifier> theValue) {
|
||||
ourIdentifier = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Enumeration<EpisodeOfCareStatus> _getStatus() {
|
||||
if (ourStatus == null)
|
||||
ourStatus = new org.hl7.fhir.dstu3.model.Enumeration<EpisodeOfCareStatus>(new EpisodeOfCareStatusEnumFactory());
|
||||
return ourStatus;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setStatus(org.hl7.fhir.dstu3.model.Enumeration<EpisodeOfCareStatus> theValue) {
|
||||
ourStatus = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getPatient() {
|
||||
if (ourPatient == null)
|
||||
ourPatient = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourPatient;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setPatient(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourPatient = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getManagingOrganization() {
|
||||
if (ourManagingOrganization == null)
|
||||
ourManagingOrganization = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourManagingOrganization;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setManagingOrganization(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourManagingOrganization = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Period _getPeriod() {
|
||||
if (ourPeriod == null)
|
||||
ourPeriod = new Period();
|
||||
return ourPeriod;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setPeriod(Period theValue) {
|
||||
ourPeriod = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getCareManager() {
|
||||
if (ourCareManager == null)
|
||||
ourCareManager = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourCareManager;
|
||||
}
|
||||
|
||||
public MyEpisodeOfCareFHIR _setCareManager(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourCareManager = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void listChildren(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasAccount() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasCareManager() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasDiagnosis() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasIdentifier() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasManagingOrganization() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasPatient() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasPeriod() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasReferralRequest() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasStatus() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasStatusElement() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasStatusHistory() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasTeam() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasType() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String fhirType() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTypesForProperty(int p0, String p1) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getAccount() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getAccountTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getDiagnosis() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getIdentifier() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getReferralRequest() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getReferralRequestTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getStatusHistory() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getTeam() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getTeamTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public List getType() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Account addAccountTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Base addChild(String p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Base makeProperty(int p0, String p1) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Base setProperty(int p0, String p1, Base p2) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Base setProperty(String p0, Base p1) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Base[] getProperty(int p0, String p1, boolean p2) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public CareTeam addTeamTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public CodeableConcept addType() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public CodeableConcept getTypeFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Enumeration getStatusElement() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addAccount(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addDiagnosis(DiagnosisComponent p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addIdentifier(Identifier p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addReferralRequest(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addStatusHistory(EpisodeOfCareStatusHistoryComponent p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addTeam(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare addType(CodeableConcept p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setAccount(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setCareManager(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setCareManagerTarget(Practitioner p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setDiagnosis(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setIdentifier(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setManagingOrganization(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setManagingOrganizationTarget(Organization p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setPatient(Reference p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setPatientTarget(Patient p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setPeriod(Period p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setReferralRequest(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setStatus(EpisodeOfCareStatus p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setStatusElement(Enumeration p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setStatusHistory(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setTeam(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCare setType(List p0) {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public DiagnosisComponent addDiagnosis() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public DiagnosisComponent getDiagnosisFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCareStatus getStatus() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCareStatusHistoryComponent addStatusHistory() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public EpisodeOfCareStatusHistoryComponent getStatusHistoryFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Identifier addIdentifier() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Identifier getIdentifierFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Organization getManagingOrganizationTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Patient getPatientTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Period getPeriod() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Practitioner getCareManagerTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference addAccount() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference addReferralRequest() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference addTeam() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getAccountFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getCareManager() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getManagingOrganization() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getPatient() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getReferralRequestFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Reference getTeamFirstRep() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ReferralRequest addReferralRequestTarget() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ResourceType getResourceType() {
|
||||
throw new UnsupportedOperationException("Deprecated method");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MyEpisodeOfCareFHIR typedCopy() {
|
||||
return copy();
|
||||
}
|
||||
}
|
|
@ -1,19 +1,12 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.*;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
|
||||
import ca.uhn.fhir.model.api.IElement;
|
||||
import ca.uhn.fhir.model.api.IExtension;
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef;
|
||||
|
||||
@ResourceDef(name = "ResourceWithExtensionsA", id="0001")
|
||||
@ResourceDef(name = "ResourceWithExtensionsA", id = "0001")
|
||||
public class ResourceWithExtensionsDstu3A extends DomainResource {
|
||||
|
||||
/*
|
||||
|
@ -24,23 +17,23 @@ public class ResourceWithExtensionsDstu3A extends DomainResource {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Child(name = "foo1", type = StringType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://foo/#f1", definedLocally=true, isModifier=false)
|
||||
@Extension(url = "http://foo/#f1", definedLocally = true, isModifier = false)
|
||||
private List<StringType> myFoo1;
|
||||
|
||||
@Child(name = "foo2", type = StringType.class, order = 1, min = 0, max = 1)
|
||||
@Extension(url = "http://foo/#f2", definedLocally=true, isModifier=true)
|
||||
@Extension(url = "http://foo/#f2", definedLocally = true, isModifier = true)
|
||||
private StringType myFoo2;
|
||||
|
||||
@Child(name = "bar1", type = Bar1.class, order = 2, min = 1, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1", definedLocally=true, isModifier=false)
|
||||
@Extension(url = "http://bar/#b1", definedLocally = true, isModifier = false)
|
||||
private List<Bar1> myBar1;
|
||||
|
||||
@Child(name = "bar2", type = Bar1.class, order = 3, min = 1, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b2", definedLocally=true, isModifier=false)
|
||||
@Extension(url = "http://bar/#b2", definedLocally = true, isModifier = false)
|
||||
private Bar1 myBar2;
|
||||
|
||||
@Child(name="baz", type = CodeableConcept.class, order = 4)
|
||||
@Extension(url= "http://baz/#baz", definedLocally=true, isModifier=false)
|
||||
@Child(name = "baz", type = CodeableConcept.class, order = 4)
|
||||
@Extension(url = "http://baz/#baz", definedLocally = true, isModifier = false)
|
||||
@Description(shortDefinition = "Contains a codeable concept")
|
||||
private CodeableConcept myBaz;
|
||||
|
||||
|
@ -51,143 +44,55 @@ public class ResourceWithExtensionsDstu3A extends DomainResource {
|
|||
return myBar1;
|
||||
}
|
||||
|
||||
public Bar1 getBar2() {
|
||||
return myBar2;
|
||||
}
|
||||
|
||||
public List<StringType> getFoo1() {
|
||||
return myFoo1;
|
||||
}
|
||||
|
||||
public StringType getFoo2() {
|
||||
return myFoo2;
|
||||
}
|
||||
|
||||
public CodeableConcept getBaz() { return myBaz; }
|
||||
|
||||
public List<Identifier> getIdentifier() {
|
||||
return myIdentifier;
|
||||
}
|
||||
|
||||
public void setBar1(List<Bar1> theBar1) {
|
||||
myBar1 = theBar1;
|
||||
}
|
||||
|
||||
public Bar1 getBar2() {
|
||||
return myBar2;
|
||||
}
|
||||
|
||||
public void setBar2(Bar1 theBar2) {
|
||||
myBar2 = theBar2;
|
||||
}
|
||||
|
||||
public List<StringType> getFoo1() {
|
||||
return myFoo1;
|
||||
}
|
||||
|
||||
public void setFoo1(List<StringType> theFoo1) {
|
||||
myFoo1 = theFoo1;
|
||||
}
|
||||
|
||||
public StringType getFoo2() {
|
||||
return myFoo2;
|
||||
}
|
||||
|
||||
public void setFoo2(StringType theFoo2) {
|
||||
myFoo2 = theFoo2;
|
||||
}
|
||||
|
||||
public void setBaz(CodeableConcept myBaz) { this.myBaz = myBaz; }
|
||||
public CodeableConcept getBaz() {
|
||||
return myBaz;
|
||||
}
|
||||
|
||||
public void setBaz(CodeableConcept myBaz) {
|
||||
this.myBaz = myBaz;
|
||||
}
|
||||
|
||||
public List<Identifier> getIdentifier() {
|
||||
return myIdentifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(List<Identifier> theValue) {
|
||||
myIdentifier = theValue;
|
||||
}
|
||||
|
||||
@Block(name = "Bar1")
|
||||
public static class Bar1 extends BaseIdentifiableElement implements IExtension {
|
||||
|
||||
public Bar1() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Child(name = "bar11", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/1", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar11;
|
||||
|
||||
@Child(name = "bar12", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2", definedLocally=true, isModifier=false)
|
||||
private List<Bar2> myBar12;
|
||||
|
||||
private IdType myId;
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // not implemented
|
||||
}
|
||||
|
||||
|
||||
public List<DateType> getBar11() {
|
||||
return myBar11;
|
||||
}
|
||||
|
||||
public List<Bar2> getBar12() {
|
||||
return myBar12;
|
||||
}
|
||||
|
||||
public void setBar11(List<DateType> theBar11) {
|
||||
myBar11 = theBar11;
|
||||
}
|
||||
|
||||
public void setBar12(List<Bar2> theBar12) {
|
||||
myBar12 = theBar12;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Block(name = "Bar2")
|
||||
public static class Bar2 extends BaseIdentifiableElement implements IExtension {
|
||||
|
||||
@Child(name = "bar121", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/1", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar121;
|
||||
|
||||
@Child(name = "bar122", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/2", definedLocally=true, isModifier=false)
|
||||
private List<DateType> myBar122;
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType ); // not implemented
|
||||
}
|
||||
|
||||
|
||||
public List<DateType> getBar121() {
|
||||
return myBar121;
|
||||
}
|
||||
|
||||
public List<DateType> getBar122() {
|
||||
return myBar122;
|
||||
}
|
||||
|
||||
public void setBar121(List<DateType> theBar121) {
|
||||
myBar121 = theBar121;
|
||||
}
|
||||
|
||||
public void setBar122(List<DateType> theBar122) {
|
||||
myBar122 = theBar122;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
|
@ -238,5 +143,90 @@ public class ResourceWithExtensionsDstu3A extends DomainResource {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Block(name = "Bar1")
|
||||
public static class Bar1 extends BackboneElement {
|
||||
|
||||
@Child(name = "bar11", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/1", definedLocally = true, isModifier = false)
|
||||
private List<DateType> myBar11;
|
||||
@Child(name = "bar12", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2", definedLocally = true, isModifier = false)
|
||||
private List<Bar2> myBar12;
|
||||
private IdType myId;
|
||||
|
||||
public Bar1() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BackboneElement copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
public List<DateType> getBar11() {
|
||||
return myBar11;
|
||||
}
|
||||
|
||||
public void setBar11(List<DateType> theBar11) {
|
||||
myBar11 = theBar11;
|
||||
}
|
||||
|
||||
public List<Bar2> getBar12() {
|
||||
return myBar12;
|
||||
}
|
||||
|
||||
public void setBar12(List<Bar2> theBar12) {
|
||||
myBar12 = theBar12;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Block(name = "Bar2")
|
||||
public static class Bar2 extends BackboneElement {
|
||||
|
||||
@Child(name = "bar121", type = DateType.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/1", definedLocally = true, isModifier = false)
|
||||
private List<DateType> myBar121;
|
||||
|
||||
@Child(name = "bar122", type = DateType.class, order = 1, min = 0, max = Child.MAX_UNLIMITED)
|
||||
@Extension(url = "http://bar/#b1/2/2", definedLocally = true, isModifier = false)
|
||||
private List<DateType> myBar122;
|
||||
|
||||
@Override
|
||||
public BackboneElement copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false; // not implemented
|
||||
}
|
||||
|
||||
|
||||
public List<DateType> getBar121() {
|
||||
return myBar121;
|
||||
}
|
||||
|
||||
public void setBar121(List<DateType> theBar121) {
|
||||
myBar121 = theBar121;
|
||||
}
|
||||
|
||||
public List<DateType> getBar122() {
|
||||
return myBar122;
|
||||
}
|
||||
|
||||
public void setBar122(List<DateType> theBar122) {
|
||||
myBar122 = theBar122;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.BackboneElement;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.Coding;
|
||||
import org.hl7.fhir.dstu3.model.DateTimeType;
|
||||
|
||||
@Block
|
||||
public class _EventMarkerComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* eventType (extension)
|
||||
*/
|
||||
@Child(name = FIELD_EVENTTYPE, min = 1, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The type of event marker on an episode of care.")
|
||||
@Extension(url = EXTURL_EVENTTYPE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourEventType;
|
||||
public static final String EXTURL_EVENTTYPE = "http://myfhir.dk/x/MyEpisodeOfCare-event-marker/eventType";
|
||||
public static final String FIELD_EVENTTYPE = "eventType";
|
||||
/**
|
||||
* eventTimestamp (extension)
|
||||
*/
|
||||
@Child(name = FIELD_EVENTTIMESTAMP, min = 1, max = 1, type = {DateTimeType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Time in which the event marker was created.")
|
||||
@Extension(url = EXTURL_EVENTTIMESTAMP, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.DateTimeType ourEventTimestamp;
|
||||
public static final String EXTURL_EVENTTIMESTAMP = "http://myfhir.dk/x/MyEpisodeOfCare-event-marker/eventTimestamp";
|
||||
public static final String FIELD_EVENTTIMESTAMP = "eventTimestamp";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourEventType, ourEventTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _EventMarkerComponent copy() {
|
||||
_EventMarkerComponent dst = new _EventMarkerComponent();
|
||||
copyValues(dst);
|
||||
dst.ourEventType = ourEventType == null ? null : ourEventType.copy();
|
||||
dst.ourEventTimestamp = ourEventTimestamp == null ? null : ourEventTimestamp.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _EventMarkerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_EventMarkerComponent that = (_EventMarkerComponent) other;
|
||||
return compareDeep(ourEventType, that.ourEventType, true) && compareDeep(ourEventTimestamp, that.ourEventTimestamp, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _EventMarkerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_EventMarkerComponent that = (_EventMarkerComponent) other;
|
||||
return compareValues(ourEventTimestamp, that.ourEventTimestamp, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getEventType() {
|
||||
if (ourEventType == null)
|
||||
ourEventType = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourEventType;
|
||||
}
|
||||
|
||||
public _EventMarkerComponent _setEventType(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourEventType = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.DateTimeType _getEventTimestamp() {
|
||||
if (ourEventTimestamp == null)
|
||||
ourEventTimestamp = new org.hl7.fhir.dstu3.model.DateTimeType();
|
||||
return ourEventTimestamp;
|
||||
}
|
||||
|
||||
public _EventMarkerComponent _setEventTimestamp(org.hl7.fhir.dstu3.model.DateTimeType theValue) {
|
||||
ourEventTimestamp = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
@Block
|
||||
public class _MyReferralInformationComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* referralType (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERRALTYPE, min = 1, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Referral type in referral info.")
|
||||
@Extension(url = EXTURL_REFERRALTYPE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourReferralType;
|
||||
public static final String EXTURL_REFERRALTYPE = "http://myfhir.dk/x/MyReferralInformation/referralType";
|
||||
public static final String FIELD_REFERRALTYPE = "referralType";
|
||||
/**
|
||||
* referringOrganisation (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERRINGORGANISATION, min = 0, max = 1, type = {Organization.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The organization which the referral originates from.")
|
||||
@Extension(url = EXTURL_REFERRINGORGANISATION, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourReferringOrganisation;
|
||||
public static final String EXTURL_REFERRINGORGANISATION = "http://myfhir.dk/x/MyReferralInformation/referringOrganisation";
|
||||
public static final String FIELD_REFERRINGORGANISATION = "referringOrganisation";
|
||||
/**
|
||||
* freeChoice (extension)
|
||||
*/
|
||||
@Child(name = FIELD_FREECHOICE, min = 1, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Type of free choice in relation to the referral decision.")
|
||||
@Extension(url = EXTURL_FREECHOICE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourFreeChoice;
|
||||
public static final String EXTURL_FREECHOICE = "http://myfhir.dk/x/MyReferralInformation/freeChoice";
|
||||
public static final String FIELD_FREECHOICE = "freeChoice";
|
||||
/**
|
||||
* received (extension)
|
||||
*/
|
||||
@Child(name = FIELD_RECEIVED, min = 1, max = 1, type = {DateTimeType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Time in which the referral was received.")
|
||||
@Extension(url = EXTURL_RECEIVED, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.DateTimeType ourReceived;
|
||||
public static final String EXTURL_RECEIVED = "http://myfhir.dk/x/MyReferralInformation/received";
|
||||
public static final String FIELD_RECEIVED = "received";
|
||||
/**
|
||||
* referrer (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERRER, min = 0, max = 1, type = {_MyReferrerComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Referring organization, doctor or other.")
|
||||
@Extension(url = EXTURL_REFERRER, definedLocally = false, isModifier = false)
|
||||
protected _MyReferrerComponent ourReferrer;
|
||||
public static final String EXTURL_REFERRER = "http://myfhir.dk/x/MyReferralInformation-referrer";
|
||||
public static final String FIELD_REFERRER = "referrer";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourReferralType, ourReferringOrganisation, ourFreeChoice, ourReceived, ourReferrer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _MyReferralInformationComponent copy() {
|
||||
_MyReferralInformationComponent dst = new _MyReferralInformationComponent();
|
||||
copyValues(dst);
|
||||
dst.ourReferralType = ourReferralType == null ? null : ourReferralType.copy();
|
||||
dst.ourReferringOrganisation = ourReferringOrganisation == null ? null : ourReferringOrganisation.copy();
|
||||
dst.ourFreeChoice = ourFreeChoice == null ? null : ourFreeChoice.copy();
|
||||
dst.ourReceived = ourReceived == null ? null : ourReceived.copy();
|
||||
dst.ourReferrer = ourReferrer == null ? null : ourReferrer.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _MyReferralInformationComponent)) {
|
||||
return false;
|
||||
}
|
||||
_MyReferralInformationComponent that = (_MyReferralInformationComponent) other;
|
||||
return compareDeep(ourReferralType, that.ourReferralType, true) && compareDeep(ourReferringOrganisation, that.ourReferringOrganisation, true) && compareDeep(ourFreeChoice, that.ourFreeChoice, true) && compareDeep(ourReceived, that.ourReceived, true)
|
||||
&& compareDeep(ourReferrer, that.ourReferrer, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _MyReferralInformationComponent)) {
|
||||
return false;
|
||||
}
|
||||
_MyReferralInformationComponent that = (_MyReferralInformationComponent) other;
|
||||
return compareValues(ourReceived, that.ourReceived, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getReferralType() {
|
||||
if (ourReferralType == null)
|
||||
ourReferralType = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourReferralType;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _setReferralType(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourReferralType = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getReferringOrganisation() {
|
||||
if (ourReferringOrganisation == null)
|
||||
ourReferringOrganisation = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourReferringOrganisation;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _setReferringOrganisation(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourReferringOrganisation = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getFreeChoice() {
|
||||
if (ourFreeChoice == null)
|
||||
ourFreeChoice = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourFreeChoice;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _setFreeChoice(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourFreeChoice = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.DateTimeType _getReceived() {
|
||||
if (ourReceived == null)
|
||||
ourReceived = new org.hl7.fhir.dstu3.model.DateTimeType();
|
||||
return ourReceived;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _setReceived(org.hl7.fhir.dstu3.model.DateTimeType theValue) {
|
||||
ourReceived = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public _MyReferrerComponent _getReferrer() {
|
||||
if (ourReferrer == null)
|
||||
ourReferrer = new _MyReferrerComponent();
|
||||
return ourReferrer;
|
||||
}
|
||||
|
||||
public _MyReferralInformationComponent _setReferrer(_MyReferrerComponent theValue) {
|
||||
ourReferrer = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
@Block
|
||||
public class _MyReferrerComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* referrerType (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERRERTYPE, min = 1, max = 1, type = {StringType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Type of the selected referrer")
|
||||
@Extension(url = EXTURL_REFERRERTYPE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.StringType ourReferrerType;
|
||||
public static final String EXTURL_REFERRERTYPE = "http://myfhir.dk/x/MyReferrer/referrerType";
|
||||
public static final String FIELD_REFERRERTYPE = "referrerType";
|
||||
/**
|
||||
* hospitalReferrer (extension)
|
||||
*/
|
||||
@Child(name = FIELD_HOSPITALREFERRER, min = 0, max = 1, type = {CodeType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Hospital department reference.")
|
||||
@Extension(url = EXTURL_HOSPITALREFERRER, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.CodeType ourHospitalReferrer;
|
||||
public static final String EXTURL_HOSPITALREFERRER = "http://myfhir.dk/x/MyReferrer/hospitalReferrer";
|
||||
public static final String FIELD_HOSPITALREFERRER = "hospitalReferrer";
|
||||
/**
|
||||
* doctorReferrer (extension)
|
||||
*/
|
||||
@Child(name = FIELD_DOCTORREFERRER, min = 0, max = 1, type = {Practitioner.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Reference to a medical practitioner or a specialist doctor.")
|
||||
@Extension(url = EXTURL_DOCTORREFERRER, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Reference ourDoctorReferrer;
|
||||
public static final String EXTURL_DOCTORREFERRER = "http://myfhir.dk/x/MyReferrer/doctorReferrer";
|
||||
public static final String FIELD_DOCTORREFERRER = "doctorReferrer";
|
||||
/**
|
||||
* otherReferrer (extension)
|
||||
*/
|
||||
@Child(name = FIELD_OTHERREFERRER, min = 0, max = 1, type = {_OtherReferrerComponent.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Name, address and phone number of the referrer.")
|
||||
@Extension(url = EXTURL_OTHERREFERRER, definedLocally = false, isModifier = false)
|
||||
protected _OtherReferrerComponent ourOtherReferrer;
|
||||
public static final String EXTURL_OTHERREFERRER = "http://myfhir.dk/x/MyReferrer/otherReferrer";
|
||||
public static final String FIELD_OTHERREFERRER = "otherReferrer";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourReferrerType, ourHospitalReferrer, ourDoctorReferrer, ourOtherReferrer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _MyReferrerComponent copy() {
|
||||
_MyReferrerComponent dst = new _MyReferrerComponent();
|
||||
copyValues(dst);
|
||||
dst.ourReferrerType = ourReferrerType == null ? null : ourReferrerType.copy();
|
||||
dst.ourHospitalReferrer = ourHospitalReferrer == null ? null : ourHospitalReferrer.copy();
|
||||
dst.ourDoctorReferrer = ourDoctorReferrer == null ? null : ourDoctorReferrer.copy();
|
||||
dst.ourOtherReferrer = ourOtherReferrer == null ? null : ourOtherReferrer.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _MyReferrerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_MyReferrerComponent that = (_MyReferrerComponent) other;
|
||||
return compareDeep(ourReferrerType, that.ourReferrerType, true) && compareDeep(ourHospitalReferrer, that.ourHospitalReferrer, true) && compareDeep(ourDoctorReferrer, that.ourDoctorReferrer, true) && compareDeep(ourOtherReferrer, that.ourOtherReferrer, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _MyReferrerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_MyReferrerComponent that = (_MyReferrerComponent) other;
|
||||
return compareValues(ourReferrerType, that.ourReferrerType, true) && compareValues(ourHospitalReferrer, that.ourHospitalReferrer, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.StringType _getReferrerType() {
|
||||
if (ourReferrerType == null)
|
||||
ourReferrerType = new org.hl7.fhir.dstu3.model.StringType();
|
||||
return ourReferrerType;
|
||||
}
|
||||
|
||||
public _MyReferrerComponent _setReferrerType(org.hl7.fhir.dstu3.model.StringType theValue) {
|
||||
ourReferrerType = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.CodeType _getHospitalReferrer() {
|
||||
if (ourHospitalReferrer == null)
|
||||
ourHospitalReferrer = new org.hl7.fhir.dstu3.model.CodeType();
|
||||
return ourHospitalReferrer;
|
||||
}
|
||||
|
||||
public _MyReferrerComponent _setHospitalReferrer(org.hl7.fhir.dstu3.model.CodeType theValue) {
|
||||
ourHospitalReferrer = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Reference _getDoctorReferrer() {
|
||||
if (ourDoctorReferrer == null)
|
||||
ourDoctorReferrer = new org.hl7.fhir.dstu3.model.Reference();
|
||||
return ourDoctorReferrer;
|
||||
}
|
||||
|
||||
public _MyReferrerComponent _setDoctorReferrer(org.hl7.fhir.dstu3.model.Reference theValue) {
|
||||
ourDoctorReferrer = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public _OtherReferrerComponent _getOtherReferrer() {
|
||||
if (ourOtherReferrer == null)
|
||||
ourOtherReferrer = new _OtherReferrerComponent();
|
||||
return ourOtherReferrer;
|
||||
}
|
||||
|
||||
public _MyReferrerComponent _setOtherReferrer(_OtherReferrerComponent theValue) {
|
||||
ourOtherReferrer = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.Address;
|
||||
import org.hl7.fhir.dstu3.model.BackboneElement;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.StringType;
|
||||
|
||||
@Block
|
||||
public class _OtherReferrerComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* name (extension)
|
||||
*/
|
||||
@Child(name = FIELD_NAME, min = 0, max = 1, type = {StringType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Name of the referrer")
|
||||
@Extension(url = EXTURL_NAME, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.StringType ourName;
|
||||
public static final String EXTURL_NAME = "http://myfhir.dk/x/MyReferrer/otherReferrer/name";
|
||||
public static final String FIELD_NAME = "name";
|
||||
/**
|
||||
* address (extension)
|
||||
*/
|
||||
@Child(name = FIELD_ADDRESS, min = 0, max = 1, type = {Address.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Address of the referrer")
|
||||
@Extension(url = EXTURL_ADDRESS, definedLocally = false, isModifier = false)
|
||||
protected Address ourAddress;
|
||||
public static final String EXTURL_ADDRESS = "http://myfhir.dk/x/MyReferrer/otherReferrer/address";
|
||||
public static final String FIELD_ADDRESS = "address";
|
||||
/**
|
||||
* phoneNumber (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PHONENUMBER, min = 0, max = 1, type = {StringType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Phone number of the referrer")
|
||||
@Extension(url = EXTURL_PHONENUMBER, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.StringType ourPhoneNumber;
|
||||
public static final String EXTURL_PHONENUMBER = "http://myfhir.dk/x/MyReferrer/otherReferrer/phoneNumber";
|
||||
public static final String FIELD_PHONENUMBER = "phoneNumber";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourName, ourAddress, ourPhoneNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _OtherReferrerComponent copy() {
|
||||
_OtherReferrerComponent dst = new _OtherReferrerComponent();
|
||||
copyValues(dst);
|
||||
dst.ourName = ourName == null ? null : ourName.copy();
|
||||
dst.ourAddress = ourAddress == null ? null : ourAddress.copy();
|
||||
dst.ourPhoneNumber = ourPhoneNumber == null ? null : ourPhoneNumber.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _OtherReferrerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_OtherReferrerComponent that = (_OtherReferrerComponent) other;
|
||||
return compareDeep(ourName, that.ourName, true) && compareDeep(ourAddress, that.ourAddress, true) && compareDeep(ourPhoneNumber, that.ourPhoneNumber, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _OtherReferrerComponent)) {
|
||||
return false;
|
||||
}
|
||||
_OtherReferrerComponent that = (_OtherReferrerComponent) other;
|
||||
return compareValues(ourName, that.ourName, true) && compareValues(ourPhoneNumber, that.ourPhoneNumber, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.StringType _getName() {
|
||||
if (ourName == null)
|
||||
ourName = new org.hl7.fhir.dstu3.model.StringType();
|
||||
return ourName;
|
||||
}
|
||||
|
||||
public _OtherReferrerComponent _setName(org.hl7.fhir.dstu3.model.StringType theValue) {
|
||||
ourName = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Address _getAddress() {
|
||||
if (ourAddress == null)
|
||||
ourAddress = new Address();
|
||||
return ourAddress;
|
||||
}
|
||||
|
||||
public _OtherReferrerComponent _setAddress(Address theValue) {
|
||||
ourAddress = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.StringType _getPhoneNumber() {
|
||||
if (ourPhoneNumber == null)
|
||||
ourPhoneNumber = new org.hl7.fhir.dstu3.model.StringType();
|
||||
return ourPhoneNumber;
|
||||
}
|
||||
|
||||
public _OtherReferrerComponent _setPhoneNumber(org.hl7.fhir.dstu3.model.StringType theValue) {
|
||||
ourPhoneNumber = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
|
||||
@Block
|
||||
public class _PayorComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* payorCode (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PAYORCODE, min = 1, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The payor code for the duration")
|
||||
@Extension(url = EXTURL_PAYORCODE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourPayorCode;
|
||||
public static final String EXTURL_PAYORCODE = "http://myfhir.dk/x/MyEpisodeOfCare-payor/payorCode";
|
||||
public static final String FIELD_PAYORCODE = "payorCode";
|
||||
/**
|
||||
* period (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PERIOD, min = 1, max = 1, type = {Period.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The duration for the responsible payor.")
|
||||
@Extension(url = EXTURL_PERIOD, definedLocally = false, isModifier = false)
|
||||
protected Period ourPeriod;
|
||||
public static final String EXTURL_PERIOD = "http://myfhir.dk/x/MyEpisodeOfCare-payor/period";
|
||||
public static final String FIELD_PERIOD = "period";
|
||||
/**
|
||||
* userDefined (extension)
|
||||
*/
|
||||
@Child(name = FIELD_USERDEFINED, min = 1, max = 1, type = {BooleanType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "True if the payor information is defined by a user.")
|
||||
@Extension(url = EXTURL_USERDEFINED, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.BooleanType ourUserDefined;
|
||||
public static final String EXTURL_USERDEFINED = "http://myfhir.dk/x/MyEpisodeOfCare-payor/userDefined";
|
||||
public static final String FIELD_USERDEFINED = "userDefined";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourPayorCode, ourPeriod, ourUserDefined);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _PayorComponent copy() {
|
||||
_PayorComponent dst = new _PayorComponent();
|
||||
copyValues(dst);
|
||||
dst.ourPayorCode = ourPayorCode == null ? null : ourPayorCode.copy();
|
||||
dst.ourPeriod = ourPeriod == null ? null : ourPeriod.copy();
|
||||
dst.ourUserDefined = ourUserDefined == null ? null : ourUserDefined.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _PayorComponent)) {
|
||||
return false;
|
||||
}
|
||||
_PayorComponent that = (_PayorComponent) other;
|
||||
return compareDeep(ourPayorCode, that.ourPayorCode, true) && compareDeep(ourPeriod, that.ourPeriod, true) && compareDeep(ourUserDefined, that.ourUserDefined, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _PayorComponent)) {
|
||||
return false;
|
||||
}
|
||||
_PayorComponent that = (_PayorComponent) other;
|
||||
return compareValues(ourUserDefined, that.ourUserDefined, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getPayorCode() {
|
||||
if (ourPayorCode == null)
|
||||
ourPayorCode = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourPayorCode;
|
||||
}
|
||||
|
||||
public _PayorComponent _setPayorCode(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourPayorCode = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Period _getPeriod() {
|
||||
if (ourPeriod == null)
|
||||
ourPeriod = new Period();
|
||||
return ourPeriod;
|
||||
}
|
||||
|
||||
public _PayorComponent _setPeriod(Period theValue) {
|
||||
ourPeriod = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.BooleanType _getUserDefined() {
|
||||
if (ourUserDefined == null)
|
||||
ourUserDefined = new org.hl7.fhir.dstu3.model.BooleanType();
|
||||
return ourUserDefined;
|
||||
}
|
||||
|
||||
public _PayorComponent _setUserDefined(org.hl7.fhir.dstu3.model.BooleanType theValue) {
|
||||
ourUserDefined = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package ca.uhn.fhir.context;
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.Block;
|
||||
import ca.uhn.fhir.model.api.annotation.Child;
|
||||
import ca.uhn.fhir.model.api.annotation.Description;
|
||||
import ca.uhn.fhir.model.api.annotation.Extension;
|
||||
import ca.uhn.fhir.util.ElementUtil;
|
||||
import org.hl7.fhir.dstu3.model.BackboneElement;
|
||||
import org.hl7.fhir.dstu3.model.Base;
|
||||
import org.hl7.fhir.dstu3.model.Coding;
|
||||
import org.hl7.fhir.dstu3.model.StringType;
|
||||
|
||||
@Block
|
||||
public class _PreviousComponent extends BackboneElement implements org.hl7.fhir.instance.model.api.IBaseBackboneElement {
|
||||
|
||||
/**
|
||||
* previousReference (extension)
|
||||
*/
|
||||
@Child(name = FIELD_PREVIOUSREFERENCE, min = 1, max = 1, type = {StringType.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "Reference to the previous episode of care which may be external.")
|
||||
@Extension(url = EXTURL_PREVIOUSREFERENCE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.StringType ourPreviousReference;
|
||||
public static final String EXTURL_PREVIOUSREFERENCE = "http://myfhir.dk/x/MyEpisodeOfCare-previous/previousReference";
|
||||
public static final String FIELD_PREVIOUSREFERENCE = "previousReference";
|
||||
/**
|
||||
* referenceType (extension)
|
||||
*/
|
||||
@Child(name = FIELD_REFERENCETYPE, min = 1, max = 1, type = {Coding.class})
|
||||
@Description(shortDefinition = "", formalDefinition = "The type of reference to a previous episode of care.")
|
||||
@Extension(url = EXTURL_REFERENCETYPE, definedLocally = false, isModifier = false)
|
||||
protected org.hl7.fhir.dstu3.model.Coding ourReferenceType;
|
||||
public static final String EXTURL_REFERENCETYPE = "http://myfhir.dk/x/MyEpisodeOfCare-previous/referenceType";
|
||||
public static final String FIELD_REFERENCETYPE = "referenceType";
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return super.isEmpty() && ElementUtil.isEmpty(ourPreviousReference, ourReferenceType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public _PreviousComponent copy() {
|
||||
_PreviousComponent dst = new _PreviousComponent();
|
||||
copyValues(dst);
|
||||
dst.ourPreviousReference = ourPreviousReference == null ? null : ourPreviousReference.copy();
|
||||
dst.ourReferenceType = ourReferenceType == null ? null : ourReferenceType.copy();
|
||||
return dst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsDeep(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsDeep(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _PreviousComponent)) {
|
||||
return false;
|
||||
}
|
||||
_PreviousComponent that = (_PreviousComponent) other;
|
||||
return compareDeep(ourPreviousReference, that.ourPreviousReference, true) && compareDeep(ourReferenceType, that.ourReferenceType, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsShallow(Base other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equalsShallow(other)) {
|
||||
return false;
|
||||
}
|
||||
if (!(other instanceof _PreviousComponent)) {
|
||||
return false;
|
||||
}
|
||||
_PreviousComponent that = (_PreviousComponent) other;
|
||||
return compareValues(ourPreviousReference, that.ourPreviousReference, true);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.StringType _getPreviousReference() {
|
||||
if (ourPreviousReference == null)
|
||||
ourPreviousReference = new org.hl7.fhir.dstu3.model.StringType();
|
||||
return ourPreviousReference;
|
||||
}
|
||||
|
||||
public _PreviousComponent _setPreviousReference(org.hl7.fhir.dstu3.model.StringType theValue) {
|
||||
ourPreviousReference = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public org.hl7.fhir.dstu3.model.Coding _getReferenceType() {
|
||||
if (ourReferenceType == null)
|
||||
ourReferenceType = new org.hl7.fhir.dstu3.model.Coding();
|
||||
return ourReferenceType;
|
||||
}
|
||||
|
||||
public _PreviousComponent _setReferenceType(org.hl7.fhir.dstu3.model.Coding theValue) {
|
||||
ourReferenceType = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -67,7 +67,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf-spring4</artifactId>
|
||||
<artifactId>thymeleaf-spring5</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -478,6 +478,10 @@
|
|||
<id>volsch</id>
|
||||
<name>Volker Schmidt</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>magnuswatn</id>
|
||||
<name>Magnus Watn</name>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<licenses>
|
||||
|
@ -518,9 +522,9 @@
|
|||
<jsr305_version>3.0.2</jsr305_version>
|
||||
<!--<hibernate_version>5.2.10.Final</hibernate_version>-->
|
||||
<hibernate_version>5.3.6.Final</hibernate_version>
|
||||
<hibernate_search_version>5.10.3.Final</hibernate_search_version>
|
||||
<hibernate_validator_version>5.4.1.Final</hibernate_validator_version>
|
||||
<!-- Update lucene version when you update hibernate-search version -->
|
||||
<hibernate_search_version>5.10.3.Final</hibernate_search_version>
|
||||
<httpcore_version>4.4.6</httpcore_version>
|
||||
<httpclient_version>4.5.3</httpclient_version>
|
||||
<jackson_version>2.9.7</jackson_version>
|
||||
|
@ -1246,7 +1250,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf-spring4</artifactId>
|
||||
<artifactId>thymeleaf-spring5</artifactId>
|
||||
<version>${thymeleaf-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -6,6 +6,34 @@
|
|||
<title>HAPI FHIR Changelog</title>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="3.7.0" date="TBD" description="Gale">
|
||||
<action type="add">
|
||||
The version of a few dependencies have been bumped to the
|
||||
latest versions (dependent HAPI modules listed in brackets):
|
||||
<![CDATA[
|
||||
<ul>
|
||||
<li>thymeleaf-spring4 (Testpage Overlay) has been replaced with thymeleaf-spring5</li>
|
||||
</ul>
|
||||
]]>
|
||||
</action>
|
||||
<action type="fix">
|
||||
The JPA server $expunge operation could sometimes fail to expunge if
|
||||
another resource linked to a resource that was being
|
||||
expunged. This has been corrected. In addition, the $expunge operation
|
||||
has been refactored to use smaller chunks of work
|
||||
within a single DB transaction. This improves performance and reduces contention when
|
||||
performing large expunge workloads.
|
||||
</action>
|
||||
<action type="add" issue="1117">
|
||||
A badly formatted log message when handing exceptions was cleaned up. Thanks to
|
||||
Magnus Watn for the pull request!
|
||||
</action>
|
||||
<action type="fix" issue="944">
|
||||
A NullPointerException has been fixed when using custom resource classes that
|
||||
have a @Block class as a child element. Thanks to Lars Gram Mathiasen for
|
||||
reporting and providing a test case!
|
||||
</action>
|
||||
</release>
|
||||
<release version="3.6.0" date="2018-11-12" description="Food">
|
||||
<action type="add">
|
||||
The version of a few dependencies have been bumped to the
|
||||
|
|
Loading…
Reference in New Issue