Merge branch 'master' of github.com:jamesagnew/hapi-fhir

This commit is contained in:
James Agnew 2016-05-02 09:03:48 -04:00
commit c90795ccef
222 changed files with 56426 additions and 5921 deletions

View File

@ -788,7 +788,7 @@ public class GenericClient extends BaseClient implements IGenericClient {
RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource); RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource);
final String resourceName = def.getName(); final String resourceName = def.getName();
OutcomeResponseHandler binding = new OutcomeResponseHandler(resourceName); OutcomeResponseHandler binding = new OutcomeResponseHandler(resourceName, myPrefer);
Map<String, List<String>> params = new HashMap<String, List<String>>(); Map<String, List<String>> params = new HashMap<String, List<String>>();
return invoke(params, binding, invocation); return invoke(params, binding, invocation);
@ -1608,6 +1608,12 @@ public class GenericClient extends BaseClient implements IGenericClient {
private final class OutcomeResponseHandler implements IClientResponseHandler<MethodOutcome> { private final class OutcomeResponseHandler implements IClientResponseHandler<MethodOutcome> {
private final String myResourceName; private final String myResourceName;
private PreferReturnEnum myPrefer;
private OutcomeResponseHandler(String theResourceName, PreferReturnEnum thePrefer) {
this(theResourceName);
myPrefer = thePrefer;
}
private OutcomeResponseHandler(String theResourceName) { private OutcomeResponseHandler(String theResourceName) {
myResourceName = theResourceName; myResourceName = theResourceName;
@ -1619,6 +1625,17 @@ public class GenericClient extends BaseClient implements IGenericClient {
if (theResponseStatusCode == Constants.STATUS_HTTP_201_CREATED) { if (theResponseStatusCode == Constants.STATUS_HTTP_201_CREATED) {
response.setCreated(true); response.setCreated(true);
} }
if (myPrefer == PreferReturnEnum.REPRESENTATION) {
if (response.getResource() == null) {
if (response.getId() != null && isNotBlank(response.getId().getValue()) && response.getId().hasBaseUrl()) {
ourLog.info("Server did not return resource for Prefer-representation, going to fetch: {}", response.getId().getValue());
IBaseResource resource = read().resource(response.getId().getResourceType()).withUrl(response.getId()).execute();
response.setResource(resource);
}
}
}
return response; return response;
} }
} }
@ -2242,7 +2259,7 @@ public class GenericClient extends BaseClient implements IGenericClient {
RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource); RuntimeResourceDefinition def = myContext.getResourceDefinition(myResource);
final String resourceName = def.getName(); final String resourceName = def.getName();
OutcomeResponseHandler binding = new OutcomeResponseHandler(resourceName); OutcomeResponseHandler binding = new OutcomeResponseHandler(resourceName, myPrefer);
Map<String, List<String>> params = new HashMap<String, List<String>>(); Map<String, List<String>> params = new HashMap<String, List<String>>();
return invoke(params, binding, invocation); return invoke(params, binding, invocation);

View File

@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IBaseMetaType; import org.hl7.fhir.instance.model.api.IBaseMetaType;
import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
@ -781,8 +782,8 @@ public class MethodUtil {
if (reader != null) { if (reader != null) {
IParser parser = ct.newParser(theContext); IParser parser = ct.newParser(theContext);
IBaseResource outcome = parser.parseResource(reader); IBaseResource outcome = parser.parseResource(reader);
if (outcome instanceof BaseOperationOutcome) { if (outcome instanceof IBaseOperationOutcome) {
retVal.setOperationOutcome((BaseOperationOutcome) outcome); retVal.setOperationOutcome((IBaseOperationOutcome) outcome);
} else { } else {
retVal.setResource(outcome); retVal.setResource(outcome);
} }

View File

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

View File

@ -19,7 +19,7 @@
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${project.basedir}/../hapi-fhir-cli/src/main/script</directory> <directory>${project.basedir}/../hapi-fhir-cli/hapi-fhir-cli-app/src/main/script</directory>
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>
<includes> <includes>
<include>hapi-fhir-cli</include> <include>hapi-fhir-cli</include>

View File

@ -28,6 +28,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.dao.SearchParamExtractorDstu1;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.MetaDt;
@ -53,4 +54,9 @@ public class BaseDstu1Config extends BaseConfig {
return retVal; return retVal;
} }
@Bean(autowire=Autowire.BY_TYPE)
public SearchParamExtractorDstu1 searchParamExtractor() {
return new SearchParamExtractorDstu1();
}
} }

View File

@ -30,6 +30,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl; import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
import ca.uhn.fhir.jpa.dao.SearchParamExtractorDstu2;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.MetaDt;
@Configuration @Configuration
@ -66,4 +67,10 @@ public class BaseDstu2Config extends BaseConfig {
retVal.setDao(systemDaoDstu2()); retVal.setDao(systemDaoDstu2());
return retVal; return retVal;
} }
@Bean(autowire=Autowire.BY_TYPE)
public SearchParamExtractorDstu2 searchParamExtractor() {
return new SearchParamExtractorDstu2();
}
} }

View File

@ -36,6 +36,7 @@ import ca.uhn.fhir.jpa.config.BaseConfig;
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl; import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc; import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
import ca.uhn.fhir.jpa.dao.dstu3.SearchParamExtractorDstu3;
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainDstu3; import ca.uhn.fhir.jpa.validation.JpaValidationSupportChainDstu3;
import ca.uhn.fhir.validation.IValidatorModule; import ca.uhn.fhir.validation.IValidatorModule;
@ -83,9 +84,15 @@ public class BaseDstu3Config extends BaseConfig {
return retVal; return retVal;
} }
@Primary
@Bean(autowire=Autowire.BY_NAME, name="myJpaValidationSupportChainDstu3") @Bean(autowire=Autowire.BY_NAME, name="myJpaValidationSupportChainDstu3")
public IValidationSupport validationSupportChainDstu3() { public IValidationSupport validationSupportChainDstu3() {
return new JpaValidationSupportChainDstu3(); return new JpaValidationSupportChainDstu3();
} }
@Bean(autowire=Autowire.BY_TYPE)
public SearchParamExtractorDstu3 searchParamExtractor() {
return new SearchParamExtractorDstu3();
}
} }

View File

@ -213,6 +213,7 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
@Autowired @Autowired
private ISearchDao mySearchDao; private ISearchDao mySearchDao;
@Autowired
private ISearchParamExtractor mySearchParamExtractor; private ISearchParamExtractor mySearchParamExtractor;
@Autowired @Autowired
@ -380,15 +381,15 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
return retVal; return retVal;
} }
protected Set<ResourceIndexedSearchParamCoords> extractSearchParamCoords(ResourceTable theEntity, IBaseResource theResource) {
return mySearchParamExtractor.extractSearchParamCoords(theEntity, theResource);
}
// @Override // @Override
// public void setResourceDaos(List<IFhirResourceDao<?>> theResourceDaos) { // public void setResourceDaos(List<IFhirResourceDao<?>> theResourceDaos) {
// myResourceDaos = theResourceDaos; // myResourceDaos = theResourceDaos;
// } // }
protected Set<ResourceIndexedSearchParamCoords> extractSearchParamCoords(ResourceTable theEntity, IBaseResource theResource) {
return mySearchParamExtractor.extractSearchParamCoords(theEntity, theResource);
}
protected Set<ResourceIndexedSearchParamDate> extractSearchParamDates(ResourceTable theEntity, IBaseResource theResource) { protected Set<ResourceIndexedSearchParamDate> extractSearchParamDates(ResourceTable theEntity, IBaseResource theResource) {
return mySearchParamExtractor.extractSearchParamDates(theEntity, theResource); return mySearchParamExtractor.extractSearchParamDates(theEntity, theResource);
} }
@ -513,11 +514,11 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
} }
} }
protected DaoConfig getConfig() { protected DaoConfig getConfig() {
return myConfig; return myConfig;
} }
@Override @Override
public FhirContext getContext() { public FhirContext getContext() {
return myContext; return myContext;
@ -949,6 +950,10 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
throw new NotImplementedException(""); throw new NotImplementedException("");
} }
public void setConfig(DaoConfig theConfig) {
myConfig = theConfig;
}
// protected MetaDt toMetaDt(Collection<TagDefinition> tagDefinitions) { // protected MetaDt toMetaDt(Collection<TagDefinition> tagDefinitions) {
// MetaDt retVal = new MetaDt(); // MetaDt retVal = new MetaDt();
// for (TagDefinition next : tagDefinitions) { // for (TagDefinition next : tagDefinitions) {
@ -967,28 +972,12 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
// return retVal; // return retVal;
// } // }
public void setConfig(DaoConfig theConfig) {
myConfig = theConfig;
}
@Autowired @Autowired
public void setContext(FhirContext theContext) { public void setContext(FhirContext theContext) {
myContext = theContext; myContext = theContext;
switch (myContext.getVersion().getVersion()) {
case DSTU1:
mySearchParamExtractor = new SearchParamExtractorDstu1(theContext);
break;
case DSTU2:
mySearchParamExtractor = new SearchParamExtractorDstu2(theContext);
break;
case DSTU3:
mySearchParamExtractor = new SearchParamExtractorDstu3(theContext);
break;
case DSTU2_HL7ORG:
throw new IllegalStateException("Don't know how to handle version: " + myContext.getVersion().getVersion());
}
} }
public void setEntityManager(EntityManager theEntityManager) { public void setEntityManager(EntityManager theEntityManager) {
myEntityManager = theEntityManager; myEntityManager = theEntityManager;
} }
@ -1088,18 +1077,14 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
return myContext.getResourceDefinition(theResource).getName(); return myContext.getResourceDefinition(theResource).getName();
} }
protected List<Long> translateForcedIdToPids(IIdType theId) {
return translateForcedIdToPids(theId, myForcedIdDao);
}
protected static Long translateForcedIdToPid(String theResourceName, String theResourceId, IForcedIdDao theForcedIdDao) {
return translateForcedIdToPids(new IdDt(theResourceName, theResourceId), theForcedIdDao).get(0);
}
protected Long translateForcedIdToPid(String theResourceName, String theResourceId) { protected Long translateForcedIdToPid(String theResourceName, String theResourceId) {
return translateForcedIdToPids(new IdDt(theResourceName, theResourceId), myForcedIdDao).get(0); return translateForcedIdToPids(new IdDt(theResourceName, theResourceId), myForcedIdDao).get(0);
} }
protected List<Long> translateForcedIdToPids(IIdType theId) {
return translateForcedIdToPids(theId, myForcedIdDao);
}
protected String translatePidIdToForcedId(String theResourceType, Long theId) { protected String translatePidIdToForcedId(String theResourceType, Long theId) {
ForcedId forcedId = myForcedIdDao.findByResourcePid(theId); ForcedId forcedId = myForcedIdDao.findByResourcePid(theId);
if (forcedId != null) { if (forcedId != null) {
@ -1570,6 +1555,10 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
return retVal; return retVal;
} }
protected static Long translateForcedIdToPid(String theResourceName, String theResourceId, IForcedIdDao theForcedIdDao) {
return translateForcedIdToPids(new IdDt(theResourceName, theResourceId), theForcedIdDao).get(0);
}
static List<Long> translateForcedIdToPids(IIdType theId, IForcedIdDao theForcedIdDao) { static List<Long> translateForcedIdToPids(IIdType theId, IForcedIdDao theForcedIdDao) {
Validate.isTrue(theId.hasIdPart()); Validate.isTrue(theId.hasIdPart());

View File

@ -25,22 +25,28 @@ import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.springframework.beans.factory.annotation.Autowired;
import com.google.common.annotations.VisibleForTesting;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.util.FhirTerser;
public class BaseSearchParamExtractor { public class BaseSearchParamExtractor {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseSearchParamExtractor.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseSearchParamExtractor.class);
private static final Pattern SPLIT = Pattern.compile("\\||( or )"); private static final Pattern SPLIT = Pattern.compile("\\||( or )");
@Autowired
private FhirContext myContext; private FhirContext myContext;
public BaseSearchParamExtractor(FhirContext theContext) { public BaseSearchParamExtractor() {
myContext = theContext; super();
} }
protected FhirContext getContext() { public BaseSearchParamExtractor(FhirContext theCtx) {
return myContext; myContext = theCtx;
} }
protected List<Object> extractValues(String thePaths, IBaseResource theResource) { protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
@ -58,6 +64,15 @@ public class BaseSearchParamExtractor {
} }
return values; return values;
} }
protected FhirContext getContext() {
return myContext;
}
@VisibleForTesting
void setContextForUnitTest(FhirContext theContext) {
myContext = theContext;
}
} }

View File

@ -42,6 +42,10 @@ import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetai
public class FhirResourceDaoPatientDstu2 extends FhirResourceDaoDstu2<Patient>implements IFhirResourceDaoPatient<Patient> { public class FhirResourceDaoPatientDstu2 extends FhirResourceDaoDstu2<Patient>implements IFhirResourceDaoPatient<Patient> {
public FhirResourceDaoPatientDstu2() {
super();
}
private IBundleProvider doEverythingOperation(IIdType theId, IPrimitiveType<Integer> theCount, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative) { private IBundleProvider doEverythingOperation(IIdType theId, IPrimitiveType<Integer> theCount, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative) {
SearchParameterMap paramMap = new SearchParameterMap(); SearchParameterMap paramMap = new SearchParameterMap();
if (theCount != null) { if (theCount != null) {

View File

@ -460,6 +460,9 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
List<BaseResourceReferenceDt> allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class); List<BaseResourceReferenceDt> allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, BaseResourceReferenceDt.class);
for (BaseResourceReferenceDt nextRef : allRefs) { for (BaseResourceReferenceDt nextRef : allRefs) {
IdDt nextId = nextRef.getReference(); IdDt nextId = nextRef.getReference();
if (!nextId.hasIdPart()) {
continue;
}
if (idSubstitutions.containsKey(nextId)) { if (idSubstitutions.containsKey(nextId)) {
IdDt newId = idSubstitutions.get(nextId); IdDt newId = idSubstitutions.get(nextId);
ourLog.info(" * Replacing resource ref {} with {}", nextId, newId); ourLog.info(" * Replacing resource ref {} with {}", nextId, newId);

View File

@ -70,10 +70,6 @@ import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum;
public class SearchParamExtractorDstu1 extends BaseSearchParamExtractor implements ISearchParamExtractor { public class SearchParamExtractorDstu1 extends BaseSearchParamExtractor implements ISearchParamExtractor {
public SearchParamExtractorDstu1(FhirContext theContext) {
super(theContext);
}
@Override @Override
public Set<ResourceIndexedSearchParamCoords> extractSearchParamCoords(ResourceTable theEntity, IBaseResource theResource) { public Set<ResourceIndexedSearchParamCoords> extractSearchParamCoords(ResourceTable theEntity, IBaseResource theResource) {
return Collections.emptySet(); return Collections.emptySet();

View File

@ -82,10 +82,6 @@ public class SearchParamExtractorDstu2 extends BaseSearchParamExtractor implemen
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDstu2.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDstu2.class);
public SearchParamExtractorDstu2(FhirContext theContext) {
super(theContext);
}
private void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) { private void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) {
if (isBlank(searchTerm)) { if (isBlank(searchTerm)) {
return; return;

View File

@ -470,6 +470,9 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
List<IBaseReference> allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class); List<IBaseReference> allRefs = terser.getAllPopulatedChildElementsOfType(nextResource, IBaseReference.class);
for (IBaseReference nextRef : allRefs) { for (IBaseReference nextRef : allRefs) {
IIdType nextId = nextRef.getReferenceElement(); IIdType nextId = nextRef.getReferenceElement();
if (!nextId.hasIdPart()) {
continue;
}
if (idSubstitutions.containsKey(nextId)) { if (idSubstitutions.containsKey(nextId)) {
IdType newId = idSubstitutions.get(nextId); IdType newId = idSubstitutions.get(nextId);
ourLog.info(" * Replacing resource ref {} with {}", nextId, newId); ourLog.info(" * Replacing resource ref {} with {}", nextId, newId);

View File

@ -1,5 +1,8 @@
package ca.uhn.fhir.jpa.dao.dstu3; package ca.uhn.fhir.jpa.dao.dstu3;
import java.util.Collections;
import java.util.List;
import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.Questionnaire; import org.hl7.fhir.dstu3.model.Questionnaire;
@ -131,4 +134,10 @@ public class JpaValidationSupportDstu3 implements IJpaValidationSupportDstu3 {
return fetchResource(theCtx, StructureDefinition.class, theUrl); return fetchResource(theCtx, StructureDefinition.class, theUrl);
} }
@Override
public List<StructureDefinition> fetchAllStructureDefinitions(FhirContext theContext) {
return Collections.emptyList();
}
} }

View File

@ -34,7 +34,10 @@ import javax.measure.unit.Unit;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.model.Address; import org.hl7.fhir.dstu3.model.Address;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.BaseDateTimeType; import org.hl7.fhir.dstu3.model.BaseDateTimeType;
import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeableConcept; import org.hl7.fhir.dstu3.model.CodeableConcept;
@ -53,9 +56,15 @@ import org.hl7.fhir.dstu3.model.Quantity;
import org.hl7.fhir.dstu3.model.Questionnaire; import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UriType; import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.omg.PortableServer.ThreadPolicyValue;
import org.springframework.beans.factory.annotation.Autowired;
import com.google.common.annotations.VisibleForTesting;
import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
@ -74,13 +83,25 @@ import ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamToken;
import ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamUri; import ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamUri;
import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.jpa.entity.ResourceTable;
import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implements ISearchParamExtractor { public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implements ISearchParamExtractor {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDstu3.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDstu3.class);
public SearchParamExtractorDstu3(FhirContext theContext) { @Autowired
super(theContext); private org.hl7.fhir.dstu3.hapi.validation.IValidationSupport myValidationSupport;
/**
* Constructor
*/
public SearchParamExtractorDstu3() {
super();
}
public SearchParamExtractorDstu3(FhirContext theCtx, IValidationSupport theValidationSupport) {
super(theCtx);
myValidationSupport = theValidationSupport;
} }
private void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) { private void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) {
@ -443,15 +464,15 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
List<String> systems = new ArrayList<String>(); List<String> systems = new ArrayList<String>();
List<String> codes = new ArrayList<String>(); List<String> codes = new ArrayList<String>();
String needContactPointSystem = null; // String needContactPointSystem = null;
if (nextPath.contains(".where(system='phone')")) { // if (nextPath.contains(".where(system='phone')")) {
nextPath = nextPath.replace(".where(system='phone')", ""); // nextPath = nextPath.replace(".where(system='phone')", "");
needContactPointSystem = "phone"; // needContactPointSystem = "phone";
} // }
if (nextPath.contains(".where(system='email')")) { // if (nextPath.contains(".where(system='email')")) {
nextPath = nextPath.replace(".where(system='email')", ""); // nextPath = nextPath.replace(".where(system='email')", "");
needContactPointSystem = "email"; // needContactPointSystem = "email";
} // }
for (Object nextObject : extractValues(nextPath, theResource)) { for (Object nextObject : extractValues(nextPath, theResource)) {
@ -482,11 +503,6 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
if (nextValue.isEmpty()) { if (nextValue.isEmpty()) {
continue; continue;
} }
if (isNotBlank(needContactPointSystem)) {
if (!needContactPointSystem.equals(nextValue.getSystemElement().getValueAsString())) {
continue;
}
}
systems.add(nextValue.getSystemElement().getValueAsString()); systems.add(nextValue.getSystemElement().getValueAsString());
codes.add(nextValue.getValueElement().getValue()); codes.add(nextValue.getValueElement().getValue());
} else if (nextObject instanceof Enumeration<?>) { } else if (nextObject instanceof Enumeration<?>) {
@ -623,6 +639,7 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
return retVal; return retVal;
} }
private void extractTokensFromCodeableConcept(List<String> theSystems, List<String> theCodes, CodeableConcept theCodeableConcept, ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> theListToPopulate, RuntimeSearchParam theParameterDef) { private void extractTokensFromCodeableConcept(List<String> theSystems, List<String> theCodes, CodeableConcept theCodeableConcept, ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> theListToPopulate, RuntimeSearchParam theParameterDef) {
for (Coding nextCoding : theCodeableConcept.getCoding()) { for (Coding nextCoding : theCodeableConcept.getCoding()) {
extractTokensFromCoding(theSystems, theCodes, theEntity, theListToPopulate, theParameterDef, nextCoding); extractTokensFromCoding(theSystems, theCodes, theEntity, theListToPopulate, theParameterDef, nextCoding);
@ -646,6 +663,28 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
} }
} }
/**
* Override parent because we're using FHIRPath here
*/
@Override
protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
IWorkerContext worker = new org.hl7.fhir.dstu3.hapi.validation.HapiWorkerContext(getContext(), myValidationSupport);
FHIRPathEngine fp = new FHIRPathEngine(worker);
List<Object> values = new ArrayList<Object>();
try {
values.addAll(fp.evaluate((Base)theResource, thePaths));
} catch (FHIRException e) {
throw new InternalErrorException(e);
}
return values;
}
@VisibleForTesting
void setValidationSupportForTesting(org.hl7.fhir.dstu3.hapi.validation.IValidationSupport theValidationSupport) {
myValidationSupport = theValidationSupport;
}
private static <T extends Enum<?>> String extractSystem(Enumeration<T> theBoundCode) { private static <T extends Enum<?>> String extractSystem(Enumeration<T> theBoundCode) {
if (theBoundCode.getValue() != null) { if (theBoundCode.getValue() != null) {
return theBoundCode.getEnumFactory().toSystem(theBoundCode.getValue()); return theBoundCode.getEnumFactory().toSystem(theBoundCode.getValue());

View File

@ -18,7 +18,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.PlatformTransactionManager;
@ -41,6 +40,7 @@ import ca.uhn.fhir.jpa.provider.JpaSystemProviderDstu2;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt; import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.MetaDt;
import ca.uhn.fhir.model.dstu2.resource.Appointment;
import ca.uhn.fhir.model.dstu2.resource.Bundle; import ca.uhn.fhir.model.dstu2.resource.Bundle;
import ca.uhn.fhir.model.dstu2.resource.ConceptMap; import ca.uhn.fhir.model.dstu2.resource.ConceptMap;
import ca.uhn.fhir.model.dstu2.resource.Device; import ca.uhn.fhir.model.dstu2.resource.Device;
@ -87,6 +87,9 @@ public abstract class BaseJpaDstu2Test extends BaseJpaTest {
@Qualifier("myConceptMapDaoDstu2") @Qualifier("myConceptMapDaoDstu2")
protected IFhirResourceDao<ConceptMap> myConceptMapDao; protected IFhirResourceDao<ConceptMap> myConceptMapDao;
@Autowired @Autowired
@Qualifier("myAppointmentDaoDstu2")
protected IFhirResourceDao<Appointment> myAppointmentDao;
@Autowired
@Qualifier("myBundleDaoDstu2") @Qualifier("myBundleDaoDstu2")
protected IFhirResourceDao<Bundle> myBundleDao; protected IFhirResourceDao<Bundle> myBundleDao;
@Autowired @Autowired

View File

@ -43,6 +43,7 @@ import ca.uhn.fhir.model.base.composite.BaseCodingDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt; import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.MetaDt;
import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu2.resource.Appointment;
import ca.uhn.fhir.model.dstu2.resource.Bundle; import ca.uhn.fhir.model.dstu2.resource.Bundle;
import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry;
import ca.uhn.fhir.model.dstu2.resource.Bundle.EntryRequest; import ca.uhn.fhir.model.dstu2.resource.Bundle.EntryRequest;
@ -66,19 +67,12 @@ import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException;
import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.util.TestUtil;
public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest { public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class);
@AfterClass
public static void afterClassClearContext() {
TestUtil.clearAllStaticFieldsForUnitTest();
}
@Test @Test
public void testReindexing() { public void testReindexing() {
Patient p = new Patient(); Patient p = new Patient();
@ -151,7 +145,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertEquals(Long.valueOf(2), entity.getIndexStatus()); assertEquals(Long.valueOf(2), entity.getIndexStatus());
} }
@Test @Test
public void testSystemMetaOperation() { public void testSystemMetaOperation() {
@ -240,7 +234,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertEquals("http://profile/2", profiles.get(0).getValue()); assertEquals("http://profile/2", profiles.get(0).getValue());
} }
@Test @Test
public void testTransactionBatchWithFailingRead() { public void testTransactionBatchWithFailingRead() {
String methodName = "testTransactionBatchWithFailingRead"; String methodName = "testTransactionBatchWithFailingRead";
@ -287,6 +281,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertThat(respEntry.getStatus(), startsWith("404")); assertThat(respEntry.getStatus(), startsWith("404"));
} }
@Test @Test
public void testTransactionCreateMatchUrlWithOneMatch() { public void testTransactionCreateMatchUrlWithOneMatch() {
@ -329,7 +324,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertEquals("1", o.getId().getVersionIdPart()); assertEquals("1", o.getId().getVersionIdPart());
} }
@Test @Test
public void testTransactionCreateMatchUrlWithTwoMatch() { public void testTransactionCreateMatchUrlWithTwoMatch() {
String methodName = "testTransactionCreateMatchUrlWithTwoMatch"; String methodName = "testTransactionCreateMatchUrlWithTwoMatch";
@ -929,6 +924,25 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
} }
private Bundle testTransactionOrderingCreateBundle(String methodName, int pass, IdDt patientPlaceholderId) {
Bundle req = new Bundle();
req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=" + methodName);
Observation obs = new Observation();
obs.getSubject().setReference(patientPlaceholderId);
obs.addIdentifier().setValue(methodName);
obs.getCode().setText(methodName + pass);
req.addEntry().setResource(obs).getRequest().setMethod(HTTPVerbEnum.PUT).setUrl("Observation?identifier=" + methodName);
Patient pat = new Patient();
pat.addIdentifier().setValue(methodName);
pat.addName().addFamily(methodName + pass);
req.addEntry().setResource(pat).setFullUrl(patientPlaceholderId.getValue()).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Patient");
req.addEntry().getRequest().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=" + methodName);
return req;
}
private void testTransactionOrderingValidateResponse(int pass, Bundle resp) { private void testTransactionOrderingValidateResponse(int pass, Bundle resp) {
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(4, resp.getEntry().size()); assertEquals(4, resp.getEntry().size());
@ -957,25 +971,6 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertThat(respGetBundle.getLink("self").getUrl(), endsWith("/Patient?identifier=testTransactionOrdering")); assertThat(respGetBundle.getLink("self").getUrl(), endsWith("/Patient?identifier=testTransactionOrdering"));
} }
private Bundle testTransactionOrderingCreateBundle(String methodName, int pass, IdDt patientPlaceholderId) {
Bundle req = new Bundle();
req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=" + methodName);
Observation obs = new Observation();
obs.getSubject().setReference(patientPlaceholderId);
obs.addIdentifier().setValue(methodName);
obs.getCode().setText(methodName + pass);
req.addEntry().setResource(obs).getRequest().setMethod(HTTPVerbEnum.PUT).setUrl("Observation?identifier=" + methodName);
Patient pat = new Patient();
pat.addIdentifier().setValue(methodName);
pat.addName().addFamily(methodName + pass);
req.addEntry().setResource(pat).setFullUrl(patientPlaceholderId.getValue()).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Patient");
req.addEntry().getRequest().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=" + methodName);
return req;
}
@Test @Test
public void testTransactionReadAndSearch() { public void testTransactionReadAndSearch() {
String methodName = "testTransactionReadAndSearch"; String methodName = "testTransactionReadAndSearch";
@ -1308,6 +1303,87 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
} }
/**
* From a message from David Hay
*/
@Test
public void testTransactionWithAppointments() {
Patient p = new Patient();
p.addName().addFamily("family");
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();
//@formatter:on
String input = "{\n" +
" \"resourceType\": \"Bundle\",\n" +
" \"type\": \"transaction\",\n" +
" \"entry\": [\n" +
" {\n" +
" \"resource\": {\n" +
" \"resourceType\": \"Appointment\",\n" +
" \"status\": \"pending\",\n" +
" \"type\": {\"text\": \"Cardiology\"},\n" +
" \"description\": \"Investigate Angina\",\n" +
" \"start\": \"2016-04-30T18:48:29+12:00\",\n" +
" \"end\": \"2016-04-30T19:03:29+12:00\",\n" +
" \"minutesDuration\": 15,\n" +
" \"participant\": [\n" +
" {\n" +
" \"actor\": {\"display\": \"Clarence cardiology clinic\"},\n" +
" \"status\": \"accepted\"\n" +
" },\n" +
" {\n" +
" \"actor\": {\"reference\": \"Patient/" + id.getIdPart() + "\"},\n" +
" \"status\": \"accepted\"\n" +
" }\n" +
" ],\n" +
" \"text\": {\n" +
" \"status\": \"generated\",\n" +
" \"div\": \"<div><div>Investigate Angina<\\/div><div>Clarence cardiology clinic<\\/div><\\/div>\"\n" +
" }\n" +
" },\n" +
" \"request\": {\n" +
" \"method\": \"POST\",\n" +
" \"url\": \"Appointment\"\n" +
" }\n" +
" },\n" +
" {\n" +
" \"resource\": {\n" +
" \"resourceType\": \"Appointment\",\n" +
" \"status\": \"pending\",\n" +
" \"type\": {\"text\": \"GP Visit\"},\n" +
" \"description\": \"Routine checkup\",\n" +
" \"start\": \"2016-05-03T18:48:29+12:00\",\n" +
" \"end\": \"2016-05-03T19:03:29+12:00\",\n" +
" \"minutesDuration\": 15,\n" +
" \"participant\": [\n" +
" {\n" +
" \"actor\": {\"display\": \"Dr Dave\"},\n" +
" \"status\": \"accepted\"\n" +
" },\n" +
" {\n" +
" \"actor\": {\"reference\": \"Patient/" + id.getIdPart() + "\"},\n" +
" \"status\": \"accepted\"\n" +
" }\n" +
" ],\n" +
" \"text\": {\n" +
" \"status\": \"generated\",\n" +
" \"div\": \"<div><div>Routine checkup<\\/div><div>Dr Dave<\\/div><\\/div>\"\n" +
" }\n" +
" },\n" +
" \"request\": {\n" +
" \"method\": \"POST\",\n" +
" \"url\": \"Appointment\"\n" +
" }\n" +
" }\n" +
" ]\n" +
"}";
//@formatter:on
Bundle inputBundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, input);
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
}
@Test @Test
public void testTransactionWithInvalidType() { public void testTransactionWithInvalidType() {
Bundle request = new Bundle(); Bundle request = new Bundle();
@ -1324,6 +1400,65 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
} }
@Test
public void testTransactionWithNullReference() {
Patient p = new Patient();
p.addName().addFamily("family");
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();
Bundle inputBundle = new Bundle();
//@formatter:off
Patient app0 = new Patient();
app0.addName().addFamily("NEW PATIENT");
String placeholderId0 = IdDt.newRandomUuid().getValue();
inputBundle
.addEntry()
.setResource(app0)
.setFullUrl(placeholderId0)
.getRequest()
.setMethod(HTTPVerbEnum.POST)
.setUrl("Patient");
//@formatter:on
//@formatter:off
Appointment app1 = new Appointment();
app1.addParticipant().getActor().setReference(id);
inputBundle
.addEntry()
.setResource(app1)
.getRequest()
.setMethod(HTTPVerbEnum.POST)
.setUrl("Appointment");
//@formatter:on
//@formatter:off
Appointment app2 = new Appointment();
app2.addParticipant().getActor().setDisplay("NO REF");
app2.addParticipant().getActor().setDisplay("YES REF").setReference(placeholderId0);
inputBundle
.addEntry()
.setResource(app2)
.getRequest()
.setMethod(HTTPVerbEnum.POST)
.setUrl("Appointment");
//@formatter:on
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
assertEquals(3, outputBundle.getEntry().size());
IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation());
IdDt id1 = new IdDt(outputBundle.getEntry().get(1).getResponse().getLocation());
IdDt id2 = new IdDt(outputBundle.getEntry().get(2).getResponse().getLocation());
app2 = myAppointmentDao.read(id2, mySrd);
assertEquals("NO REF", app2.getParticipant().get(0).getActor().getDisplay().getValue());
assertEquals(null, app2.getParticipant().get(0).getActor().getReference().getValue());
assertEquals("YES REF", app2.getParticipant().get(1).getActor().getDisplay().getValue());
assertEquals(id0.toUnqualifiedVersionless().getValue(), app2.getParticipant().get(1).getActor().getReference().getValue());
}
@Test @Test
public void testTransactionWithReferenceToCreateIfNoneExist() { public void testTransactionWithReferenceToCreateIfNoneExist() {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
@ -1377,6 +1512,46 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertNotEquals(medOrderId1, medOrderId2); assertNotEquals(medOrderId1, medOrderId2);
} }
@Test
public void testTransactionWithRelativeOidIds() throws Exception {
Bundle res = new Bundle();
res.setType(BundleTypeEnum.TRANSACTION);
Patient p1 = new Patient();
p1.setId("urn:oid:0.1.2.3");
p1.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds01");
res.addEntry().setResource(p1).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Patient");
Observation o1 = new Observation();
o1.setId("cid:observation1");
o1.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds02");
o1.setSubject(new ResourceReferenceDt("urn:oid:0.1.2.3"));
res.addEntry().setResource(o1).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Observation");
Observation o2 = new Observation();
o2.setId("cid:observation2");
o2.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds03");
o2.setSubject(new ResourceReferenceDt("urn:oid:0.1.2.3"));
res.addEntry().setResource(o2).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Observation");
Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum());
assertEquals(3, resp.getEntry().size());
assertTrue(resp.getEntry().get(0).getResponse().getLocation(), new IdDt(resp.getEntry().get(0).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(1).getResponse().getLocation(), new IdDt(resp.getEntry().get(1).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(2).getResponse().getLocation(), new IdDt(resp.getEntry().get(2).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
o1 = myObservationDao.read(new IdDt(resp.getEntry().get(1).getResponse().getLocation()), mySrd);
o2 = myObservationDao.read(new IdDt(resp.getEntry().get(2).getResponse().getLocation()), mySrd);
assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
}
// //
// //
// /** // /**
@ -1479,46 +1654,6 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
// //
// } // }
@Test
public void testTransactionWithRelativeOidIds() throws Exception {
Bundle res = new Bundle();
res.setType(BundleTypeEnum.TRANSACTION);
Patient p1 = new Patient();
p1.setId("urn:oid:0.1.2.3");
p1.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds01");
res.addEntry().setResource(p1).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Patient");
Observation o1 = new Observation();
o1.setId("cid:observation1");
o1.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds02");
o1.setSubject(new ResourceReferenceDt("urn:oid:0.1.2.3"));
res.addEntry().setResource(o1).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Observation");
Observation o2 = new Observation();
o2.setId("cid:observation2");
o2.addIdentifier().setSystem("system").setValue("testTransactionWithRelativeOidIds03");
o2.setSubject(new ResourceReferenceDt("urn:oid:0.1.2.3"));
res.addEntry().setResource(o2).getRequest().setMethod(HTTPVerbEnum.POST).setUrl("Observation");
Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum());
assertEquals(3, resp.getEntry().size());
assertTrue(resp.getEntry().get(0).getResponse().getLocation(), new IdDt(resp.getEntry().get(0).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(1).getResponse().getLocation(), new IdDt(resp.getEntry().get(1).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(2).getResponse().getLocation(), new IdDt(resp.getEntry().get(2).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
o1 = myObservationDao.read(new IdDt(resp.getEntry().get(1).getResponse().getLocation()), mySrd);
o2 = myObservationDao.read(new IdDt(resp.getEntry().get(2).getResponse().getLocation()), mySrd);
assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
}
/** /**
* This is not the correct way to do it, but we'll allow it to be lenient * This is not the correct way to do it, but we'll allow it to be lenient
*/ */
@ -1562,4 +1697,9 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
} }
@AfterClass
public static void afterClassClearContext() {
TestUtil.clearAllStaticFieldsForUnitTest();
}
} }

View File

@ -12,6 +12,7 @@ import org.apache.commons.io.IOUtils;
import org.hibernate.search.jpa.FullTextEntityManager; import org.hibernate.search.jpa.FullTextEntityManager;
import org.hibernate.search.jpa.Search; import org.hibernate.search.jpa.Search;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport; import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.model.Appointment;
import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.CodeSystem; import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeableConcept; import org.hl7.fhir.dstu3.model.CodeableConcept;
@ -90,12 +91,15 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
@Autowired @Autowired
@Qualifier("myCodeSystemDaoDstu3") @Qualifier("myAppointmentDaoDstu3")
protected IFhirResourceDao<CodeSystem> myCodeSystemDao; protected IFhirResourceDao<Appointment> myAppointmentDao;
@Autowired @Autowired
@Qualifier("myBundleDaoDstu3") @Qualifier("myBundleDaoDstu3")
protected IFhirResourceDao<Bundle> myBundleDao; protected IFhirResourceDao<Bundle> myBundleDao;
@Autowired @Autowired
@Qualifier("myCodeSystemDaoDstu3")
protected IFhirResourceDao<CodeSystem> myCodeSystemDao;
@Autowired
@Qualifier("myConceptMapDaoDstu3") @Qualifier("myConceptMapDaoDstu3")
protected IFhirResourceDao<ConceptMap> myConceptMapDao; protected IFhirResourceDao<ConceptMap> myConceptMapDao;
@Autowired @Autowired
@ -139,14 +143,14 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
@Autowired @Autowired
@Qualifier("myNamingSystemDaoDstu3") @Qualifier("myNamingSystemDaoDstu3")
protected IFhirResourceDao<NamingSystem> myNamingSystemDao; protected IFhirResourceDao<NamingSystem> myNamingSystemDao;
@Autowired
@Qualifier("myObservationDaoDstu3")
protected IFhirResourceDao<Observation> myObservationDao;
@Autowired @Autowired
@Qualifier("myOrganizationDaoDstu3") @Qualifier("myObservationDaoDstu3")
protected IFhirResourceDao<Organization> myOrganizationDao; protected IFhirResourceDao<Observation> myObservationDao;
@Autowired
@Qualifier("myOrganizationDaoDstu3")
protected IFhirResourceDao<Organization> myOrganizationDao;
@Autowired @Autowired
@Qualifier("myPatientDaoDstu3") @Qualifier("myPatientDaoDstu3")
protected IFhirResourceDaoPatient<Patient> myPatientDao; protected IFhirResourceDaoPatient<Patient> myPatientDao;

View File

@ -23,6 +23,7 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.dstu3.model.Appointment;
import org.hl7.fhir.dstu3.model.CodeType; import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.ConceptMap; import org.hl7.fhir.dstu3.model.ConceptMap;
import org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem; import org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem;
@ -92,7 +93,6 @@ import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IBundleProvider;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.util.TestUtil;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -435,6 +435,36 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
} }
/**
* https://chat.fhir.org/#narrow/stream/implementers/topic/Understanding.20_include
*/
@Test
@Ignore
public void testSearchWithTypedInclude() {
IIdType patId;
{
Patient patient = new Patient();
patient.addIdentifier().setSystem("urn:system").setValue("001");
patId = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
}
IIdType practId;
{
Practitioner pract = new Practitioner();
pract.addIdentifier().setSystem("urn:system").setValue("001");
practId = myPractitionerDao.create(pract, mySrd).getId().toUnqualifiedVersionless();
}
Appointment appt = new Appointment();
appt.addParticipant().getActor().setReference(patId.getValue());
appt.addParticipant().getActor().setReference(practId.getValue());
IIdType apptId = myAppointmentDao.create(appt, mySrd).getId().toUnqualifiedVersionless();
SearchParameterMap params = new SearchParameterMap();
params.addInclude(Appointment.INCLUDE_PATIENT);
assertThat(toUnqualifiedVersionlessIds(myAppointmentDao.search(params)), containsInAnyOrder(patId, apptId));
}
@Test @Test
public void testSearchByIdParamWrongType() { public void testSearchByIdParamWrongType() {
IIdType id1; IIdType id1;

View File

@ -22,6 +22,7 @@ import java.io.UnsupportedEncodingException;
import java.util.List; import java.util.List;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.model.Appointment;
import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent;
@ -58,6 +59,7 @@ import ca.uhn.fhir.jpa.entity.ResourceTable;
import ca.uhn.fhir.jpa.entity.TagTypeEnum; import ca.uhn.fhir.jpa.entity.TagTypeEnum;
import ca.uhn.fhir.jpa.provider.SystemProviderDstu2Test; import ca.uhn.fhir.jpa.provider.SystemProviderDstu2Test;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IBundleProvider;
@ -77,6 +79,64 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
TestUtil.clearAllStaticFieldsForUnitTest(); TestUtil.clearAllStaticFieldsForUnitTest();
} }
@Test
public void testTransactionWithNullReference() {
Patient p = new Patient();
p.addName().addFamily("family");
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();
Bundle inputBundle = new Bundle();
//@formatter:off
Patient app0 = new Patient();
app0.addName().addFamily("NEW PATIENT");
String placeholderId0 = IdDt.newRandomUuid().getValue();
inputBundle
.addEntry()
.setResource(app0)
.setFullUrl(placeholderId0)
.getRequest()
.setMethod(HTTPVerb.POST)
.setUrl("Patient");
//@formatter:on
//@formatter:off
Appointment app1 = new Appointment();
app1.addParticipant().getActor().setReference(id.getValue());
inputBundle
.addEntry()
.setResource(app1)
.getRequest()
.setMethod(HTTPVerb.POST)
.setUrl("Appointment");
//@formatter:on
//@formatter:off
Appointment app2 = new Appointment();
app2.addParticipant().getActor().setDisplay("NO REF");
app2.addParticipant().getActor().setDisplay("YES REF").setReference(placeholderId0);
inputBundle
.addEntry()
.setResource(app2)
.getRequest()
.setMethod(HTTPVerb.POST)
.setUrl("Appointment");
//@formatter:on
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
assertEquals(3, outputBundle.getEntry().size());
IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation());
IdDt id2 = new IdDt(outputBundle.getEntry().get(2).getResponse().getLocation());
app2 = myAppointmentDao.read(id2, mySrd);
assertEquals("NO REF", app2.getParticipant().get(0).getActor().getDisplay());
assertEquals(null, app2.getParticipant().get(0).getActor().getReference());
assertEquals("YES REF", app2.getParticipant().get(1).getActor().getDisplay());
assertEquals(id0.toUnqualifiedVersionless().getValue(), app2.getParticipant().get(1).getActor().getReference());
}
@Test @Test
public void testReindexing() { public void testReindexing() {

View File

@ -4,6 +4,8 @@ import static org.junit.Assert.*;
import java.util.Set; import java.util.Set;
import org.hl7.fhir.dstu3.hapi.validation.DefaultProfileValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.model.Observation; import org.hl7.fhir.dstu3.model.Observation;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.Test; import org.junit.Test;
@ -17,10 +19,12 @@ import ca.uhn.fhir.util.TestUtil;
public class SearchParamExtractorDstu3Test { public class SearchParamExtractorDstu3Test {
private static final FhirContext ourCtx = FhirContext.forDstu3(); private static final FhirContext ourCtx = FhirContext.forDstu3();
private static IValidationSupport ourValidationSupport;
@AfterClass @AfterClass
public static void afterClassClearContext() { public static void afterClassClearContext() {
TestUtil.clearAllStaticFieldsForUnitTest(); TestUtil.clearAllStaticFieldsForUnitTest();
ourValidationSupport = new DefaultProfileValidationSupport();
} }
@ -29,7 +33,7 @@ public class SearchParamExtractorDstu3Test {
Observation obs = new Observation(); Observation obs = new Observation();
obs.getCategory().addCoding().setSystem("SYSTEM").setCode("CODE"); obs.getCategory().addCoding().setSystem("SYSTEM").setCode("CODE");
SearchParamExtractorDstu3 extractor = new SearchParamExtractorDstu3(ourCtx); SearchParamExtractorDstu3 extractor = new SearchParamExtractorDstu3(ourCtx, ourValidationSupport);
Set<BaseResourceIndexedSearchParam> tokens = extractor.extractSearchParamTokens(new ResourceTable(), obs); Set<BaseResourceIndexedSearchParam> tokens = extractor.extractSearchParamTokens(new ResourceTable(), obs);
assertEquals(1, tokens.size()); assertEquals(1, tokens.size());
ResourceIndexedSearchParamToken token = (ResourceIndexedSearchParamToken) tokens.iterator().next(); ResourceIndexedSearchParamToken token = (ResourceIndexedSearchParamToken) tokens.iterator().next();

View File

@ -2,6 +2,7 @@ package ca.uhn.fhir.model.dstu2;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -10,7 +11,9 @@ import org.junit.Test;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.MetaDt; import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu2.resource.Claim;
import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.resource.Practitioner; import ca.uhn.fhir.model.dstu2.resource.Practitioner;
import ca.uhn.fhir.model.dstu2.resource.Practitioner.PractitionerRole; import ca.uhn.fhir.model.dstu2.resource.Practitioner.PractitionerRole;
@ -41,7 +44,7 @@ public class ModelDstu2Test {
CodeableConceptDt roleField = role.getRole(); CodeableConceptDt roleField = role.getRole();
assertEquals(CodeableConceptDt.class, roleField.getClass()); assertEquals(CodeableConceptDt.class, roleField.getClass());
} }
/** /**
* See #304 * See #304
*/ */
@ -58,6 +61,20 @@ public class ModelDstu2Test {
assertEquals("Found instance of class java.lang.String - Did you set a field value to the incorrect type? Expected org.hl7.fhir.instance.model.api.IBase", e.getMessage()); assertEquals("Found instance of class java.lang.String - Did you set a field value to the incorrect type? Expected org.hl7.fhir.instance.model.api.IBase", e.getMessage());
} }
} }
/**
* See #354
*/
@Test
public void testSetters() {
Claim claim = new Claim();
claim.setIdentifier(new ArrayList<IdentifierDt>()).setCondition(new ArrayList<CodingDt>());
}
@AfterClass
public static void afterClassClearContext() {
TestUtil.clearAllStaticFieldsForUnitTest();
}
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -239,6 +239,24 @@ public class Account extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Account setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -635,6 +653,66 @@ public class Account extends DomainResource {
childrenList.add(new Property("description", "string", "Provides additional information about what the account tracks and how it is used.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("description", "string", "Provides additional information about what the account tracks and how it is used.", 0, java.lang.Integer.MAX_VALUE, description));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<AccountStatus>
case 1325532263: /*activePeriod*/ return this.activePeriod == null ? new Base[0] : new Base[] {this.activePeriod}; // Period
case 575402001: /*currency*/ return this.currency == null ? new Base[0] : new Base[] {this.currency}; // Coding
case -339185956: /*balance*/ return this.balance == null ? new Base[0] : new Base[] {this.balance}; // Money
case 1024117193: /*coveragePeriod*/ return this.coveragePeriod == null ? new Base[0] : new Base[] {this.coveragePeriod}; // Period
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case -892481550: // status
this.status = new AccountStatusEnumFactory().fromType(value); // Enumeration<AccountStatus>
break;
case 1325532263: // activePeriod
this.activePeriod = castToPeriod(value); // Period
break;
case 575402001: // currency
this.currency = castToCoding(value); // Coding
break;
case -339185956: // balance
this.balance = castToMoney(value); // Money
break;
case 1024117193: // coveragePeriod
this.coveragePeriod = castToPeriod(value); // Period
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 106164915: // owner
this.owner = castToReference(value); // Reference
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -663,6 +741,25 @@ public class Account extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 3575610: return getType(); // CodeableConcept
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<AccountStatus>
case 1325532263: return getActivePeriod(); // Period
case 575402001: return getCurrency(); // Coding
case -339185956: return getBalance(); // Money
case 1024117193: return getCoveragePeriod(); // Period
case -1867885268: return getSubject(); // Reference
case 106164915: return getOwner(); // Reference
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -765,8 +862,8 @@ public class Account extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, name, type, status return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, name, type, status
, activePeriod, currency, balance, coveragePeriod, subject, owner, description); , activePeriod, currency, balance, coveragePeriod, subject, owner, description);
} }
@Override @Override
@ -782,7 +879,9 @@ public class Account extends DomainResource {
* Path: <b>Account.owner</b><br> * Path: <b>Account.owner</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="owner", path="Account.owner", description="Who is responsible?", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="owner", path="Account.owner", description="Who is responsible?", type="reference", target={Organization.class} )
public static final String SP_OWNER = "owner"; public static final String SP_OWNER = "owner";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>owner</b> * <b>Fluent Client</b> search parameter constant for <b>owner</b>
@ -808,7 +907,9 @@ public class Account extends DomainResource {
* Path: <b>Account.identifier</b><br> * Path: <b>Account.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Account.identifier", description="Account number", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Account.identifier", description="Account number", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -828,7 +929,9 @@ public class Account extends DomainResource {
* Path: <b>Account.coveragePeriod</b><br> * Path: <b>Account.coveragePeriod</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="period", path="Account.coveragePeriod", description="Transaction window", type="date" ) // []
// []
@SearchParamDefinition(name="period", path="Account.coveragePeriod", description="Transaction window", type="date", target={} )
public static final String SP_PERIOD = "period"; public static final String SP_PERIOD = "period";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>period</b> * <b>Fluent Client</b> search parameter constant for <b>period</b>
@ -848,7 +951,9 @@ public class Account extends DomainResource {
* Path: <b>Account.balance</b><br> * Path: <b>Account.balance</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="balance", path="Account.balance", description="How much is in account?", type="quantity" ) // []
// []
@SearchParamDefinition(name="balance", path="Account.balance", description="How much is in account?", type="quantity", target={} )
public static final String SP_BALANCE = "balance"; public static final String SP_BALANCE = "balance";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>balance</b> * <b>Fluent Client</b> search parameter constant for <b>balance</b>
@ -868,7 +973,9 @@ public class Account extends DomainResource {
* Path: <b>Account.subject</b><br> * Path: <b>Account.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization, Device, Patient, HealthcareService, Location]
// [Practitioner, Organization, Device, Patient, HealthcareService, Location]
@SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, HealthcareService.class, Location.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -894,7 +1001,9 @@ public class Account extends DomainResource {
* Path: <b>Account.subject</b><br> * Path: <b>Account.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Account.subject", description="What is account tied to?", type="reference" ) // [Practitioner, Organization, Device, Patient, HealthcareService, Location]
// [Patient]
@SearchParamDefinition(name="patient", path="Account.subject", description="What is account tied to?", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, HealthcareService.class, Location.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -920,7 +1029,9 @@ public class Account extends DomainResource {
* Path: <b>Account.name</b><br> * Path: <b>Account.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" ) // []
// []
@SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string", target={} )
public static final String SP_NAME = "name"; public static final String SP_NAME = "name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>name</b> * <b>Fluent Client</b> search parameter constant for <b>name</b>
@ -940,7 +1051,9 @@ public class Account extends DomainResource {
* Path: <b>Account.type</b><br> * Path: <b>Account.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Account.type", description="E.g. patient, expense, depreciation", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Account.type", description="E.g. patient, expense, depreciation", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -960,7 +1073,9 @@ public class Account extends DomainResource {
* Path: <b>Account.status</b><br> * Path: <b>Account.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="Account.status", description="active | inactive", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="Account.status", description="active | inactive", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -661,6 +661,38 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor)); childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -889046145: /*actionIdentifier*/ return this.actionIdentifier == null ? new Base[0] : new Base[] {this.actionIdentifier}; // Identifier
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType>
case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type
case -1413299531: /*anchor*/ return this.anchor == null ? new Base[0] : new Base[] {this.anchor}; // Enumeration<ActionRelationshipAnchor>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -889046145: // actionIdentifier
this.actionIdentifier = castToIdentifier(value); // Identifier
break;
case -261851592: // relationship
this.relationship = new ActionRelationshipTypeEnumFactory().fromType(value); // Enumeration<ActionRelationshipType>
break;
case -1019779949: // offset
this.offset = (Type) value; // Type
break;
case -1413299531: // anchor
this.anchor = new ActionRelationshipAnchorEnumFactory().fromType(value); // Enumeration<ActionRelationshipAnchor>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionIdentifier")) if (name.equals("actionIdentifier"))
@ -675,6 +707,18 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -889046145: return getActionIdentifier(); // Identifier
case -261851592: throw new FHIRException("Cannot make property relationship as it is not a complex type"); // Enumeration<ActionRelationshipType>
case -1960684787: return getOffset(); // Type
case -1413299531: throw new FHIRException("Cannot make property anchor as it is not a complex type"); // Enumeration<ActionRelationshipAnchor>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("actionIdentifier")) { if (name.equals("actionIdentifier")) {
@ -731,8 +775,8 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, relationship return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, relationship
, offset, anchor); , offset, anchor);
} }
public String fhirType() { public String fhirType() {
@ -830,6 +874,30 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case 111972721: // value
this.value = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -840,6 +908,16 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // Coding
case 111972721: return getValue(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -883,7 +961,7 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
} }
public String fhirType() { public String fhirType() {
@ -1023,6 +1101,30 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -1795452264: // expression
this.expression = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -1033,6 +1135,16 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1795452264: throw new FHIRException("Cannot make property expression as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -1074,7 +1186,7 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, expression); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, expression);
} }
public String fhirType() { public String fhirType() {
@ -1432,6 +1544,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.concept; return this.concept;
} }
/**
* @return The first repetition of repeating field {@link #concept}, creating it if it does not already exist
*/
public CodeableConcept getConceptFirstRep() {
if (getConcept().isEmpty()) {
addConcept();
}
return getConcept().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setConcept(List<CodeableConcept> theConcept) {
this.concept = theConcept;
return this;
}
public boolean hasConcept() { public boolean hasConcept() {
if (this.concept == null) if (this.concept == null)
return false; return false;
@ -1472,6 +1602,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.supportingEvidence; return this.supportingEvidence;
} }
/**
* @return The first repetition of repeating field {@link #supportingEvidence}, creating it if it does not already exist
*/
public Attachment getSupportingEvidenceFirstRep() {
if (getSupportingEvidence().isEmpty()) {
addSupportingEvidence();
}
return getSupportingEvidence().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setSupportingEvidence(List<Attachment> theSupportingEvidence) {
this.supportingEvidence = theSupportingEvidence;
return this;
}
public boolean hasSupportingEvidence() { public boolean hasSupportingEvidence() {
if (this.supportingEvidence == null) if (this.supportingEvidence == null)
return false; return false;
@ -1512,6 +1660,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.documentation; return this.documentation;
} }
/**
* @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist
*/
public Attachment getDocumentationFirstRep() {
if (getDocumentation().isEmpty()) {
addDocumentation();
}
return getDocumentation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setDocumentation(List<Attachment> theDocumentation) {
this.documentation = theDocumentation;
return this;
}
public boolean hasDocumentation() { public boolean hasDocumentation() {
if (this.documentation == null) if (this.documentation == null)
return false; return false;
@ -1576,6 +1742,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.participantType; return this.participantType;
} }
/**
* @return The first repetition of repeating field {@link #participantType}, creating it if it does not already exist
*/
public Enumeration<ParticipantType> getParticipantTypeFirstRep() {
if (getParticipantType().isEmpty()) {
addParticipantTypeElement();
}
return getParticipantType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setParticipantType(List<Enumeration<ParticipantType>> theParticipantType) {
this.participantType = theParticipantType;
return this;
}
public boolean hasParticipantType() { public boolean hasParticipantType() {
if (this.participantType == null) if (this.participantType == null)
return false; return false;
@ -1616,7 +1800,7 @@ public class ActionDefinition extends Type implements ICompositeType {
if (this.participantType == null) if (this.participantType == null)
return false; return false;
for (Enumeration<ParticipantType> v : this.participantType) for (Enumeration<ParticipantType> v : this.participantType)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -1679,6 +1863,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.behavior; return this.behavior;
} }
/**
* @return The first repetition of repeating field {@link #behavior}, creating it if it does not already exist
*/
public ActionDefinitionBehaviorComponent getBehaviorFirstRep() {
if (getBehavior().isEmpty()) {
addBehavior();
}
return getBehavior().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setBehavior(List<ActionDefinitionBehaviorComponent> theBehavior) {
this.behavior = theBehavior;
return this;
}
public boolean hasBehavior() { public boolean hasBehavior() {
if (this.behavior == null) if (this.behavior == null)
return false; return false;
@ -1758,6 +1960,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.customization; return this.customization;
} }
/**
* @return The first repetition of repeating field {@link #customization}, creating it if it does not already exist
*/
public ActionDefinitionCustomizationComponent getCustomizationFirstRep() {
if (getCustomization().isEmpty()) {
addCustomization();
}
return getCustomization().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setCustomization(List<ActionDefinitionCustomizationComponent> theCustomization) {
this.customization = theCustomization;
return this;
}
public boolean hasCustomization() { public boolean hasCustomization() {
if (this.customization == null) if (this.customization == null)
return false; return false;
@ -1798,6 +2018,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.action; return this.action;
} }
/**
* @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
*/
public ActionDefinition getActionFirstRep() {
if (getAction().isEmpty()) {
addAction();
}
return getAction().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setAction(List<ActionDefinition> theAction) {
this.action = theAction;
return this;
}
public boolean hasAction() { public boolean hasAction() {
if (this.action == null) if (this.action == null)
return false; return false;
@ -1848,6 +2086,82 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("action", "ActionDefinition", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("action", "ActionDefinition", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -889046145: /*actionIdentifier*/ return this.actionIdentifier == null ? new Base[0] : new Base[] {this.actionIdentifier}; // Identifier
case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType
case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // CodeableConcept
case -1735429846: /*supportingEvidence*/ return this.supportingEvidence == null ? new Base[0] : this.supportingEvidence.toArray(new Base[this.supportingEvidence.size()]); // Attachment
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // Attachment
case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : new Base[] {this.relatedAction}; // ActionDefinitionRelatedActionComponent
case 841294093: /*participantType*/ return this.participantType == null ? new Base[0] : this.participantType.toArray(new Base[this.participantType.size()]); // Enumeration<ParticipantType>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActionType>
case 1510912594: /*behavior*/ return this.behavior == null ? new Base[0] : this.behavior.toArray(new Base[this.behavior.size()]); // ActionDefinitionBehaviorComponent
case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
case 1637263315: /*customization*/ return this.customization == null ? new Base[0] : this.customization.toArray(new Base[this.customization.size()]); // ActionDefinitionCustomizationComponent
case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // ActionDefinition
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -889046145: // actionIdentifier
this.actionIdentifier = castToIdentifier(value); // Identifier
break;
case 102727412: // label
this.label = castToString(value); // StringType
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -900391049: // textEquivalent
this.textEquivalent = castToString(value); // StringType
break;
case 951024232: // concept
this.getConcept().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1735429846: // supportingEvidence
this.getSupportingEvidence().add(castToAttachment(value)); // Attachment
break;
case 1587405498: // documentation
this.getDocumentation().add(castToAttachment(value)); // Attachment
break;
case -384107967: // relatedAction
this.relatedAction = (ActionDefinitionRelatedActionComponent) value; // ActionDefinitionRelatedActionComponent
break;
case 841294093: // participantType
this.getParticipantType().add(new ParticipantTypeEnumFactory().fromType(value)); // Enumeration<ParticipantType>
break;
case 3575610: // type
this.type = new ActionTypeEnumFactory().fromType(value); // Enumeration<ActionType>
break;
case 1510912594: // behavior
this.getBehavior().add((ActionDefinitionBehaviorComponent) value); // ActionDefinitionBehaviorComponent
break;
case -341064690: // resource
this.resource = castToReference(value); // Reference
break;
case 1637263315: // customization
this.getCustomization().add((ActionDefinitionCustomizationComponent) value); // ActionDefinitionCustomizationComponent
break;
case -1422950858: // action
this.getAction().add(castToActionDefinition(value)); // ActionDefinition
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionIdentifier")) if (name.equals("actionIdentifier"))
@ -1884,6 +2198,29 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -889046145: return getActionIdentifier(); // Identifier
case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -900391049: throw new FHIRException("Cannot make property textEquivalent as it is not a complex type"); // StringType
case 951024232: return addConcept(); // CodeableConcept
case -1735429846: return addSupportingEvidence(); // Attachment
case 1587405498: return addDocumentation(); // Attachment
case -384107967: return getRelatedAction(); // ActionDefinitionRelatedActionComponent
case 841294093: throw new FHIRException("Cannot make property participantType as it is not a complex type"); // Enumeration<ParticipantType>
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ActionType>
case 1510912594: return addBehavior(); // ActionDefinitionBehaviorComponent
case -341064690: return getResource(); // Reference
case 1637263315: return addCustomization(); // ActionDefinitionCustomizationComponent
case -1422950858: return addAction(); // ActionDefinition
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("actionIdentifier")) { if (name.equals("actionIdentifier")) {
@ -2025,9 +2362,9 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, label, title return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionIdentifier, label, title
, description, textEquivalent, concept, supportingEvidence, documentation, relatedAction , description, textEquivalent, concept, supportingEvidence, documentation, relatedAction, participantType
, participantType, type, behavior, resource, customization, action); , type, behavior, resource, customization, action);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -503,6 +503,24 @@ public class Address extends Type implements ICompositeType {
return this.line; return this.line;
} }
/**
* @return The first repetition of repeating field {@link #line}, creating it if it does not already exist
*/
public StringType getLineFirstRep() {
if (getLine().isEmpty()) {
addLineElement();
}
return getLine().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Address setLine(List<StringType> theLine) {
this.line = theLine;
return this;
}
public boolean hasLine() { public boolean hasLine() {
if (this.line == null) if (this.line == null)
return false; return false;
@ -831,6 +849,62 @@ public class Address extends Type implements ICompositeType {
childrenList.add(new Property("period", "Period", "Time period when address was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Time period when address was/is in use.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<AddressUse>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<AddressType>
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
case 3321844: /*line*/ return this.line == null ? new Base[0] : this.line.toArray(new Base[this.line.size()]); // StringType
case 3053931: /*city*/ return this.city == null ? new Base[0] : new Base[] {this.city}; // StringType
case 288961422: /*district*/ return this.district == null ? new Base[0] : new Base[] {this.district}; // StringType
case 109757585: /*state*/ return this.state == null ? new Base[0] : new Base[] {this.state}; // StringType
case 2011152728: /*postalCode*/ return this.postalCode == null ? new Base[0] : new Base[] {this.postalCode}; // StringType
case 957831062: /*country*/ return this.country == null ? new Base[0] : new Base[] {this.country}; // StringType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116103: // use
this.use = new AddressUseEnumFactory().fromType(value); // Enumeration<AddressUse>
break;
case 3575610: // type
this.type = new AddressTypeEnumFactory().fromType(value); // Enumeration<AddressType>
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
case 3321844: // line
this.getLine().add(castToString(value)); // StringType
break;
case 3053931: // city
this.city = castToString(value); // StringType
break;
case 288961422: // district
this.district = castToString(value); // StringType
break;
case 109757585: // state
this.state = castToString(value); // StringType
break;
case 2011152728: // postalCode
this.postalCode = castToString(value); // StringType
break;
case 957831062: // country
this.country = castToString(value); // StringType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("use")) if (name.equals("use"))
@ -857,6 +931,24 @@ public class Address extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<AddressUse>
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<AddressType>
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
case 3321844: throw new FHIRException("Cannot make property line as it is not a complex type"); // StringType
case 3053931: throw new FHIRException("Cannot make property city as it is not a complex type"); // StringType
case 288961422: throw new FHIRException("Cannot make property district as it is not a complex type"); // StringType
case 109757585: throw new FHIRException("Cannot make property state as it is not a complex type"); // StringType
case 2011152728: throw new FHIRException("Cannot make property postalCode as it is not a complex type"); // StringType
case 957831062: throw new FHIRException("Cannot make property country as it is not a complex type"); // StringType
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("use")) { if (name.equals("use")) {
@ -950,8 +1042,8 @@ public class Address extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, type, text, line, city return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, type, text, line, city, district
, district, state, postalCode, country, period); , state, postalCode, country, period);
} }

View File

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

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -878,6 +878,24 @@ public class AllergyIntolerance extends DomainResource {
return this.manifestation; return this.manifestation;
} }
/**
* @return The first repetition of repeating field {@link #manifestation}, creating it if it does not already exist
*/
public CodeableConcept getManifestationFirstRep() {
if (getManifestation().isEmpty()) {
addManifestation();
}
return getManifestation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AllergyIntoleranceReactionComponent setManifestation(List<CodeableConcept> theManifestation) {
this.manifestation = theManifestation;
return this;
}
public boolean hasManifestation() { public boolean hasManifestation() {
if (this.manifestation == null) if (this.manifestation == null)
return false; return false;
@ -1089,6 +1107,24 @@ public class AllergyIntolerance extends DomainResource {
return this.note; return this.note;
} }
/**
* @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
*/
public Annotation getNoteFirstRep() {
if (getNote().isEmpty()) {
addNote();
}
return getNote().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AllergyIntoleranceReactionComponent setNote(List<Annotation> theNote) {
this.note = theNote;
return this;
}
public boolean hasNote() { public boolean hasNote() {
if (this.note == null) if (this.note == null)
return false; return false;
@ -1132,6 +1168,54 @@ public class AllergyIntolerance extends DomainResource {
childrenList.add(new Property("note", "Annotation", "Additional text about the adverse reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note)); childrenList.add(new Property("note", "Annotation", "Additional text about the adverse reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableConcept
case -1404142937: /*certainty*/ return this.certainty == null ? new Base[0] : new Base[] {this.certainty}; // Enumeration<AllergyIntoleranceCertainty>
case 1115984422: /*manifestation*/ return this.manifestation == null ? new Base[0] : this.manifestation.toArray(new Base[this.manifestation.size()]); // CodeableConcept
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // DateTimeType
case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<AllergyIntoleranceSeverity>
case 421286274: /*exposureRoute*/ return this.exposureRoute == null ? new Base[0] : new Base[] {this.exposureRoute}; // CodeableConcept
case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 530040176: // substance
this.substance = castToCodeableConcept(value); // CodeableConcept
break;
case -1404142937: // certainty
this.certainty = new AllergyIntoleranceCertaintyEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceCertainty>
break;
case 1115984422: // manifestation
this.getManifestation().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 105901603: // onset
this.onset = castToDateTime(value); // DateTimeType
break;
case 1478300413: // severity
this.severity = new AllergyIntoleranceSeverityEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceSeverity>
break;
case 421286274: // exposureRoute
this.exposureRoute = castToCodeableConcept(value); // CodeableConcept
break;
case 3387378: // note
this.getNote().add(castToAnnotation(value)); // Annotation
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("substance")) if (name.equals("substance"))
@ -1154,6 +1238,22 @@ public class AllergyIntolerance extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 530040176: return getSubstance(); // CodeableConcept
case -1404142937: throw new FHIRException("Cannot make property certainty as it is not a complex type"); // Enumeration<AllergyIntoleranceCertainty>
case 1115984422: return addManifestation(); // CodeableConcept
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 105901603: throw new FHIRException("Cannot make property onset as it is not a complex type"); // DateTimeType
case 1478300413: throw new FHIRException("Cannot make property severity as it is not a complex type"); // Enumeration<AllergyIntoleranceSeverity>
case 421286274: return getExposureRoute(); // CodeableConcept
case 3387378: return addNote(); // Annotation
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("substance")) { if (name.equals("substance")) {
@ -1232,8 +1332,8 @@ public class AllergyIntolerance extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( substance, certainty, manifestation return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, certainty, manifestation
, description, onset, severity, exposureRoute, note); , description, onset, severity, exposureRoute, note);
} }
public String fhirType() { public String fhirType() {
@ -1383,6 +1483,24 @@ public class AllergyIntolerance extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AllergyIntolerance setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1912,6 +2030,24 @@ public class AllergyIntolerance extends DomainResource {
return this.note; return this.note;
} }
/**
* @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
*/
public Annotation getNoteFirstRep() {
if (getNote().isEmpty()) {
addNote();
}
return getNote().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AllergyIntolerance setNote(List<Annotation> theNote) {
this.note = theNote;
return this;
}
public boolean hasNote() { public boolean hasNote() {
if (this.note == null) if (this.note == null)
return false; return false;
@ -1952,6 +2088,24 @@ public class AllergyIntolerance extends DomainResource {
return this.reaction; return this.reaction;
} }
/**
* @return The first repetition of repeating field {@link #reaction}, creating it if it does not already exist
*/
public AllergyIntoleranceReactionComponent getReactionFirstRep() {
if (getReaction().isEmpty()) {
addReaction();
}
return getReaction().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AllergyIntolerance setReaction(List<AllergyIntoleranceReactionComponent> theReaction) {
this.reaction = theReaction;
return this;
}
public boolean hasReaction() { public boolean hasReaction() {
if (this.reaction == null) if (this.reaction == null)
return false; return false;
@ -2001,6 +2155,78 @@ public class AllergyIntolerance extends DomainResource {
childrenList.add(new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, reaction)); childrenList.add(new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, reaction));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<AllergyIntoleranceStatus>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<AllergyIntoleranceType>
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration<AllergyIntoleranceCategory>
case -1608054609: /*criticality*/ return this.criticality == null ? new Base[0] : new Base[] {this.criticality}; // Enumeration<AllergyIntoleranceCriticality>
case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableConcept
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case -1952893826: /*recordedDate*/ return this.recordedDate == null ? new Base[0] : new Base[] {this.recordedDate}; // DateTimeType
case -799233858: /*recorder*/ return this.recorder == null ? new Base[0] : new Base[] {this.recorder}; // Reference
case -427039519: /*reporter*/ return this.reporter == null ? new Base[0] : new Base[] {this.reporter}; // Reference
case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // DateTimeType
case 1307739841: /*lastOccurence*/ return this.lastOccurence == null ? new Base[0] : new Base[] {this.lastOccurence}; // DateTimeType
case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
case -867509719: /*reaction*/ return this.reaction == null ? new Base[0] : this.reaction.toArray(new Base[this.reaction.size()]); // AllergyIntoleranceReactionComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new AllergyIntoleranceStatusEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceStatus>
break;
case 3575610: // type
this.type = new AllergyIntoleranceTypeEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceType>
break;
case 50511102: // category
this.category = new AllergyIntoleranceCategoryEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceCategory>
break;
case -1608054609: // criticality
this.criticality = new AllergyIntoleranceCriticalityEnumFactory().fromType(value); // Enumeration<AllergyIntoleranceCriticality>
break;
case 530040176: // substance
this.substance = castToCodeableConcept(value); // CodeableConcept
break;
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case -1952893826: // recordedDate
this.recordedDate = castToDateTime(value); // DateTimeType
break;
case -799233858: // recorder
this.recorder = castToReference(value); // Reference
break;
case -427039519: // reporter
this.reporter = castToReference(value); // Reference
break;
case 105901603: // onset
this.onset = castToDateTime(value); // DateTimeType
break;
case 1307739841: // lastOccurence
this.lastOccurence = castToDateTime(value); // DateTimeType
break;
case 3387378: // note
this.getNote().add(castToAnnotation(value)); // Annotation
break;
case -867509719: // reaction
this.getReaction().add((AllergyIntoleranceReactionComponent) value); // AllergyIntoleranceReactionComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -2035,6 +2261,28 @@ public class AllergyIntolerance extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<AllergyIntoleranceStatus>
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<AllergyIntoleranceType>
case 50511102: throw new FHIRException("Cannot make property category as it is not a complex type"); // Enumeration<AllergyIntoleranceCategory>
case -1608054609: throw new FHIRException("Cannot make property criticality as it is not a complex type"); // Enumeration<AllergyIntoleranceCriticality>
case 530040176: return getSubstance(); // CodeableConcept
case -791418107: return getPatient(); // Reference
case -1952893826: throw new FHIRException("Cannot make property recordedDate as it is not a complex type"); // DateTimeType
case -799233858: return getRecorder(); // Reference
case -427039519: return getReporter(); // Reference
case 105901603: throw new FHIRException("Cannot make property onset as it is not a complex type"); // DateTimeType
case 1307739841: throw new FHIRException("Cannot make property lastOccurence as it is not a complex type"); // DateTimeType
case 3387378: return addNote(); // Annotation
case -867509719: return addReaction(); // AllergyIntoleranceReactionComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -2155,9 +2403,9 @@ public class AllergyIntolerance extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, type, category return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type, category
, criticality, substance, patient, recordedDate, recorder, reporter, onset, lastOccurence , criticality, substance, patient, recordedDate, recorder, reporter, onset, lastOccurence, note
, note, reaction); , reaction);
} }
@Override @Override
@ -2173,7 +2421,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.reaction.severity</b><br> * Path: <b>AllergyIntolerance.reaction.severity</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="mild | moderate | severe (of event as a whole)", type="token" ) // []
// []
@SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="mild | moderate | severe (of event as a whole)", type="token", target={} )
public static final String SP_SEVERITY = "severity"; public static final String SP_SEVERITY = "severity";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>severity</b> * <b>Fluent Client</b> search parameter constant for <b>severity</b>
@ -2193,7 +2443,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.recordedDate</b><br> * Path: <b>AllergyIntolerance.recordedDate</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -2213,7 +2465,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.identifier</b><br> * Path: <b>AllergyIntolerance.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External ids for this item", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External ids for this item", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -2233,7 +2487,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.reaction.manifestation</b><br> * Path: <b>AllergyIntolerance.reaction.manifestation</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="manifestation", path="AllergyIntolerance.reaction.manifestation", description="Clinical symptoms/signs associated with the Event", type="token" ) // []
// []
@SearchParamDefinition(name="manifestation", path="AllergyIntolerance.reaction.manifestation", description="Clinical symptoms/signs associated with the Event", type="token", target={} )
public static final String SP_MANIFESTATION = "manifestation"; public static final String SP_MANIFESTATION = "manifestation";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>manifestation</b> * <b>Fluent Client</b> search parameter constant for <b>manifestation</b>
@ -2253,7 +2509,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.recorder</b><br> * Path: <b>AllergyIntolerance.recorder</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Patient]
// [Practitioner, Patient]
@SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference", target={Practitioner.class, Patient.class} )
public static final String SP_RECORDER = "recorder"; public static final String SP_RECORDER = "recorder";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>recorder</b> * <b>Fluent Client</b> search parameter constant for <b>recorder</b>
@ -2279,7 +2537,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.substance, AllergyIntolerance.reaction.substance</b><br> * Path: <b>AllergyIntolerance.substance, AllergyIntolerance.reaction.substance</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="substance", path="AllergyIntolerance.substance | AllergyIntolerance.reaction.substance", description="Substance, (or class) considered to be responsible for risk", type="token" ) // []
// []
@SearchParamDefinition(name="substance", path="AllergyIntolerance.substance | AllergyIntolerance.reaction.substance", description="Substance, (or class) considered to be responsible for risk", type="token", target={} )
public static final String SP_SUBSTANCE = "substance"; public static final String SP_SUBSTANCE = "substance";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>substance</b> * <b>Fluent Client</b> search parameter constant for <b>substance</b>
@ -2299,7 +2559,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.criticality</b><br> * Path: <b>AllergyIntolerance.criticality</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unable-to-assess", type="token" ) // []
// []
@SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unable-to-assess", type="token", target={} )
public static final String SP_CRITICALITY = "criticality"; public static final String SP_CRITICALITY = "criticality";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>criticality</b> * <b>Fluent Client</b> search parameter constant for <b>criticality</b>
@ -2319,7 +2581,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.reporter</b><br> * Path: <b>AllergyIntolerance.reporter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Patient, RelatedPerson]
// [Practitioner, Patient, RelatedPerson]
@SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference", target={Practitioner.class, Patient.class, RelatedPerson.class} )
public static final String SP_REPORTER = "reporter"; public static final String SP_REPORTER = "reporter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>reporter</b> * <b>Fluent Client</b> search parameter constant for <b>reporter</b>
@ -2345,7 +2609,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.type</b><br> * Path: <b>AllergyIntolerance.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="allergy | intolerance - Underlying mechanism (if known)", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="allergy | intolerance - Underlying mechanism (if known)", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -2365,7 +2631,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.reaction.onset</b><br> * Path: <b>AllergyIntolerance.reaction.onset</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="Date(/time) when manifestations showed", type="date" ) // []
// []
@SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="Date(/time) when manifestations showed", type="date", target={} )
public static final String SP_ONSET = "onset"; public static final String SP_ONSET = "onset";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>onset</b> * <b>Fluent Client</b> search parameter constant for <b>onset</b>
@ -2385,7 +2653,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br> * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="How the subject was exposed to the substance", type="token" ) // []
// []
@SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="How the subject was exposed to the substance", type="token", target={} )
public static final String SP_ROUTE = "route"; public static final String SP_ROUTE = "route";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>route</b> * <b>Fluent Client</b> search parameter constant for <b>route</b>
@ -2405,7 +2675,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.patient</b><br> * Path: <b>AllergyIntolerance.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="Who the sensitivity is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="Who the sensitivity is for", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -2431,7 +2703,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.category</b><br> * Path: <b>AllergyIntolerance.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment | other - Category of Substance", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment | other - Category of Substance", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>
@ -2451,7 +2725,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.lastOccurence</b><br> * Path: <b>AllergyIntolerance.lastOccurence</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurrence of a reaction", type="date" ) // []
// []
@SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurrence of a reaction", type="date", target={} )
public static final String SP_LAST_DATE = "last-date"; public static final String SP_LAST_DATE = "last-date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>last-date</b> * <b>Fluent Client</b> search parameter constant for <b>last-date</b>
@ -2471,7 +2747,9 @@ public class AllergyIntolerance extends DomainResource {
* Path: <b>AllergyIntolerance.status</b><br> * Path: <b>AllergyIntolerance.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -230,6 +230,34 @@ public class Annotation extends Type implements ICompositeType {
childrenList.add(new Property("text", "string", "The text of the annotation.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("text", "string", "The text of the annotation.", 0, java.lang.Integer.MAX_VALUE, text));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Type
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1406328437: // author
this.author = (Type) value; // Type
break;
case 3560141: // time
this.time = castToDateTime(value); // DateTimeType
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("author[x]")) if (name.equals("author[x]"))
@ -242,6 +270,17 @@ public class Annotation extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1475597077: return getAuthor(); // Type
case 3560141: throw new FHIRException("Cannot make property time as it is not a complex type"); // DateTimeType
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("authorReference")) { if (name.equals("authorReference")) {
@ -302,7 +341,7 @@ public class Annotation extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( author, time, text); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(author, time, text);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -497,6 +497,24 @@ public class Appointment extends DomainResource {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AppointmentParticipantComponent setType(List<CodeableConcept> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -669,6 +687,38 @@ public class Appointment extends DomainResource {
childrenList.add(new Property("status", "code", "Participation status of the Patient.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("status", "code", "Participation status of the Patient.", 0, java.lang.Integer.MAX_VALUE, status));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // Enumeration<ParticipantRequired>
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ParticipationStatus>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.getType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 92645877: // actor
this.actor = castToReference(value); // Reference
break;
case -393139297: // required
this.required = new ParticipantRequiredEnumFactory().fromType(value); // Enumeration<ParticipantRequired>
break;
case -892481550: // status
this.status = new ParticipationStatusEnumFactory().fromType(value); // Enumeration<ParticipationStatus>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -683,6 +733,18 @@ public class Appointment extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return addType(); // CodeableConcept
case 92645877: return getActor(); // Reference
case -393139297: throw new FHIRException("Cannot make property required as it is not a complex type"); // Enumeration<ParticipantRequired>
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ParticipationStatus>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -738,8 +800,7 @@ public class Appointment extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, actor, required, status return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, actor, required, status);
);
} }
public String fhirType() { public String fhirType() {
@ -892,6 +953,24 @@ public class Appointment extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Appointment setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1001,6 +1080,24 @@ public class Appointment extends DomainResource {
return this.serviceType; return this.serviceType;
} }
/**
* @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist
*/
public CodeableConcept getServiceTypeFirstRep() {
if (getServiceType().isEmpty()) {
addServiceType();
}
return getServiceType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Appointment setServiceType(List<CodeableConcept> theServiceType) {
this.serviceType = theServiceType;
return this;
}
public boolean hasServiceType() { public boolean hasServiceType() {
if (this.serviceType == null) if (this.serviceType == null)
return false; return false;
@ -1041,6 +1138,24 @@ public class Appointment extends DomainResource {
return this.specialty; return this.specialty;
} }
/**
* @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist
*/
public CodeableConcept getSpecialtyFirstRep() {
if (getSpecialty().isEmpty()) {
addSpecialty();
}
return getSpecialty().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Appointment setSpecialty(List<CodeableConcept> theSpecialty) {
this.specialty = theSpecialty;
return this;
}
public boolean hasSpecialty() { public boolean hasSpecialty() {
if (this.specialty == null) if (this.specialty == null)
return false; return false;
@ -1366,6 +1481,24 @@ public class Appointment extends DomainResource {
return this.slot; return this.slot;
} }
/**
* @return The first repetition of repeating field {@link #slot}, creating it if it does not already exist
*/
public Reference getSlotFirstRep() {
if (getSlot().isEmpty()) {
addSlot();
}
return getSlot().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Appointment setSlot(List<Reference> theSlot) {
this.slot = theSlot;
return this;
}
public boolean hasSlot() { public boolean hasSlot() {
if (this.slot == null) if (this.slot == null)
return false; return false;
@ -1525,6 +1658,24 @@ public class Appointment extends DomainResource {
return this.participant; return this.participant;
} }
/**
* @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
*/
public AppointmentParticipantComponent getParticipantFirstRep() {
if (getParticipant().isEmpty()) {
addParticipant();
}
return getParticipant().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Appointment setParticipant(List<AppointmentParticipantComponent> theParticipant) {
this.participant = theParticipant;
return this;
}
public boolean hasParticipant() { public boolean hasParticipant() {
if (this.participant == null) if (this.participant == null)
return false; return false;
@ -1576,6 +1727,86 @@ public class Appointment extends DomainResource {
childrenList.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); childrenList.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<AppointmentStatus>
case 1281188563: /*serviceCategory*/ return this.serviceCategory == null ? new Base[0] : new Base[] {this.serviceCategory}; // CodeableConcept
case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableConcept
case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
case -1596426375: /*appointmentType*/ return this.appointmentType == null ? new Base[0] : new Base[] {this.appointmentType}; // CodeableConcept
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // UnsignedIntType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType
case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType
case -413630573: /*minutesDuration*/ return this.minutesDuration == null ? new Base[0] : new Base[] {this.minutesDuration}; // PositiveIntType
case 3533310: /*slot*/ return this.slot == null ? new Base[0] : this.slot.toArray(new Base[this.slot.size()]); // Reference
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // AppointmentParticipantComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new AppointmentStatusEnumFactory().fromType(value); // Enumeration<AppointmentStatus>
break;
case 1281188563: // serviceCategory
this.serviceCategory = castToCodeableConcept(value); // CodeableConcept
break;
case -1928370289: // serviceType
this.getServiceType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1694759682: // specialty
this.getSpecialty().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1596426375: // appointmentType
this.appointmentType = castToCodeableConcept(value); // CodeableConcept
break;
case -934964668: // reason
this.reason = castToCodeableConcept(value); // CodeableConcept
break;
case -1165461084: // priority
this.priority = castToUnsignedInt(value); // UnsignedIntType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 109757538: // start
this.start = castToInstant(value); // InstantType
break;
case 100571: // end
this.end = castToInstant(value); // InstantType
break;
case -413630573: // minutesDuration
this.minutesDuration = castToPositiveInt(value); // PositiveIntType
break;
case 3533310: // slot
this.getSlot().add(castToReference(value)); // Reference
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case 950398559: // comment
this.comment = castToString(value); // StringType
break;
case 767422259: // participant
this.getParticipant().add((AppointmentParticipantComponent) value); // AppointmentParticipantComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1614,6 +1845,30 @@ public class Appointment extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<AppointmentStatus>
case 1281188563: return getServiceCategory(); // CodeableConcept
case -1928370289: return addServiceType(); // CodeableConcept
case -1694759682: return addSpecialty(); // CodeableConcept
case -1596426375: return getAppointmentType(); // CodeableConcept
case -934964668: return getReason(); // CodeableConcept
case -1165461084: throw new FHIRException("Cannot make property priority as it is not a complex type"); // UnsignedIntType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // InstantType
case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // InstantType
case -413630573: throw new FHIRException("Cannot make property minutesDuration as it is not a complex type"); // PositiveIntType
case 3533310: return addSlot(); // Reference
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case 950398559: throw new FHIRException("Cannot make property comment as it is not a complex type"); // StringType
case 767422259: return addParticipant(); // AppointmentParticipantComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1750,9 +2005,9 @@ public class Appointment extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, serviceCategory return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, serviceCategory
, serviceType, specialty, appointmentType, reason, priority, description, start, end , serviceType, specialty, appointmentType, reason, priority, description, start, end, minutesDuration
, minutesDuration, slot, created, comment, participant); , slot, created, comment, participant);
} }
@Override @Override
@ -1768,7 +2023,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.start</b><br> * Path: <b>Appointment.start</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1788,7 +2045,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.participant.actor</b><br> * Path: <b>Appointment.participant.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
@SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_ACTOR = "actor"; public static final String SP_ACTOR = "actor";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>actor</b> * <b>Fluent Client</b> search parameter constant for <b>actor</b>
@ -1814,7 +2073,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.identifier</b><br> * Path: <b>Appointment.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1834,7 +2095,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.participant.actor</b><br> * Path: <b>Appointment.participant.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="practitioner", path="Appointment.participant.actor", description="One of the individuals of the appointment is this practitioner", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Practitioner]
@SearchParamDefinition(name="practitioner", path="Appointment.participant.actor", description="One of the individuals of the appointment is this practitioner", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_PRACTITIONER = "practitioner"; public static final String SP_PRACTITIONER = "practitioner";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>practitioner</b> * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
@ -1860,7 +2123,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.participant.status</b><br> * Path: <b>Appointment.participant.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" ) // []
// []
@SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token", target={} )
public static final String SP_PART_STATUS = "part-status"; public static final String SP_PART_STATUS = "part-status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>part-status</b> * <b>Fluent Client</b> search parameter constant for <b>part-status</b>
@ -1880,7 +2145,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.participant.actor</b><br> * Path: <b>Appointment.participant.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Patient]
@SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1906,7 +2173,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.appointmentType</b><br> * Path: <b>Appointment.appointmentType</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="appointment-type", path="Appointment.appointmentType", description="The style of appointment or patient that has been booked in the slot (not service type)", type="token" ) // []
// []
@SearchParamDefinition(name="appointment-type", path="Appointment.appointmentType", description="The style of appointment or patient that has been booked in the slot (not service type)", type="token", target={} )
public static final String SP_APPOINTMENT_TYPE = "appointment-type"; public static final String SP_APPOINTMENT_TYPE = "appointment-type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>appointment-type</b> * <b>Fluent Client</b> search parameter constant for <b>appointment-type</b>
@ -1926,7 +2195,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.serviceType</b><br> * Path: <b>Appointment.serviceType</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="service-type", path="Appointment.serviceType", description="The specific service that is to be performed during this appointment", type="token" ) // []
// []
@SearchParamDefinition(name="service-type", path="Appointment.serviceType", description="The specific service that is to be performed during this appointment", type="token", target={} )
public static final String SP_SERVICE_TYPE = "service-type"; public static final String SP_SERVICE_TYPE = "service-type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>service-type</b> * <b>Fluent Client</b> search parameter constant for <b>service-type</b>
@ -1946,7 +2217,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.participant.actor</b><br> * Path: <b>Appointment.participant.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location", path="Appointment.participant.actor", description="This location is listed in the participants of the appointment", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Location]
@SearchParamDefinition(name="location", path="Appointment.participant.actor", description="This location is listed in the participants of the appointment", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_LOCATION = "location"; public static final String SP_LOCATION = "location";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location</b> * <b>Fluent Client</b> search parameter constant for <b>location</b>
@ -1972,7 +2245,9 @@ public class Appointment extends DomainResource {
* Path: <b>Appointment.status</b><br> * Path: <b>Appointment.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -140,6 +140,24 @@ public class AppointmentResponse extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AppointmentResponse setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -322,6 +340,24 @@ public class AppointmentResponse extends DomainResource {
return this.participantType; return this.participantType;
} }
/**
* @return The first repetition of repeating field {@link #participantType}, creating it if it does not already exist
*/
public CodeableConcept getParticipantTypeFirstRep() {
if (getParticipantType().isEmpty()) {
addParticipantType();
}
return getParticipantType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AppointmentResponse setParticipantType(List<CodeableConcept> theParticipantType) {
this.participantType = theParticipantType;
return this;
}
public boolean hasParticipantType() { public boolean hasParticipantType() {
if (this.participantType == null) if (this.participantType == null)
return false; return false;
@ -498,6 +534,54 @@ public class AppointmentResponse extends DomainResource {
childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment)); childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -1474995297: /*appointment*/ return this.appointment == null ? new Base[0] : new Base[] {this.appointment}; // Reference
case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType
case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType
case 841294093: /*participantType*/ return this.participantType == null ? new Base[0] : this.participantType.toArray(new Base[this.participantType.size()]); // CodeableConcept
case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
case 996096261: /*participantStatus*/ return this.participantStatus == null ? new Base[0] : new Base[] {this.participantStatus}; // CodeType
case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -1474995297: // appointment
this.appointment = castToReference(value); // Reference
break;
case 109757538: // start
this.start = castToInstant(value); // InstantType
break;
case 100571: // end
this.end = castToInstant(value); // InstantType
break;
case 841294093: // participantType
this.getParticipantType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 92645877: // actor
this.actor = castToReference(value); // Reference
break;
case 996096261: // participantStatus
this.participantStatus = castToCode(value); // CodeType
break;
case 950398559: // comment
this.comment = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -520,6 +604,22 @@ public class AppointmentResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -1474995297: return getAppointment(); // Reference
case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // InstantType
case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // InstantType
case 841294093: return addParticipantType(); // CodeableConcept
case 92645877: return getActor(); // Reference
case 996096261: throw new FHIRException("Cannot make property participantStatus as it is not a complex type"); // CodeType
case 950398559: throw new FHIRException("Cannot make property comment as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -608,8 +708,8 @@ public class AppointmentResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, appointment, start return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, appointment, start
, end, participantType, actor, participantStatus, comment); , end, participantType, actor, participantStatus, comment);
} }
@Override @Override
@ -625,7 +725,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.actor</b><br> * Path: <b>AppointmentResponse.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
@SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_ACTOR = "actor"; public static final String SP_ACTOR = "actor";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>actor</b> * <b>Fluent Client</b> search parameter constant for <b>actor</b>
@ -651,7 +753,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.identifier</b><br> * Path: <b>AppointmentResponse.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="AppointmentResponse.identifier", description="An Identifier in this appointment response", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="AppointmentResponse.identifier", description="An Identifier in this appointment response", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -671,7 +775,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.actor</b><br> * Path: <b>AppointmentResponse.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="practitioner", path="AppointmentResponse.actor", description="This Response is for this Practitioner", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Practitioner]
@SearchParamDefinition(name="practitioner", path="AppointmentResponse.actor", description="This Response is for this Practitioner", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_PRACTITIONER = "practitioner"; public static final String SP_PRACTITIONER = "practitioner";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>practitioner</b> * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
@ -697,7 +803,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.participantStatus</b><br> * Path: <b>AppointmentResponse.participantStatus</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="part-status", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token" ) // []
// []
@SearchParamDefinition(name="part-status", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token", target={} )
public static final String SP_PART_STATUS = "part-status"; public static final String SP_PART_STATUS = "part-status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>part-status</b> * <b>Fluent Client</b> search parameter constant for <b>part-status</b>
@ -717,7 +825,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.actor</b><br> * Path: <b>AppointmentResponse.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="AppointmentResponse.actor", description="This Response is for this Patient", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Patient]
@SearchParamDefinition(name="patient", path="AppointmentResponse.actor", description="This Response is for this Patient", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -743,7 +853,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.appointment</b><br> * Path: <b>AppointmentResponse.appointment</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference" ) // [Appointment]
// [Appointment]
@SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference", target={Appointment.class} )
public static final String SP_APPOINTMENT = "appointment"; public static final String SP_APPOINTMENT = "appointment";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>appointment</b> * <b>Fluent Client</b> search parameter constant for <b>appointment</b>
@ -769,7 +881,9 @@ public class AppointmentResponse extends DomainResource {
* Path: <b>AppointmentResponse.actor</b><br> * Path: <b>AppointmentResponse.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location", path="AppointmentResponse.actor", description="This Response is for this Location", type="reference" ) // [Practitioner, Device, Patient, HealthcareService, RelatedPerson, Location]
// [Location]
@SearchParamDefinition(name="location", path="AppointmentResponse.actor", description="This Response is for this Location", type="reference", target={Practitioner.class, Device.class, Patient.class, HealthcareService.class, RelatedPerson.class, Location.class} )
public static final String SP_LOCATION = "location"; public static final String SP_LOCATION = "location";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location</b> * <b>Fluent Client</b> search parameter constant for <b>location</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -512,6 +512,54 @@ public class Attachment extends Type implements ICompositeType {
childrenList.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, java.lang.Integer.MAX_VALUE, creation)); childrenList.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, java.lang.Integer.MAX_VALUE, creation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // Base64BinaryType
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 3530753: /*size*/ return this.size == null ? new Base[0] : new Base[] {this.size}; // UnsignedIntType
case 3195150: /*hash*/ return this.hash == null ? new Base[0] : new Base[] {this.hash}; // Base64BinaryType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case 1820421855: /*creation*/ return this.creation == null ? new Base[0] : new Base[] {this.creation}; // DateTimeType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
break;
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 3076010: // data
this.data = castToBase64Binary(value); // Base64BinaryType
break;
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 3530753: // size
this.size = castToUnsignedInt(value); // UnsignedIntType
break;
case 3195150: // hash
this.hash = castToBase64Binary(value); // Base64BinaryType
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case 1820421855: // creation
this.creation = castToDateTime(value); // DateTimeType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("contentType")) if (name.equals("contentType"))
@ -534,6 +582,22 @@ public class Attachment extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // CodeType
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 3076010: throw new FHIRException("Cannot make property data as it is not a complex type"); // Base64BinaryType
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case 3530753: throw new FHIRException("Cannot make property size as it is not a complex type"); // UnsignedIntType
case 3195150: throw new FHIRException("Cannot make property hash as it is not a complex type"); // Base64BinaryType
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case 1820421855: throw new FHIRException("Cannot make property creation as it is not a complex type"); // DateTimeType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) { if (name.equals("contentType")) {
@ -614,8 +678,8 @@ public class Attachment extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, language, data, url return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, language, data, url
, size, hash, title, creation); , size, hash, title, creation);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -552,6 +552,24 @@ public class AuditEvent extends DomainResource {
return this.role; return this.role;
} }
/**
* @return The first repetition of repeating field {@link #role}, creating it if it does not already exist
*/
public CodeableConcept getRoleFirstRep() {
if (getRole().isEmpty()) {
addRole();
}
return getRole().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventAgentComponent setRole(List<CodeableConcept> theRole) {
this.role = theRole;
return this;
}
public boolean hasRole() { public boolean hasRole() {
if (this.role == null) if (this.role == null)
return false; return false;
@ -842,6 +860,24 @@ public class AuditEvent extends DomainResource {
return this.policy; return this.policy;
} }
/**
* @return The first repetition of repeating field {@link #policy}, creating it if it does not already exist
*/
public UriType getPolicyFirstRep() {
if (getPolicy().isEmpty()) {
addPolicyElement();
}
return getPolicy().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventAgentComponent setPolicy(List<UriType> thePolicy) {
this.policy = thePolicy;
return this;
}
public boolean hasPolicy() { public boolean hasPolicy() {
if (this.policy == null) if (this.policy == null)
return false; return false;
@ -944,6 +980,24 @@ public class AuditEvent extends DomainResource {
return this.purposeOfUse; return this.purposeOfUse;
} }
/**
* @return The first repetition of repeating field {@link #purposeOfUse}, creating it if it does not already exist
*/
public Coding getPurposeOfUseFirstRep() {
if (getPurposeOfUse().isEmpty()) {
addPurposeOfUse();
}
return getPurposeOfUse().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventAgentComponent setPurposeOfUse(List<Coding> thePurposeOfUse) {
this.purposeOfUse = thePurposeOfUse;
return this;
}
public boolean hasPurposeOfUse() { public boolean hasPurposeOfUse() {
if (this.purposeOfUse == null) if (this.purposeOfUse == null)
return false; return false;
@ -990,6 +1044,66 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("purposeOfUse", "Coding", "The reason (purpose of use), specific to this agent, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse)); childrenList.add(new Property("purposeOfUse", "Coding", "The reason (purpose of use), specific to this agent, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
case -836030906: /*userId*/ return this.userId == null ? new Base[0] : new Base[] {this.userId}; // Identifier
case 92912804: /*altId*/ return this.altId == null ? new Base[0] : new Base[] {this.altId}; // StringType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // BooleanType
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // UriType
case 103772132: /*media*/ return this.media == null ? new Base[0] : new Base[] {this.media}; // Coding
case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // AuditEventAgentNetworkComponent
case -1881902670: /*purposeOfUse*/ return this.purposeOfUse == null ? new Base[0] : this.purposeOfUse.toArray(new Base[this.purposeOfUse.size()]); // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3506294: // role
this.getRole().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -925155509: // reference
this.reference = castToReference(value); // Reference
break;
case -836030906: // userId
this.userId = castToIdentifier(value); // Identifier
break;
case 92912804: // altId
this.altId = castToString(value); // StringType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 693934258: // requestor
this.requestor = castToBoolean(value); // BooleanType
break;
case 1901043637: // location
this.location = castToReference(value); // Reference
break;
case -982670030: // policy
this.getPolicy().add(castToUri(value)); // UriType
break;
case 103772132: // media
this.media = castToCoding(value); // Coding
break;
case 1843485230: // network
this.network = (AuditEventAgentNetworkComponent) value; // AuditEventAgentNetworkComponent
break;
case -1881902670: // purposeOfUse
this.getPurposeOfUse().add(castToCoding(value)); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("role")) if (name.equals("role"))
@ -1018,6 +1132,25 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3506294: return addRole(); // CodeableConcept
case -925155509: return getReference(); // Reference
case -836030906: return getUserId(); // Identifier
case 92912804: throw new FHIRException("Cannot make property altId as it is not a complex type"); // StringType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 693934258: throw new FHIRException("Cannot make property requestor as it is not a complex type"); // BooleanType
case 1901043637: return getLocation(); // Reference
case -982670030: throw new FHIRException("Cannot make property policy as it is not a complex type"); // UriType
case 103772132: return getMedia(); // Coding
case 1843485230: return getNetwork(); // AuditEventAgentNetworkComponent
case -1881902670: return addPurposeOfUse(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("role")) { if (name.equals("role")) {
@ -1116,8 +1249,8 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, reference, userId, altId return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, reference, userId, altId
, name, requestor, location, policy, media, network, purposeOfUse); , name, requestor, location, policy, media, network, purposeOfUse);
} }
public String fhirType() { public String fhirType() {
@ -1256,6 +1389,30 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, java.lang.Integer.MAX_VALUE, type));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // StringType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<AuditEventParticipantNetworkType>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1147692044: // address
this.address = castToString(value); // StringType
break;
case 3575610: // type
this.type = new AuditEventParticipantNetworkTypeEnumFactory().fromType(value); // Enumeration<AuditEventParticipantNetworkType>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("address")) if (name.equals("address"))
@ -1266,6 +1423,16 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1147692044: throw new FHIRException("Cannot make property address as it is not a complex type"); // StringType
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<AuditEventParticipantNetworkType>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("address")) { if (name.equals("address")) {
@ -1307,7 +1474,7 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( address, type); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(address, type);
} }
public String fhirType() { public String fhirType() {
@ -1439,6 +1606,24 @@ public class AuditEvent extends DomainResource {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public Coding getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventSourceComponent setType(List<Coding> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -1477,6 +1662,34 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // StringType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3530567: // site
this.site = castToString(value); // StringType
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 3575610: // type
this.getType().add(castToCoding(value)); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("site")) if (name.equals("site"))
@ -1489,6 +1702,17 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3530567: throw new FHIRException("Cannot make property site as it is not a complex type"); // StringType
case -1618432855: return getIdentifier(); // Identifier
case 3575610: return addType(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("site")) { if (name.equals("site")) {
@ -1540,7 +1764,7 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( site, identifier, type); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, identifier, type);
} }
public String fhirType() { public String fhirType() {
@ -1780,6 +2004,24 @@ public class AuditEvent extends DomainResource {
return this.securityLabel; return this.securityLabel;
} }
/**
* @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist
*/
public Coding getSecurityLabelFirstRep() {
if (getSecurityLabel().isEmpty()) {
addSecurityLabel();
}
return getSecurityLabel().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventEntityComponent setSecurityLabel(List<Coding> theSecurityLabel) {
this.securityLabel = theSecurityLabel;
return this;
}
public boolean hasSecurityLabel() { public boolean hasSecurityLabel() {
if (this.securityLabel == null) if (this.securityLabel == null)
return false; return false;
@ -1967,6 +2209,24 @@ public class AuditEvent extends DomainResource {
return this.detail; return this.detail;
} }
/**
* @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist
*/
public AuditEventEntityDetailComponent getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEventEntityComponent setDetail(List<AuditEventEntityDetailComponent> theDetail) {
this.detail = theDetail;
return this;
}
public boolean hasDetail() { public boolean hasDetail() {
if (this.detail == null) if (this.detail == null)
return false; return false;
@ -2012,6 +2272,62 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("detail", "", "Additional Information about the entity.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("detail", "", "Additional Information about the entity.", 0, java.lang.Integer.MAX_VALUE, detail));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // Coding
case -302323862: /*lifecycle*/ return this.lifecycle == null ? new Base[0] : new Base[] {this.lifecycle}; // Coding
case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // Coding
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 107944136: /*query*/ return this.query == null ? new Base[0] : new Base[] {this.query}; // Base64BinaryType
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // AuditEventEntityDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case -925155509: // reference
this.reference = castToReference(value); // Reference
break;
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case 3506294: // role
this.role = castToCoding(value); // Coding
break;
case -302323862: // lifecycle
this.lifecycle = castToCoding(value); // Coding
break;
case -722296940: // securityLabel
this.getSecurityLabel().add(castToCoding(value)); // Coding
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 107944136: // query
this.query = castToBase64Binary(value); // Base64BinaryType
break;
case -1335224239: // detail
this.getDetail().add((AuditEventEntityDetailComponent) value); // AuditEventEntityDetailComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -2038,6 +2354,24 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return getIdentifier(); // Identifier
case -925155509: return getReference(); // Reference
case 3575610: return getType(); // Coding
case 3506294: return getRole(); // Coding
case -302323862: return getLifecycle(); // Coding
case -722296940: return addSecurityLabel(); // Coding
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 107944136: throw new FHIRException("Cannot make property query as it is not a complex type"); // Base64BinaryType
case -1335224239: return addDetail(); // AuditEventEntityDetailComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -2128,8 +2462,8 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, reference, type, role return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, reference, type, role
, lifecycle, securityLabel, name, description, query, detail); , lifecycle, securityLabel, name, description, query, detail);
} }
public String fhirType() { public String fhirType() {
@ -2269,6 +2603,30 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("value", "base64Binary", "Property value.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value", "base64Binary", "Property value.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Base64BinaryType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToString(value); // StringType
break;
case 111972721: // value
this.value = castToBase64Binary(value); // Base64BinaryType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -2279,6 +2637,16 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // StringType
case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // Base64BinaryType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -2320,7 +2688,7 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
} }
public String fhirType() { public String fhirType() {
@ -2452,6 +2820,24 @@ public class AuditEvent extends DomainResource {
return this.subtype; return this.subtype;
} }
/**
* @return The first repetition of repeating field {@link #subtype}, creating it if it does not already exist
*/
public Coding getSubtypeFirstRep() {
if (getSubtype().isEmpty()) {
addSubtype();
}
return getSubtype().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEvent setSubtype(List<Coding> theSubtype) {
this.subtype = theSubtype;
return this;
}
public boolean hasSubtype() { public boolean hasSubtype() {
if (this.subtype == null) if (this.subtype == null)
return false; return false;
@ -2684,6 +3070,24 @@ public class AuditEvent extends DomainResource {
return this.purposeOfEvent; return this.purposeOfEvent;
} }
/**
* @return The first repetition of repeating field {@link #purposeOfEvent}, creating it if it does not already exist
*/
public Coding getPurposeOfEventFirstRep() {
if (getPurposeOfEvent().isEmpty()) {
addPurposeOfEvent();
}
return getPurposeOfEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEvent setPurposeOfEvent(List<Coding> thePurposeOfEvent) {
this.purposeOfEvent = thePurposeOfEvent;
return this;
}
public boolean hasPurposeOfEvent() { public boolean hasPurposeOfEvent() {
if (this.purposeOfEvent == null) if (this.purposeOfEvent == null)
return false; return false;
@ -2724,6 +3128,24 @@ public class AuditEvent extends DomainResource {
return this.agent; return this.agent;
} }
/**
* @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist
*/
public AuditEventAgentComponent getAgentFirstRep() {
if (getAgent().isEmpty()) {
addAgent();
}
return getAgent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEvent setAgent(List<AuditEventAgentComponent> theAgent) {
this.agent = theAgent;
return this;
}
public boolean hasAgent() { public boolean hasAgent() {
if (this.agent == null) if (this.agent == null)
return false; return false;
@ -2788,6 +3210,24 @@ public class AuditEvent extends DomainResource {
return this.entity; return this.entity;
} }
/**
* @return The first repetition of repeating field {@link #entity}, creating it if it does not already exist
*/
public AuditEventEntityComponent getEntityFirstRep() {
if (getEntity().isEmpty()) {
addEntity();
}
return getEntity().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public AuditEvent setEntity(List<AuditEventEntityComponent> theEntity) {
this.entity = theEntity;
return this;
}
public boolean hasEntity() { public boolean hasEntity() {
if (this.entity == null) if (this.entity == null)
return false; return false;
@ -2833,6 +3273,62 @@ public class AuditEvent extends DomainResource {
childrenList.add(new Property("entity", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, entity)); childrenList.add(new Property("entity", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, entity));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : this.subtype.toArray(new Base[this.subtype.size()]); // Coding
case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // Enumeration<AuditEventAction>
case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // InstantType
case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<AuditEventOutcome>
case 1062502659: /*outcomeDesc*/ return this.outcomeDesc == null ? new Base[0] : new Base[] {this.outcomeDesc}; // StringType
case -341917691: /*purposeOfEvent*/ return this.purposeOfEvent == null ? new Base[0] : this.purposeOfEvent.toArray(new Base[this.purposeOfEvent.size()]); // Coding
case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // AuditEventAgentComponent
case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // AuditEventSourceComponent
case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : this.entity.toArray(new Base[this.entity.size()]); // AuditEventEntityComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case -1867567750: // subtype
this.getSubtype().add(castToCoding(value)); // Coding
break;
case -1422950858: // action
this.action = new AuditEventActionEnumFactory().fromType(value); // Enumeration<AuditEventAction>
break;
case -799233872: // recorded
this.recorded = castToInstant(value); // InstantType
break;
case -1106507950: // outcome
this.outcome = new AuditEventOutcomeEnumFactory().fromType(value); // Enumeration<AuditEventOutcome>
break;
case 1062502659: // outcomeDesc
this.outcomeDesc = castToString(value); // StringType
break;
case -341917691: // purposeOfEvent
this.getPurposeOfEvent().add(castToCoding(value)); // Coding
break;
case 92750597: // agent
this.getAgent().add((AuditEventAgentComponent) value); // AuditEventAgentComponent
break;
case -896505829: // source
this.source = (AuditEventSourceComponent) value; // AuditEventSourceComponent
break;
case -1298275357: // entity
this.getEntity().add((AuditEventEntityComponent) value); // AuditEventEntityComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -2859,6 +3355,24 @@ public class AuditEvent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // Coding
case -1867567750: return addSubtype(); // Coding
case -1422950858: throw new FHIRException("Cannot make property action as it is not a complex type"); // Enumeration<AuditEventAction>
case -799233872: throw new FHIRException("Cannot make property recorded as it is not a complex type"); // InstantType
case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Enumeration<AuditEventOutcome>
case 1062502659: throw new FHIRException("Cannot make property outcomeDesc as it is not a complex type"); // StringType
case -341917691: return addPurposeOfEvent(); // Coding
case 92750597: return addAgent(); // AuditEventAgentComponent
case -896505829: return getSource(); // AuditEventSourceComponent
case -1298275357: return addEntity(); // AuditEventEntityComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -2963,8 +3477,8 @@ public class AuditEvent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, subtype, action, recorded return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subtype, action, recorded
, outcome, outcomeDesc, purposeOfEvent, agent, source, entity); , outcome, outcomeDesc, purposeOfEvent, agent, source, entity);
} }
@Override @Override
@ -2980,7 +3494,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.recorded</b><br> * Path: <b>AuditEvent.recorded</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="AuditEvent.recorded", description="Time when the event occurred on source", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="AuditEvent.recorded", description="Time when the event occurred on source", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -3000,7 +3516,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.entity.type</b><br> * Path: <b>AuditEvent.entity.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="entity-type", path="AuditEvent.entity.type", description="Type of object involved", type="token" ) // []
// []
@SearchParamDefinition(name="entity-type", path="AuditEvent.entity.type", description="Type of object involved", type="token", target={} )
public static final String SP_ENTITY_TYPE = "entity-type"; public static final String SP_ENTITY_TYPE = "entity-type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>entity-type</b> * <b>Fluent Client</b> search parameter constant for <b>entity-type</b>
@ -3020,7 +3538,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.reference</b><br> * Path: <b>AuditEvent.agent.reference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_AGENT = "agent"; public static final String SP_AGENT = "agent";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>agent</b> * <b>Fluent Client</b> search parameter constant for <b>agent</b>
@ -3046,7 +3566,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.network.address</b><br> * Path: <b>AuditEvent.agent.network.address</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="address", path="AuditEvent.agent.network.address", description="Identifier for the network access point of the user device", type="token" ) // []
// []
@SearchParamDefinition(name="address", path="AuditEvent.agent.network.address", description="Identifier for the network access point of the user device", type="token", target={} )
public static final String SP_ADDRESS = "address"; public static final String SP_ADDRESS = "address";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>address</b> * <b>Fluent Client</b> search parameter constant for <b>address</b>
@ -3066,7 +3588,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.source.identifier</b><br> * Path: <b>AuditEvent.source.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The identity of source detecting the event", type="token" ) // []
// []
@SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The identity of source detecting the event", type="token", target={} )
public static final String SP_SOURCE = "source"; public static final String SP_SOURCE = "source";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source</b> * <b>Fluent Client</b> search parameter constant for <b>source</b>
@ -3086,7 +3610,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.type</b><br> * Path: <b>AuditEvent.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="AuditEvent.type", description="Type/identifier of event", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="AuditEvent.type", description="Type/identifier of event", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -3106,7 +3632,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.altId</b><br> * Path: <b>AuditEvent.agent.altId</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="altid", path="AuditEvent.agent.altId", description="Alternative User id e.g. authentication", type="token" ) // []
// []
@SearchParamDefinition(name="altid", path="AuditEvent.agent.altId", description="Alternative User id e.g. authentication", type="token", target={} )
public static final String SP_ALTID = "altid"; public static final String SP_ALTID = "altid";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>altid</b> * <b>Fluent Client</b> search parameter constant for <b>altid</b>
@ -3126,7 +3654,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.source.site</b><br> * Path: <b>AuditEvent.source.site</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="site", path="AuditEvent.source.site", description="Logical source location within the enterprise", type="token" ) // []
// []
@SearchParamDefinition(name="site", path="AuditEvent.source.site", description="Logical source location within the enterprise", type="token", target={} )
public static final String SP_SITE = "site"; public static final String SP_SITE = "site";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>site</b> * <b>Fluent Client</b> search parameter constant for <b>site</b>
@ -3146,7 +3676,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.name</b><br> * Path: <b>AuditEvent.agent.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="agent-name", path="AuditEvent.agent.name", description="Human-meaningful name for the agent", type="string" ) // []
// []
@SearchParamDefinition(name="agent-name", path="AuditEvent.agent.name", description="Human-meaningful name for the agent", type="string", target={} )
public static final String SP_AGENT_NAME = "agent-name"; public static final String SP_AGENT_NAME = "agent-name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>agent-name</b> * <b>Fluent Client</b> search parameter constant for <b>agent-name</b>
@ -3166,7 +3698,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.entity.name</b><br> * Path: <b>AuditEvent.entity.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="entity-name", path="AuditEvent.entity.name", description="Descriptor for entity", type="string" ) // []
// []
@SearchParamDefinition(name="entity-name", path="AuditEvent.entity.name", description="Descriptor for entity", type="string", target={} )
public static final String SP_ENTITY_NAME = "entity-name"; public static final String SP_ENTITY_NAME = "entity-name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>entity-name</b> * <b>Fluent Client</b> search parameter constant for <b>entity-name</b>
@ -3186,7 +3720,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.subtype</b><br> * Path: <b>AuditEvent.subtype</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subtype", path="AuditEvent.subtype", description="More specific type/id for the event", type="token" ) // []
// []
@SearchParamDefinition(name="subtype", path="AuditEvent.subtype", description="More specific type/id for the event", type="token", target={} )
public static final String SP_SUBTYPE = "subtype"; public static final String SP_SUBTYPE = "subtype";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subtype</b> * <b>Fluent Client</b> search parameter constant for <b>subtype</b>
@ -3206,7 +3742,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.reference, AuditEvent.entity.reference</b><br> * Path: <b>AuditEvent.agent.reference, AuditEvent.entity.reference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="AuditEvent.agent.reference | AuditEvent.entity.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Practitioner, Organization, Device, Patient, Any, RelatedPerson]
// [Patient]
@SearchParamDefinition(name="patient", path="AuditEvent.agent.reference | AuditEvent.entity.reference", description="Direct reference to resource", type="reference" )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -3232,7 +3770,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.action</b><br> * Path: <b>AuditEvent.action</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="action", path="AuditEvent.action", description="Type of action performed during the event", type="token" ) // []
// []
@SearchParamDefinition(name="action", path="AuditEvent.action", description="Type of action performed during the event", type="token", target={} )
public static final String SP_ACTION = "action"; public static final String SP_ACTION = "action";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>action</b> * <b>Fluent Client</b> search parameter constant for <b>action</b>
@ -3252,7 +3792,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.userId</b><br> * Path: <b>AuditEvent.agent.userId</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="user", path="AuditEvent.agent.userId", description="Unique identifier for the user", type="token" ) // []
// []
@SearchParamDefinition(name="user", path="AuditEvent.agent.userId", description="Unique identifier for the user", type="token", target={} )
public static final String SP_USER = "user"; public static final String SP_USER = "user";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>user</b> * <b>Fluent Client</b> search parameter constant for <b>user</b>
@ -3272,6 +3814,8 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.entity.reference</b><br> * Path: <b>AuditEvent.entity.reference</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="entity", path="AuditEvent.entity.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) @SearchParamDefinition(name="entity", path="AuditEvent.entity.reference", description="Specific instance of resource (e.g. versioned)", type="reference" )
public static final String SP_ENTITY = "entity"; public static final String SP_ENTITY = "entity";
/** /**
@ -3298,7 +3842,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.entity.identifier</b><br> * Path: <b>AuditEvent.entity.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="entity-id", path="AuditEvent.entity.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) // []
// []
@SearchParamDefinition(name="entity-id", path="AuditEvent.entity.identifier", description="Specific instance of object (e.g. versioned)", type="token", target={} )
public static final String SP_ENTITY_ID = "entity-id"; public static final String SP_ENTITY_ID = "entity-id";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>entity-id</b> * <b>Fluent Client</b> search parameter constant for <b>entity-id</b>
@ -3318,7 +3864,9 @@ public class AuditEvent extends DomainResource {
* Path: <b>AuditEvent.agent.policy</b><br> * Path: <b>AuditEvent.agent.policy</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="policy", path="AuditEvent.agent.policy", description="Policy that authorized event", type="uri" ) // []
// []
@SearchParamDefinition(name="policy", path="AuditEvent.agent.policy", description="Policy that authorized event", type="uri", target={} )
public static final String SP_POLICY = "policy"; public static final String SP_POLICY = "policy";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>policy</b> * <b>Fluent Client</b> search parameter constant for <b>policy</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -70,6 +70,24 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
return this.modifierExtension; return this.modifierExtension;
} }
/**
* @return The first repetition of repeating field {@link #modifierExtension}, creating it if it does not already exist
*/
public Extension getModifierExtensionFirstRep() {
if (getModifierExtension().isEmpty()) {
addModifierExtension();
}
return getModifierExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BackboneElement setModifierExtension(List<Extension> theModifierExtension) {
this.modifierExtension = theModifierExtension;
return this;
}
public boolean hasModifierExtension() { public boolean hasModifierExtension() {
if (this.modifierExtension == null) if (this.modifierExtension == null)
return false; return false;
@ -105,6 +123,26 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension)); childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -298878168: /*modifierExtension*/ return this.modifierExtension == null ? new Base[0] : this.modifierExtension.toArray(new Base[this.modifierExtension.size()]); // Extension
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -298878168: // modifierExtension
this.getModifierExtension().add(castToExtension(value)); // Extension
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("modifierExtension")) if (name.equals("modifierExtension"))
@ -113,6 +151,15 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -298878168: return addModifierExtension(); // Extension
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("modifierExtension")) { if (name.equals("modifierExtension")) {
@ -158,7 +205,7 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( modifierExtension); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifierExtension);
} }

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.dstu3.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -84,11 +85,15 @@ private Map<String, Object> userData;
return formatCommentsPost; return formatCommentsPost;
} }
// these 2 allow evaluation engines to get access to primitive values // these 3 allow evaluation engines to get access to primitive values
public boolean isPrimitive() { public boolean isPrimitive() {
return false; return false;
} }
public boolean hasPrimitiveValue() {
return isPrimitive();
}
public String primitiveValue() { public String primitiveValue() {
return null; return null;
} }
@ -138,13 +143,26 @@ private Map<String, Object> userData;
return null; return null;
} }
public List<Base> listChildrenByName(String name) { public List<Base> listChildrenByName(String name) throws FHIRException {
List<Property> children = new ArrayList<Property>(); List<Base> result = new ArrayList<Base>();
listChildren(children); for (Base b : listChildrenByName(name, true))
for (Property c : children) if (b != null)
if (c.getName().equals(name) || (c.getName().endsWith("[x]") && name.startsWith(c.getName()))) result.add(b);
return c.getValues(); return result;
return new ArrayList<Base>(); }
public Base[] listChildrenByName(String name, boolean checkValid) throws FHIRException {
if (name.equals("*")) {
List<Property> children = new ArrayList<Property>();
listChildren(children);
List<Base> result = new ArrayList<Base>();
for (Property c : children)
if (name.equals("*") || c.getName().equals(name) || (c.getName().endsWith("[x]") && c.getName().startsWith(name)))
result.addAll(c.getValues());
return result.toArray(new Base[result.size()]);
}
else
return getProperty(name.hashCode(), name, checkValid);
} }
public boolean isEmpty() { public boolean isEmpty() {
@ -185,7 +203,6 @@ private Map<String, Object> userData;
return true; return true;
} }
} }
if (e1 == null || e2 == null) if (e1 == null || e2 == null)
return false; return false;
if (e2.isMetadataBased() && !e1.isMetadataBased()) // respect existing order for debugging consistency; outcome must be the same either way if (e2.isMetadataBased() && !e1.isMetadataBased()) // respect existing order for debugging consistency; outcome must be the same either way
@ -217,17 +234,14 @@ private Map<String, Object> userData;
return true; return true;
} }
public static boolean compareValues(PrimitiveType<?> e1, PrimitiveType<?> e2, boolean allowNull) { public static boolean compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull) {
boolean noLeft = e1 == null || e1.isEmpty(); boolean noLeft = e1 == null || e1.isEmpty();
boolean noRight = e2 == null || e2.isEmpty(); boolean noRight = e2 == null || e2.isEmpty();
if (noLeft && noRight && allowNull) { if (noLeft && noRight && allowNull) {
return true; return true;
} }
if (noLeft != noRight)
if (e1 == null || e2 == null) {
return false; return false;
}
return e1.equalsShallow(e2); return e1.equalsShallow(e2);
} }
@ -272,6 +286,8 @@ private Map<String, Object> userData;
public StringType castToString(Base b) throws FHIRException { public StringType castToString(Base b) throws FHIRException {
if (b instanceof StringType) if (b instanceof StringType)
return (StringType) b; return (StringType) b;
else if (b.hasPrimitiveValue())
return new StringType(b.primitiveValue());
else else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a String"); throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a String");
} }
@ -279,20 +295,26 @@ private Map<String, Object> userData;
public UriType castToUri(Base b) throws FHIRException { public UriType castToUri(Base b) throws FHIRException {
if (b instanceof UriType) if (b instanceof UriType)
return (UriType) b; return (UriType) b;
else else if (b.hasPrimitiveValue())
return new UriType(b.primitiveValue());
else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Uri"); throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Uri");
} }
public DateType castToDate(Base b) throws FHIRException { public DateType castToDate(Base b) throws FHIRException {
if (b instanceof DateType) if (b instanceof DateType)
return (DateType) b; return (DateType) b;
else else if (b.hasPrimitiveValue())
return new DateType(b.primitiveValue());
else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Date"); throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Date");
} }
public DateTimeType castToDateTime(Base b) throws FHIRException { public DateTimeType castToDateTime(Base b) throws FHIRException {
if (b instanceof DateTimeType) if (b instanceof DateTimeType)
return (DateTimeType) b; return (DateTimeType) b;
else if (b.fhirType().equals("dateTime"))
return new DateTimeType(b.primitiveValue());
else else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a DateTime"); throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a DateTime");
} }
@ -307,6 +329,8 @@ private Map<String, Object> userData;
public CodeType castToCode(Base b) throws FHIRException { public CodeType castToCode(Base b) throws FHIRException {
if (b instanceof CodeType) if (b instanceof CodeType)
return (CodeType) b; return (CodeType) b;
else if (b.isPrimitive())
return new CodeType(b.primitiveValue());
else else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Code"); throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Code");
} }
@ -566,6 +590,29 @@ private Map<String, Object> userData;
protected boolean isMetadataBased() { protected boolean isMetadataBased() {
return false; return false;
} }
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
if (checkValid)
throw new FHIRException("Attempt to read invalid property '"+name+"' on type "+fhirType());
return null;
}
public void setProperty(int hash, String name, Base value) throws FHIRException {
throw new FHIRException("Attempt to write to invalid property '"+name+"' on type "+fhirType());
}
public Base makeProperty(int hash, String name) throws FHIRException {
throw new FHIRException("Attempt to make an invalid property '"+name+"' on type "+fhirType());
}
public static boolean equals(String v1, String v2) {
if (v1 == null && v2 == null)
return true;
else if (v1 == null || v2 == null)
return false;
else
return v1.equals(v2);
}
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -117,6 +117,24 @@ public class Basic extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Basic setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -308,6 +326,42 @@ public class Basic extends DomainResource {
childrenList.add(new Property("author", "Reference(Practitioner|Patient|RelatedPerson)", "Indicates who was responsible for creating the resource instance.", 0, java.lang.Integer.MAX_VALUE, author)); childrenList.add(new Property("author", "Reference(Practitioner|Patient|RelatedPerson)", "Indicates who was responsible for creating the resource instance.", 0, java.lang.Integer.MAX_VALUE, author));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateType
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 1028554472: // created
this.created = castToDate(value); // DateType
break;
case -1406328437: // author
this.author = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -324,6 +378,19 @@ public class Basic extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 3059181: return getCode(); // CodeableConcept
case -1867885268: return getSubject(); // Reference
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateType
case -1406328437: return getAuthor(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -394,8 +461,8 @@ public class Basic extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, code, subject, created return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, code, subject, created
, author); , author);
} }
@Override @Override
@ -411,7 +478,9 @@ public class Basic extends DomainResource {
* Path: <b>Basic.identifier</b><br> * Path: <b>Basic.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Basic.identifier", description="Business identifier", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Basic.identifier", description="Business identifier", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -431,7 +500,9 @@ public class Basic extends DomainResource {
* Path: <b>Basic.code</b><br> * Path: <b>Basic.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -451,6 +522,8 @@ public class Basic extends DomainResource {
* Path: <b>Basic.subject</b><br> * Path: <b>Basic.subject</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the focus of this resource", type="reference" ) @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the focus of this resource", type="reference" )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
@ -477,7 +550,9 @@ public class Basic extends DomainResource {
* Path: <b>Basic.created</b><br> * Path: <b>Basic.created</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" ) // []
// []
@SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date", target={} )
public static final String SP_CREATED = "created"; public static final String SP_CREATED = "created";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>created</b> * <b>Fluent Client</b> search parameter constant for <b>created</b>
@ -497,7 +572,9 @@ public class Basic extends DomainResource {
* Path: <b>Basic.subject</b><br> * Path: <b>Basic.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the focus of this resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Any]
// [Patient]
@SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the focus of this resource", type="reference" )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -523,7 +600,9 @@ public class Basic extends DomainResource {
* Path: <b>Basic.author</b><br> * Path: <b>Basic.author</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="author", path="Basic.author", description="Who created", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Patient, RelatedPerson]
// [Practitioner, Patient, RelatedPerson]
@SearchParamDefinition(name="author", path="Basic.author", description="Who created", type="reference", target={Practitioner.class, Patient.class, RelatedPerson.class} )
public static final String SP_AUTHOR = "author"; public static final String SP_AUTHOR = "author";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>author</b> * <b>Fluent Client</b> search parameter constant for <b>author</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -176,6 +176,30 @@ public class Binary extends BaseBinary implements IBaseBinary {
childrenList.add(new Property("content", "base64Binary", "The actual content, base64 encoded.", 0, java.lang.Integer.MAX_VALUE, content)); childrenList.add(new Property("content", "base64Binary", "The actual content, base64 encoded.", 0, java.lang.Integer.MAX_VALUE, content));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Base64BinaryType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
break;
case 951530617: // content
this.content = castToBase64Binary(value); // Base64BinaryType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("contentType")) if (name.equals("contentType"))
@ -186,6 +210,16 @@ public class Binary extends BaseBinary implements IBaseBinary {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // CodeType
case 951530617: throw new FHIRException("Cannot make property content as it is not a complex type"); // Base64BinaryType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) { if (name.equals("contentType")) {
@ -236,7 +270,7 @@ public class Binary extends BaseBinary implements IBaseBinary {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, content); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, content);
} }
@Override @Override
@ -252,7 +286,9 @@ public class Binary extends BaseBinary implements IBaseBinary {
* Path: <b>Binary.contentType</b><br> * Path: <b>Binary.contentType</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="contenttype", path="Binary.contentType", description="MimeType of the binary content", type="token" ) // []
// []
@SearchParamDefinition(name="contenttype", path="Binary.contentType", description="MimeType of the binary content", type="token", target={} )
public static final String SP_CONTENTTYPE = "contenttype"; public static final String SP_CONTENTTYPE = "contenttype";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>contenttype</b> * <b>Fluent Client</b> search parameter constant for <b>contenttype</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -164,6 +164,24 @@ public class BodySite extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BodySite setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -228,6 +246,24 @@ public class BodySite extends DomainResource {
return this.modifier; return this.modifier;
} }
/**
* @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist
*/
public CodeableConcept getModifierFirstRep() {
if (getModifier().isEmpty()) {
addModifier();
}
return getModifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BodySite setModifier(List<CodeableConcept> theModifier) {
this.modifier = theModifier;
return this;
}
public boolean hasModifier() { public boolean hasModifier() {
if (this.modifier == null) if (this.modifier == null)
return false; return false;
@ -317,6 +353,24 @@ public class BodySite extends DomainResource {
return this.image; return this.image;
} }
/**
* @return The first repetition of repeating field {@link #image}, creating it if it does not already exist
*/
public Attachment getImageFirstRep() {
if (getImage().isEmpty()) {
addImage();
}
return getImage().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BodySite setImage(List<Attachment> theImage) {
this.image = theImage;
return this;
}
public boolean hasImage() { public boolean hasImage() {
if (this.image == null) if (this.image == null)
return false; return false;
@ -358,6 +412,46 @@ public class BodySite extends DomainResource {
childrenList.add(new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image)); childrenList.add(new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // Attachment
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case -615513385: // modifier
this.getModifier().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 100313435: // image
this.getImage().add(castToAttachment(value)); // Attachment
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("patient")) if (name.equals("patient"))
@ -376,6 +470,20 @@ public class BodySite extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -791418107: return getPatient(); // Reference
case -1618432855: return addIdentifier(); // Identifier
case 3059181: return getCode(); // CodeableConcept
case -615513385: return addModifier(); // CodeableConcept
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 100313435: return addImage(); // Attachment
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("patient")) { if (name.equals("patient")) {
@ -458,8 +566,8 @@ public class BodySite extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, identifier, code, modifier return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, identifier, code, modifier
, description, image); , description, image);
} }
@Override @Override
@ -475,7 +583,9 @@ public class BodySite extends DomainResource {
* Path: <b>BodySite.identifier</b><br> * Path: <b>BodySite.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="BodySite.identifier", description="Identifier for this instance of the anatomical location", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="BodySite.identifier", description="Identifier for this instance of the anatomical location", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -495,7 +605,9 @@ public class BodySite extends DomainResource {
* Path: <b>BodySite.code</b><br> * Path: <b>BodySite.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="BodySite.code", description="Named anatomical location", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="BodySite.code", description="Named anatomical location", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -515,7 +627,9 @@ public class BodySite extends DomainResource {
* Path: <b>BodySite.patient</b><br> * Path: <b>BodySite.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -599,6 +599,30 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("url", "uri", "The reference details for the link.", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("url", "uri", "The reference details for the link.", 0, java.lang.Integer.MAX_VALUE, url));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -554436100: /*relation*/ return this.relation == null ? new Base[0] : new Base[] {this.relation}; // StringType
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -554436100: // relation
this.relation = castToString(value); // StringType
break;
case 116079: // url
this.url = castToUri(value); // UriType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("relation")) if (name.equals("relation"))
@ -609,6 +633,16 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -554436100: throw new FHIRException("Cannot make property relation as it is not a complex type"); // StringType
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("relation")) { if (name.equals("relation")) {
@ -650,7 +684,7 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( relation, url); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relation, url);
} }
public String fhirType() { public String fhirType() {
@ -724,6 +758,24 @@ public class Bundle extends Resource implements IBaseBundle {
return this.link; return this.link;
} }
/**
* @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
*/
public BundleLinkComponent getLinkFirstRep() {
if (getLink().isEmpty()) {
addLink();
}
return getLink().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BundleEntryComponent setLink(List<BundleLinkComponent> theLink) {
this.link = theLink;
return this;
}
public boolean hasLink() { public boolean hasLink() {
if (this.link == null) if (this.link == null)
return false; return false;
@ -960,6 +1012,46 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("response", "", "Additional information about how this entry should be processed as part of a transaction.", 0, java.lang.Integer.MAX_VALUE, response)); childrenList.add(new Property("response", "", "Additional information about how this entry should be processed as part of a transaction.", 0, java.lang.Integer.MAX_VALUE, response));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent
case -511251360: /*fullUrl*/ return this.fullUrl == null ? new Base[0] : new Base[] {this.fullUrl}; // UriType
case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Resource
case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BundleEntrySearchComponent
case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // BundleEntryRequestComponent
case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // BundleEntryResponseComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3321850: // link
this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent
break;
case -511251360: // fullUrl
this.fullUrl = castToUri(value); // UriType
break;
case -341064690: // resource
this.resource = castToResource(value); // Resource
break;
case -906336856: // search
this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent
break;
case 1095692943: // request
this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent
break;
case -340323263: // response
this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("link")) if (name.equals("link"))
@ -978,6 +1070,20 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3321850: return addLink(); // BundleLinkComponent
case -511251360: throw new FHIRException("Cannot make property fullUrl as it is not a complex type"); // UriType
case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // Resource
case -906336856: return getSearch(); // BundleEntrySearchComponent
case 1095692943: return getRequest(); // BundleEntryRequestComponent
case -340323263: return getResponse(); // BundleEntryResponseComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("link")) { if (name.equals("link")) {
@ -1044,8 +1150,8 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( link, fullUrl, resource, search return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, fullUrl, resource, search
, request, response); , request, response);
} }
public String fhirType() { public String fhirType() {
@ -1202,6 +1308,30 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, java.lang.Integer.MAX_VALUE, score)); childrenList.add(new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, java.lang.Integer.MAX_VALUE, score));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<SearchEntryMode>
case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // DecimalType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3357091: // mode
this.mode = new SearchEntryModeEnumFactory().fromType(value); // Enumeration<SearchEntryMode>
break;
case 109264530: // score
this.score = castToDecimal(value); // DecimalType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("mode")) if (name.equals("mode"))
@ -1212,6 +1342,16 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3357091: throw new FHIRException("Cannot make property mode as it is not a complex type"); // Enumeration<SearchEntryMode>
case 109264530: throw new FHIRException("Cannot make property score as it is not a complex type"); // DecimalType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("mode")) { if (name.equals("mode")) {
@ -1253,7 +1393,7 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, score); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, score);
} }
public String fhirType() { public String fhirType() {
@ -1621,6 +1761,46 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, java.lang.Integer.MAX_VALUE, ifNoneExist)); childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, java.lang.Integer.MAX_VALUE, ifNoneExist));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // Enumeration<HTTPVerb>
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 171868368: /*ifNoneMatch*/ return this.ifNoneMatch == null ? new Base[0] : new Base[] {this.ifNoneMatch}; // StringType
case -2061602860: /*ifModifiedSince*/ return this.ifModifiedSince == null ? new Base[0] : new Base[] {this.ifModifiedSince}; // InstantType
case 1692894888: /*ifMatch*/ return this.ifMatch == null ? new Base[0] : new Base[] {this.ifMatch}; // StringType
case 165155330: /*ifNoneExist*/ return this.ifNoneExist == null ? new Base[0] : new Base[] {this.ifNoneExist}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1077554975: // method
this.method = new HTTPVerbEnumFactory().fromType(value); // Enumeration<HTTPVerb>
break;
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 171868368: // ifNoneMatch
this.ifNoneMatch = castToString(value); // StringType
break;
case -2061602860: // ifModifiedSince
this.ifModifiedSince = castToInstant(value); // InstantType
break;
case 1692894888: // ifMatch
this.ifMatch = castToString(value); // StringType
break;
case 165155330: // ifNoneExist
this.ifNoneExist = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("method")) if (name.equals("method"))
@ -1639,6 +1819,20 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1077554975: throw new FHIRException("Cannot make property method as it is not a complex type"); // Enumeration<HTTPVerb>
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case 171868368: throw new FHIRException("Cannot make property ifNoneMatch as it is not a complex type"); // StringType
case -2061602860: throw new FHIRException("Cannot make property ifModifiedSince as it is not a complex type"); // InstantType
case 1692894888: throw new FHIRException("Cannot make property ifMatch as it is not a complex type"); // StringType
case 165155330: throw new FHIRException("Cannot make property ifNoneExist as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("method")) { if (name.equals("method")) {
@ -1700,8 +1894,8 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( method, url, ifNoneMatch, ifModifiedSince return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(method, url, ifNoneMatch, ifModifiedSince
, ifMatch, ifNoneExist); , ifMatch, ifNoneExist);
} }
public String fhirType() { public String fhirType() {
@ -1958,6 +2152,38 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // StringType
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // UriType
case 3123477: /*etag*/ return this.etag == null ? new Base[0] : new Base[] {this.etag}; // StringType
case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // InstantType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -892481550: // status
this.status = castToString(value); // StringType
break;
case 1901043637: // location
this.location = castToUri(value); // UriType
break;
case 3123477: // etag
this.etag = castToString(value); // StringType
break;
case 1959003007: // lastModified
this.lastModified = castToInstant(value); // InstantType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("status")) if (name.equals("status"))
@ -1972,6 +2198,18 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // StringType
case 1901043637: throw new FHIRException("Cannot make property location as it is not a complex type"); // UriType
case 3123477: throw new FHIRException("Cannot make property etag as it is not a complex type"); // StringType
case 1959003007: throw new FHIRException("Cannot make property lastModified as it is not a complex type"); // InstantType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("status")) { if (name.equals("status")) {
@ -2023,7 +2261,7 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, location, etag, lastModified return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, location, etag, lastModified
); );
} }
@ -2185,6 +2423,24 @@ public class Bundle extends Resource implements IBaseBundle {
return this.link; return this.link;
} }
/**
* @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
*/
public BundleLinkComponent getLinkFirstRep() {
if (getLink().isEmpty()) {
addLink();
}
return getLink().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Bundle setLink(List<BundleLinkComponent> theLink) {
this.link = theLink;
return this;
}
public boolean hasLink() { public boolean hasLink() {
if (this.link == null) if (this.link == null)
return false; return false;
@ -2225,6 +2481,24 @@ public class Bundle extends Resource implements IBaseBundle {
return this.entry; return this.entry;
} }
/**
* @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist
*/
public BundleEntryComponent getEntryFirstRep() {
if (getEntry().isEmpty()) {
addEntry();
}
return getEntry().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Bundle setEntry(List<BundleEntryComponent> theEntry) {
this.entry = theEntry;
return this;
}
public boolean hasEntry() { public boolean hasEntry() {
if (this.entry == null) if (this.entry == null)
return false; return false;
@ -2336,6 +2610,42 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("signature", "Signature", "Digital Signature - base64 encoded. XML DigSIg or a JWT.", 0, java.lang.Integer.MAX_VALUE, signature)); childrenList.add(new Property("signature", "Signature", "Digital Signature - base64 encoded. XML DigSIg or a JWT.", 0, java.lang.Integer.MAX_VALUE, signature));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<BundleType>
case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // UnsignedIntType
case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent
case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // BundleEntryComponent
case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : new Base[] {this.signature}; // Signature
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = new BundleTypeEnumFactory().fromType(value); // Enumeration<BundleType>
break;
case 110549828: // total
this.total = castToUnsignedInt(value); // UnsignedIntType
break;
case 3321850: // link
this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent
break;
case 96667762: // entry
this.getEntry().add((BundleEntryComponent) value); // BundleEntryComponent
break;
case 1073584312: // signature
this.signature = castToSignature(value); // Signature
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -2352,6 +2662,19 @@ public class Bundle extends Resource implements IBaseBundle {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<BundleType>
case 110549828: throw new FHIRException("Cannot make property total as it is not a complex type"); // UnsignedIntType
case 3321850: return addLink(); // BundleLinkComponent
case 96667762: return addEntry(); // BundleEntryComponent
case 1073584312: return getSignature(); // Signature
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -2424,7 +2747,7 @@ public class Bundle extends Resource implements IBaseBundle {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, total, link, entry, signature return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, total, link, entry, signature
); );
} }
@ -2441,7 +2764,9 @@ public class Bundle extends Resource implements IBaseBundle {
* Path: <b>Bundle.entry.resource(0)</b><br> * Path: <b>Bundle.entry.resource(0)</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="composition", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference" ) // []
// [Composition]
@SearchParamDefinition(name="composition", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference", target={} )
public static final String SP_COMPOSITION = "composition"; public static final String SP_COMPOSITION = "composition";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>composition</b> * <b>Fluent Client</b> search parameter constant for <b>composition</b>
@ -2467,7 +2792,9 @@ public class Bundle extends Resource implements IBaseBundle {
* Path: <b>Bundle.type</b><br> * Path: <b>Bundle.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -2487,7 +2814,9 @@ public class Bundle extends Resource implements IBaseBundle {
* Path: <b>Bundle.entry.resource(0)</b><br> * Path: <b>Bundle.entry.resource(0)</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="message", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference" ) // []
// [MessageHeader]
@SearchParamDefinition(name="message", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference", target={} )
public static final String SP_MESSAGE = "message"; public static final String SP_MESSAGE = "message";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>message</b> * <b>Fluent Client</b> search parameter constant for <b>message</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -573,6 +573,30 @@ public class CarePlan extends DomainResource {
childrenList.add(new Property("plan", "Reference(CarePlan)", "A reference to the plan to which a relationship is asserted.", 0, java.lang.Integer.MAX_VALUE, plan)); childrenList.add(new Property("plan", "Reference(CarePlan)", "A reference to the plan to which a relationship is asserted.", 0, java.lang.Integer.MAX_VALUE, plan));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CarePlanRelationship>
case 3443497: /*plan*/ return this.plan == null ? new Base[0] : new Base[] {this.plan}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = new CarePlanRelationshipEnumFactory().fromType(value); // Enumeration<CarePlanRelationship>
break;
case 3443497: // plan
this.plan = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -583,6 +607,16 @@ public class CarePlan extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // Enumeration<CarePlanRelationship>
case 3443497: return getPlan(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -625,7 +659,7 @@ public class CarePlan extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, plan); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, plan);
} }
public String fhirType() { public String fhirType() {
@ -734,6 +768,30 @@ public class CarePlan extends DomainResource {
childrenList.add(new Property("member", "Reference(Practitioner|RelatedPerson|Patient|Organization)", "The specific person or organization who is participating/expected to participate in the care plan.", 0, java.lang.Integer.MAX_VALUE, member)); childrenList.add(new Property("member", "Reference(Practitioner|RelatedPerson|Patient|Organization)", "The specific person or organization who is participating/expected to participate in the care plan.", 0, java.lang.Integer.MAX_VALUE, member));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
case -1077769574: /*member*/ return this.member == null ? new Base[0] : new Base[] {this.member}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3506294: // role
this.role = castToCodeableConcept(value); // CodeableConcept
break;
case -1077769574: // member
this.member = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("role")) if (name.equals("role"))
@ -744,6 +802,16 @@ public class CarePlan extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3506294: return getRole(); // CodeableConcept
case -1077769574: return getMember(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("role")) { if (name.equals("role")) {
@ -787,7 +855,7 @@ public class CarePlan extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, member); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member);
} }
public String fhirType() { public String fhirType() {
@ -855,6 +923,24 @@ public class CarePlan extends DomainResource {
return this.actionResulting; return this.actionResulting;
} }
/**
* @return The first repetition of repeating field {@link #actionResulting}, creating it if it does not already exist
*/
public Reference getActionResultingFirstRep() {
if (getActionResulting().isEmpty()) {
addActionResulting();
}
return getActionResulting().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityComponent setActionResulting(List<Reference> theActionResulting) {
this.actionResulting = theActionResulting;
return this;
}
public boolean hasActionResulting() { public boolean hasActionResulting() {
if (this.actionResulting == null) if (this.actionResulting == null)
return false; return false;
@ -904,6 +990,24 @@ public class CarePlan extends DomainResource {
return this.progress; return this.progress;
} }
/**
* @return The first repetition of repeating field {@link #progress}, creating it if it does not already exist
*/
public Annotation getProgressFirstRep() {
if (getProgress().isEmpty()) {
addProgress();
}
return getProgress().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityComponent setProgress(List<Annotation> theProgress) {
this.progress = theProgress;
return this;
}
public boolean hasProgress() { public boolean hasProgress() {
if (this.progress == null) if (this.progress == null)
return false; return false;
@ -1006,6 +1110,38 @@ public class CarePlan extends DomainResource {
childrenList.add(new Property("detail", "", "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("detail", "", "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 0, java.lang.Integer.MAX_VALUE, detail));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 836386063: /*actionResulting*/ return this.actionResulting == null ? new Base[0] : this.actionResulting.toArray(new Base[this.actionResulting.size()]); // Reference
case -1001078227: /*progress*/ return this.progress == null ? new Base[0] : this.progress.toArray(new Base[this.progress.size()]); // Annotation
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // CarePlanActivityDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 836386063: // actionResulting
this.getActionResulting().add(castToReference(value)); // Reference
break;
case -1001078227: // progress
this.getProgress().add(castToAnnotation(value)); // Annotation
break;
case -925155509: // reference
this.reference = castToReference(value); // Reference
break;
case -1335224239: // detail
this.detail = (CarePlanActivityDetailComponent) value; // CarePlanActivityDetailComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionResulting")) if (name.equals("actionResulting"))
@ -1020,6 +1156,18 @@ public class CarePlan extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 836386063: return addActionResulting(); // Reference
case -1001078227: return addProgress(); // Annotation
case -925155509: return getReference(); // Reference
case -1335224239: return getDetail(); // CarePlanActivityDetailComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("actionResulting")) { if (name.equals("actionResulting")) {
@ -1080,8 +1228,8 @@ public class CarePlan extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionResulting, progress, reference return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionResulting, progress, reference
, detail); , detail);
} }
public String fhirType() { public String fhirType() {
@ -1292,6 +1440,24 @@ public class CarePlan extends DomainResource {
return this.reasonCode; return this.reasonCode;
} }
/**
* @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
*/
public CodeableConcept getReasonCodeFirstRep() {
if (getReasonCode().isEmpty()) {
addReasonCode();
}
return getReasonCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityDetailComponent setReasonCode(List<CodeableConcept> theReasonCode) {
this.reasonCode = theReasonCode;
return this;
}
public boolean hasReasonCode() { public boolean hasReasonCode() {
if (this.reasonCode == null) if (this.reasonCode == null)
return false; return false;
@ -1332,6 +1498,24 @@ public class CarePlan extends DomainResource {
return this.reasonReference; return this.reasonReference;
} }
/**
* @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
*/
public Reference getReasonReferenceFirstRep() {
if (getReasonReference().isEmpty()) {
addReasonReference();
}
return getReasonReference().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityDetailComponent setReasonReference(List<Reference> theReasonReference) {
this.reasonReference = theReasonReference;
return this;
}
public boolean hasReasonReference() { public boolean hasReasonReference() {
if (this.reasonReference == null) if (this.reasonReference == null)
return false; return false;
@ -1393,6 +1577,24 @@ public class CarePlan extends DomainResource {
return this.goal; return this.goal;
} }
/**
* @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist
*/
public Reference getGoalFirstRep() {
if (getGoal().isEmpty()) {
addGoal();
}
return getGoal().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityDetailComponent setGoal(List<Reference> theGoal) {
this.goal = theGoal;
return this;
}
public boolean hasGoal() { public boolean hasGoal() {
if (this.goal == null) if (this.goal == null)
return false; return false;
@ -1674,6 +1876,24 @@ public class CarePlan extends DomainResource {
return this.performer; return this.performer;
} }
/**
* @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist
*/
public Reference getPerformerFirstRep() {
if (getPerformer().isEmpty()) {
addPerformer();
}
return getPerformer().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlanActivityDetailComponent setPerformer(List<Reference> thePerformer) {
this.performer = thePerformer;
return this;
}
public boolean hasPerformer() { public boolean hasPerformer() {
if (this.performer == null) if (this.performer == null)
return false; return false;
@ -1875,6 +2095,82 @@ public class CarePlan extends DomainResource {
childrenList.add(new Property("description", "string", "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("description", "string", "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", 0, java.lang.Integer.MAX_VALUE, description));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept
case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference
case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CarePlanActivityStatus>
case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
case 663275198: /*prohibited*/ return this.prohibited == null ? new Base[0] : new Base[] {this.prohibited}; // BooleanType
case -160710483: /*scheduled*/ return this.scheduled == null ? new Base[0] : new Base[] {this.scheduled}; // Type
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference
case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // Type
case -768908335: /*dailyAmount*/ return this.dailyAmount == null ? new Base[0] : new Base[] {this.dailyAmount}; // SimpleQuantity
case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case 722137681: // reasonCode
this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1146218137: // reasonReference
this.getReasonReference().add(castToReference(value)); // Reference
break;
case 3178259: // goal
this.getGoal().add(castToReference(value)); // Reference
break;
case -892481550: // status
this.status = new CarePlanActivityStatusEnumFactory().fromType(value); // Enumeration<CarePlanActivityStatus>
break;
case 2051346646: // statusReason
this.statusReason = castToCodeableConcept(value); // CodeableConcept
break;
case 663275198: // prohibited
this.prohibited = castToBoolean(value); // BooleanType
break;
case -160710483: // scheduled
this.scheduled = (Type) value; // Type
break;
case 1901043637: // location
this.location = castToReference(value); // Reference
break;
case 481140686: // performer
this.getPerformer().add(castToReference(value)); // Reference
break;
case -309474065: // product
this.product = (Type) value; // Type
break;
case -768908335: // dailyAmount
this.dailyAmount = castToSimpleQuantity(value); // SimpleQuantity
break;
case -1285004149: // quantity
this.quantity = castToSimpleQuantity(value); // SimpleQuantity
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("category")) if (name.equals("category"))
@ -1911,6 +2207,29 @@ public class CarePlan extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: return getCategory(); // CodeableConcept
case 3059181: return getCode(); // CodeableConcept
case 722137681: return addReasonCode(); // CodeableConcept
case -1146218137: return addReasonReference(); // Reference
case 3178259: return addGoal(); // Reference
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CarePlanActivityStatus>
case 2051346646: return getStatusReason(); // CodeableConcept
case 663275198: throw new FHIRException("Cannot make property prohibited as it is not a complex type"); // BooleanType
case 1162627251: return getScheduled(); // Type
case 1901043637: return getLocation(); // Reference
case 481140686: return addPerformer(); // Reference
case 1753005361: return getProduct(); // Type
case -768908335: return getDailyAmount(); // SimpleQuantity
case -1285004149: return getQuantity(); // SimpleQuantity
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("category")) { if (name.equals("category")) {
@ -2046,9 +2365,9 @@ public class CarePlan extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, code, reasonCode, reasonReference return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, code, reasonCode, reasonReference
, goal, status, statusReason, prohibited, scheduled, location, performer, product, dailyAmount , goal, status, statusReason, prohibited, scheduled, location, performer, product, dailyAmount
, quantity, description); , quantity, description);
} }
public String fhirType() { public String fhirType() {
@ -2226,6 +2545,24 @@ public class CarePlan extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -2413,6 +2750,24 @@ public class CarePlan extends DomainResource {
return this.author; return this.author;
} }
/**
* @return The first repetition of repeating field {@link #author}, creating it if it does not already exist
*/
public Reference getAuthorFirstRep() {
if (getAuthor().isEmpty()) {
addAuthor();
}
return getAuthor().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setAuthor(List<Reference> theAuthor) {
this.author = theAuthor;
return this;
}
public boolean hasAuthor() { public boolean hasAuthor() {
if (this.author == null) if (this.author == null)
return false; return false;
@ -2511,6 +2866,24 @@ public class CarePlan extends DomainResource {
return this.category; return this.category;
} }
/**
* @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
*/
public CodeableConcept getCategoryFirstRep() {
if (getCategory().isEmpty()) {
addCategory();
}
return getCategory().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setCategory(List<CodeableConcept> theCategory) {
this.category = theCategory;
return this;
}
public boolean hasCategory() { public boolean hasCategory() {
if (this.category == null) if (this.category == null)
return false; return false;
@ -2600,6 +2973,24 @@ public class CarePlan extends DomainResource {
return this.addresses; return this.addresses;
} }
/**
* @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist
*/
public Reference getAddressesFirstRep() {
if (getAddresses().isEmpty()) {
addAddresses();
}
return getAddresses().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setAddresses(List<Reference> theAddresses) {
this.addresses = theAddresses;
return this;
}
public boolean hasAddresses() { public boolean hasAddresses() {
if (this.addresses == null) if (this.addresses == null)
return false; return false;
@ -2661,6 +3052,24 @@ public class CarePlan extends DomainResource {
return this.support; return this.support;
} }
/**
* @return The first repetition of repeating field {@link #support}, creating it if it does not already exist
*/
public Reference getSupportFirstRep() {
if (getSupport().isEmpty()) {
addSupport();
}
return getSupport().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setSupport(List<Reference> theSupport) {
this.support = theSupport;
return this;
}
public boolean hasSupport() { public boolean hasSupport() {
if (this.support == null) if (this.support == null)
return false; return false;
@ -2710,6 +3119,24 @@ public class CarePlan extends DomainResource {
return this.relatedPlan; return this.relatedPlan;
} }
/**
* @return The first repetition of repeating field {@link #relatedPlan}, creating it if it does not already exist
*/
public CarePlanRelatedPlanComponent getRelatedPlanFirstRep() {
if (getRelatedPlan().isEmpty()) {
addRelatedPlan();
}
return getRelatedPlan().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setRelatedPlan(List<CarePlanRelatedPlanComponent> theRelatedPlan) {
this.relatedPlan = theRelatedPlan;
return this;
}
public boolean hasRelatedPlan() { public boolean hasRelatedPlan() {
if (this.relatedPlan == null) if (this.relatedPlan == null)
return false; return false;
@ -2750,6 +3177,24 @@ public class CarePlan extends DomainResource {
return this.participant; return this.participant;
} }
/**
* @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
*/
public CarePlanParticipantComponent getParticipantFirstRep() {
if (getParticipant().isEmpty()) {
addParticipant();
}
return getParticipant().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setParticipant(List<CarePlanParticipantComponent> theParticipant) {
this.participant = theParticipant;
return this;
}
public boolean hasParticipant() { public boolean hasParticipant() {
if (this.participant == null) if (this.participant == null)
return false; return false;
@ -2790,6 +3235,24 @@ public class CarePlan extends DomainResource {
return this.goal; return this.goal;
} }
/**
* @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist
*/
public Reference getGoalFirstRep() {
if (getGoal().isEmpty()) {
addGoal();
}
return getGoal().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setGoal(List<Reference> theGoal) {
this.goal = theGoal;
return this;
}
public boolean hasGoal() { public boolean hasGoal() {
if (this.goal == null) if (this.goal == null)
return false; return false;
@ -2851,6 +3314,24 @@ public class CarePlan extends DomainResource {
return this.activity; return this.activity;
} }
/**
* @return The first repetition of repeating field {@link #activity}, creating it if it does not already exist
*/
public CarePlanActivityComponent getActivityFirstRep() {
if (getActivity().isEmpty()) {
addActivity();
}
return getActivity().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CarePlan setActivity(List<CarePlanActivityComponent> theActivity) {
this.activity = theActivity;
return this;
}
public boolean hasActivity() { public boolean hasActivity() {
if (this.activity == null) if (this.activity == null)
return false; return false;
@ -2926,6 +3407,86 @@ public class CarePlan extends DomainResource {
childrenList.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note)); childrenList.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CarePlanStatus>
case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
case -615513399: /*modified*/ return this.modified == null ? new Base[0] : new Base[] {this.modified}; // DateTimeType
case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // Reference
case -1854767153: /*support*/ return this.support == null ? new Base[0] : this.support.toArray(new Base[this.support.size()]); // Reference
case 1112903156: /*relatedPlan*/ return this.relatedPlan == null ? new Base[0] : this.relatedPlan.toArray(new Base[this.relatedPlan.size()]); // CarePlanRelatedPlanComponent
case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // CarePlanParticipantComponent
case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference
case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : this.activity.toArray(new Base[this.activity.size()]); // CarePlanActivityComponent
case 3387378: /*note*/ return this.note == null ? new Base[0] : new Base[] {this.note}; // Annotation
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -892481550: // status
this.status = new CarePlanStatusEnumFactory().fromType(value); // Enumeration<CarePlanStatus>
break;
case 951530927: // context
this.context = castToReference(value); // Reference
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -1406328437: // author
this.getAuthor().add(castToReference(value)); // Reference
break;
case -615513399: // modified
this.modified = castToDateTime(value); // DateTimeType
break;
case 50511102: // category
this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 874544034: // addresses
this.getAddresses().add(castToReference(value)); // Reference
break;
case -1854767153: // support
this.getSupport().add(castToReference(value)); // Reference
break;
case 1112903156: // relatedPlan
this.getRelatedPlan().add((CarePlanRelatedPlanComponent) value); // CarePlanRelatedPlanComponent
break;
case 767422259: // participant
this.getParticipant().add((CarePlanParticipantComponent) value); // CarePlanParticipantComponent
break;
case 3178259: // goal
this.getGoal().add(castToReference(value)); // Reference
break;
case -1655966961: // activity
this.getActivity().add((CarePlanActivityComponent) value); // CarePlanActivityComponent
break;
case 3387378: // note
this.note = castToAnnotation(value); // Annotation
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -2964,6 +3525,30 @@ public class CarePlan extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -1867885268: return getSubject(); // Reference
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CarePlanStatus>
case 951530927: return getContext(); // Reference
case -991726143: return getPeriod(); // Period
case -1406328437: return addAuthor(); // Reference
case -615513399: throw new FHIRException("Cannot make property modified as it is not a complex type"); // DateTimeType
case 50511102: return addCategory(); // CodeableConcept
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 874544034: return addAddresses(); // Reference
case -1854767153: return addSupport(); // Reference
case 1112903156: return addRelatedPlan(); // CarePlanRelatedPlanComponent
case 767422259: return addParticipant(); // CarePlanParticipantComponent
case 3178259: return addGoal(); // Reference
case -1655966961: return addActivity(); // CarePlanActivityComponent
case 3387378: return getNote(); // Annotation
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -3116,9 +3701,9 @@ public class CarePlan extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, subject, status, context return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subject, status, context
, period, author, modified, category, description, addresses, support, relatedPlan, participant , period, author, modified, category, description, addresses, support, relatedPlan, participant
, goal, activity, note); , goal, activity, note);
} }
@Override @Override
@ -3134,7 +3719,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.period</b><br> * Path: <b>CarePlan.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -3154,7 +3741,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.activity.detail.code</b><br> * Path: <b>CarePlan.activity.detail.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="activitycode", path="CarePlan.activity.detail.code", description="Detail type of activity", type="token" ) // []
// []
@SearchParamDefinition(name="activitycode", path="CarePlan.activity.detail.code", description="Detail type of activity", type="token", target={} )
public static final String SP_ACTIVITYCODE = "activitycode"; public static final String SP_ACTIVITYCODE = "activitycode";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>activitycode</b> * <b>Fluent Client</b> search parameter constant for <b>activitycode</b>
@ -3174,7 +3763,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.activity.detail.scheduled[x]</b><br> * Path: <b>CarePlan.activity.detail.scheduled[x]</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="activitydate", path="CarePlan.activity.detail.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" ) // []
// []
@SearchParamDefinition(name="activitydate", path="CarePlan.activity.detail.scheduled", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date", target={} )
public static final String SP_ACTIVITYDATE = "activitydate"; public static final String SP_ACTIVITYDATE = "activitydate";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>activitydate</b> * <b>Fluent Client</b> search parameter constant for <b>activitydate</b>
@ -3194,7 +3785,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.activity.reference</b><br> * Path: <b>CarePlan.activity.reference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="activityreference", path="CarePlan.activity.reference", description="Activity details defined in specific resource", type="reference" ) // [Appointment, Order, ReferralRequest, ProcessRequest, NutritionOrder, VisionPrescription, DiagnosticOrder, ProcedureRequest, DeviceUseRequest, MedicationOrder, CommunicationRequest, SupplyRequest]
// [Appointment, Order, ReferralRequest, ProcessRequest, NutritionOrder, VisionPrescription, DiagnosticOrder, ProcedureRequest, DeviceUseRequest, MedicationOrder, CommunicationRequest, SupplyRequest]
@SearchParamDefinition(name="activityreference", path="CarePlan.activity.reference", description="Activity details defined in specific resource", type="reference", target={Appointment.class, Order.class, ReferralRequest.class, ProcessRequest.class, NutritionOrder.class, VisionPrescription.class, DiagnosticOrder.class, ProcedureRequest.class, DeviceUseRequest.class, MedicationOrder.class, CommunicationRequest.class, SupplyRequest.class} )
public static final String SP_ACTIVITYREFERENCE = "activityreference"; public static final String SP_ACTIVITYREFERENCE = "activityreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>activityreference</b> * <b>Fluent Client</b> search parameter constant for <b>activityreference</b>
@ -3220,7 +3813,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.activity.detail.performer</b><br> * Path: <b>CarePlan.activity.detail.performer</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="performer", path="CarePlan.activity.detail.performer", description="Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Patient, RelatedPerson]
// [Practitioner, Organization, Patient, RelatedPerson]
@SearchParamDefinition(name="performer", path="CarePlan.activity.detail.performer", description="Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type="reference", target={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class} )
public static final String SP_PERFORMER = "performer"; public static final String SP_PERFORMER = "performer";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>performer</b> * <b>Fluent Client</b> search parameter constant for <b>performer</b>
@ -3246,7 +3841,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.goal</b><br> * Path: <b>CarePlan.goal</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="goal", path="CarePlan.goal", description="Desired outcome of plan", type="reference" ) // [Goal]
// [Goal]
@SearchParamDefinition(name="goal", path="CarePlan.goal", description="Desired outcome of plan", type="reference", target={Goal.class} )
public static final String SP_GOAL = "goal"; public static final String SP_GOAL = "goal";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>goal</b> * <b>Fluent Client</b> search parameter constant for <b>goal</b>
@ -3272,7 +3869,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.subject</b><br> * Path: <b>CarePlan.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="CarePlan.subject", description="Who care plan is for", type="reference" ) // [Group, Patient]
// [Group, Patient]
@SearchParamDefinition(name="subject", path="CarePlan.subject", description="Who care plan is for", type="reference", target={Group.class, Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -3298,7 +3897,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.relatedPlan.code</b><br> * Path: <b>CarePlan.relatedPlan.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="relatedcode", path="CarePlan.relatedPlan.code", description="includes | replaces | fulfills", type="token" ) // []
// []
@SearchParamDefinition(name="relatedcode", path="CarePlan.relatedPlan.code", description="includes | replaces | fulfills", type="token", target={} )
public static final String SP_RELATEDCODE = "relatedcode"; public static final String SP_RELATEDCODE = "relatedcode";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>relatedcode</b> * <b>Fluent Client</b> search parameter constant for <b>relatedcode</b>
@ -3318,7 +3919,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.participant.member</b><br> * Path: <b>CarePlan.participant.member</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Patient, RelatedPerson]
// [Practitioner, Organization, Patient, RelatedPerson]
@SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference", target={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class} )
public static final String SP_PARTICIPANT = "participant"; public static final String SP_PARTICIPANT = "participant";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>participant</b> * <b>Fluent Client</b> search parameter constant for <b>participant</b>
@ -3344,7 +3947,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.relatedPlan.plan</b><br> * Path: <b>CarePlan.relatedPlan.plan</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="relatedplan", path="CarePlan.relatedPlan.plan", description="Plan relationship exists with", type="reference" ) // [CarePlan]
// [CarePlan]
@SearchParamDefinition(name="relatedplan", path="CarePlan.relatedPlan.plan", description="Plan relationship exists with", type="reference", target={CarePlan.class} )
public static final String SP_RELATEDPLAN = "relatedplan"; public static final String SP_RELATEDPLAN = "relatedplan";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>relatedplan</b> * <b>Fluent Client</b> search parameter constant for <b>relatedplan</b>
@ -3370,7 +3975,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.addresses</b><br> * Path: <b>CarePlan.addresses</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="condition", path="CarePlan.addresses", description="Health issues this plan addresses", type="reference" ) // [Condition]
// [Condition]
@SearchParamDefinition(name="condition", path="CarePlan.addresses", description="Health issues this plan addresses", type="reference", target={Condition.class} )
public static final String SP_CONDITION = "condition"; public static final String SP_CONDITION = "condition";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>condition</b> * <b>Fluent Client</b> search parameter constant for <b>condition</b>
@ -3396,7 +4003,9 @@ public class CarePlan extends DomainResource {
* Path: <b></b><br> * Path: <b></b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="related", path="", description="A combination of the type of relationship and the related plan", type="composite", compositeOf={"relatedcode", "relatedplan"} ) // []
// []
@SearchParamDefinition(name="related", path="", description="A combination of the type of relationship and the related plan", type="composite", compositeOf={"relatedcode", "relatedplan"}, target={} )
public static final String SP_RELATED = "related"; public static final String SP_RELATED = "related";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>related</b> * <b>Fluent Client</b> search parameter constant for <b>related</b>
@ -3416,7 +4025,9 @@ public class CarePlan extends DomainResource {
* Path: <b>CarePlan.subject</b><br> * Path: <b>CarePlan.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="CarePlan.subject", description="Who care plan is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Group, Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="CarePlan.subject", description="Who care plan is for", type="reference", target={Group.class, Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -3434,6 +4045,28 @@ public class CarePlan extends DomainResource {
*/ */
public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CarePlan:patient").toLocked(); public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CarePlan:patient").toLocked();
/**
* Search parameter: <b>category</b>
* <p>
* Description: <b>Type of plan</b><br>
* Type: <b>token</b><br>
* Path: <b>CarePlan.category</b><br>
* </p>
*/
// []
// []
@SearchParamDefinition(name="category", path="CarePlan.category", description="Type of plan", type="token", target={} )
public static final String SP_CATEGORY = "category";
/**
* <b>Fluent Client</b> search parameter constant for <b>category</b>
* <p>
* Description: <b>Type of plan</b><br>
* Type: <b>token</b><br>
* Path: <b>CarePlan.category</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -178,6 +178,34 @@ public class CareTeam extends DomainResource {
childrenList.add(new Property("period", "Period", "Indicates when the specific member or organization did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Indicates when the specific member or organization did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
case -1077769574: /*member*/ return this.member == null ? new Base[0] : new Base[] {this.member}; // Reference
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3506294: // role
this.role = castToCodeableConcept(value); // CodeableConcept
break;
case -1077769574: // member
this.member = castToReference(value); // Reference
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("role")) if (name.equals("role"))
@ -190,6 +218,17 @@ public class CareTeam extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3506294: return getRole(); // CodeableConcept
case -1077769574: return getMember(); // Reference
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("role")) { if (name.equals("role")) {
@ -239,7 +278,7 @@ public class CareTeam extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, member, period); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member, period);
} }
public String fhirType() { public String fhirType() {
@ -333,6 +372,24 @@ public class CareTeam extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CareTeam setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -397,6 +454,24 @@ public class CareTeam extends DomainResource {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CareTeam setType(List<CodeableConcept> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -549,6 +624,24 @@ public class CareTeam extends DomainResource {
return this.participant; return this.participant;
} }
/**
* @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
*/
public CareTeamParticipantComponent getParticipantFirstRep() {
if (getParticipant().isEmpty()) {
addParticipant();
}
return getParticipant().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CareTeam setParticipant(List<CareTeamParticipantComponent> theParticipant) {
this.participant = theParticipant;
return this;
}
public boolean hasParticipant() { public boolean hasParticipant() {
if (this.participant == null) if (this.participant == null)
return false; return false;
@ -636,6 +729,54 @@ public class CareTeam extends DomainResource {
childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // CareTeamParticipantComponent
case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = castToCodeableConcept(value); // CodeableConcept
break;
case 3575610: // type
this.getType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case 767422259: // participant
this.getParticipant().add((CareTeamParticipantComponent) value); // CareTeamParticipantComponent
break;
case -2058947787: // managingOrganization
this.managingOrganization = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -658,6 +799,22 @@ public class CareTeam extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: return getStatus(); // CodeableConcept
case 3575610: return addType(); // CodeableConcept
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1867885268: return getSubject(); // Reference
case -991726143: return getPeriod(); // Period
case 767422259: return addParticipant(); // CareTeamParticipantComponent
case -2058947787: return getManagingOrganization(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -751,8 +908,8 @@ public class CareTeam extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, type, name return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type, name
, subject, period, participant, managingOrganization); , subject, period, participant, managingOrganization);
} }
@Override @Override
@ -768,7 +925,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.period</b><br> * Path: <b>CareTeam.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="CareTeam.period", description="Time period team covers", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="CareTeam.period", description="Time period team covers", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -788,7 +947,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.identifier</b><br> * Path: <b>CareTeam.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="CareTeam.identifier", description="External Ids for this team", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="CareTeam.identifier", description="External Ids for this team", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -808,7 +969,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.subject</b><br> * Path: <b>CareTeam.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="CareTeam.subject", description="Who care team is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Group, Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="CareTeam.subject", description="Who care team is for", type="reference", target={Group.class, Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -834,7 +997,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.subject</b><br> * Path: <b>CareTeam.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="CareTeam.subject", description="Who care team is for", type="reference" ) // [Group, Patient]
// [Group, Patient]
@SearchParamDefinition(name="subject", path="CareTeam.subject", description="Who care team is for", type="reference", target={Group.class, Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -860,7 +1025,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.type</b><br> * Path: <b>CareTeam.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="CareTeam.type", description="Type of team", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="CareTeam.type", description="Type of team", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -880,7 +1047,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.participant.member</b><br> * Path: <b>CareTeam.participant.member</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="participant", path="CareTeam.participant.member", description="Who is involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Patient, RelatedPerson]
// [Practitioner, Organization, Patient, RelatedPerson]
@SearchParamDefinition(name="participant", path="CareTeam.participant.member", description="Who is involved", type="reference", target={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class} )
public static final String SP_PARTICIPANT = "participant"; public static final String SP_PARTICIPANT = "participant";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>participant</b> * <b>Fluent Client</b> search parameter constant for <b>participant</b>
@ -906,7 +1075,9 @@ public class CareTeam extends DomainResource {
* Path: <b>CareTeam.status</b><br> * Path: <b>CareTeam.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="CareTeam.status", description="active | suspended | inactive | entered in error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="CareTeam.status", description="active | suspended | inactive | entered in error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -221,6 +221,24 @@ public class ClinicalImpression extends DomainResource {
return this.item; return this.item;
} }
/**
* @return The first repetition of repeating field {@link #item}, creating it if it does not already exist
*/
public Reference getItemFirstRep() {
if (getItem().isEmpty()) {
addItem();
}
return getItem().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpressionInvestigationsComponent setItem(List<Reference> theItem) {
this.item = theItem;
return this;
}
public boolean hasItem() { public boolean hasItem() {
if (this.item == null) if (this.item == null)
return false; return false;
@ -267,6 +285,30 @@ public class ClinicalImpression extends DomainResource {
childrenList.add(new Property("item", "Reference(Observation|QuestionnaireResponse|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("item", "Reference(Observation|QuestionnaireResponse|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case 3242771: // item
this.getItem().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -277,6 +319,16 @@ public class ClinicalImpression extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: return getCode(); // CodeableConcept
case 3242771: return addItem(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -323,7 +375,7 @@ public class ClinicalImpression extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, item); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, item);
} }
public String fhirType() { public String fhirType() {
@ -445,6 +497,30 @@ public class ClinicalImpression extends DomainResource {
childrenList.add(new Property("cause", "string", "Which investigations support finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, cause)); childrenList.add(new Property("cause", "string", "Which investigations support finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, cause));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableConcept
case 94434409: /*cause*/ return this.cause == null ? new Base[0] : new Base[] {this.cause}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3242771: // item
this.item = castToCodeableConcept(value); // CodeableConcept
break;
case 94434409: // cause
this.cause = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("item")) if (name.equals("item"))
@ -455,6 +531,16 @@ public class ClinicalImpression extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3242771: return getItem(); // CodeableConcept
case 94434409: throw new FHIRException("Cannot make property cause as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("item")) { if (name.equals("item")) {
@ -497,7 +583,7 @@ public class ClinicalImpression extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, cause); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, cause);
} }
public String fhirType() { public String fhirType() {
@ -619,6 +705,30 @@ public class ClinicalImpression extends DomainResource {
childrenList.add(new Property("reason", "string", "Grounds for elimination.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("reason", "string", "Grounds for elimination.", 0, java.lang.Integer.MAX_VALUE, reason));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableConcept
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3242771: // item
this.item = castToCodeableConcept(value); // CodeableConcept
break;
case -934964668: // reason
this.reason = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("item")) if (name.equals("item"))
@ -629,6 +739,16 @@ public class ClinicalImpression extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3242771: return getItem(); // CodeableConcept
case -934964668: throw new FHIRException("Cannot make property reason as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("item")) { if (name.equals("item")) {
@ -671,7 +791,7 @@ public class ClinicalImpression extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, reason); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, reason);
} }
public String fhirType() { public String fhirType() {
@ -1132,6 +1252,24 @@ public class ClinicalImpression extends DomainResource {
return this.problem; return this.problem;
} }
/**
* @return The first repetition of repeating field {@link #problem}, creating it if it does not already exist
*/
public Reference getProblemFirstRep() {
if (getProblem().isEmpty()) {
addProblem();
}
return getProblem().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setProblem(List<Reference> theProblem) {
this.problem = theProblem;
return this;
}
public boolean hasProblem() { public boolean hasProblem() {
if (this.problem == null) if (this.problem == null)
return false; return false;
@ -1226,6 +1364,24 @@ public class ClinicalImpression extends DomainResource {
return this.investigations; return this.investigations;
} }
/**
* @return The first repetition of repeating field {@link #investigations}, creating it if it does not already exist
*/
public ClinicalImpressionInvestigationsComponent getInvestigationsFirstRep() {
if (getInvestigations().isEmpty()) {
addInvestigations();
}
return getInvestigations().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setInvestigations(List<ClinicalImpressionInvestigationsComponent> theInvestigations) {
this.investigations = theInvestigations;
return this;
}
public boolean hasInvestigations() { public boolean hasInvestigations() {
if (this.investigations == null) if (this.investigations == null)
return false; return false;
@ -1364,6 +1520,24 @@ public class ClinicalImpression extends DomainResource {
return this.finding; return this.finding;
} }
/**
* @return The first repetition of repeating field {@link #finding}, creating it if it does not already exist
*/
public ClinicalImpressionFindingComponent getFindingFirstRep() {
if (getFinding().isEmpty()) {
addFinding();
}
return getFinding().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setFinding(List<ClinicalImpressionFindingComponent> theFinding) {
this.finding = theFinding;
return this;
}
public boolean hasFinding() { public boolean hasFinding() {
if (this.finding == null) if (this.finding == null)
return false; return false;
@ -1404,6 +1578,24 @@ public class ClinicalImpression extends DomainResource {
return this.resolved; return this.resolved;
} }
/**
* @return The first repetition of repeating field {@link #resolved}, creating it if it does not already exist
*/
public CodeableConcept getResolvedFirstRep() {
if (getResolved().isEmpty()) {
addResolved();
}
return getResolved().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setResolved(List<CodeableConcept> theResolved) {
this.resolved = theResolved;
return this;
}
public boolean hasResolved() { public boolean hasResolved() {
if (this.resolved == null) if (this.resolved == null)
return false; return false;
@ -1444,6 +1636,24 @@ public class ClinicalImpression extends DomainResource {
return this.ruledOut; return this.ruledOut;
} }
/**
* @return The first repetition of repeating field {@link #ruledOut}, creating it if it does not already exist
*/
public ClinicalImpressionRuledOutComponent getRuledOutFirstRep() {
if (getRuledOut().isEmpty()) {
addRuledOut();
}
return getRuledOut().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setRuledOut(List<ClinicalImpressionRuledOutComponent> theRuledOut) {
this.ruledOut = theRuledOut;
return this;
}
public boolean hasRuledOut() { public boolean hasRuledOut() {
if (this.ruledOut == null) if (this.ruledOut == null)
return false; return false;
@ -1533,6 +1743,24 @@ public class ClinicalImpression extends DomainResource {
return this.plan; return this.plan;
} }
/**
* @return The first repetition of repeating field {@link #plan}, creating it if it does not already exist
*/
public Reference getPlanFirstRep() {
if (getPlan().isEmpty()) {
addPlan();
}
return getPlan().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setPlan(List<Reference> thePlan) {
this.plan = thePlan;
return this;
}
public boolean hasPlan() { public boolean hasPlan() {
if (this.plan == null) if (this.plan == null)
return false; return false;
@ -1582,6 +1810,24 @@ public class ClinicalImpression extends DomainResource {
return this.action; return this.action;
} }
/**
* @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
*/
public Reference getActionFirstRep() {
if (getAction().isEmpty()) {
addAction();
}
return getAction().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ClinicalImpression setAction(List<Reference> theAction) {
this.action = theAction;
return this;
}
public boolean hasAction() { public boolean hasAction() {
if (this.action == null) if (this.action == null)
return false; return false;
@ -1643,6 +1889,90 @@ public class ClinicalImpression extends DomainResource {
childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationOrder|DiagnosticOrder|NutritionOrder|SupplyRequest|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationOrder|DiagnosticOrder|NutritionOrder|SupplyRequest|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case -373213113: /*assessor*/ return this.assessor == null ? new Base[0] : new Base[] {this.assessor}; // Reference
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ClinicalImpressionStatus>
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1273775369: /*previous*/ return this.previous == null ? new Base[0] : new Base[] {this.previous}; // Reference
case -309542241: /*problem*/ return this.problem == null ? new Base[0] : this.problem.toArray(new Base[this.problem.size()]); // Reference
case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : new Base[] {this.trigger}; // Type
case -428294735: /*investigations*/ return this.investigations == null ? new Base[0] : this.investigations.toArray(new Base[this.investigations.size()]); // ClinicalImpressionInvestigationsComponent
case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : new Base[] {this.protocol}; // UriType
case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // StringType
case -853173367: /*finding*/ return this.finding == null ? new Base[0] : this.finding.toArray(new Base[this.finding.size()]); // ClinicalImpressionFindingComponent
case -341328904: /*resolved*/ return this.resolved == null ? new Base[0] : this.resolved.toArray(new Base[this.resolved.size()]); // CodeableConcept
case 763913542: /*ruledOut*/ return this.ruledOut == null ? new Base[0] : this.ruledOut.toArray(new Base[this.ruledOut.size()]); // ClinicalImpressionRuledOutComponent
case -972050334: /*prognosis*/ return this.prognosis == null ? new Base[0] : new Base[] {this.prognosis}; // StringType
case 3443497: /*plan*/ return this.plan == null ? new Base[0] : this.plan.toArray(new Base[this.plan.size()]); // Reference
case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case -373213113: // assessor
this.assessor = castToReference(value); // Reference
break;
case -892481550: // status
this.status = new ClinicalImpressionStatusEnumFactory().fromType(value); // Enumeration<ClinicalImpressionStatus>
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1273775369: // previous
this.previous = castToReference(value); // Reference
break;
case -309542241: // problem
this.getProblem().add(castToReference(value)); // Reference
break;
case -1059891784: // trigger
this.trigger = (Type) value; // Type
break;
case -428294735: // investigations
this.getInvestigations().add((ClinicalImpressionInvestigationsComponent) value); // ClinicalImpressionInvestigationsComponent
break;
case -989163880: // protocol
this.protocol = castToUri(value); // UriType
break;
case -1857640538: // summary
this.summary = castToString(value); // StringType
break;
case -853173367: // finding
this.getFinding().add((ClinicalImpressionFindingComponent) value); // ClinicalImpressionFindingComponent
break;
case -341328904: // resolved
this.getResolved().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 763913542: // ruledOut
this.getRuledOut().add((ClinicalImpressionRuledOutComponent) value); // ClinicalImpressionRuledOutComponent
break;
case -972050334: // prognosis
this.prognosis = castToString(value); // StringType
break;
case 3443497: // plan
this.getPlan().add(castToReference(value)); // Reference
break;
case -1422950858: // action
this.getAction().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("patient")) if (name.equals("patient"))
@ -1683,6 +2013,31 @@ public class ClinicalImpression extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -791418107: return getPatient(); // Reference
case -373213113: return getAssessor(); // Reference
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ClinicalImpressionStatus>
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1273775369: return getPrevious(); // Reference
case -309542241: return addProblem(); // Reference
case 1363514312: return getTrigger(); // Type
case -428294735: return addInvestigations(); // ClinicalImpressionInvestigationsComponent
case -989163880: throw new FHIRException("Cannot make property protocol as it is not a complex type"); // UriType
case -1857640538: throw new FHIRException("Cannot make property summary as it is not a complex type"); // StringType
case -853173367: return addFinding(); // ClinicalImpressionFindingComponent
case -341328904: return addResolved(); // CodeableConcept
case 763913542: return addRuledOut(); // ClinicalImpressionRuledOutComponent
case -972050334: throw new FHIRException("Cannot make property prognosis as it is not a complex type"); // StringType
case 3443497: return addPlan(); // Reference
case -1422950858: return addAction(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("patient")) { if (name.equals("patient")) {
@ -1836,9 +2191,9 @@ public class ClinicalImpression extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, assessor, status, date return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, assessor, status, date
, description, previous, problem, trigger, investigations, protocol, summary, finding , description, previous, problem, trigger, investigations, protocol, summary, finding, resolved
, resolved, ruledOut, prognosis, plan, action); , ruledOut, prognosis, plan, action);
} }
@Override @Override
@ -1854,7 +2209,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.date</b><br> * Path: <b>ClinicalImpression.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="ClinicalImpression.date", description="When the assessment occurred", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="ClinicalImpression.date", description="When the assessment occurred", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1874,7 +2231,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.previous</b><br> * Path: <b>ClinicalImpression.previous</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference" ) // [ClinicalImpression]
// [ClinicalImpression]
@SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference", target={ClinicalImpression.class} )
public static final String SP_PREVIOUS = "previous"; public static final String SP_PREVIOUS = "previous";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>previous</b> * <b>Fluent Client</b> search parameter constant for <b>previous</b>
@ -1900,7 +2259,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.assessor</b><br> * Path: <b>ClinicalImpression.assessor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner]
// [Practitioner]
@SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference", target={Practitioner.class} )
public static final String SP_ASSESSOR = "assessor"; public static final String SP_ASSESSOR = "assessor";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>assessor</b> * <b>Fluent Client</b> search parameter constant for <b>assessor</b>
@ -1926,7 +2287,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.triggerReference</b><br> * Path: <b>ClinicalImpression.triggerReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="trigger", path="ClinicalImpression.triggerReference", description="Request or event that necessitated this assessment", type="reference" ) // [Any]
// [Any]
@SearchParamDefinition(name="trigger", path="ClinicalImpression.trigger.as(Reference)", description="Request or event that necessitated this assessment", type="reference" )
public static final String SP_TRIGGER = "trigger"; public static final String SP_TRIGGER = "trigger";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>trigger</b> * <b>Fluent Client</b> search parameter constant for <b>trigger</b>
@ -1952,7 +2315,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.finding.item</b><br> * Path: <b>ClinicalImpression.finding.item</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="finding", path="ClinicalImpression.finding.item", description="Specific text or code for finding", type="token" ) // []
// []
@SearchParamDefinition(name="finding", path="ClinicalImpression.finding.item", description="Specific text or code for finding", type="token", target={} )
public static final String SP_FINDING = "finding"; public static final String SP_FINDING = "finding";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>finding</b> * <b>Fluent Client</b> search parameter constant for <b>finding</b>
@ -1972,7 +2337,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.ruledOut.item</b><br> * Path: <b>ClinicalImpression.ruledOut.item</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="ruledout", path="ClinicalImpression.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) // []
// []
@SearchParamDefinition(name="ruledout", path="ClinicalImpression.ruledOut.item", description="Specific text of code for diagnosis", type="token", target={} )
public static final String SP_RULEDOUT = "ruledout"; public static final String SP_RULEDOUT = "ruledout";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>ruledout</b> * <b>Fluent Client</b> search parameter constant for <b>ruledout</b>
@ -1992,7 +2359,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.problem</b><br> * Path: <b>ClinicalImpression.problem</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="General assessment of patient state", type="reference" ) // [Condition, AllergyIntolerance]
// [Condition, AllergyIntolerance]
@SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="General assessment of patient state", type="reference", target={Condition.class, AllergyIntolerance.class} )
public static final String SP_PROBLEM = "problem"; public static final String SP_PROBLEM = "problem";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>problem</b> * <b>Fluent Client</b> search parameter constant for <b>problem</b>
@ -2018,7 +2387,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.patient</b><br> * Path: <b>ClinicalImpression.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -2044,7 +2415,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.investigations.item</b><br> * Path: <b>ClinicalImpression.investigations.item</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="investigation", path="ClinicalImpression.investigations.item", description="Record of a specific investigation", type="reference" ) // [FamilyMemberHistory, Observation, DiagnosticReport, QuestionnaireResponse]
// [FamilyMemberHistory, Observation, DiagnosticReport, QuestionnaireResponse]
@SearchParamDefinition(name="investigation", path="ClinicalImpression.investigations.item", description="Record of a specific investigation", type="reference", target={FamilyMemberHistory.class, Observation.class, DiagnosticReport.class, QuestionnaireResponse.class} )
public static final String SP_INVESTIGATION = "investigation"; public static final String SP_INVESTIGATION = "investigation";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>investigation</b> * <b>Fluent Client</b> search parameter constant for <b>investigation</b>
@ -2070,7 +2443,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.action</b><br> * Path: <b>ClinicalImpression.action</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="action", path="ClinicalImpression.action", description="Actions taken during assessment", type="reference" ) // [Appointment, ReferralRequest, NutritionOrder, ProcedureRequest, Procedure, DiagnosticOrder, MedicationOrder, SupplyRequest]
// [Appointment, ReferralRequest, NutritionOrder, ProcedureRequest, Procedure, DiagnosticOrder, MedicationOrder, SupplyRequest]
@SearchParamDefinition(name="action", path="ClinicalImpression.action", description="Actions taken during assessment", type="reference", target={Appointment.class, ReferralRequest.class, NutritionOrder.class, ProcedureRequest.class, Procedure.class, DiagnosticOrder.class, MedicationOrder.class, SupplyRequest.class} )
public static final String SP_ACTION = "action"; public static final String SP_ACTION = "action";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>action</b> * <b>Fluent Client</b> search parameter constant for <b>action</b>
@ -2096,7 +2471,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.triggerCodeableConcept</b><br> * Path: <b>ClinicalImpression.triggerCodeableConcept</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="trigger-code", path="ClinicalImpression.triggerCodeableConcept", description="Request or event that necessitated this assessment", type="token" ) // []
// []
@SearchParamDefinition(name="trigger-code", path="ClinicalImpression.trigger.as(CodeableConcept)", description="Request or event that necessitated this assessment", type="token", target={} )
public static final String SP_TRIGGER_CODE = "trigger-code"; public static final String SP_TRIGGER_CODE = "trigger-code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>trigger-code</b> * <b>Fluent Client</b> search parameter constant for <b>trigger-code</b>
@ -2116,7 +2493,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.plan</b><br> * Path: <b>ClinicalImpression.plan</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="plan", path="ClinicalImpression.plan", description="Plan of action after assessment", type="reference" ) // [Appointment, Order, ReferralRequest, ProcessRequest, VisionPrescription, DiagnosticOrder, ProcedureRequest, DeviceUseRequest, SupplyRequest, CarePlan, NutritionOrder, MedicationOrder, CommunicationRequest]
// [Appointment, Order, ReferralRequest, ProcessRequest, VisionPrescription, DiagnosticOrder, ProcedureRequest, DeviceUseRequest, SupplyRequest, CarePlan, NutritionOrder, MedicationOrder, CommunicationRequest]
@SearchParamDefinition(name="plan", path="ClinicalImpression.plan", description="Plan of action after assessment", type="reference", target={Appointment.class, Order.class, ReferralRequest.class, ProcessRequest.class, VisionPrescription.class, DiagnosticOrder.class, ProcedureRequest.class, DeviceUseRequest.class, SupplyRequest.class, CarePlan.class, NutritionOrder.class, MedicationOrder.class, CommunicationRequest.class} )
public static final String SP_PLAN = "plan"; public static final String SP_PLAN = "plan";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>plan</b> * <b>Fluent Client</b> search parameter constant for <b>plan</b>
@ -2142,7 +2521,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.resolved</b><br> * Path: <b>ClinicalImpression.resolved</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="resolved", path="ClinicalImpression.resolved", description="Diagnoses/conditions resolved since previous assessment", type="token" ) // []
// []
@SearchParamDefinition(name="resolved", path="ClinicalImpression.resolved", description="Diagnoses/conditions resolved since previous assessment", type="token", target={} )
public static final String SP_RESOLVED = "resolved"; public static final String SP_RESOLVED = "resolved";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>resolved</b> * <b>Fluent Client</b> search parameter constant for <b>resolved</b>
@ -2162,7 +2543,9 @@ public class ClinicalImpression extends DomainResource {
* Path: <b>ClinicalImpression.status</b><br> * Path: <b>ClinicalImpression.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="ClinicalImpression.status", description="in-progress | completed | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="ClinicalImpression.status", description="in-progress | completed | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -78,6 +78,24 @@ public class CodeableConcept extends Type implements ICompositeType {
return this.coding; return this.coding;
} }
/**
* @return The first repetition of repeating field {@link #coding}, creating it if it does not already exist
*/
public Coding getCodingFirstRep() {
if (getCoding().isEmpty()) {
addCoding();
}
return getCoding().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CodeableConcept setCoding(List<Coding> theCoding) {
this.coding = theCoding;
return this;
}
public boolean hasCoding() { public boolean hasCoding() {
if (this.coding == null) if (this.coding == null)
return false; return false;
@ -164,6 +182,30 @@ public class CodeableConcept extends Type implements ICompositeType {
childrenList.add(new Property("text", "string", "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("text", "string", "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", 0, java.lang.Integer.MAX_VALUE, text));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1355086998: /*coding*/ return this.coding == null ? new Base[0] : this.coding.toArray(new Base[this.coding.size()]); // Coding
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1355086998: // coding
this.getCoding().add(castToCoding(value)); // Coding
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("coding")) if (name.equals("coding"))
@ -174,6 +216,16 @@ public class CodeableConcept extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1355086998: return addCoding(); // Coding
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("coding")) { if (name.equals("coding")) {
@ -228,7 +280,7 @@ public class CodeableConcept extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( coding, text); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coding, text);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -352,6 +352,42 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
childrenList.add(new Property("userSelected", "boolean", "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", 0, java.lang.Integer.MAX_VALUE, userSelected)); childrenList.add(new Property("userSelected", "boolean", "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", 0, java.lang.Integer.MAX_VALUE, userSelected));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
case 423643014: /*userSelected*/ return this.userSelected == null ? new Base[0] : new Base[] {this.userSelected}; // BooleanType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case 1671764162: // display
this.display = castToString(value); // StringType
break;
case 423643014: // userSelected
this.userSelected = castToBoolean(value); // BooleanType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -368,6 +404,19 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case 1671764162: throw new FHIRException("Cannot make property display as it is not a complex type"); // StringType
case 423643014: throw new FHIRException("Cannot make property userSelected as it is not a complex type"); // BooleanType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -432,8 +481,8 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, display return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, display
, userSelected); , userSelected);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -271,6 +271,26 @@ public class Communication extends DomainResource {
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "A communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content)); childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "A communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 951530617: // content
this.content = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("content[x]")) if (name.equals("content[x]"))
@ -279,6 +299,15 @@ public class Communication extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 264548711: return getContent(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("contentString")) { if (name.equals("contentString")) {
@ -325,7 +354,7 @@ public class Communication extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
} }
public String fhirType() { public String fhirType() {
@ -469,6 +498,24 @@ public class Communication extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Communication setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -572,6 +619,24 @@ public class Communication extends DomainResource {
return this.recipient; return this.recipient;
} }
/**
* @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist
*/
public Reference getRecipientFirstRep() {
if (getRecipient().isEmpty()) {
addRecipient();
}
return getRecipient().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Communication setRecipient(List<Reference> theRecipient) {
this.recipient = theRecipient;
return this;
}
public boolean hasRecipient() { public boolean hasRecipient() {
if (this.recipient == null) if (this.recipient == null)
return false; return false;
@ -621,6 +686,24 @@ public class Communication extends DomainResource {
return this.payload; return this.payload;
} }
/**
* @return The first repetition of repeating field {@link #payload}, creating it if it does not already exist
*/
public CommunicationPayloadComponent getPayloadFirstRep() {
if (getPayload().isEmpty()) {
addPayload();
}
return getPayload().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Communication setPayload(List<CommunicationPayloadComponent> thePayload) {
this.payload = thePayload;
return this;
}
public boolean hasPayload() { public boolean hasPayload() {
if (this.payload == null) if (this.payload == null)
return false; return false;
@ -661,6 +744,24 @@ public class Communication extends DomainResource {
return this.medium; return this.medium;
} }
/**
* @return The first repetition of repeating field {@link #medium}, creating it if it does not already exist
*/
public CodeableConcept getMediumFirstRep() {
if (getMedium().isEmpty()) {
addMedium();
}
return getMedium().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Communication setMedium(List<CodeableConcept> theMedium) {
this.medium = theMedium;
return this;
}
public boolean hasMedium() { public boolean hasMedium() {
if (this.medium == null) if (this.medium == null)
return false; return false;
@ -892,6 +993,24 @@ public class Communication extends DomainResource {
return this.reason; return this.reason;
} }
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Communication setReason(List<CodeableConcept> theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() { public boolean hasReason() {
if (this.reason == null) if (this.reason == null)
return false; return false;
@ -1028,6 +1147,74 @@ public class Communication extends DomainResource {
childrenList.add(new Property("requestDetail", "Reference(CommunicationRequest)", "The communication request that was responsible for producing this communication.", 0, java.lang.Integer.MAX_VALUE, requestDetail)); childrenList.add(new Property("requestDetail", "Reference(CommunicationRequest)", "The communication request that was responsible for producing this communication.", 0, java.lang.Integer.MAX_VALUE, requestDetail));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case -905962955: /*sender*/ return this.sender == null ? new Base[0] : new Base[] {this.sender}; // Reference
case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
case -786701938: /*payload*/ return this.payload == null ? new Base[0] : this.payload.toArray(new Base[this.payload.size()]); // CommunicationPayloadComponent
case -1078030475: /*medium*/ return this.medium == null ? new Base[0] : this.medium.toArray(new Base[this.medium.size()]); // CodeableConcept
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CommunicationStatus>
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case 3526552: /*sent*/ return this.sent == null ? new Base[0] : new Base[] {this.sent}; // DateTimeType
case -808719903: /*received*/ return this.received == null ? new Base[0] : new Base[] {this.received}; // DateTimeType
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 960204736: /*requestDetail*/ return this.requestDetail == null ? new Base[0] : new Base[] {this.requestDetail}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case -905962955: // sender
this.sender = castToReference(value); // Reference
break;
case 820081177: // recipient
this.getRecipient().add(castToReference(value)); // Reference
break;
case -786701938: // payload
this.getPayload().add((CommunicationPayloadComponent) value); // CommunicationPayloadComponent
break;
case -1078030475: // medium
this.getMedium().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -892481550: // status
this.status = new CommunicationStatusEnumFactory().fromType(value); // Enumeration<CommunicationStatus>
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case 3526552: // sent
this.sent = castToDateTime(value); // DateTimeType
break;
case -808719903: // received
this.received = castToDateTime(value); // DateTimeType
break;
case -934964668: // reason
this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 960204736: // requestDetail
this.requestDetail = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1060,6 +1247,27 @@ public class Communication extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 50511102: return getCategory(); // CodeableConcept
case -905962955: return getSender(); // Reference
case 820081177: return addRecipient(); // Reference
case -786701938: return addPayload(); // CommunicationPayloadComponent
case -1078030475: return addMedium(); // CodeableConcept
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CommunicationStatus>
case 1524132147: return getEncounter(); // Reference
case 3526552: throw new FHIRException("Cannot make property sent as it is not a complex type"); // DateTimeType
case -808719903: throw new FHIRException("Cannot make property received as it is not a complex type"); // DateTimeType
case -934964668: return addReason(); // CodeableConcept
case -1867885268: return getSubject(); // Reference
case 960204736: return getRequestDetail(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1184,9 +1392,8 @@ public class Communication extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, sender return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, category, sender, recipient
, recipient, payload, medium, status, encounter, sent, received, reason, subject, requestDetail , payload, medium, status, encounter, sent, received, reason, subject, requestDetail);
);
} }
@Override @Override
@ -1202,7 +1409,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.identifier</b><br> * Path: <b>Communication.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1222,7 +1431,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.requestDetail</b><br> * Path: <b>Communication.requestDetail</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="request", path="Communication.requestDetail", description="CommunicationRequest producing this message", type="reference" ) // [CommunicationRequest]
// [CommunicationRequest]
@SearchParamDefinition(name="request", path="Communication.requestDetail", description="CommunicationRequest producing this message", type="reference", target={CommunicationRequest.class} )
public static final String SP_REQUEST = "request"; public static final String SP_REQUEST = "request";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>request</b> * <b>Fluent Client</b> search parameter constant for <b>request</b>
@ -1248,7 +1459,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.sender</b><br> * Path: <b>Communication.sender</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_SENDER = "sender"; public static final String SP_SENDER = "sender";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>sender</b> * <b>Fluent Client</b> search parameter constant for <b>sender</b>
@ -1274,7 +1487,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.subject</b><br> * Path: <b>Communication.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference", target={Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -1300,7 +1515,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.subject</b><br> * Path: <b>Communication.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1326,7 +1543,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.recipient</b><br> * Path: <b>Communication.recipient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Group, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Group, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference", target={Practitioner.class, Group.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_RECIPIENT = "recipient"; public static final String SP_RECIPIENT = "recipient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>recipient</b> * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
@ -1352,7 +1571,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.received</b><br> * Path: <b>Communication.received</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" ) // []
// []
@SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date", target={} )
public static final String SP_RECEIVED = "received"; public static final String SP_RECEIVED = "received";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>received</b> * <b>Fluent Client</b> search parameter constant for <b>received</b>
@ -1372,7 +1593,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.medium</b><br> * Path: <b>Communication.medium</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="medium", path="Communication.medium", description="A channel of communication", type="token" ) // []
// []
@SearchParamDefinition(name="medium", path="Communication.medium", description="A channel of communication", type="token", target={} )
public static final String SP_MEDIUM = "medium"; public static final String SP_MEDIUM = "medium";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>medium</b> * <b>Fluent Client</b> search parameter constant for <b>medium</b>
@ -1392,7 +1615,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.encounter</b><br> * Path: <b>Communication.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -1418,7 +1643,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.category</b><br> * Path: <b>Communication.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>
@ -1438,7 +1665,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.sent</b><br> * Path: <b>Communication.sent</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" ) // []
// []
@SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date", target={} )
public static final String SP_SENT = "sent"; public static final String SP_SENT = "sent";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>sent</b> * <b>Fluent Client</b> search parameter constant for <b>sent</b>
@ -1458,7 +1687,9 @@ public class Communication extends DomainResource {
* Path: <b>Communication.status</b><br> * Path: <b>Communication.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -351,6 +351,26 @@ public class CommunicationRequest extends DomainResource {
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content)); childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 951530617: // content
this.content = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("content[x]")) if (name.equals("content[x]"))
@ -359,6 +379,15 @@ public class CommunicationRequest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 264548711: return getContent(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("contentString")) { if (name.equals("contentString")) {
@ -405,7 +434,7 @@ public class CommunicationRequest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content);
} }
public String fhirType() { public String fhirType() {
@ -442,13 +471,13 @@ public class CommunicationRequest extends DomainResource {
protected Resource senderTarget; protected Resource senderTarget;
/** /**
* The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication. * The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.
*/ */
@Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Group.class, CareTeam.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication." ) @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication." )
protected List<Reference> recipient; protected List<Reference> recipient;
/** /**
* The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) * The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.)
*/ */
protected List<Resource> recipientTarget; protected List<Resource> recipientTarget;
@ -556,6 +585,24 @@ public class CommunicationRequest extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CommunicationRequest setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -651,7 +698,7 @@ public class CommunicationRequest extends DomainResource {
} }
/** /**
* @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.)
*/ */
public List<Reference> getRecipient() { public List<Reference> getRecipient() {
if (this.recipient == null) if (this.recipient == null)
@ -659,6 +706,24 @@ public class CommunicationRequest extends DomainResource {
return this.recipient; return this.recipient;
} }
/**
* @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist
*/
public Reference getRecipientFirstRep() {
if (getRecipient().isEmpty()) {
addRecipient();
}
return getRecipient().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CommunicationRequest setRecipient(List<Reference> theRecipient) {
this.recipient = theRecipient;
return this;
}
public boolean hasRecipient() { public boolean hasRecipient() {
if (this.recipient == null) if (this.recipient == null)
return false; return false;
@ -669,7 +734,7 @@ public class CommunicationRequest extends DomainResource {
} }
/** /**
* @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.)
*/ */
// syntactic sugar // syntactic sugar
public Reference addRecipient() { //3 public Reference addRecipient() { //3
@ -691,7 +756,7 @@ public class CommunicationRequest extends DomainResource {
} }
/** /**
* @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.) * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.)
*/ */
public List<Resource> getRecipientTarget() { public List<Resource> getRecipientTarget() {
if (this.recipientTarget == null) if (this.recipientTarget == null)
@ -708,6 +773,24 @@ public class CommunicationRequest extends DomainResource {
return this.payload; return this.payload;
} }
/**
* @return The first repetition of repeating field {@link #payload}, creating it if it does not already exist
*/
public CommunicationRequestPayloadComponent getPayloadFirstRep() {
if (getPayload().isEmpty()) {
addPayload();
}
return getPayload().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CommunicationRequest setPayload(List<CommunicationRequestPayloadComponent> thePayload) {
this.payload = thePayload;
return this;
}
public boolean hasPayload() { public boolean hasPayload() {
if (this.payload == null) if (this.payload == null)
return false; return false;
@ -748,6 +831,24 @@ public class CommunicationRequest extends DomainResource {
return this.medium; return this.medium;
} }
/**
* @return The first repetition of repeating field {@link #medium}, creating it if it does not already exist
*/
public CodeableConcept getMediumFirstRep() {
if (getMedium().isEmpty()) {
addMedium();
}
return getMedium().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CommunicationRequest setMedium(List<CodeableConcept> theMedium) {
this.medium = theMedium;
return this;
}
public boolean hasMedium() { public boolean hasMedium() {
if (this.medium == null) if (this.medium == null)
return false; return false;
@ -965,6 +1066,24 @@ public class CommunicationRequest extends DomainResource {
return this.reason; return this.reason;
} }
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CommunicationRequest setReason(List<CodeableConcept> theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() { public boolean hasReason() {
if (this.reason == null) if (this.reason == null)
return false; return false;
@ -1118,7 +1237,7 @@ public class CommunicationRequest extends DomainResource {
childrenList.add(new Property("identifier", "Identifier", "A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("identifier", "Identifier", "A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("category", "CodeableConcept", "The type of message to be sent such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category)); childrenList.add(new Property("category", "CodeableConcept", "The type of message to be sent such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender)); childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender));
childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient)); childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson|Group|CareTeam)", "The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient));
childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload)); childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload));
childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium)); childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium));
childrenList.add(new Property("requester", "Reference(Practitioner|Patient|RelatedPerson)", "The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.", 0, java.lang.Integer.MAX_VALUE, requester)); childrenList.add(new Property("requester", "Reference(Practitioner|Patient|RelatedPerson)", "The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.", 0, java.lang.Integer.MAX_VALUE, requester));
@ -1131,6 +1250,78 @@ public class CommunicationRequest extends DomainResource {
childrenList.add(new Property("priority", "CodeableConcept", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("priority", "CodeableConcept", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case -905962955: /*sender*/ return this.sender == null ? new Base[0] : new Base[] {this.sender}; // Reference
case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
case -786701938: /*payload*/ return this.payload == null ? new Base[0] : this.payload.toArray(new Base[this.payload.size()]); // CommunicationRequestPayloadComponent
case -1078030475: /*medium*/ return this.medium == null ? new Base[0] : this.medium.toArray(new Base[this.medium.size()]); // CodeableConcept
case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CommunicationRequestStatus>
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case -160710483: /*scheduled*/ return this.scheduled == null ? new Base[0] : new Base[] {this.scheduled}; // Type
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case 1150582253: /*requestedOn*/ return this.requestedOn == null ? new Base[0] : new Base[] {this.requestedOn}; // DateTimeType
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case -905962955: // sender
this.sender = castToReference(value); // Reference
break;
case 820081177: // recipient
this.getRecipient().add(castToReference(value)); // Reference
break;
case -786701938: // payload
this.getPayload().add((CommunicationRequestPayloadComponent) value); // CommunicationRequestPayloadComponent
break;
case -1078030475: // medium
this.getMedium().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 693933948: // requester
this.requester = castToReference(value); // Reference
break;
case -892481550: // status
this.status = new CommunicationRequestStatusEnumFactory().fromType(value); // Enumeration<CommunicationRequestStatus>
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case -160710483: // scheduled
this.scheduled = (Type) value; // Type
break;
case -934964668: // reason
this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 1150582253: // requestedOn
this.requestedOn = castToDateTime(value); // DateTimeType
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -1165461084: // priority
this.priority = castToCodeableConcept(value); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1165,6 +1356,28 @@ public class CommunicationRequest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 50511102: return getCategory(); // CodeableConcept
case -905962955: return getSender(); // Reference
case 820081177: return addRecipient(); // Reference
case -786701938: return addPayload(); // CommunicationRequestPayloadComponent
case -1078030475: return addMedium(); // CodeableConcept
case 693933948: return getRequester(); // Reference
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CommunicationRequestStatus>
case 1524132147: return getEncounter(); // Reference
case 1162627251: return getScheduled(); // Type
case -934964668: return addReason(); // CodeableConcept
case 1150582253: throw new FHIRException("Cannot make property requestedOn as it is not a complex type"); // DateTimeType
case -1867885268: return getSubject(); // Reference
case -1165461084: return getPriority(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1298,9 +1511,9 @@ public class CommunicationRequest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, sender return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, category, sender, recipient
, recipient, payload, medium, requester, status, encounter, scheduled, reason, requestedOn , payload, medium, requester, status, encounter, scheduled, reason, requestedOn, subject, priority
, subject, priority); );
} }
@Override @Override
@ -1316,7 +1529,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.requester</b><br> * Path: <b>CommunicationRequest.requester</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Patient, RelatedPerson]
// [Practitioner, Patient, RelatedPerson]
@SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference", target={Practitioner.class, Patient.class, RelatedPerson.class} )
public static final String SP_REQUESTER = "requester"; public static final String SP_REQUESTER = "requester";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requester</b> * <b>Fluent Client</b> search parameter constant for <b>requester</b>
@ -1342,7 +1557,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.identifier</b><br> * Path: <b>CommunicationRequest.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1362,7 +1579,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.subject</b><br> * Path: <b>CommunicationRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference", target={Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -1388,7 +1607,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.medium</b><br> * Path: <b>CommunicationRequest.medium</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token" ) // []
// []
@SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token", target={} )
public static final String SP_MEDIUM = "medium"; public static final String SP_MEDIUM = "medium";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>medium</b> * <b>Fluent Client</b> search parameter constant for <b>medium</b>
@ -1408,7 +1629,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.encounter</b><br> * Path: <b>CommunicationRequest.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -1434,7 +1657,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.priority</b><br> * Path: <b>CommunicationRequest.priority</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) // []
// []
@SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token", target={} )
public static final String SP_PRIORITY = "priority"; public static final String SP_PRIORITY = "priority";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>priority</b> * <b>Fluent Client</b> search parameter constant for <b>priority</b>
@ -1454,7 +1679,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.requestedOn</b><br> * Path: <b>CommunicationRequest.requestedOn</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="When ordered or proposed", type="date" ) // []
// []
@SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="When ordered or proposed", type="date", target={} )
public static final String SP_REQUESTED = "requested"; public static final String SP_REQUESTED = "requested";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requested</b> * <b>Fluent Client</b> search parameter constant for <b>requested</b>
@ -1474,7 +1701,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.sender</b><br> * Path: <b>CommunicationRequest.sender</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_SENDER = "sender"; public static final String SP_SENDER = "sender";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>sender</b> * <b>Fluent Client</b> search parameter constant for <b>sender</b>
@ -1500,7 +1729,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.subject</b><br> * Path: <b>CommunicationRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1526,7 +1757,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.recipient</b><br> * Path: <b>CommunicationRequest.recipient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Group, Organization, CareTeam, Device, Patient, RelatedPerson]
// [Practitioner, Group, Organization, CareTeam, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference", target={Practitioner.class, Group.class, Organization.class, CareTeam.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_RECIPIENT = "recipient"; public static final String SP_RECIPIENT = "recipient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>recipient</b> * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
@ -1552,7 +1785,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.scheduledDateTime</b><br> * Path: <b>CommunicationRequest.scheduledDateTime</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="time", path="CommunicationRequest.scheduledDateTime", description="When scheduled", type="date" ) // []
// []
@SearchParamDefinition(name="time", path="CommunicationRequest.scheduled.as(DateTime)", description="When scheduled", type="date", target={} )
public static final String SP_TIME = "time"; public static final String SP_TIME = "time";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>time</b> * <b>Fluent Client</b> search parameter constant for <b>time</b>
@ -1572,7 +1807,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.category</b><br> * Path: <b>CommunicationRequest.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>
@ -1592,7 +1829,9 @@ public class CommunicationRequest extends DomainResource {
* Path: <b>CommunicationRequest.status</b><br> * Path: <b>CommunicationRequest.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -266,6 +266,24 @@ public class CompartmentDefinition extends DomainResource {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompartmentDefinitionContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -303,6 +321,30 @@ public class CompartmentDefinition extends DomainResource {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -313,6 +355,16 @@ public class CompartmentDefinition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -358,7 +410,7 @@ public class CompartmentDefinition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
} }
public String fhirType() { public String fhirType() {
@ -462,6 +514,24 @@ public class CompartmentDefinition extends DomainResource {
return this.param; return this.param;
} }
/**
* @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
*/
public StringType getParamFirstRep() {
if (getParam().isEmpty()) {
addParamElement();
}
return getParam().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompartmentDefinitionResourceComponent setParam(List<StringType> theParam) {
this.param = theParam;
return this;
}
public boolean hasParam() { public boolean hasParam() {
if (this.param == null) if (this.param == null)
return false; return false;
@ -563,6 +633,34 @@ public class CompartmentDefinition extends DomainResource {
childrenList.add(new Property("documentation", "string", "Additional doco about the resource and compartment.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("documentation", "string", "Additional doco about the resource and compartment.", 0, java.lang.Integer.MAX_VALUE, documentation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // StringType
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case 106436749: // param
this.getParam().add(castToString(value)); // StringType
break;
case 1587405498: // documentation
this.documentation = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -575,6 +673,17 @@ public class CompartmentDefinition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case 106436749: throw new FHIRException("Cannot make property param as it is not a complex type"); // StringType
case 1587405498: throw new FHIRException("Cannot make property documentation as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -626,7 +735,7 @@ public class CompartmentDefinition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, param, documentation); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, param, documentation);
} }
public String fhirType() { public String fhirType() {
@ -982,6 +1091,24 @@ public class CompartmentDefinition extends DomainResource {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public CompartmentDefinitionContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompartmentDefinition setContact(List<CompartmentDefinitionContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -1259,6 +1386,24 @@ public class CompartmentDefinition extends DomainResource {
return this.resource; return this.resource;
} }
/**
* @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist
*/
public CompartmentDefinitionResourceComponent getResourceFirstRep() {
if (getResource().isEmpty()) {
addResource();
}
return getResource().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompartmentDefinition setResource(List<CompartmentDefinitionResourceComponent> theResource) {
this.resource = theResource;
return this;
}
public boolean hasResource() { public boolean hasResource() {
if (this.resource == null) if (this.resource == null)
return false; return false;
@ -1306,6 +1451,70 @@ public class CompartmentDefinition extends DomainResource {
childrenList.add(new Property("resource", "", "Information about how a resource it related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource)); childrenList.add(new Property("resource", "", "Information about how a resource it related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus>
case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // CompartmentDefinitionContactComponent
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CompartmentType>
case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BooleanType
case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CompartmentDefinitionResourceComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -892481550: // status
this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
break;
case -404562712: // experimental
this.experimental = castToBoolean(value); // BooleanType
break;
case 1447404028: // publisher
this.publisher = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((CompartmentDefinitionContactComponent) value); // CompartmentDefinitionContactComponent
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1619874672: // requirements
this.requirements = castToString(value); // StringType
break;
case 3059181: // code
this.code = new CompartmentTypeEnumFactory().fromType(value); // Enumeration<CompartmentType>
break;
case -906336856: // search
this.search = castToBoolean(value); // BooleanType
break;
case -341064690: // resource
this.getResource().add((CompartmentDefinitionResourceComponent) value); // CompartmentDefinitionResourceComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -1336,6 +1545,26 @@ public class CompartmentDefinition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus>
case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
case 951526432: return addContact(); // CompartmentDefinitionContactComponent
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // Enumeration<CompartmentType>
case -906336856: throw new FHIRException("Cannot make property search as it is not a complex type"); // BooleanType
case -341064690: return addResource(); // CompartmentDefinitionResourceComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -1441,8 +1670,8 @@ public class CompartmentDefinition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, name, status, experimental return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, name, status, experimental
, publisher, contact, date, description, requirements, code, search, resource); , publisher, contact, date, description, requirements, code, search, resource);
} }
@Override @Override
@ -1458,7 +1687,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.date</b><br> * Path: <b>CompartmentDefinition.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="Publication Date(/time)", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="Publication Date(/time)", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1478,7 +1709,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.code</b><br> * Path: <b>CompartmentDefinition.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -1498,7 +1731,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.resource.code</b><br> * Path: <b>CompartmentDefinition.resource.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token" ) // []
// []
@SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token", target={} )
public static final String SP_RESOURCE = "resource"; public static final String SP_RESOURCE = "resource";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>resource</b> * <b>Fluent Client</b> search parameter constant for <b>resource</b>
@ -1518,7 +1753,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.name</b><br> * Path: <b>CompartmentDefinition.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Informal name for this compartment definition", type="string" ) // []
// []
@SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Informal name for this compartment definition", type="string", target={} )
public static final String SP_NAME = "name"; public static final String SP_NAME = "name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>name</b> * <b>Fluent Client</b> search parameter constant for <b>name</b>
@ -1538,7 +1775,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.url</b><br> * Path: <b>CompartmentDefinition.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="Absolute URL used to reference this compartment definition", type="uri" ) // []
// []
@SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="Absolute URL used to reference this compartment definition", type="uri", target={} )
public static final String SP_URL = "url"; public static final String SP_URL = "url";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>url</b> * <b>Fluent Client</b> search parameter constant for <b>url</b>
@ -1558,7 +1797,9 @@ public class CompartmentDefinition extends DomainResource {
* Path: <b>CompartmentDefinition.status</b><br> * Path: <b>CompartmentDefinition.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="draft | active | retired", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="draft | active | retired", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -331,6 +331,24 @@ public class Composition extends DomainResource {
return this.mode; return this.mode;
} }
/**
* @return The first repetition of repeating field {@link #mode}, creating it if it does not already exist
*/
public Enumeration<CompositionAttestationMode> getModeFirstRep() {
if (getMode().isEmpty()) {
addModeElement();
}
return getMode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompositionAttesterComponent setMode(List<Enumeration<CompositionAttestationMode>> theMode) {
this.mode = theMode;
return this;
}
public boolean hasMode() { public boolean hasMode() {
if (this.mode == null) if (this.mode == null)
return false; return false;
@ -371,7 +389,7 @@ public class Composition extends DomainResource {
if (this.mode == null) if (this.mode == null)
return false; return false;
for (Enumeration<CompositionAttestationMode> v : this.mode) for (Enumeration<CompositionAttestationMode> v : this.mode)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -471,6 +489,34 @@ public class Composition extends DomainResource {
childrenList.add(new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, java.lang.Integer.MAX_VALUE, party)); childrenList.add(new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, java.lang.Integer.MAX_VALUE, party));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3357091: /*mode*/ return this.mode == null ? new Base[0] : this.mode.toArray(new Base[this.mode.size()]); // Enumeration<CompositionAttestationMode>
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3357091: // mode
this.getMode().add(new CompositionAttestationModeEnumFactory().fromType(value)); // Enumeration<CompositionAttestationMode>
break;
case 3560141: // time
this.time = castToDateTime(value); // DateTimeType
break;
case 106437350: // party
this.party = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("mode")) if (name.equals("mode"))
@ -483,6 +529,17 @@ public class Composition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3357091: throw new FHIRException("Cannot make property mode as it is not a complex type"); // Enumeration<CompositionAttestationMode>
case 3560141: throw new FHIRException("Cannot make property time as it is not a complex type"); // DateTimeType
case 106437350: return getParty(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("mode")) { if (name.equals("mode")) {
@ -534,7 +591,7 @@ public class Composition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, time, party); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, time, party);
} }
public String fhirType() { public String fhirType() {
@ -590,6 +647,24 @@ public class Composition extends DomainResource {
return this.code; return this.code;
} }
/**
* @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
*/
public CodeableConcept getCodeFirstRep() {
if (getCode().isEmpty()) {
addCode();
}
return getCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompositionEventComponent setCode(List<CodeableConcept> theCode) {
this.code = theCode;
return this;
}
public boolean hasCode() { public boolean hasCode() {
if (this.code == null) if (this.code == null)
return false; return false;
@ -654,6 +729,24 @@ public class Composition extends DomainResource {
return this.detail; return this.detail;
} }
/**
* @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist
*/
public Reference getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CompositionEventComponent setDetail(List<Reference> theDetail) {
this.detail = theDetail;
return this;
}
public boolean hasDetail() { public boolean hasDetail() {
if (this.detail == null) if (this.detail == null)
return false; return false;
@ -701,6 +794,34 @@ public class Composition extends DomainResource {
childrenList.add(new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.getCode().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -1335224239: // detail
this.getDetail().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -713,6 +834,17 @@ public class Composition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: return addCode(); // CodeableConcept
case -991726143: return getPeriod(); // Period
case -1335224239: return addDetail(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -768,7 +900,7 @@ public class Composition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, period, detail); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, period, detail);
} }
public String fhirType() { public String fhirType() {
@ -1029,6 +1161,24 @@ public class Composition extends DomainResource {
return this.entry; return this.entry;
} }
/**
* @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist
*/
public Reference getEntryFirstRep() {
if (getEntry().isEmpty()) {
addEntry();
}
return getEntry().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public SectionComponent setEntry(List<Reference> theEntry) {
this.entry = theEntry;
return this;
}
public boolean hasEntry() { public boolean hasEntry() {
if (this.entry == null) if (this.entry == null)
return false; return false;
@ -1102,6 +1252,24 @@ public class Composition extends DomainResource {
return this.section; return this.section;
} }
/**
* @return The first repetition of repeating field {@link #section}, creating it if it does not already exist
*/
public SectionComponent getSectionFirstRep() {
if (getSection().isEmpty()) {
addSection();
}
return getSection().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public SectionComponent setSection(List<SectionComponent> theSection) {
this.section = theSection;
return this;
}
public boolean hasSection() { public boolean hasSection() {
if (this.section == null) if (this.section == null)
return false; return false;
@ -1145,6 +1313,54 @@ public class Composition extends DomainResource {
childrenList.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section)); childrenList.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // Narrative
case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // CodeType
case -391079516: /*orderedBy*/ return this.orderedBy == null ? new Base[0] : new Base[] {this.orderedBy}; // CodeableConcept
case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // Reference
case 1140135409: /*emptyReason*/ return this.emptyReason == null ? new Base[0] : new Base[] {this.emptyReason}; // CodeableConcept
case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 110371416: // title
this.title = castToString(value); // StringType
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case 3556653: // text
this.text = castToNarrative(value); // Narrative
break;
case 3357091: // mode
this.mode = castToCode(value); // CodeType
break;
case -391079516: // orderedBy
this.orderedBy = castToCodeableConcept(value); // CodeableConcept
break;
case 96667762: // entry
this.getEntry().add(castToReference(value)); // Reference
break;
case 1140135409: // emptyReason
this.emptyReason = castToCodeableConcept(value); // CodeableConcept
break;
case 1970241253: // section
this.getSection().add((SectionComponent) value); // SectionComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("title")) if (name.equals("title"))
@ -1167,6 +1383,22 @@ public class Composition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case 3059181: return getCode(); // CodeableConcept
case 3556653: return getText(); // Narrative
case 3357091: throw new FHIRException("Cannot make property mode as it is not a complex type"); // CodeType
case -391079516: return getOrderedBy(); // CodeableConcept
case 96667762: return addEntry(); // Reference
case 1140135409: return getEmptyReason(); // CodeableConcept
case 1970241253: return addSection(); // SectionComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("title")) { if (name.equals("title")) {
@ -1246,8 +1478,8 @@ public class Composition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( title, code, text, mode, orderedBy return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, code, text, mode, orderedBy
, entry, emptyReason, section); , entry, emptyReason, section);
} }
public String fhirType() { public String fhirType() {
@ -1700,6 +1932,24 @@ public class Composition extends DomainResource {
return this.author; return this.author;
} }
/**
* @return The first repetition of repeating field {@link #author}, creating it if it does not already exist
*/
public Reference getAuthorFirstRep() {
if (getAuthor().isEmpty()) {
addAuthor();
}
return getAuthor().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Composition setAuthor(List<Reference> theAuthor) {
this.author = theAuthor;
return this;
}
public boolean hasAuthor() { public boolean hasAuthor() {
if (this.author == null) if (this.author == null)
return false; return false;
@ -1749,6 +1999,24 @@ public class Composition extends DomainResource {
return this.attester; return this.attester;
} }
/**
* @return The first repetition of repeating field {@link #attester}, creating it if it does not already exist
*/
public CompositionAttesterComponent getAttesterFirstRep() {
if (getAttester().isEmpty()) {
addAttester();
}
return getAttester().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Composition setAttester(List<CompositionAttesterComponent> theAttester) {
this.attester = theAttester;
return this;
}
public boolean hasAttester() { public boolean hasAttester() {
if (this.attester == null) if (this.attester == null)
return false; return false;
@ -1833,6 +2101,24 @@ public class Composition extends DomainResource {
return this.event; return this.event;
} }
/**
* @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
*/
public CompositionEventComponent getEventFirstRep() {
if (getEvent().isEmpty()) {
addEvent();
}
return getEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Composition setEvent(List<CompositionEventComponent> theEvent) {
this.event = theEvent;
return this;
}
public boolean hasEvent() { public boolean hasEvent() {
if (this.event == null) if (this.event == null)
return false; return false;
@ -1917,6 +2203,24 @@ public class Composition extends DomainResource {
return this.section; return this.section;
} }
/**
* @return The first repetition of repeating field {@link #section}, creating it if it does not already exist
*/
public SectionComponent getSectionFirstRep() {
if (getSection().isEmpty()) {
addSection();
}
return getSection().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Composition setSection(List<SectionComponent> theSection) {
this.section = theSection;
return this;
}
public boolean hasSection() { public boolean hasSection() {
if (this.section == null) if (this.section == null)
return false; return false;
@ -1966,6 +2270,78 @@ public class Composition extends DomainResource {
childrenList.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section)); childrenList.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // CodeableConcept
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CompositionStatus>
case -1923018202: /*confidentiality*/ return this.confidentiality == null ? new Base[0] : new Base[] {this.confidentiality}; // CodeType
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
case 542920370: /*attester*/ return this.attester == null ? new Base[0] : this.attester.toArray(new Base[this.attester.size()]); // CompositionAttesterComponent
case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference
case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CompositionEventComponent
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case 94742904: // class
this.class_ = castToCodeableConcept(value); // CodeableConcept
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case -892481550: // status
this.status = new CompositionStatusEnumFactory().fromType(value); // Enumeration<CompositionStatus>
break;
case -1923018202: // confidentiality
this.confidentiality = castToCode(value); // CodeType
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -1406328437: // author
this.getAuthor().add(castToReference(value)); // Reference
break;
case 542920370: // attester
this.getAttester().add((CompositionAttesterComponent) value); // CompositionAttesterComponent
break;
case 1611297262: // custodian
this.custodian = castToReference(value); // Reference
break;
case 96891546: // event
this.getEvent().add((CompositionEventComponent) value); // CompositionEventComponent
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case 1970241253: // section
this.getSection().add((SectionComponent) value); // SectionComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -2000,6 +2376,28 @@ public class Composition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return getIdentifier(); // Identifier
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case 3575610: return getType(); // CodeableConcept
case 94742904: return getClass_(); // CodeableConcept
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CompositionStatus>
case -1923018202: throw new FHIRException("Cannot make property confidentiality as it is not a complex type"); // CodeType
case -1867885268: return getSubject(); // Reference
case -1406328437: return addAuthor(); // Reference
case 542920370: return addAttester(); // CompositionAttesterComponent
case 1611297262: return getCustodian(); // Reference
case 96891546: return addEvent(); // CompositionEventComponent
case 1524132147: return getEncounter(); // Reference
case 1970241253: return addSection(); // SectionComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -2126,9 +2524,9 @@ public class Composition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, date, type, class_ return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, date, type, class_
, title, status, confidentiality, subject, author, attester, custodian, event, encounter , title, status, confidentiality, subject, author, attester, custodian, event, encounter, section
, section); );
} }
@Override @Override
@ -2144,7 +2542,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.date</b><br> * Path: <b>Composition.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -2164,7 +2564,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.identifier</b><br> * Path: <b>Composition.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -2184,7 +2586,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.event.period</b><br> * Path: <b>Composition.event.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) // []
// []
@SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date", target={} )
public static final String SP_PERIOD = "period"; public static final String SP_PERIOD = "period";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>period</b> * <b>Fluent Client</b> search parameter constant for <b>period</b>
@ -2204,7 +2608,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.subject</b><br> * Path: <b>Composition.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Any]
// [Any]
@SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -2230,7 +2636,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.author</b><br> * Path: <b>Composition.author</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Device, Patient, RelatedPerson]
// [Practitioner, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", target={Practitioner.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_AUTHOR = "author"; public static final String SP_AUTHOR = "author";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>author</b> * <b>Fluent Client</b> search parameter constant for <b>author</b>
@ -2256,7 +2664,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.confidentiality</b><br> * Path: <b>Composition.confidentiality</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) // []
// []
@SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token", target={} )
public static final String SP_CONFIDENTIALITY = "confidentiality"; public static final String SP_CONFIDENTIALITY = "confidentiality";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>confidentiality</b> * <b>Fluent Client</b> search parameter constant for <b>confidentiality</b>
@ -2276,7 +2686,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.section.code</b><br> * Path: <b>Composition.section.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) // []
// []
@SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token", target={} )
public static final String SP_SECTION = "section"; public static final String SP_SECTION = "section";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>section</b> * <b>Fluent Client</b> search parameter constant for <b>section</b>
@ -2296,7 +2708,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.encounter</b><br> * Path: <b>Composition.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -2322,7 +2736,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.type</b><br> * Path: <b>Composition.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -2342,7 +2758,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.title</b><br> * Path: <b>Composition.title</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) // []
// []
@SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string", target={} )
public static final String SP_TITLE = "title"; public static final String SP_TITLE = "title";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>title</b> * <b>Fluent Client</b> search parameter constant for <b>title</b>
@ -2362,7 +2780,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.attester.party</b><br> * Path: <b>Composition.attester.party</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization, Patient]
// [Practitioner, Organization, Patient]
@SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", target={Practitioner.class, Organization.class, Patient.class} )
public static final String SP_ATTESTER = "attester"; public static final String SP_ATTESTER = "attester";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>attester</b> * <b>Fluent Client</b> search parameter constant for <b>attester</b>
@ -2388,6 +2808,8 @@ public class Composition extends DomainResource {
* Path: <b>Composition.section.entry</b><br> * Path: <b>Composition.section.entry</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference" ) @SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference" )
public static final String SP_ENTRY = "entry"; public static final String SP_ENTRY = "entry";
/** /**
@ -2414,6 +2836,8 @@ public class Composition extends DomainResource {
* Path: <b>Composition.subject</b><br> * Path: <b>Composition.subject</b><br>
* </p> * </p>
*/ */
// [Any]
// [Patient]
@SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
@ -2440,7 +2864,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.event.code</b><br> * Path: <b>Composition.event.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) // []
// []
@SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token", target={} )
public static final String SP_CONTEXT = "context"; public static final String SP_CONTEXT = "context";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>context</b> * <b>Fluent Client</b> search parameter constant for <b>context</b>
@ -2460,7 +2886,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.class</b><br> * Path: <b>Composition.class</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) // []
// []
@SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token", target={} )
public static final String SP_CLASS = "class"; public static final String SP_CLASS = "class";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>class</b> * <b>Fluent Client</b> search parameter constant for <b>class</b>
@ -2480,7 +2908,9 @@ public class Composition extends DomainResource {
* Path: <b>Composition.status</b><br> * Path: <b>Composition.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | amended | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | amended | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -131,6 +131,24 @@ public class ConceptMap extends DomainResource {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConceptMapContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -168,6 +186,30 @@ public class ConceptMap extends DomainResource {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -178,6 +220,16 @@ public class ConceptMap extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -223,7 +275,7 @@ public class ConceptMap extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
} }
public String fhirType() { public String fhirType() {
@ -428,6 +480,24 @@ public class ConceptMap extends DomainResource {
return this.target; return this.target;
} }
/**
* @return The first repetition of repeating field {@link #target}, creating it if it does not already exist
*/
public TargetElementComponent getTargetFirstRep() {
if (getTarget().isEmpty()) {
addTarget();
}
return getTarget().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public SourceElementComponent setTarget(List<TargetElementComponent> theTarget) {
this.target = theTarget;
return this;
}
public boolean hasTarget() { public boolean hasTarget() {
if (this.target == null) if (this.target == null)
return false; return false;
@ -467,6 +537,38 @@ public class ConceptMap extends DomainResource {
childrenList.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target)); childrenList.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // TargetElementComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case -880905839: // target
this.getTarget().add((TargetElementComponent) value); // TargetElementComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -481,6 +583,18 @@ public class ConceptMap extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case -880905839: return addTarget(); // TargetElementComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -536,8 +650,7 @@ public class ConceptMap extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, target return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, target);
);
} }
public String fhirType() { public String fhirType() {
@ -865,6 +978,24 @@ public class ConceptMap extends DomainResource {
return this.dependsOn; return this.dependsOn;
} }
/**
* @return The first repetition of repeating field {@link #dependsOn}, creating it if it does not already exist
*/
public OtherElementComponent getDependsOnFirstRep() {
if (getDependsOn().isEmpty()) {
addDependsOn();
}
return getDependsOn().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TargetElementComponent setDependsOn(List<OtherElementComponent> theDependsOn) {
this.dependsOn = theDependsOn;
return this;
}
public boolean hasDependsOn() { public boolean hasDependsOn() {
if (this.dependsOn == null) if (this.dependsOn == null)
return false; return false;
@ -905,6 +1036,24 @@ public class ConceptMap extends DomainResource {
return this.product; return this.product;
} }
/**
* @return The first repetition of repeating field {@link #product}, creating it if it does not already exist
*/
public OtherElementComponent getProductFirstRep() {
if (getProduct().isEmpty()) {
addProduct();
}
return getProduct().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TargetElementComponent setProduct(List<OtherElementComponent> theProduct) {
this.product = theProduct;
return this;
}
public boolean hasProduct() { public boolean hasProduct() {
if (this.product == null) if (this.product == null)
return false; return false;
@ -947,6 +1096,50 @@ public class ConceptMap extends DomainResource {
childrenList.add(new Property("product", "@ConceptMap.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product)); childrenList.add(new Property("product", "@ConceptMap.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case -15828692: /*equivalence*/ return this.equivalence == null ? new Base[0] : new Base[] {this.equivalence}; // Enumeration<ConceptMapEquivalence>
case -602415628: /*comments*/ return this.comments == null ? new Base[0] : new Base[] {this.comments}; // StringType
case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : this.dependsOn.toArray(new Base[this.dependsOn.size()]); // OtherElementComponent
case -309474065: /*product*/ return this.product == null ? new Base[0] : this.product.toArray(new Base[this.product.size()]); // OtherElementComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case -15828692: // equivalence
this.equivalence = new ConceptMapEquivalenceEnumFactory().fromType(value); // Enumeration<ConceptMapEquivalence>
break;
case -602415628: // comments
this.comments = castToString(value); // StringType
break;
case -1109214266: // dependsOn
this.getDependsOn().add((OtherElementComponent) value); // OtherElementComponent
break;
case -309474065: // product
this.getProduct().add((OtherElementComponent) value); // OtherElementComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -967,6 +1160,21 @@ public class ConceptMap extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case -15828692: throw new FHIRException("Cannot make property equivalence as it is not a complex type"); // Enumeration<ConceptMapEquivalence>
case -602415628: throw new FHIRException("Cannot make property comments as it is not a complex type"); // StringType
case -1109214266: return addDependsOn(); // OtherElementComponent
case -309474065: return addProduct(); // OtherElementComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -1039,8 +1247,8 @@ public class ConceptMap extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, equivalence return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, code, equivalence
, comments, dependsOn, product); , comments, dependsOn, product);
} }
public String fhirType() { public String fhirType() {
@ -1234,6 +1442,34 @@ public class ConceptMap extends DomainResource {
childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1662836996: /*element*/ return this.element == null ? new Base[0] : new Base[] {this.element}; // UriType
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1662836996: // element
this.element = castToUri(value); // UriType
break;
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 3059181: // code
this.code = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("element")) if (name.equals("element"))
@ -1246,6 +1482,17 @@ public class ConceptMap extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1662836996: throw new FHIRException("Cannot make property element as it is not a complex type"); // UriType
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("element")) { if (name.equals("element")) {
@ -1293,7 +1540,7 @@ public class ConceptMap extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( element, system, code); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(element, system, code);
} }
public String fhirType() { public String fhirType() {
@ -1753,6 +2000,24 @@ public class ConceptMap extends DomainResource {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public ConceptMapContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConceptMap setContact(List<ConceptMapContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -1891,6 +2156,24 @@ public class ConceptMap extends DomainResource {
return this.useContext; return this.useContext;
} }
/**
* @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
*/
public CodeableConcept getUseContextFirstRep() {
if (getUseContext().isEmpty()) {
addUseContext();
}
return getUseContext().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConceptMap setUseContext(List<CodeableConcept> theUseContext) {
this.useContext = theUseContext;
return this;
}
public boolean hasUseContext() { public boolean hasUseContext() {
if (this.useContext == null) if (this.useContext == null)
return false; return false;
@ -2119,6 +2402,24 @@ public class ConceptMap extends DomainResource {
return this.element; return this.element;
} }
/**
* @return The first repetition of repeating field {@link #element}, creating it if it does not already exist
*/
public SourceElementComponent getElementFirstRep() {
if (getElement().isEmpty()) {
addElement();
}
return getElement().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConceptMap setElement(List<SourceElementComponent> theElement) {
this.element = theElement;
return this;
}
public boolean hasElement() { public boolean hasElement() {
if (this.element == null) if (this.element == null)
return false; return false;
@ -2170,6 +2471,86 @@ public class ConceptMap extends DomainResource {
childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element)); childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus>
case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ConceptMapContactComponent
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType
case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type
case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type
case -1662836996: /*element*/ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // SourceElementComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -892481550: // status
this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
break;
case -404562712: // experimental
this.experimental = castToBoolean(value); // BooleanType
break;
case 1447404028: // publisher
this.publisher = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((ConceptMapContactComponent) value); // ConceptMapContactComponent
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -669707736: // useContext
this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1619874672: // requirements
this.requirements = castToString(value); // StringType
break;
case 1522889671: // copyright
this.copyright = castToString(value); // StringType
break;
case -896505829: // source
this.source = (Type) value; // Type
break;
case -880905839: // target
this.target = (Type) value; // Type
break;
case -1662836996: // element
this.getElement().add((SourceElementComponent) value); // SourceElementComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -2208,6 +2589,30 @@ public class ConceptMap extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case -1618432855: return getIdentifier(); // Identifier
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus>
case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
case 951526432: return addContact(); // ConceptMapContactComponent
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -669707736: return addUseContext(); // CodeableConcept
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType
case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType
case -1698413947: return getSource(); // Type
case -815579825: return getTarget(); // Type
case -1662836996: return addElement(); // SourceElementComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -2346,9 +2751,9 @@ public class ConceptMap extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, name
, status, experimental, publisher, contact, date, description, useContext, requirements , status, experimental, publisher, contact, date, description, useContext, requirements, copyright
, copyright, source, target, element); , source, target, element);
} }
@Override @Override
@ -2364,7 +2769,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.date</b><br> * Path: <b>ConceptMap.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -2384,7 +2791,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.identifier</b><br> * Path: <b>ConceptMap.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="Additional identifier for the concept map", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="Additional identifier for the concept map", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -2404,7 +2813,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.target.product.element</b><br> * Path: <b>ConceptMap.element.target.product.element</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="product", path="ConceptMap.element.target.product.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" ) // []
// []
@SearchParamDefinition(name="product", path="ConceptMap.element.target.product.element", description="Reference to element/field/ValueSet mapping depends on", type="uri", target={} )
public static final String SP_PRODUCT = "product"; public static final String SP_PRODUCT = "product";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>product</b> * <b>Fluent Client</b> search parameter constant for <b>product</b>
@ -2424,7 +2835,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.target.system</b><br> * Path: <b>ConceptMap.element.target.system</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="target-system", path="ConceptMap.element.target.system", description="System of the target (if necessary)", type="uri" ) // []
// []
@SearchParamDefinition(name="target-system", path="ConceptMap.element.target.system", description="System of the target (if necessary)", type="uri", target={} )
public static final String SP_TARGET_SYSTEM = "target-system"; public static final String SP_TARGET_SYSTEM = "target-system";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>target-system</b> * <b>Fluent Client</b> search parameter constant for <b>target-system</b>
@ -2444,7 +2857,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.target.dependsOn.element</b><br> * Path: <b>ConceptMap.element.target.dependsOn.element</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="dependson", path="ConceptMap.element.target.dependsOn.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" ) // []
// []
@SearchParamDefinition(name="dependson", path="ConceptMap.element.target.dependsOn.element", description="Reference to element/field/ValueSet mapping depends on", type="uri", target={} )
public static final String SP_DEPENDSON = "dependson"; public static final String SP_DEPENDSON = "dependson";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>dependson</b> * <b>Fluent Client</b> search parameter constant for <b>dependson</b>
@ -2464,7 +2879,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.description</b><br> * Path: <b>ConceptMap.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -2484,7 +2901,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.sourceReference</b><br> * Path: <b>ConceptMap.sourceReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source", path="ConceptMap.sourceReference", description="Identifies the source of the concepts which are being mapped", type="reference" ) // [StructureDefinition, ValueSet]
// [StructureDefinition, ValueSet]
@SearchParamDefinition(name="source", path="ConceptMap.source.as(Reference)", description="Identifies the source of the concepts which are being mapped", type="reference", target={StructureDefinition.class, ValueSet.class} )
public static final String SP_SOURCE = "source"; public static final String SP_SOURCE = "source";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source</b> * <b>Fluent Client</b> search parameter constant for <b>source</b>
@ -2510,7 +2929,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.version</b><br> * Path: <b>ConceptMap.version</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" ) // []
// []
@SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token", target={} )
public static final String SP_VERSION = "version"; public static final String SP_VERSION = "version";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>version</b> * <b>Fluent Client</b> search parameter constant for <b>version</b>
@ -2530,7 +2951,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.url</b><br> * Path: <b>ConceptMap.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="url", path="ConceptMap.url", description="The URL of the concept map", type="uri" ) // []
// []
@SearchParamDefinition(name="url", path="ConceptMap.url", description="The URL of the concept map", type="uri", target={} )
public static final String SP_URL = "url"; public static final String SP_URL = "url";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>url</b> * <b>Fluent Client</b> search parameter constant for <b>url</b>
@ -2550,7 +2973,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.target[x]</b><br> * Path: <b>ConceptMap.target[x]</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) // [StructureDefinition, ValueSet]
// [StructureDefinition, ValueSet]
@SearchParamDefinition(name="target", path="ConceptMap.target", description="Provides context to the mappings", type="reference", target={StructureDefinition.class, ValueSet.class} )
public static final String SP_TARGET = "target"; public static final String SP_TARGET = "target";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>target</b> * <b>Fluent Client</b> search parameter constant for <b>target</b>
@ -2576,7 +3001,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.code</b><br> * Path: <b>ConceptMap.element.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source-code", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" ) // []
// []
@SearchParamDefinition(name="source-code", path="ConceptMap.element.code", description="Identifies element being mapped", type="token", target={} )
public static final String SP_SOURCE_CODE = "source-code"; public static final String SP_SOURCE_CODE = "source-code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source-code</b> * <b>Fluent Client</b> search parameter constant for <b>source-code</b>
@ -2596,7 +3023,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.sourceUri</b><br> * Path: <b>ConceptMap.sourceUri</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source-uri", path="ConceptMap.sourceUri", description="Identifies the source of the concepts which are being mapped", type="reference" ) // [StructureDefinition, ValueSet]
// [StructureDefinition, ValueSet]
@SearchParamDefinition(name="source-uri", path="ConceptMap.source.as(Uri)", description="Identifies the source of the concepts which are being mapped", type="reference", target={StructureDefinition.class, ValueSet.class} )
public static final String SP_SOURCE_URI = "source-uri"; public static final String SP_SOURCE_URI = "source-uri";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source-uri</b> * <b>Fluent Client</b> search parameter constant for <b>source-uri</b>
@ -2622,7 +3051,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.name</b><br> * Path: <b>ConceptMap.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) // []
// []
@SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string", target={} )
public static final String SP_NAME = "name"; public static final String SP_NAME = "name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>name</b> * <b>Fluent Client</b> search parameter constant for <b>name</b>
@ -2642,7 +3073,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.useContext</b><br> * Path: <b>ConceptMap.useContext</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token" ) // []
// []
@SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token", target={} )
public static final String SP_CONTEXT = "context"; public static final String SP_CONTEXT = "context";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>context</b> * <b>Fluent Client</b> search parameter constant for <b>context</b>
@ -2662,7 +3095,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.publisher</b><br> * Path: <b>ConceptMap.publisher</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) // []
// []
@SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string", target={} )
public static final String SP_PUBLISHER = "publisher"; public static final String SP_PUBLISHER = "publisher";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>publisher</b> * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
@ -2682,7 +3117,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.system</b><br> * Path: <b>ConceptMap.element.system</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source-system", path="ConceptMap.element.system", description="Code System (if value set crosses code systems)", type="uri" ) // []
// []
@SearchParamDefinition(name="source-system", path="ConceptMap.element.system", description="Code System (if value set crosses code systems)", type="uri", target={} )
public static final String SP_SOURCE_SYSTEM = "source-system"; public static final String SP_SOURCE_SYSTEM = "source-system";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source-system</b> * <b>Fluent Client</b> search parameter constant for <b>source-system</b>
@ -2702,7 +3139,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.element.target.code</b><br> * Path: <b>ConceptMap.element.target.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="target-code", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token" ) // []
// []
@SearchParamDefinition(name="target-code", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token", target={} )
public static final String SP_TARGET_CODE = "target-code"; public static final String SP_TARGET_CODE = "target-code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>target-code</b> * <b>Fluent Client</b> search parameter constant for <b>target-code</b>
@ -2722,7 +3161,9 @@ public class ConceptMap extends DomainResource {
* Path: <b>ConceptMap.status</b><br> * Path: <b>ConceptMap.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -261,6 +261,24 @@ public class Condition extends DomainResource {
return this.assessment; return this.assessment;
} }
/**
* @return The first repetition of repeating field {@link #assessment}, creating it if it does not already exist
*/
public Reference getAssessmentFirstRep() {
if (getAssessment().isEmpty()) {
addAssessment();
}
return getAssessment().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConditionStageComponent setAssessment(List<Reference> theAssessment) {
this.assessment = theAssessment;
return this;
}
public boolean hasAssessment() { public boolean hasAssessment() {
if (this.assessment == null) if (this.assessment == null)
return false; return false;
@ -307,6 +325,30 @@ public class Condition extends DomainResource {
childrenList.add(new Property("assessment", "Reference(ClinicalImpression|DiagnosticReport|Observation)", "Reference to a formal record of the evidence on which the staging assessment is based.", 0, java.lang.Integer.MAX_VALUE, assessment)); childrenList.add(new Property("assessment", "Reference(ClinicalImpression|DiagnosticReport|Observation)", "Reference to a formal record of the evidence on which the staging assessment is based.", 0, java.lang.Integer.MAX_VALUE, assessment));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // CodeableConcept
case 2119382722: /*assessment*/ return this.assessment == null ? new Base[0] : this.assessment.toArray(new Base[this.assessment.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1857640538: // summary
this.summary = castToCodeableConcept(value); // CodeableConcept
break;
case 2119382722: // assessment
this.getAssessment().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("summary")) if (name.equals("summary"))
@ -317,6 +359,16 @@ public class Condition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1857640538: return getSummary(); // CodeableConcept
case 2119382722: return addAssessment(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("summary")) { if (name.equals("summary")) {
@ -363,7 +415,7 @@ public class Condition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( summary, assessment); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(summary, assessment);
} }
public String fhirType() { public String fhirType() {
@ -436,6 +488,24 @@ public class Condition extends DomainResource {
return this.detail; return this.detail;
} }
/**
* @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist
*/
public Reference getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ConditionEvidenceComponent setDetail(List<Reference> theDetail) {
this.detail = theDetail;
return this;
}
public boolean hasDetail() { public boolean hasDetail() {
if (this.detail == null) if (this.detail == null)
return false; return false;
@ -482,6 +552,30 @@ public class Condition extends DomainResource {
childrenList.add(new Property("detail", "Reference(Any)", "Links to other relevant information, including pathology reports.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("detail", "Reference(Any)", "Links to other relevant information, including pathology reports.", 0, java.lang.Integer.MAX_VALUE, detail));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case -1335224239: // detail
this.getDetail().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -492,6 +586,16 @@ public class Condition extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: return getCode(); // CodeableConcept
case -1335224239: return addDetail(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -538,7 +642,7 @@ public class Condition extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, detail); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, detail);
} }
public String fhirType() { public String fhirType() {
@ -671,11 +775,11 @@ public class Condition extends DomainResource {
/** /**
* Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. * Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.
*/ */
@Child(name = "notes", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." ) @Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." )
protected StringType notes; protected List<Annotation> note;
private static final long serialVersionUID = -341227215L; private static final long serialVersionUID = 2092930482L;
/** /**
* Constructor * Constructor
@ -703,6 +807,24 @@ public class Condition extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Condition setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1290,6 +1412,24 @@ public class Condition extends DomainResource {
return this.evidence; return this.evidence;
} }
/**
* @return The first repetition of repeating field {@link #evidence}, creating it if it does not already exist
*/
public ConditionEvidenceComponent getEvidenceFirstRep() {
if (getEvidence().isEmpty()) {
addEvidence();
}
return getEvidence().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Condition setEvidence(List<ConditionEvidenceComponent> theEvidence) {
this.evidence = theEvidence;
return this;
}
public boolean hasEvidence() { public boolean hasEvidence() {
if (this.evidence == null) if (this.evidence == null)
return false; return false;
@ -1330,6 +1470,24 @@ public class Condition extends DomainResource {
return this.bodySite; return this.bodySite;
} }
/**
* @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist
*/
public CodeableConcept getBodySiteFirstRep() {
if (getBodySite().isEmpty()) {
addBodySite();
}
return getBodySite().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Condition setBodySite(List<CodeableConcept> theBodySite) {
this.bodySite = theBodySite;
return this;
}
public boolean hasBodySite() { public boolean hasBodySite() {
if (this.bodySite == null) if (this.bodySite == null)
return false; return false;
@ -1362,51 +1520,60 @@ public class Condition extends DomainResource {
} }
/** /**
* @return {@link #notes} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value * @return {@link #note} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.)
*/ */
public StringType getNotesElement() { public List<Annotation> getNote() {
if (this.notes == null) if (this.note == null)
if (Configuration.errorOnAutoCreate()) this.note = new ArrayList<Annotation>();
throw new Error("Attempt to auto-create Condition.notes"); return this.note;
else if (Configuration.doAutoCreate())
this.notes = new StringType(); // bb
return this.notes;
}
public boolean hasNotesElement() {
return this.notes != null && !this.notes.isEmpty();
}
public boolean hasNotes() {
return this.notes != null && !this.notes.isEmpty();
} }
/** /**
* @param value {@link #notes} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
*/ */
public Condition setNotesElement(StringType value) { public Annotation getNoteFirstRep() {
this.notes = value; if (getNote().isEmpty()) {
addNote();
}
return getNote().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Condition setNote(List<Annotation> theNote) {
this.note = theNote;
return this; return this;
} }
/** public boolean hasNote() {
* @return Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. if (this.note == null)
*/ return false;
public String getNotes() { for (Annotation item : this.note)
return this.notes == null ? null : this.notes.getValue(); if (!item.isEmpty())
return true;
return false;
} }
/** /**
* @param value Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis. * @return {@link #note} (Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.)
*/ */
public Condition setNotes(String value) { // syntactic sugar
if (Utilities.noString(value)) public Annotation addNote() { //3
this.notes = null; Annotation t = new Annotation();
else { if (this.note == null)
if (this.notes == null) this.note = new ArrayList<Annotation>();
this.notes = new StringType(); this.note.add(t);
this.notes.setValue(value); return t;
} }
// syntactic sugar
public Condition addNote(Annotation t) { //3
if (t == null)
return this;
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return this; return this;
} }
@ -1427,7 +1594,87 @@ public class Condition extends DomainResource {
childrenList.add(new Property("stage", "", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, java.lang.Integer.MAX_VALUE, stage)); childrenList.add(new Property("stage", "", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, java.lang.Integer.MAX_VALUE, stage));
childrenList.add(new Property("evidence", "", "Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.", 0, java.lang.Integer.MAX_VALUE, evidence)); childrenList.add(new Property("evidence", "", "Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.", 0, java.lang.Integer.MAX_VALUE, evidence));
childrenList.add(new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, java.lang.Integer.MAX_VALUE, bodySite)); childrenList.add(new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, java.lang.Integer.MAX_VALUE, bodySite));
childrenList.add(new Property("notes", "string", "Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.", 0, java.lang.Integer.MAX_VALUE, notes)); childrenList.add(new Property("note", "Annotation", "Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.", 0, java.lang.Integer.MAX_VALUE, note));
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case -373242253: /*asserter*/ return this.asserter == null ? new Base[0] : new Base[] {this.asserter}; // Reference
case 1888120446: /*dateRecorded*/ return this.dateRecorded == null ? new Base[0] : new Base[] {this.dateRecorded}; // DateType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case -462853915: /*clinicalStatus*/ return this.clinicalStatus == null ? new Base[0] : new Base[] {this.clinicalStatus}; // CodeType
case -842509843: /*verificationStatus*/ return this.verificationStatus == null ? new Base[0] : new Base[] {this.verificationStatus}; // Enumeration<ConditionVerificationStatus>
case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // CodeableConcept
case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // Type
case -921554001: /*abatement*/ return this.abatement == null ? new Base[0] : new Base[] {this.abatement}; // Type
case 109757182: /*stage*/ return this.stage == null ? new Base[0] : new Base[] {this.stage}; // ConditionStageComponent
case 382967383: /*evidence*/ return this.evidence == null ? new Base[0] : this.evidence.toArray(new Base[this.evidence.size()]); // ConditionEvidenceComponent
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case -373242253: // asserter
this.asserter = castToReference(value); // Reference
break;
case 1888120446: // dateRecorded
this.dateRecorded = castToDate(value); // DateType
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case -462853915: // clinicalStatus
this.clinicalStatus = castToCode(value); // CodeType
break;
case -842509843: // verificationStatus
this.verificationStatus = new ConditionVerificationStatusEnumFactory().fromType(value); // Enumeration<ConditionVerificationStatus>
break;
case 1478300413: // severity
this.severity = castToCodeableConcept(value); // CodeableConcept
break;
case 105901603: // onset
this.onset = (Type) value; // Type
break;
case -921554001: // abatement
this.abatement = (Type) value; // Type
break;
case 109757182: // stage
this.stage = (ConditionStageComponent) value; // ConditionStageComponent
break;
case 382967383: // evidence
this.getEvidence().add((ConditionEvidenceComponent) value); // ConditionEvidenceComponent
break;
case 1702620169: // bodySite
this.getBodySite().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 3387378: // note
this.getNote().add(castToAnnotation(value)); // Annotation
break;
default: super.setProperty(hash, name, value);
}
} }
@Override @Override
@ -1462,12 +1709,36 @@ public class Condition extends DomainResource {
this.getEvidence().add((ConditionEvidenceComponent) value); this.getEvidence().add((ConditionEvidenceComponent) value);
else if (name.equals("bodySite")) else if (name.equals("bodySite"))
this.getBodySite().add(castToCodeableConcept(value)); this.getBodySite().add(castToCodeableConcept(value));
else if (name.equals("notes")) else if (name.equals("note"))
this.notes = castToString(value); // StringType this.getNote().add(castToAnnotation(value));
else else
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -791418107: return getPatient(); // Reference
case 1524132147: return getEncounter(); // Reference
case -373242253: return getAsserter(); // Reference
case 1888120446: throw new FHIRException("Cannot make property dateRecorded as it is not a complex type"); // DateType
case 3059181: return getCode(); // CodeableConcept
case 50511102: return getCategory(); // CodeableConcept
case -462853915: throw new FHIRException("Cannot make property clinicalStatus as it is not a complex type"); // CodeType
case -842509843: throw new FHIRException("Cannot make property verificationStatus as it is not a complex type"); // Enumeration<ConditionVerificationStatus>
case 1478300413: return getSeverity(); // CodeableConcept
case -1886216323: return getOnset(); // Type
case -584196495: return getAbatement(); // Type
case 109757182: return getStage(); // ConditionStageComponent
case 382967383: return addEvidence(); // ConditionEvidenceComponent
case 1702620169: return addBodySite(); // CodeableConcept
case 3387378: return addNote(); // Annotation
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1560,8 +1831,8 @@ public class Condition extends DomainResource {
else if (name.equals("bodySite")) { else if (name.equals("bodySite")) {
return addBodySite(); return addBodySite();
} }
else if (name.equals("notes")) { else if (name.equals("note")) {
throw new FHIRException("Cannot call addChild on a primitive type Condition.notes"); return addNote();
} }
else else
return super.addChild(name); return super.addChild(name);
@ -1602,7 +1873,11 @@ public class Condition extends DomainResource {
for (CodeableConcept i : bodySite) for (CodeableConcept i : bodySite)
dst.bodySite.add(i.copy()); dst.bodySite.add(i.copy());
}; };
dst.notes = notes == null ? null : notes.copy(); if (note != null) {
dst.note = new ArrayList<Annotation>();
for (Annotation i : note)
dst.note.add(i.copy());
};
return dst; return dst;
} }
@ -1622,7 +1897,7 @@ public class Condition extends DomainResource {
&& compareDeep(category, o.category, true) && compareDeep(clinicalStatus, o.clinicalStatus, true) && compareDeep(category, o.category, true) && compareDeep(clinicalStatus, o.clinicalStatus, true)
&& compareDeep(verificationStatus, o.verificationStatus, true) && compareDeep(severity, o.severity, true) && compareDeep(verificationStatus, o.verificationStatus, true) && compareDeep(severity, o.severity, true)
&& compareDeep(onset, o.onset, true) && compareDeep(abatement, o.abatement, true) && compareDeep(stage, o.stage, true) && compareDeep(onset, o.onset, true) && compareDeep(abatement, o.abatement, true) && compareDeep(stage, o.stage, true)
&& compareDeep(evidence, o.evidence, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(notes, o.notes, true) && compareDeep(evidence, o.evidence, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(note, o.note, true)
; ;
} }
@ -1634,14 +1909,13 @@ public class Condition extends DomainResource {
return false; return false;
Condition o = (Condition) other; Condition o = (Condition) other;
return compareValues(dateRecorded, o.dateRecorded, true) && compareValues(clinicalStatus, o.clinicalStatus, true) return compareValues(dateRecorded, o.dateRecorded, true) && compareValues(clinicalStatus, o.clinicalStatus, true)
&& compareValues(verificationStatus, o.verificationStatus, true) && compareValues(notes, o.notes, true) && compareValues(verificationStatus, o.verificationStatus, true);
;
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, patient, encounter return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, patient, encounter
, asserter, dateRecorded, code, category, clinicalStatus, verificationStatus, severity , asserter, dateRecorded, code, category, clinicalStatus, verificationStatus, severity, onset
, onset, abatement, stage, evidence, bodySite, notes); , abatement, stage, evidence, bodySite, note);
} }
@Override @Override
@ -1657,7 +1931,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.severity</b><br> * Path: <b>Condition.severity</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token" ) // []
// []
@SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token", target={} )
public static final String SP_SEVERITY = "severity"; public static final String SP_SEVERITY = "severity";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>severity</b> * <b>Fluent Client</b> search parameter constant for <b>severity</b>
@ -1677,7 +1953,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.identifier</b><br> * Path: <b>Condition.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Condition.identifier", description="A unique identifier of the condition record", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Condition.identifier", description="A unique identifier of the condition record", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1697,7 +1975,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.clinicalStatus</b><br> * Path: <b>Condition.clinicalStatus</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="clinicalstatus", path="Condition.clinicalStatus", description="The clinical status of the condition", type="token" ) // []
// []
@SearchParamDefinition(name="clinicalstatus", path="Condition.clinicalStatus", description="The clinical status of the condition", type="token", target={} )
public static final String SP_CLINICALSTATUS = "clinicalstatus"; public static final String SP_CLINICALSTATUS = "clinicalstatus";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>clinicalstatus</b> * <b>Fluent Client</b> search parameter constant for <b>clinicalstatus</b>
@ -1717,7 +1997,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.onset[x]</b><br> * Path: <b>Condition.onset[x]</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="onset-info", path="Condition.onset[x]", description="Other onsets (boolean, age, range, string)", type="string" ) // []
// []
@SearchParamDefinition(name="onset-info", path="Condition.onset.as(boolean) | Condition.onset.as(Quantity) | Condition.onset.as(Range) | Condition.onset.as(string)", description="Other onsets (boolean, age, range, string)", type="string", target={} )
public static final String SP_ONSET_INFO = "onset-info"; public static final String SP_ONSET_INFO = "onset-info";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>onset-info</b> * <b>Fluent Client</b> search parameter constant for <b>onset-info</b>
@ -1737,7 +2019,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.code</b><br> * Path: <b>Condition.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -1757,7 +2041,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.evidence.code</b><br> * Path: <b>Condition.evidence.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" ) // []
// []
@SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token", target={} )
public static final String SP_EVIDENCE = "evidence"; public static final String SP_EVIDENCE = "evidence";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>evidence</b> * <b>Fluent Client</b> search parameter constant for <b>evidence</b>
@ -1777,7 +2063,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.encounter</b><br> * Path: <b>Condition.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -1803,7 +2091,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.onset[x]</b><br> * Path: <b>Condition.onset[x]</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="onset", path="Condition.onset[x]", description="Date related onsets (dateTime and Period)", type="date" ) // []
// []
@SearchParamDefinition(name="onset", path="Condition.onset.as(dateTime) | Condition.onset.as(Period)", description="Date related onsets (dateTime and Period)", type="date", target={} )
public static final String SP_ONSET = "onset"; public static final String SP_ONSET = "onset";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>onset</b> * <b>Fluent Client</b> search parameter constant for <b>onset</b>
@ -1823,7 +2113,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.asserter</b><br> * Path: <b>Condition.asserter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Patient]
// [Practitioner, Patient]
@SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference", target={Practitioner.class, Patient.class} )
public static final String SP_ASSERTER = "asserter"; public static final String SP_ASSERTER = "asserter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>asserter</b> * <b>Fluent Client</b> search parameter constant for <b>asserter</b>
@ -1849,7 +2141,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.dateRecorded</b><br> * Path: <b>Condition.dateRecorded</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date-recorded", path="Condition.dateRecorded", description="A date, when the Condition statement was documented", type="date" ) // []
// []
@SearchParamDefinition(name="date-recorded", path="Condition.dateRecorded", description="A date, when the Condition statement was documented", type="date", target={} )
public static final String SP_DATE_RECORDED = "date-recorded"; public static final String SP_DATE_RECORDED = "date-recorded";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date-recorded</b> * <b>Fluent Client</b> search parameter constant for <b>date-recorded</b>
@ -1869,7 +2163,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.stage.summary</b><br> * Path: <b>Condition.stage.summary</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" ) // []
// []
@SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token", target={} )
public static final String SP_STAGE = "stage"; public static final String SP_STAGE = "stage";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>stage</b> * <b>Fluent Client</b> search parameter constant for <b>stage</b>
@ -1889,7 +2185,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.patient</b><br> * Path: <b>Condition.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Condition.patient", description="Who has the condition?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="Condition.patient", description="Who has the condition?", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1915,7 +2213,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.category</b><br> * Path: <b>Condition.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>
@ -1935,7 +2235,9 @@ public class Condition extends DomainResource {
* Path: <b>Condition.bodySite</b><br> * Path: <b>Condition.bodySite</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="body-site", path="Condition.bodySite", description="Anatomical location, if relevant", type="token" ) // []
// []
@SearchParamDefinition(name="body-site", path="Condition.bodySite", description="Anatomical location, if relevant", type="token", target={} )
public static final String SP_BODY_SITE = "body-site"; public static final String SP_BODY_SITE = "body-site";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>body-site</b> * <b>Fluent Client</b> search parameter constant for <b>body-site</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -585,6 +585,42 @@ public class ContactPoint extends Type implements ICompositeType {
childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // Enumeration<ContactPointSystem>
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<ContactPointUse>
case 3492908: /*rank*/ return this.rank == null ? new Base[0] : new Base[] {this.rank}; // PositiveIntType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = new ContactPointSystemEnumFactory().fromType(value); // Enumeration<ContactPointSystem>
break;
case 111972721: // value
this.value = castToString(value); // StringType
break;
case 116103: // use
this.use = new ContactPointUseEnumFactory().fromType(value); // Enumeration<ContactPointUse>
break;
case 3492908: // rank
this.rank = castToPositiveInt(value); // PositiveIntType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -601,6 +637,19 @@ public class ContactPoint extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // Enumeration<ContactPointSystem>
case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<ContactPointUse>
case 3492908: throw new FHIRException("Cannot make property rank as it is not a complex type"); // PositiveIntType
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -666,7 +715,7 @@ public class ContactPoint extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, value, use, rank, period return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, value, use, rank, period
); );
} }

View File

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

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -457,6 +457,24 @@ public class Coverage extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Coverage setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -734,6 +752,24 @@ public class Coverage extends DomainResource {
return this.exception; return this.exception;
} }
/**
* @return The first repetition of repeating field {@link #exception}, creating it if it does not already exist
*/
public Coding getExceptionFirstRep() {
if (getException().isEmpty()) {
addException();
}
return getException().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Coverage setException(List<Coding> theException) {
this.exception = theException;
return this;
}
public boolean hasException() { public boolean hasException() {
if (this.exception == null) if (this.exception == null)
return false; return false;
@ -872,6 +908,24 @@ public class Coverage extends DomainResource {
return this.contract; return this.contract;
} }
/**
* @return The first repetition of repeating field {@link #contract}, creating it if it does not already exist
*/
public Reference getContractFirstRep() {
if (getContract().isEmpty()) {
addContract();
}
return getContract().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Coverage setContract(List<Reference> theContract) {
this.contract = theContract;
return this;
}
public boolean hasContract() { public boolean hasContract() {
if (this.contract == null) if (this.contract == null)
return false; return false;
@ -945,6 +999,90 @@ public class Coverage extends DomainResource {
childrenList.add(new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract)); childrenList.add(new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // Type
case 97543: /*bin*/ return this.bin == null ? new Base[0] : new Base[] {this.bin}; // StringType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case 1007064597: /*planholder*/ return this.planholder == null ? new Base[0] : new Base[] {this.planholder}; // Type
case -565102875: /*beneficiary*/ return this.beneficiary == null ? new Base[0] : new Base[] {this.beneficiary}; // Type
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Coding
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 98629247: /*group*/ return this.group == null ? new Base[0] : new Base[] {this.group}; // StringType
case 3443497: /*plan*/ return this.plan == null ? new Base[0] : new Base[] {this.plan}; // StringType
case -1868653175: /*subPlan*/ return this.subPlan == null ? new Base[0] : new Base[] {this.subPlan}; // StringType
case -1109226753: /*dependent*/ return this.dependent == null ? new Base[0] : new Base[] {this.dependent}; // PositiveIntType
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 1481625679: /*exception*/ return this.exception == null ? new Base[0] : this.exception.toArray(new Base[this.exception.size()]); // Coding
case -907977868: /*school*/ return this.school == null ? new Base[0] : new Base[] {this.school}; // StringType
case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // StringType
case -566947566: /*contract*/ return this.contract == null ? new Base[0] : this.contract.toArray(new Base[this.contract.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1179159879: // issuer
this.issuer = (Type) value; // Type
break;
case 97543: // bin
this.bin = castToString(value); // StringType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case 1007064597: // planholder
this.planholder = (Type) value; // Type
break;
case -565102875: // beneficiary
this.beneficiary = (Type) value; // Type
break;
case -261851592: // relationship
this.relationship = castToCoding(value); // Coding
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 98629247: // group
this.group = castToString(value); // StringType
break;
case 3443497: // plan
this.plan = castToString(value); // StringType
break;
case -1868653175: // subPlan
this.subPlan = castToString(value); // StringType
break;
case -1109226753: // dependent
this.dependent = castToPositiveInt(value); // PositiveIntType
break;
case 1349547969: // sequence
this.sequence = castToPositiveInt(value); // PositiveIntType
break;
case 1481625679: // exception
this.getException().add(castToCoding(value)); // Coding
break;
case -907977868: // school
this.school = castToString(value); // StringType
break;
case 1843485230: // network
this.network = castToString(value); // StringType
break;
case -566947566: // contract
this.getContract().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("issuer[x]")) if (name.equals("issuer[x]"))
@ -985,6 +1123,31 @@ public class Coverage extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 185649959: return getIssuer(); // Type
case 97543: throw new FHIRException("Cannot make property bin as it is not a complex type"); // StringType
case -991726143: return getPeriod(); // Period
case 3575610: return getType(); // Coding
case 1114937931: return getPlanholder(); // Type
case 1292142459: return getBeneficiary(); // Type
case -261851592: return getRelationship(); // Coding
case -1618432855: return addIdentifier(); // Identifier
case 98629247: throw new FHIRException("Cannot make property group as it is not a complex type"); // StringType
case 3443497: throw new FHIRException("Cannot make property plan as it is not a complex type"); // StringType
case -1868653175: throw new FHIRException("Cannot make property subPlan as it is not a complex type"); // StringType
case -1109226753: throw new FHIRException("Cannot make property dependent as it is not a complex type"); // PositiveIntType
case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType
case 1481625679: return addException(); // Coding
case -907977868: throw new FHIRException("Cannot make property school as it is not a complex type"); // StringType
case 1843485230: throw new FHIRException("Cannot make property network as it is not a complex type"); // StringType
case -566947566: return addContract(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("issuerIdentifier")) { if (name.equals("issuerIdentifier")) {
@ -1133,9 +1296,9 @@ public class Coverage extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( issuer, bin, period, type, planholder return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(issuer, bin, period, type, planholder
, beneficiary, relationship, identifier, group, plan, subPlan, dependent, sequence, exception , beneficiary, relationship, identifier, group, plan, subPlan, dependent, sequence, exception
, school, network, contract); , school, network, contract);
} }
@Override @Override
@ -1151,7 +1314,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.identifier</b><br> * Path: <b>Coverage.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured and the coverage", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured and the coverage", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1171,7 +1336,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.issuerReference</b><br> * Path: <b>Coverage.issuerReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="issuerreference", path="Coverage.issuerReference", description="The identity of the insurer", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="issuerreference", path="Coverage.issuer.as(Reference)", description="The identity of the insurer", type="reference", target={Organization.class} )
public static final String SP_ISSUERREFERENCE = "issuerreference"; public static final String SP_ISSUERREFERENCE = "issuerreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>issuerreference</b> * <b>Fluent Client</b> search parameter constant for <b>issuerreference</b>
@ -1197,7 +1364,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.subPlan</b><br> * Path: <b>Coverage.subPlan</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subplan", path="Coverage.subPlan", description="Sub-plan identifier", type="token" ) // []
// []
@SearchParamDefinition(name="subplan", path="Coverage.subPlan", description="Sub-plan identifier", type="token", target={} )
public static final String SP_SUBPLAN = "subplan"; public static final String SP_SUBPLAN = "subplan";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subplan</b> * <b>Fluent Client</b> search parameter constant for <b>subplan</b>
@ -1217,7 +1386,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.type</b><br> * Path: <b>Coverage.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage (health plan, auto, Workers Compensation)", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage (health plan, auto, Workers Compensation)", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -1237,7 +1408,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.beneficiaryIdentifier</b><br> * Path: <b>Coverage.beneficiaryIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="beneficiaryidentifier", path="Coverage.beneficiaryIdentifier", description="Covered party", type="token" ) // []
// []
@SearchParamDefinition(name="beneficiaryidentifier", path="Coverage.beneficiary.as(Identifier)", description="Covered party", type="token", target={} )
public static final String SP_BENEFICIARYIDENTIFIER = "beneficiaryidentifier"; public static final String SP_BENEFICIARYIDENTIFIER = "beneficiaryidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>beneficiaryidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>beneficiaryidentifier</b>
@ -1257,7 +1430,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.planholderIdentifier</b><br> * Path: <b>Coverage.planholderIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="planholderidentifier", path="Coverage.planholderIdentifier", description="Reference to the planholder", type="token" ) // []
// []
@SearchParamDefinition(name="planholderidentifier", path="Coverage.planholder.as(Identifier)", description="Reference to the planholder", type="token", target={} )
public static final String SP_PLANHOLDERIDENTIFIER = "planholderidentifier"; public static final String SP_PLANHOLDERIDENTIFIER = "planholderidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>planholderidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>planholderidentifier</b>
@ -1277,7 +1452,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.sequence</b><br> * Path: <b>Coverage.sequence</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) // []
// []
@SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token", target={} )
public static final String SP_SEQUENCE = "sequence"; public static final String SP_SEQUENCE = "sequence";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>sequence</b> * <b>Fluent Client</b> search parameter constant for <b>sequence</b>
@ -1297,7 +1474,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.planholderReference</b><br> * Path: <b>Coverage.planholderReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="planholderreference", path="Coverage.planholderReference", description="Reference to the planholder", type="reference" ) // [Organization, Patient]
// [Organization, Patient]
@SearchParamDefinition(name="planholderreference", path="Coverage.planholder.as(Reference)", description="Reference to the planholder", type="reference", target={Organization.class, Patient.class} )
public static final String SP_PLANHOLDERREFERENCE = "planholderreference"; public static final String SP_PLANHOLDERREFERENCE = "planholderreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>planholderreference</b> * <b>Fluent Client</b> search parameter constant for <b>planholderreference</b>
@ -1323,7 +1502,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.issuerIdentifier</b><br> * Path: <b>Coverage.issuerIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="issueridentifier", path="Coverage.issuerIdentifier", description="The identity of the insurer", type="token" ) // []
// []
@SearchParamDefinition(name="issueridentifier", path="Coverage.issuer.as(Identifier)", description="The identity of the insurer", type="token", target={} )
public static final String SP_ISSUERIDENTIFIER = "issueridentifier"; public static final String SP_ISSUERIDENTIFIER = "issueridentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>issueridentifier</b> * <b>Fluent Client</b> search parameter constant for <b>issueridentifier</b>
@ -1343,7 +1524,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.plan</b><br> * Path: <b>Coverage.plan</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" ) // []
// []
@SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token", target={} )
public static final String SP_PLAN = "plan"; public static final String SP_PLAN = "plan";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>plan</b> * <b>Fluent Client</b> search parameter constant for <b>plan</b>
@ -1363,7 +1546,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.dependent</b><br> * Path: <b>Coverage.dependent</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" ) // []
// []
@SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token", target={} )
public static final String SP_DEPENDENT = "dependent"; public static final String SP_DEPENDENT = "dependent";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>dependent</b> * <b>Fluent Client</b> search parameter constant for <b>dependent</b>
@ -1383,7 +1568,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.beneficiaryReference</b><br> * Path: <b>Coverage.beneficiaryReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="beneficiaryreference", path="Coverage.beneficiaryReference", description="Covered party", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="beneficiaryreference", path="Coverage.beneficiary.as(Reference)", description="Covered party", type="reference", target={Patient.class} )
public static final String SP_BENEFICIARYREFERENCE = "beneficiaryreference"; public static final String SP_BENEFICIARYREFERENCE = "beneficiaryreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>beneficiaryreference</b> * <b>Fluent Client</b> search parameter constant for <b>beneficiaryreference</b>
@ -1409,7 +1596,9 @@ public class Coverage extends DomainResource {
* Path: <b>Coverage.group</b><br> * Path: <b>Coverage.group</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" ) // []
// []
@SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token", target={} )
public static final String SP_GROUP = "group"; public static final String SP_GROUP = "group";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>group</b> * <b>Fluent Client</b> search parameter constant for <b>group</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -282,6 +282,24 @@ public class DataElement extends DomainResource {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElementContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -319,6 +337,30 @@ public class DataElement extends DomainResource {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -329,6 +371,16 @@ public class DataElement extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -374,7 +426,7 @@ public class DataElement extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
} }
public String fhirType() { public String fhirType() {
@ -631,6 +683,38 @@ public class DataElement extends DomainResource {
childrenList.add(new Property("comment", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comment)); childrenList.add(new Property("comment", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comment));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType
case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -135761730: // identity
this.identity = castToId(value); // IdType
break;
case 116076: // uri
this.uri = castToUri(value); // UriType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 950398559: // comment
this.comment = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identity")) if (name.equals("identity"))
@ -645,6 +729,18 @@ public class DataElement extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -135761730: throw new FHIRException("Cannot make property identity as it is not a complex type"); // IdType
case 116076: throw new FHIRException("Cannot make property uri as it is not a complex type"); // UriType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 950398559: throw new FHIRException("Cannot make property comment as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identity")) { if (name.equals("identity")) {
@ -696,8 +792,7 @@ public class DataElement extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, uri, name, comment return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, uri, name, comment);
);
} }
public String fhirType() { public String fhirType() {
@ -880,6 +975,24 @@ public class DataElement extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElement setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1206,6 +1319,24 @@ public class DataElement extends DomainResource {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public DataElementContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElement setContact(List<DataElementContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -1246,6 +1377,24 @@ public class DataElement extends DomainResource {
return this.useContext; return this.useContext;
} }
/**
* @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
*/
public CodeableConcept getUseContextFirstRep() {
if (getUseContext().isEmpty()) {
addUseContext();
}
return getUseContext().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElement setUseContext(List<CodeableConcept> theUseContext) {
this.useContext = theUseContext;
return this;
}
public boolean hasUseContext() { public boolean hasUseContext() {
if (this.useContext == null) if (this.useContext == null)
return false; return false;
@ -1384,6 +1533,24 @@ public class DataElement extends DomainResource {
return this.mapping; return this.mapping;
} }
/**
* @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist
*/
public DataElementMappingComponent getMappingFirstRep() {
if (getMapping().isEmpty()) {
addMapping();
}
return getMapping().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElement setMapping(List<DataElementMappingComponent> theMapping) {
this.mapping = theMapping;
return this;
}
public boolean hasMapping() { public boolean hasMapping() {
if (this.mapping == null) if (this.mapping == null)
return false; return false;
@ -1424,6 +1591,24 @@ public class DataElement extends DomainResource {
return this.element; return this.element;
} }
/**
* @return The first repetition of repeating field {@link #element}, creating it if it does not already exist
*/
public ElementDefinition getElementFirstRep() {
if (getElement().isEmpty()) {
addElement();
}
return getElement().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataElement setElement(List<ElementDefinition> theElement) {
this.element = theElement;
return this;
}
public boolean hasElement() { public boolean hasElement() {
if (this.element == null) if (this.element == null)
return false; return false;
@ -1473,6 +1658,78 @@ public class DataElement extends DomainResource {
childrenList.add(new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element)); childrenList.add(new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus>
case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // DataElementContactComponent
case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept
case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType
case -1572568464: /*stringency*/ return this.stringency == null ? new Base[0] : new Base[] {this.stringency}; // Enumeration<DataElementStringency>
case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // DataElementMappingComponent
case -1662836996: /*element*/ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // ElementDefinition
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case -892481550: // status
this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
break;
case -404562712: // experimental
this.experimental = castToBoolean(value); // BooleanType
break;
case 1447404028: // publisher
this.publisher = castToString(value); // StringType
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((DataElementContactComponent) value); // DataElementContactComponent
break;
case -669707736: // useContext
this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 1522889671: // copyright
this.copyright = castToString(value); // StringType
break;
case -1572568464: // stringency
this.stringency = new DataElementStringencyEnumFactory().fromType(value); // Enumeration<DataElementStringency>
break;
case 837556430: // mapping
this.getMapping().add((DataElementMappingComponent) value); // DataElementMappingComponent
break;
case -1662836996: // element
this.getElement().add(castToElementDefinition(value)); // ElementDefinition
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -1507,6 +1764,28 @@ public class DataElement extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case -1618432855: return addIdentifier(); // Identifier
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus>
case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 951526432: return addContact(); // DataElementContactComponent
case -669707736: return addUseContext(); // CodeableConcept
case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType
case -1572568464: throw new FHIRException("Cannot make property stringency as it is not a complex type"); // Enumeration<DataElementStringency>
case 837556430: return addMapping(); // DataElementMappingComponent
case -1662836996: return addElement(); // ElementDefinition
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -1632,9 +1911,9 @@ public class DataElement extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, status return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, status
, experimental, publisher, date, name, contact, useContext, copyright, stringency, mapping , experimental, publisher, date, name, contact, useContext, copyright, stringency, mapping, element
, element); );
} }
@Override @Override
@ -1650,7 +1929,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.date</b><br> * Path: <b>DataElement.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="DataElement.date", description="The data element publication date", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="DataElement.date", description="The data element publication date", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1670,7 +1951,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.identifier</b><br> * Path: <b>DataElement.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DataElement.identifier", description="The identifier of the data element", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DataElement.identifier", description="The identifier of the data element", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1690,7 +1973,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.element.code</b><br> * Path: <b>DataElement.element.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="DataElement.element.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="DataElement.element.code", description="A code for the data element (server may choose to do subsumption)", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -1710,7 +1995,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.stringency</b><br> * Path: <b>DataElement.stringency</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="stringency", path="DataElement.stringency", description="The stringency of the data element definition", type="token" ) // []
// []
@SearchParamDefinition(name="stringency", path="DataElement.stringency", description="The stringency of the data element definition", type="token", target={} )
public static final String SP_STRINGENCY = "stringency"; public static final String SP_STRINGENCY = "stringency";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>stringency</b> * <b>Fluent Client</b> search parameter constant for <b>stringency</b>
@ -1730,7 +2017,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.name</b><br> * Path: <b>DataElement.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" ) // []
// []
@SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string", target={} )
public static final String SP_NAME = "name"; public static final String SP_NAME = "name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>name</b> * <b>Fluent Client</b> search parameter constant for <b>name</b>
@ -1750,7 +2039,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.useContext</b><br> * Path: <b>DataElement.useContext</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="context", path="DataElement.useContext", description="A use context assigned to the data element", type="token" ) // []
// []
@SearchParamDefinition(name="context", path="DataElement.useContext", description="A use context assigned to the data element", type="token", target={} )
public static final String SP_CONTEXT = "context"; public static final String SP_CONTEXT = "context";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>context</b> * <b>Fluent Client</b> search parameter constant for <b>context</b>
@ -1770,7 +2061,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.publisher</b><br> * Path: <b>DataElement.publisher</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string" ) // []
// []
@SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string", target={} )
public static final String SP_PUBLISHER = "publisher"; public static final String SP_PUBLISHER = "publisher";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>publisher</b> * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
@ -1790,7 +2083,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.element.definition</b><br> * Path: <b>DataElement.element.definition</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="DataElement.element.definition", description="Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="DataElement.element.definition", description="Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -1810,7 +2105,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.version</b><br> * Path: <b>DataElement.version</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="version", path="DataElement.version", description="The version identifier of the data element", type="string" ) // []
// []
@SearchParamDefinition(name="version", path="DataElement.version", description="The version identifier of the data element", type="string", target={} )
public static final String SP_VERSION = "version"; public static final String SP_VERSION = "version";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>version</b> * <b>Fluent Client</b> search parameter constant for <b>version</b>
@ -1830,7 +2127,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.url</b><br> * Path: <b>DataElement.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="url", path="DataElement.url", description="The official URL for the data element", type="uri" ) // []
// []
@SearchParamDefinition(name="url", path="DataElement.url", description="The official URL for the data element", type="uri", target={} )
public static final String SP_URL = "url"; public static final String SP_URL = "url";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>url</b> * <b>Fluent Client</b> search parameter constant for <b>url</b>
@ -1850,7 +2149,9 @@ public class DataElement extends DomainResource {
* Path: <b>DataElement.status</b><br> * Path: <b>DataElement.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -200,6 +200,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCode; return this.valueCode;
} }
/**
* @return The first repetition of repeating field {@link #valueCode}, creating it if it does not already exist
*/
public CodeType getValueCodeFirstRep() {
if (getValueCode().isEmpty()) {
addValueCodeElement();
}
return getValueCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCode(List<CodeType> theValueCode) {
this.valueCode = theValueCode;
return this;
}
public boolean hasValueCode() { public boolean hasValueCode() {
if (this.valueCode == null) if (this.valueCode == null)
return false; return false;
@ -254,6 +272,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCoding; return this.valueCoding;
} }
/**
* @return The first repetition of repeating field {@link #valueCoding}, creating it if it does not already exist
*/
public Coding getValueCodingFirstRep() {
if (getValueCoding().isEmpty()) {
addValueCoding();
}
return getValueCoding().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCoding(List<Coding> theValueCoding) {
this.valueCoding = theValueCoding;
return this;
}
public boolean hasValueCoding() { public boolean hasValueCoding() {
if (this.valueCoding == null) if (this.valueCoding == null)
return false; return false;
@ -294,6 +330,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCodeableConcept; return this.valueCodeableConcept;
} }
/**
* @return The first repetition of repeating field {@link #valueCodeableConcept}, creating it if it does not already exist
*/
public CodeableConcept getValueCodeableConceptFirstRep() {
if (getValueCodeableConcept().isEmpty()) {
addValueCodeableConcept();
}
return getValueCodeableConcept().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCodeableConcept(List<CodeableConcept> theValueCodeableConcept) {
this.valueCodeableConcept = theValueCodeableConcept;
return this;
}
public boolean hasValueCodeableConcept() { public boolean hasValueCodeableConcept() {
if (this.valueCodeableConcept == null) if (this.valueCodeableConcept == null)
return false; return false;
@ -334,6 +388,42 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept)); childrenList.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type
case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeType
case -1887705029: /*valueCoding*/ return this.valueCoding == null ? new Base[0] : this.valueCoding.toArray(new Base[this.valueCoding.size()]); // Coding
case 924902896: /*valueCodeableConcept*/ return this.valueCodeableConcept == null ? new Base[0] : this.valueCodeableConcept.toArray(new Base[this.valueCodeableConcept.size()]); // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -1410174671: // valueSet
this.valueSet = (Type) value; // Type
break;
case -766209282: // valueCode
this.getValueCode().add(castToCode(value)); // CodeType
break;
case -1887705029: // valueCoding
this.getValueCoding().add(castToCoding(value)); // Coding
break;
case 924902896: // valueCodeableConcept
this.getValueCodeableConcept().add(castToCodeableConcept(value)); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -350,6 +440,19 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1438410321: return getValueSet(); // Type
case -766209282: throw new FHIRException("Cannot make property valueCode as it is not a complex type"); // CodeType
case -1887705029: return addValueCoding(); // Coding
case 924902896: return addValueCodeableConcept(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -422,8 +525,8 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, valueSet, valueCode, valueCoding return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, valueSet, valueCode, valueCoding
, valueCodeableConcept); , valueCodeableConcept);
} }
public String fhirType() { public String fhirType() {
@ -562,6 +665,30 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case 111972721: // value
this.value = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -572,6 +699,16 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1410166417: return getValue(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -618,7 +755,7 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, value); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, value);
} }
public String fhirType() { public String fhirType() {
@ -783,6 +920,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.mustSupport; return this.mustSupport;
} }
/**
* @return The first repetition of repeating field {@link #mustSupport}, creating it if it does not already exist
*/
public StringType getMustSupportFirstRep() {
if (getMustSupport().isEmpty()) {
addMustSupportElement();
}
return getMustSupport().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setMustSupport(List<StringType> theMustSupport) {
this.mustSupport = theMustSupport;
return this;
}
public boolean hasMustSupport() { public boolean hasMustSupport() {
if (this.mustSupport == null) if (this.mustSupport == null)
return false; return false;
@ -837,6 +992,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.codeFilter; return this.codeFilter;
} }
/**
* @return The first repetition of repeating field {@link #codeFilter}, creating it if it does not already exist
*/
public DataRequirementCodeFilterComponent getCodeFilterFirstRep() {
if (getCodeFilter().isEmpty()) {
addCodeFilter();
}
return getCodeFilter().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setCodeFilter(List<DataRequirementCodeFilterComponent> theCodeFilter) {
this.codeFilter = theCodeFilter;
return this;
}
public boolean hasCodeFilter() { public boolean hasCodeFilter() {
if (this.codeFilter == null) if (this.codeFilter == null)
return false; return false;
@ -877,6 +1050,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.dateFilter; return this.dateFilter;
} }
/**
* @return The first repetition of repeating field {@link #dateFilter}, creating it if it does not already exist
*/
public DataRequirementDateFilterComponent getDateFilterFirstRep() {
if (getDateFilter().isEmpty()) {
addDateFilter();
}
return getDateFilter().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setDateFilter(List<DataRequirementDateFilterComponent> theDateFilter) {
this.dateFilter = theDateFilter;
return this;
}
public boolean hasDateFilter() { public boolean hasDateFilter() {
if (this.dateFilter == null) if (this.dateFilter == null)
return false; return false;
@ -917,6 +1108,42 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); childrenList.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : this.mustSupport.toArray(new Base[this.mustSupport.size()]); // StringType
case -1303674939: /*codeFilter*/ return this.codeFilter == null ? new Base[0] : this.codeFilter.toArray(new Base[this.codeFilter.size()]); // DataRequirementCodeFilterComponent
case 149531846: /*dateFilter*/ return this.dateFilter == null ? new Base[0] : this.dateFilter.toArray(new Base[this.dateFilter.size()]); // DataRequirementDateFilterComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCode(value); // CodeType
break;
case -309425751: // profile
this.profile = castToReference(value); // Reference
break;
case -1402857082: // mustSupport
this.getMustSupport().add(castToString(value)); // StringType
break;
case -1303674939: // codeFilter
this.getCodeFilter().add((DataRequirementCodeFilterComponent) value); // DataRequirementCodeFilterComponent
break;
case 149531846: // dateFilter
this.getDateFilter().add((DataRequirementDateFilterComponent) value); // DataRequirementDateFilterComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -933,6 +1160,19 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // CodeType
case -309425751: return getProfile(); // Reference
case -1402857082: throw new FHIRException("Cannot make property mustSupport as it is not a complex type"); // StringType
case -1303674939: return addCodeFilter(); // DataRequirementCodeFilterComponent
case 149531846: return addDateFilter(); // DataRequirementDateFilterComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -1009,8 +1249,8 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile, mustSupport, codeFilter return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, mustSupport, codeFilter
, dateFilter); , dateFilter);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -129,6 +129,24 @@ public class DecisionSupportRule extends DomainResource {
return this.library; return this.library;
} }
/**
* @return The first repetition of repeating field {@link #library}, creating it if it does not already exist
*/
public Reference getLibraryFirstRep() {
if (getLibrary().isEmpty()) {
addLibrary();
}
return getLibrary().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportRule setLibrary(List<Reference> theLibrary) {
this.library = theLibrary;
return this;
}
public boolean hasLibrary() { public boolean hasLibrary() {
if (this.library == null) if (this.library == null)
return false; return false;
@ -190,6 +208,24 @@ public class DecisionSupportRule extends DomainResource {
return this.trigger; return this.trigger;
} }
/**
* @return The first repetition of repeating field {@link #trigger}, creating it if it does not already exist
*/
public TriggerDefinition getTriggerFirstRep() {
if (getTrigger().isEmpty()) {
addTrigger();
}
return getTrigger().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportRule setTrigger(List<TriggerDefinition> theTrigger) {
this.trigger = theTrigger;
return this;
}
public boolean hasTrigger() { public boolean hasTrigger() {
if (this.trigger == null) if (this.trigger == null)
return false; return false;
@ -279,6 +315,24 @@ public class DecisionSupportRule extends DomainResource {
return this.action; return this.action;
} }
/**
* @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
*/
public ActionDefinition getActionFirstRep() {
if (getAction().isEmpty()) {
addAction();
}
return getAction().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportRule setAction(List<ActionDefinition> theAction) {
this.action = theAction;
return this;
}
public boolean hasAction() { public boolean hasAction() {
if (this.action == null) if (this.action == null)
return false; return false;
@ -319,6 +373,42 @@ public class DecisionSupportRule extends DomainResource {
childrenList.add(new Property("action", "ActionDefinition", "The action element defines the \"when\" portion of the rule that determines what actions should be performed if the condition evaluates to true.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("action", "ActionDefinition", "The action element defines the \"when\" portion of the rule that determines what actions should be performed if the condition evaluates to true.", 0, java.lang.Integer.MAX_VALUE, action));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 455891387: /*moduleMetadata*/ return this.moduleMetadata == null ? new Base[0] : new Base[] {this.moduleMetadata}; // ModuleMetadata
case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // Reference
case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : this.trigger.toArray(new Base[this.trigger.size()]); // TriggerDefinition
case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // StringType
case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // ActionDefinition
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 455891387: // moduleMetadata
this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata
break;
case 166208699: // library
this.getLibrary().add(castToReference(value)); // Reference
break;
case -1059891784: // trigger
this.getTrigger().add(castToTriggerDefinition(value)); // TriggerDefinition
break;
case -861311717: // condition
this.condition = castToString(value); // StringType
break;
case -1422950858: // action
this.getAction().add(castToActionDefinition(value)); // ActionDefinition
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("moduleMetadata")) if (name.equals("moduleMetadata"))
@ -335,6 +425,19 @@ public class DecisionSupportRule extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 455891387: return getModuleMetadata(); // ModuleMetadata
case 166208699: return addLibrary(); // Reference
case -1059891784: return addTrigger(); // TriggerDefinition
case -861311717: throw new FHIRException("Cannot make property condition as it is not a complex type"); // StringType
case -1422950858: return addAction(); // ActionDefinition
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("moduleMetadata")) { if (name.equals("moduleMetadata")) {
@ -412,8 +515,8 @@ public class DecisionSupportRule extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, library, trigger return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, library, trigger
, condition, action); , condition, action);
} }
@Override @Override
@ -429,7 +532,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.identifier</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DecisionSupportRule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DecisionSupportRule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -449,7 +554,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.topic</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.topic</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="topic", path="DecisionSupportRule.moduleMetadata.topic", description="Topics associated with the module", type="token" ) // []
// []
@SearchParamDefinition(name="topic", path="DecisionSupportRule.moduleMetadata.topic", description="Topics associated with the module", type="token", target={} )
public static final String SP_TOPIC = "topic"; public static final String SP_TOPIC = "topic";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>topic</b> * <b>Fluent Client</b> search parameter constant for <b>topic</b>
@ -469,7 +576,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.description</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="DecisionSupportRule.moduleMetadata.description", description="Text search against the description", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="DecisionSupportRule.moduleMetadata.description", description="Text search against the description", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -489,7 +598,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.title</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.title</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="title", path="DecisionSupportRule.moduleMetadata.title", description="Text search against the title", type="string" ) // []
// []
@SearchParamDefinition(name="title", path="DecisionSupportRule.moduleMetadata.title", description="Text search against the title", type="string", target={} )
public static final String SP_TITLE = "title"; public static final String SP_TITLE = "title";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>title</b> * <b>Fluent Client</b> search parameter constant for <b>title</b>
@ -509,7 +620,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.version</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.version</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="version", path="DecisionSupportRule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) // []
// []
@SearchParamDefinition(name="version", path="DecisionSupportRule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string", target={} )
public static final String SP_VERSION = "version"; public static final String SP_VERSION = "version";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>version</b> * <b>Fluent Client</b> search parameter constant for <b>version</b>
@ -529,7 +642,9 @@ public class DecisionSupportRule extends DomainResource {
* Path: <b>DecisionSupportRule.moduleMetadata.status</b><br> * Path: <b>DecisionSupportRule.moduleMetadata.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DecisionSupportRule.moduleMetadata.status", description="Status of the module", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DecisionSupportRule.moduleMetadata.status", description="Status of the module", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -116,6 +116,24 @@ public class DecisionSupportServiceModule extends DomainResource {
return this.trigger; return this.trigger;
} }
/**
* @return The first repetition of repeating field {@link #trigger}, creating it if it does not already exist
*/
public TriggerDefinition getTriggerFirstRep() {
if (getTrigger().isEmpty()) {
addTrigger();
}
return getTrigger().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportServiceModule setTrigger(List<TriggerDefinition> theTrigger) {
this.trigger = theTrigger;
return this;
}
public boolean hasTrigger() { public boolean hasTrigger() {
if (this.trigger == null) if (this.trigger == null)
return false; return false;
@ -156,6 +174,24 @@ public class DecisionSupportServiceModule extends DomainResource {
return this.parameter; return this.parameter;
} }
/**
* @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist
*/
public ParameterDefinition getParameterFirstRep() {
if (getParameter().isEmpty()) {
addParameter();
}
return getParameter().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportServiceModule setParameter(List<ParameterDefinition> theParameter) {
this.parameter = theParameter;
return this;
}
public boolean hasParameter() { public boolean hasParameter() {
if (this.parameter == null) if (this.parameter == null)
return false; return false;
@ -196,6 +232,24 @@ public class DecisionSupportServiceModule extends DomainResource {
return this.dataRequirement; return this.dataRequirement;
} }
/**
* @return The first repetition of repeating field {@link #dataRequirement}, creating it if it does not already exist
*/
public DataRequirement getDataRequirementFirstRep() {
if (getDataRequirement().isEmpty()) {
addDataRequirement();
}
return getDataRequirement().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DecisionSupportServiceModule setDataRequirement(List<DataRequirement> theDataRequirement) {
this.dataRequirement = theDataRequirement;
return this;
}
public boolean hasDataRequirement() { public boolean hasDataRequirement() {
if (this.dataRequirement == null) if (this.dataRequirement == null)
return false; return false;
@ -235,6 +289,38 @@ public class DecisionSupportServiceModule extends DomainResource {
childrenList.add(new Property("dataRequirement", "DataRequirement", "Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.", 0, java.lang.Integer.MAX_VALUE, dataRequirement)); childrenList.add(new Property("dataRequirement", "DataRequirement", "Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.", 0, java.lang.Integer.MAX_VALUE, dataRequirement));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 455891387: /*moduleMetadata*/ return this.moduleMetadata == null ? new Base[0] : new Base[] {this.moduleMetadata}; // ModuleMetadata
case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : this.trigger.toArray(new Base[this.trigger.size()]); // TriggerDefinition
case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ParameterDefinition
case 629147193: /*dataRequirement*/ return this.dataRequirement == null ? new Base[0] : this.dataRequirement.toArray(new Base[this.dataRequirement.size()]); // DataRequirement
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 455891387: // moduleMetadata
this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata
break;
case -1059891784: // trigger
this.getTrigger().add(castToTriggerDefinition(value)); // TriggerDefinition
break;
case 1954460585: // parameter
this.getParameter().add(castToParameterDefinition(value)); // ParameterDefinition
break;
case 629147193: // dataRequirement
this.getDataRequirement().add(castToDataRequirement(value)); // DataRequirement
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("moduleMetadata")) if (name.equals("moduleMetadata"))
@ -249,6 +335,18 @@ public class DecisionSupportServiceModule extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 455891387: return getModuleMetadata(); // ModuleMetadata
case -1059891784: return addTrigger(); // TriggerDefinition
case 1954460585: return addParameter(); // ParameterDefinition
case 629147193: return addDataRequirement(); // DataRequirement
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("moduleMetadata")) { if (name.equals("moduleMetadata")) {
@ -322,8 +420,8 @@ public class DecisionSupportServiceModule extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, trigger, parameter return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(moduleMetadata, trigger, parameter
, dataRequirement); , dataRequirement);
} }
@Override @Override
@ -339,7 +437,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.identifier</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DecisionSupportServiceModule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DecisionSupportServiceModule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -359,7 +459,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.topic</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.topic</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="topic", path="DecisionSupportServiceModule.moduleMetadata.topic", description="Topics associated with the module", type="token" ) // []
// []
@SearchParamDefinition(name="topic", path="DecisionSupportServiceModule.moduleMetadata.topic", description="Topics associated with the module", type="token", target={} )
public static final String SP_TOPIC = "topic"; public static final String SP_TOPIC = "topic";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>topic</b> * <b>Fluent Client</b> search parameter constant for <b>topic</b>
@ -379,7 +481,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.description</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="DecisionSupportServiceModule.moduleMetadata.description", description="Text search against the description", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="DecisionSupportServiceModule.moduleMetadata.description", description="Text search against the description", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -399,7 +503,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.title</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.title</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="title", path="DecisionSupportServiceModule.moduleMetadata.title", description="Text search against the title", type="string" ) // []
// []
@SearchParamDefinition(name="title", path="DecisionSupportServiceModule.moduleMetadata.title", description="Text search against the title", type="string", target={} )
public static final String SP_TITLE = "title"; public static final String SP_TITLE = "title";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>title</b> * <b>Fluent Client</b> search parameter constant for <b>title</b>
@ -419,7 +525,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.version</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.version</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="version", path="DecisionSupportServiceModule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) // []
// []
@SearchParamDefinition(name="version", path="DecisionSupportServiceModule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string", target={} )
public static final String SP_VERSION = "version"; public static final String SP_VERSION = "version";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>version</b> * <b>Fluent Client</b> search parameter constant for <b>version</b>
@ -439,7 +547,9 @@ public class DecisionSupportServiceModule extends DomainResource {
* Path: <b>DecisionSupportServiceModule.moduleMetadata.status</b><br> * Path: <b>DecisionSupportServiceModule.moduleMetadata.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DecisionSupportServiceModule.moduleMetadata.status", description="Status of the module", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DecisionSupportServiceModule.moduleMetadata.status", description="Status of the module", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -319,6 +319,34 @@ public class DetectedIssue extends DomainResource {
childrenList.add(new Property("author", "Reference(Practitioner)", "Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.", 0, java.lang.Integer.MAX_VALUE, author)); childrenList.add(new Property("author", "Reference(Practitioner)", "Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.", 0, java.lang.Integer.MAX_VALUE, author));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // CodeableConcept
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1422950858: // action
this.action = castToCodeableConcept(value); // CodeableConcept
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1406328437: // author
this.author = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("action")) if (name.equals("action"))
@ -331,6 +359,17 @@ public class DetectedIssue extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1422950858: return getAction(); // CodeableConcept
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1406328437: return getAuthor(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("action")) { if (name.equals("action")) {
@ -379,7 +418,7 @@ public class DetectedIssue extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( action, date, author); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action, date, author);
} }
public String fhirType() { public String fhirType() {
@ -609,6 +648,24 @@ public class DetectedIssue extends DomainResource {
return this.implicated; return this.implicated;
} }
/**
* @return The first repetition of repeating field {@link #implicated}, creating it if it does not already exist
*/
public Reference getImplicatedFirstRep() {
if (getImplicated().isEmpty()) {
addImplicated();
}
return getImplicated().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DetectedIssue setImplicated(List<Reference> theImplicated) {
this.implicated = theImplicated;
return this;
}
public boolean hasImplicated() { public boolean hasImplicated() {
if (this.implicated == null) if (this.implicated == null)
return false; return false;
@ -868,6 +925,24 @@ public class DetectedIssue extends DomainResource {
return this.mitigation; return this.mitigation;
} }
/**
* @return The first repetition of repeating field {@link #mitigation}, creating it if it does not already exist
*/
public DetectedIssueMitigationComponent getMitigationFirstRep() {
if (getMitigation().isEmpty()) {
addMitigation();
}
return getMitigation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DetectedIssue setMitigation(List<DetectedIssueMitigationComponent> theMitigation) {
this.mitigation = theMitigation;
return this;
}
public boolean hasMitigation() { public boolean hasMitigation() {
if (this.mitigation == null) if (this.mitigation == null)
return false; return false;
@ -913,6 +988,62 @@ public class DetectedIssue extends DomainResource {
childrenList.add(new Property("mitigation", "", "Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", 0, java.lang.Integer.MAX_VALUE, mitigation)); childrenList.add(new Property("mitigation", "", "Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", 0, java.lang.Integer.MAX_VALUE, mitigation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<DetectedIssueSeverity>
case -810216884: /*implicated*/ return this.implicated == null ? new Base[0] : this.implicated.toArray(new Base[this.implicated.size()]); // Reference
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // StringType
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // UriType
case 1293793087: /*mitigation*/ return this.mitigation == null ? new Base[0] : this.mitigation.toArray(new Base[this.mitigation.size()]); // DetectedIssueMitigationComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case 1478300413: // severity
this.severity = new DetectedIssueSeverityEnumFactory().fromType(value); // Enumeration<DetectedIssueSeverity>
break;
case -810216884: // implicated
this.getImplicated().add(castToReference(value)); // Reference
break;
case -1335224239: // detail
this.detail = castToString(value); // StringType
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1406328437: // author
this.author = castToReference(value); // Reference
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case -925155509: // reference
this.reference = castToUri(value); // UriType
break;
case 1293793087: // mitigation
this.getMitigation().add((DetectedIssueMitigationComponent) value); // DetectedIssueMitigationComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("patient")) if (name.equals("patient"))
@ -939,6 +1070,24 @@ public class DetectedIssue extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -791418107: return getPatient(); // Reference
case 50511102: return getCategory(); // CodeableConcept
case 1478300413: throw new FHIRException("Cannot make property severity as it is not a complex type"); // Enumeration<DetectedIssueSeverity>
case -810216884: return addImplicated(); // Reference
case -1335224239: throw new FHIRException("Cannot make property detail as it is not a complex type"); // StringType
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1406328437: return getAuthor(); // Reference
case -1618432855: return getIdentifier(); // Identifier
case -925155509: throw new FHIRException("Cannot make property reference as it is not a complex type"); // UriType
case 1293793087: return addMitigation(); // DetectedIssueMitigationComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("patient")) { if (name.equals("patient")) {
@ -1037,8 +1186,8 @@ public class DetectedIssue extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, category, severity, implicated return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(patient, category, severity, implicated
, detail, date, author, identifier, reference, mitigation); , detail, date, author, identifier, reference, mitigation);
} }
@Override @Override
@ -1054,7 +1203,9 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.date</b><br> * Path: <b>DetectedIssue.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="DetectedIssue.date", description="When identified", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="DetectedIssue.date", description="When identified", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1074,7 +1225,9 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.identifier</b><br> * Path: <b>DetectedIssue.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DetectedIssue.identifier", description="Unique id for the detected issue", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DetectedIssue.identifier", description="Unique id for the detected issue", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1094,7 +1247,9 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.patient</b><br> * Path: <b>DetectedIssue.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1120,7 +1275,9 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.author</b><br> * Path: <b>DetectedIssue.author</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Device]
// [Practitioner, Device]
@SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference", target={Practitioner.class, Device.class} )
public static final String SP_AUTHOR = "author"; public static final String SP_AUTHOR = "author";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>author</b> * <b>Fluent Client</b> search parameter constant for <b>author</b>
@ -1146,6 +1303,8 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.implicated</b><br> * Path: <b>DetectedIssue.implicated</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="implicated", path="DetectedIssue.implicated", description="Problem resource", type="reference" ) @SearchParamDefinition(name="implicated", path="DetectedIssue.implicated", description="Problem resource", type="reference" )
public static final String SP_IMPLICATED = "implicated"; public static final String SP_IMPLICATED = "implicated";
/** /**
@ -1172,7 +1331,9 @@ public class DetectedIssue extends DomainResource {
* Path: <b>DetectedIssue.category</b><br> * Path: <b>DetectedIssue.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="DetectedIssue.category", description="Issue Category, e.g. drug-drug, duplicate therapy, etc.", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="DetectedIssue.category", description="Issue Category, e.g. drug-drug, duplicate therapy, etc.", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -303,6 +303,24 @@ public class Device extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Device setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -822,6 +840,24 @@ public class Device extends DomainResource {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public ContactPoint getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Device setContact(List<ContactPoint> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -955,6 +991,24 @@ public class Device extends DomainResource {
return this.note; return this.note;
} }
/**
* @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
*/
public Annotation getNoteFirstRep() {
if (getNote().isEmpty()) {
addNote();
}
return getNote().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Device setNote(List<Annotation> theNote) {
this.note = theNote;
return this;
}
public boolean hasNote() { public boolean hasNote() {
if (this.note == null) if (this.note == null)
return false; return false;
@ -1006,6 +1060,86 @@ public class Device extends DomainResource {
childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -1343558178: /*udiCarrier*/ return this.udiCarrier == null ? new Base[0] : new Base[] {this.udiCarrier}; // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DeviceStatus>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case 462547450: /*lotNumber*/ return this.lotNumber == null ? new Base[0] : new Base[] {this.lotNumber}; // StringType
case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // StringType
case 416714767: /*manufactureDate*/ return this.manufactureDate == null ? new Base[0] : new Base[] {this.manufactureDate}; // DateTimeType
case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateTimeType
case 104069929: /*model*/ return this.model == null ? new Base[0] : new Base[] {this.model}; // StringType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -1343558178: // udiCarrier
this.udiCarrier = castToIdentifier(value); // Identifier
break;
case -892481550: // status
this.status = new DeviceStatusEnumFactory().fromType(value); // Enumeration<DeviceStatus>
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case 462547450: // lotNumber
this.lotNumber = castToString(value); // StringType
break;
case -1969347631: // manufacturer
this.manufacturer = castToString(value); // StringType
break;
case 416714767: // manufactureDate
this.manufactureDate = castToDateTime(value); // DateTimeType
break;
case -668811523: // expirationDate
this.expirationDate = castToDateTime(value); // DateTimeType
break;
case 104069929: // model
this.model = castToString(value); // StringType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case 106164915: // owner
this.owner = castToReference(value); // Reference
break;
case 951526432: // contact
this.getContact().add(castToContactPoint(value)); // ContactPoint
break;
case 1901043637: // location
this.location = castToReference(value); // Reference
break;
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 3387378: // note
this.getNote().add(castToAnnotation(value)); // Annotation
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1044,6 +1178,30 @@ public class Device extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -1343558178: return getUdiCarrier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DeviceStatus>
case 3575610: return getType(); // CodeableConcept
case 462547450: throw new FHIRException("Cannot make property lotNumber as it is not a complex type"); // StringType
case -1969347631: throw new FHIRException("Cannot make property manufacturer as it is not a complex type"); // StringType
case 416714767: throw new FHIRException("Cannot make property manufactureDate as it is not a complex type"); // DateTimeType
case -668811523: throw new FHIRException("Cannot make property expirationDate as it is not a complex type"); // DateTimeType
case 104069929: throw new FHIRException("Cannot make property model as it is not a complex type"); // StringType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case -791418107: return getPatient(); // Reference
case 106164915: return getOwner(); // Reference
case 951526432: return addContact(); // ContactPoint
case 1901043637: return getLocation(); // Reference
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case 3387378: return addNote(); // Annotation
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1176,9 +1334,9 @@ public class Device extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, udiCarrier, status return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, udiCarrier, status
, type, lotNumber, manufacturer, manufactureDate, expirationDate, model, version, patient , type, lotNumber, manufacturer, manufactureDate, expirationDate, model, version, patient, owner
, owner, contact, location, url, note); , contact, location, url, note);
} }
@Override @Override
@ -1194,7 +1352,9 @@ public class Device extends DomainResource {
* Path: <b>Device.identifier</b><br> * Path: <b>Device.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1214,7 +1374,9 @@ public class Device extends DomainResource {
* Path: <b>Device.patient</b><br> * Path: <b>Device.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1240,7 +1402,9 @@ public class Device extends DomainResource {
* Path: <b>Device.owner</b><br> * Path: <b>Device.owner</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference", target={Organization.class} )
public static final String SP_ORGANIZATION = "organization"; public static final String SP_ORGANIZATION = "organization";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organization</b> * <b>Fluent Client</b> search parameter constant for <b>organization</b>
@ -1266,7 +1430,9 @@ public class Device extends DomainResource {
* Path: <b>Device.model</b><br> * Path: <b>Device.model</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" ) // []
// []
@SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string", target={} )
public static final String SP_MODEL = "model"; public static final String SP_MODEL = "model";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>model</b> * <b>Fluent Client</b> search parameter constant for <b>model</b>
@ -1286,7 +1452,9 @@ public class Device extends DomainResource {
* Path: <b>Device.location</b><br> * Path: <b>Device.location</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference" ) // [Location]
// [Location]
@SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference", target={Location.class} )
public static final String SP_LOCATION = "location"; public static final String SP_LOCATION = "location";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location</b> * <b>Fluent Client</b> search parameter constant for <b>location</b>
@ -1312,7 +1480,9 @@ public class Device extends DomainResource {
* Path: <b>Device.type</b><br> * Path: <b>Device.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -1332,7 +1502,9 @@ public class Device extends DomainResource {
* Path: <b>Device.udiCarrier</b><br> * Path: <b>Device.udiCarrier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="udicarrier", path="Device.udiCarrier", description="Barcode string (udi)", type="token" ) // []
// []
@SearchParamDefinition(name="udicarrier", path="Device.udiCarrier", description="Barcode string (udi)", type="token", target={} )
public static final String SP_UDICARRIER = "udicarrier"; public static final String SP_UDICARRIER = "udicarrier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>udicarrier</b> * <b>Fluent Client</b> search parameter constant for <b>udicarrier</b>
@ -1352,7 +1524,9 @@ public class Device extends DomainResource {
* Path: <b>Device.url</b><br> * Path: <b>Device.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" ) // []
// []
@SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri", target={} )
public static final String SP_URL = "url"; public static final String SP_URL = "url";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>url</b> * <b>Fluent Client</b> search parameter constant for <b>url</b>
@ -1372,7 +1546,9 @@ public class Device extends DomainResource {
* Path: <b>Device.manufacturer</b><br> * Path: <b>Device.manufacturer</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) // []
// []
@SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string", target={} )
public static final String SP_MANUFACTURER = "manufacturer"; public static final String SP_MANUFACTURER = "manufacturer";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -415,6 +415,34 @@ public class DeviceComponent extends DomainResource {
childrenList.add(new Property("productionSpec", "string", "Describes the printable string defining the component.", 0, java.lang.Integer.MAX_VALUE, productionSpec)); childrenList.add(new Property("productionSpec", "string", "Describes the printable string defining the component.", 0, java.lang.Integer.MAX_VALUE, productionSpec));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -2133482091: /*specType*/ return this.specType == null ? new Base[0] : new Base[] {this.specType}; // CodeableConcept
case -985933064: /*componentId*/ return this.componentId == null ? new Base[0] : new Base[] {this.componentId}; // Identifier
case 182147092: /*productionSpec*/ return this.productionSpec == null ? new Base[0] : new Base[] {this.productionSpec}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -2133482091: // specType
this.specType = castToCodeableConcept(value); // CodeableConcept
break;
case -985933064: // componentId
this.componentId = castToIdentifier(value); // Identifier
break;
case 182147092: // productionSpec
this.productionSpec = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("specType")) if (name.equals("specType"))
@ -427,6 +455,17 @@ public class DeviceComponent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -2133482091: return getSpecType(); // CodeableConcept
case -985933064: return getComponentId(); // Identifier
case 182147092: throw new FHIRException("Cannot make property productionSpec as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("specType")) { if (name.equals("specType")) {
@ -475,7 +514,7 @@ public class DeviceComponent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( specType, componentId, productionSpec return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(specType, componentId, productionSpec
); );
} }
@ -775,6 +814,24 @@ public class DeviceComponent extends DomainResource {
return this.operationalStatus; return this.operationalStatus;
} }
/**
* @return The first repetition of repeating field {@link #operationalStatus}, creating it if it does not already exist
*/
public CodeableConcept getOperationalStatusFirstRep() {
if (getOperationalStatus().isEmpty()) {
addOperationalStatus();
}
return getOperationalStatus().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceComponent setOperationalStatus(List<CodeableConcept> theOperationalStatus) {
this.operationalStatus = theOperationalStatus;
return this;
}
public boolean hasOperationalStatus() { public boolean hasOperationalStatus() {
if (this.operationalStatus == null) if (this.operationalStatus == null)
return false; return false;
@ -888,6 +945,24 @@ public class DeviceComponent extends DomainResource {
return this.productionSpecification; return this.productionSpecification;
} }
/**
* @return The first repetition of repeating field {@link #productionSpecification}, creating it if it does not already exist
*/
public DeviceComponentProductionSpecificationComponent getProductionSpecificationFirstRep() {
if (getProductionSpecification().isEmpty()) {
addProductionSpecification();
}
return getProductionSpecification().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceComponent setProductionSpecification(List<DeviceComponentProductionSpecificationComponent> theProductionSpecification) {
this.productionSpecification = theProductionSpecification;
return this;
}
public boolean hasProductionSpecification() { public boolean hasProductionSpecification() {
if (this.productionSpecification == null) if (this.productionSpecification == null)
return false; return false;
@ -957,6 +1032,62 @@ public class DeviceComponent extends DomainResource {
childrenList.add(new Property("languageCode", "CodeableConcept", "Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 0, java.lang.Integer.MAX_VALUE, languageCode)); childrenList.add(new Property("languageCode", "CodeableConcept", "Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 0, java.lang.Integer.MAX_VALUE, languageCode));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case -2072475531: /*lastSystemChange*/ return this.lastSystemChange == null ? new Base[0] : new Base[] {this.lastSystemChange}; // InstantType
case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference
case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : this.operationalStatus.toArray(new Base[this.operationalStatus.size()]); // CodeableConcept
case 1111110742: /*parameterGroup*/ return this.parameterGroup == null ? new Base[0] : new Base[] {this.parameterGroup}; // CodeableConcept
case 24324384: /*measurementPrinciple*/ return this.measurementPrinciple == null ? new Base[0] : new Base[] {this.measurementPrinciple}; // Enumeration<MeasmntPrinciple>
case -455527222: /*productionSpecification*/ return this.productionSpecification == null ? new Base[0] : this.productionSpecification.toArray(new Base[this.productionSpecification.size()]); // DeviceComponentProductionSpecificationComponent
case -2092349083: /*languageCode*/ return this.languageCode == null ? new Base[0] : new Base[] {this.languageCode}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case -2072475531: // lastSystemChange
this.lastSystemChange = castToInstant(value); // InstantType
break;
case -896505829: // source
this.source = castToReference(value); // Reference
break;
case -995424086: // parent
this.parent = castToReference(value); // Reference
break;
case -2103166364: // operationalStatus
this.getOperationalStatus().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 1111110742: // parameterGroup
this.parameterGroup = castToCodeableConcept(value); // CodeableConcept
break;
case 24324384: // measurementPrinciple
this.measurementPrinciple = new MeasmntPrincipleEnumFactory().fromType(value); // Enumeration<MeasmntPrinciple>
break;
case -455527222: // productionSpecification
this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); // DeviceComponentProductionSpecificationComponent
break;
case -2092349083: // languageCode
this.languageCode = castToCodeableConcept(value); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -983,6 +1114,24 @@ public class DeviceComponent extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // CodeableConcept
case -1618432855: return getIdentifier(); // Identifier
case -2072475531: throw new FHIRException("Cannot make property lastSystemChange as it is not a complex type"); // InstantType
case -896505829: return getSource(); // Reference
case -995424086: return getParent(); // Reference
case -2103166364: return addOperationalStatus(); // CodeableConcept
case 1111110742: return getParameterGroup(); // CodeableConcept
case 24324384: throw new FHIRException("Cannot make property measurementPrinciple as it is not a complex type"); // Enumeration<MeasmntPrinciple>
case -455527222: return addProductionSpecification(); // DeviceComponentProductionSpecificationComponent
case -2092349083: return getLanguageCode(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -1084,9 +1233,9 @@ public class DeviceComponent extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, identifier, lastSystemChange return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, lastSystemChange
, source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification , source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification
, languageCode); , languageCode);
} }
@Override @Override
@ -1102,7 +1251,9 @@ public class DeviceComponent extends DomainResource {
* Path: <b>DeviceComponent.parent</b><br> * Path: <b>DeviceComponent.parent</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference" ) // [DeviceComponent]
// [DeviceComponent]
@SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference", target={DeviceComponent.class} )
public static final String SP_PARENT = "parent"; public static final String SP_PARENT = "parent";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>parent</b> * <b>Fluent Client</b> search parameter constant for <b>parent</b>
@ -1128,7 +1279,9 @@ public class DeviceComponent extends DomainResource {
* Path: <b>DeviceComponent.source</b><br> * Path: <b>DeviceComponent.source</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) // [Device]
// [Device]
@SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference", target={Device.class} )
public static final String SP_SOURCE = "source"; public static final String SP_SOURCE = "source";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source</b> * <b>Fluent Client</b> search parameter constant for <b>source</b>
@ -1154,7 +1307,9 @@ public class DeviceComponent extends DomainResource {
* Path: <b>DeviceComponent.type</b><br> * Path: <b>DeviceComponent.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -876,6 +876,34 @@ public class DeviceMetric extends DomainResource {
childrenList.add(new Property("time", "instant", "Describes the time last calibration has been performed.", 0, java.lang.Integer.MAX_VALUE, time)); childrenList.add(new Property("time", "instant", "Describes the time last calibration has been performed.", 0, java.lang.Integer.MAX_VALUE, time));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceMetricCalibrationType>
case 109757585: /*state*/ return this.state == null ? new Base[0] : new Base[] {this.state}; // Enumeration<DeviceMetricCalibrationState>
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // InstantType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = new DeviceMetricCalibrationTypeEnumFactory().fromType(value); // Enumeration<DeviceMetricCalibrationType>
break;
case 109757585: // state
this.state = new DeviceMetricCalibrationStateEnumFactory().fromType(value); // Enumeration<DeviceMetricCalibrationState>
break;
case 3560141: // time
this.time = castToInstant(value); // InstantType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -888,6 +916,17 @@ public class DeviceMetric extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<DeviceMetricCalibrationType>
case 109757585: throw new FHIRException("Cannot make property state as it is not a complex type"); // Enumeration<DeviceMetricCalibrationState>
case 3560141: throw new FHIRException("Cannot make property time as it is not a complex type"); // InstantType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -935,7 +974,7 @@ public class DeviceMetric extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, state, time); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, state, time);
} }
public String fhirType() { public String fhirType() {
@ -1380,6 +1419,24 @@ public class DeviceMetric extends DomainResource {
return this.calibration; return this.calibration;
} }
/**
* @return The first repetition of repeating field {@link #calibration}, creating it if it does not already exist
*/
public DeviceMetricCalibrationComponent getCalibrationFirstRep() {
if (getCalibration().isEmpty()) {
addCalibration();
}
return getCalibration().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceMetric setCalibration(List<DeviceMetricCalibrationComponent> theCalibration) {
this.calibration = theCalibration;
return this;
}
public boolean hasCalibration() { public boolean hasCalibration() {
if (this.calibration == null) if (this.calibration == null)
return false; return false;
@ -1425,6 +1482,62 @@ public class DeviceMetric extends DomainResource {
childrenList.add(new Property("calibration", "", "Describes the calibrations that have been performed or that are required to be performed.", 0, java.lang.Integer.MAX_VALUE, calibration)); childrenList.add(new Property("calibration", "", "Describes the calibrations that have been performed or that are required to be performed.", 0, java.lang.Integer.MAX_VALUE, calibration));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // CodeableConcept
case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference
case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Enumeration<DeviceMetricOperationalStatus>
case 94842723: /*color*/ return this.color == null ? new Base[0] : new Base[] {this.color}; // Enumeration<DeviceMetricColor>
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration<DeviceMetricCategory>
case -1300332387: /*measurementPeriod*/ return this.measurementPeriod == null ? new Base[0] : new Base[] {this.measurementPeriod}; // Timing
case 1421318634: /*calibration*/ return this.calibration == null ? new Base[0] : this.calibration.toArray(new Base[this.calibration.size()]); // DeviceMetricCalibrationComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 3594628: // unit
this.unit = castToCodeableConcept(value); // CodeableConcept
break;
case -896505829: // source
this.source = castToReference(value); // Reference
break;
case -995424086: // parent
this.parent = castToReference(value); // Reference
break;
case -2103166364: // operationalStatus
this.operationalStatus = new DeviceMetricOperationalStatusEnumFactory().fromType(value); // Enumeration<DeviceMetricOperationalStatus>
break;
case 94842723: // color
this.color = new DeviceMetricColorEnumFactory().fromType(value); // Enumeration<DeviceMetricColor>
break;
case 50511102: // category
this.category = new DeviceMetricCategoryEnumFactory().fromType(value); // Enumeration<DeviceMetricCategory>
break;
case -1300332387: // measurementPeriod
this.measurementPeriod = castToTiming(value); // Timing
break;
case 1421318634: // calibration
this.getCalibration().add((DeviceMetricCalibrationComponent) value); // DeviceMetricCalibrationComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -1451,6 +1564,24 @@ public class DeviceMetric extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // CodeableConcept
case -1618432855: return getIdentifier(); // Identifier
case 3594628: return getUnit(); // CodeableConcept
case -896505829: return getSource(); // Reference
case -995424086: return getParent(); // Reference
case -2103166364: throw new FHIRException("Cannot make property operationalStatus as it is not a complex type"); // Enumeration<DeviceMetricOperationalStatus>
case 94842723: throw new FHIRException("Cannot make property color as it is not a complex type"); // Enumeration<DeviceMetricColor>
case 50511102: throw new FHIRException("Cannot make property category as it is not a complex type"); // Enumeration<DeviceMetricCategory>
case -1300332387: return getMeasurementPeriod(); // Timing
case 1421318634: return addCalibration(); // DeviceMetricCalibrationComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -1547,8 +1678,8 @@ public class DeviceMetric extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, identifier, unit, source return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, unit, source
, parent, operationalStatus, color, category, measurementPeriod, calibration); , parent, operationalStatus, color, category, measurementPeriod, calibration);
} }
@Override @Override
@ -1564,7 +1695,9 @@ public class DeviceMetric extends DomainResource {
* Path: <b>DeviceMetric.parent</b><br> * Path: <b>DeviceMetric.parent</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="parent", path="DeviceMetric.parent", description="The parent DeviceMetric resource", type="reference" ) // [DeviceComponent]
// [DeviceComponent]
@SearchParamDefinition(name="parent", path="DeviceMetric.parent", description="The parent DeviceMetric resource", type="reference", target={DeviceComponent.class} )
public static final String SP_PARENT = "parent"; public static final String SP_PARENT = "parent";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>parent</b> * <b>Fluent Client</b> search parameter constant for <b>parent</b>
@ -1590,7 +1723,9 @@ public class DeviceMetric extends DomainResource {
* Path: <b>DeviceMetric.identifier</b><br> * Path: <b>DeviceMetric.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1610,7 +1745,9 @@ public class DeviceMetric extends DomainResource {
* Path: <b>DeviceMetric.source</b><br> * Path: <b>DeviceMetric.source</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) // [Device]
// [Device]
@SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference", target={Device.class} )
public static final String SP_SOURCE = "source"; public static final String SP_SOURCE = "source";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source</b> * <b>Fluent Client</b> search parameter constant for <b>source</b>
@ -1636,7 +1773,9 @@ public class DeviceMetric extends DomainResource {
* Path: <b>DeviceMetric.type</b><br> * Path: <b>DeviceMetric.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="DeviceMetric.type", description="The component type", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -1656,7 +1795,9 @@ public class DeviceMetric extends DomainResource {
* Path: <b>DeviceMetric.category</b><br> * Path: <b>DeviceMetric.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -696,6 +696,24 @@ public class DeviceUseRequest extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseRequest setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -736,6 +754,24 @@ public class DeviceUseRequest extends DomainResource {
return this.indication; return this.indication;
} }
/**
* @return The first repetition of repeating field {@link #indication}, creating it if it does not already exist
*/
public CodeableConcept getIndicationFirstRep() {
if (getIndication().isEmpty()) {
addIndication();
}
return getIndication().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseRequest setIndication(List<CodeableConcept> theIndication) {
this.indication = theIndication;
return this;
}
public boolean hasIndication() { public boolean hasIndication() {
if (this.indication == null) if (this.indication == null)
return false; return false;
@ -776,6 +812,24 @@ public class DeviceUseRequest extends DomainResource {
return this.notes; return this.notes;
} }
/**
* @return The first repetition of repeating field {@link #notes}, creating it if it does not already exist
*/
public StringType getNotesFirstRep() {
if (getNotes().isEmpty()) {
addNotesElement();
}
return getNotes().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseRequest setNotes(List<StringType> theNotes) {
this.notes = theNotes;
return this;
}
public boolean hasNotes() { public boolean hasNotes() {
if (this.notes == null) if (this.notes == null)
return false; return false;
@ -830,6 +884,24 @@ public class DeviceUseRequest extends DomainResource {
return this.prnReason; return this.prnReason;
} }
/**
* @return The first repetition of repeating field {@link #prnReason}, creating it if it does not already exist
*/
public CodeableConcept getPrnReasonFirstRep() {
if (getPrnReason().isEmpty()) {
addPrnReason();
}
return getPrnReason().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseRequest setPrnReason(List<CodeableConcept> thePrnReason) {
this.prnReason = thePrnReason;
return this;
}
public boolean hasPrnReason() { public boolean hasPrnReason() {
if (this.prnReason == null) if (this.prnReason == null)
return false; return false;
@ -1127,6 +1199,74 @@ public class DeviceUseRequest extends DomainResource {
childrenList.add(new Property("priority", "code", "Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("priority", "code", "Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // Type
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DeviceUseRequestStatus>
case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -597168804: /*indication*/ return this.indication == null ? new Base[0] : this.indication.toArray(new Base[this.indication.size()]); // CodeableConcept
case 105008833: /*notes*/ return this.notes == null ? new Base[0] : this.notes.toArray(new Base[this.notes.size()]); // StringType
case 1825472528: /*prnReason*/ return this.prnReason == null ? new Base[0] : this.prnReason.toArray(new Base[this.prnReason.size()]); // CodeableConcept
case -391079124: /*orderedOn*/ return this.orderedOn == null ? new Base[0] : new Base[] {this.orderedOn}; // DateTimeType
case 735397551: /*recordedOn*/ return this.recordedOn == null ? new Base[0] : new Base[] {this.recordedOn}; // DateTimeType
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<DeviceUseRequestPriority>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1702620169: // bodySite
this.bodySite = (Type) value; // Type
break;
case -892481550: // status
this.status = new DeviceUseRequestStatusEnumFactory().fromType(value); // Enumeration<DeviceUseRequestStatus>
break;
case -1335157162: // device
this.device = castToReference(value); // Reference
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -597168804: // indication
this.getIndication().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 105008833: // notes
this.getNotes().add(castToString(value)); // StringType
break;
case 1825472528: // prnReason
this.getPrnReason().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -391079124: // orderedOn
this.orderedOn = castToDateTime(value); // DateTimeType
break;
case 735397551: // recordedOn
this.recordedOn = castToDateTime(value); // DateTimeType
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -873664438: // timing
this.timing = (Type) value; // Type
break;
case -1165461084: // priority
this.priority = new DeviceUseRequestPriorityEnumFactory().fromType(value); // Enumeration<DeviceUseRequestPriority>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("bodySite[x]")) if (name.equals("bodySite[x]"))
@ -1159,6 +1299,27 @@ public class DeviceUseRequest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -806219817: return getBodySite(); // Type
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DeviceUseRequestStatus>
case -1335157162: return getDevice(); // Reference
case 1524132147: return getEncounter(); // Reference
case -1618432855: return addIdentifier(); // Identifier
case -597168804: return addIndication(); // CodeableConcept
case 105008833: throw new FHIRException("Cannot make property notes as it is not a complex type"); // StringType
case 1825472528: return addPrnReason(); // CodeableConcept
case -391079124: throw new FHIRException("Cannot make property orderedOn as it is not a complex type"); // DateTimeType
case 735397551: throw new FHIRException("Cannot make property recordedOn as it is not a complex type"); // DateTimeType
case -1867885268: return getSubject(); // Reference
case 164632566: return getTiming(); // Type
case -1165461084: throw new FHIRException("Cannot make property priority as it is not a complex type"); // Enumeration<DeviceUseRequestPriority>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("bodySiteCodeableConcept")) { if (name.equals("bodySiteCodeableConcept")) {
@ -1291,8 +1452,8 @@ public class DeviceUseRequest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bodySite, status, device, encounter return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(bodySite, status, device, encounter
, identifier, indication, notes, prnReason, orderedOn, recordedOn, subject, timing, priority , identifier, indication, notes, prnReason, orderedOn, recordedOn, subject, timing, priority
); );
} }
@ -1309,7 +1470,9 @@ public class DeviceUseRequest extends DomainResource {
* Path: <b>DeviceUseRequest.subject</b><br> * Path: <b>DeviceUseRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference", target={Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -1335,7 +1498,9 @@ public class DeviceUseRequest extends DomainResource {
* Path: <b>DeviceUseRequest.subject</b><br> * Path: <b>DeviceUseRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1361,7 +1526,9 @@ public class DeviceUseRequest extends DomainResource {
* Path: <b>DeviceUseRequest.device</b><br> * Path: <b>DeviceUseRequest.device</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="Device requested", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) // [Device]
// [Device]
@SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="Device requested", type="reference", target={Device.class} )
public static final String SP_DEVICE = "device"; public static final String SP_DEVICE = "device";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>device</b> * <b>Fluent Client</b> search parameter constant for <b>device</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -260,6 +260,24 @@ public class DeviceUseStatement extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseStatement setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -300,6 +318,24 @@ public class DeviceUseStatement extends DomainResource {
return this.indication; return this.indication;
} }
/**
* @return The first repetition of repeating field {@link #indication}, creating it if it does not already exist
*/
public CodeableConcept getIndicationFirstRep() {
if (getIndication().isEmpty()) {
addIndication();
}
return getIndication().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseStatement setIndication(List<CodeableConcept> theIndication) {
this.indication = theIndication;
return this;
}
public boolean hasIndication() { public boolean hasIndication() {
if (this.indication == null) if (this.indication == null)
return false; return false;
@ -340,6 +376,24 @@ public class DeviceUseStatement extends DomainResource {
return this.notes; return this.notes;
} }
/**
* @return The first repetition of repeating field {@link #notes}, creating it if it does not already exist
*/
public StringType getNotesFirstRep() {
if (getNotes().isEmpty()) {
addNotesElement();
}
return getNotes().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DeviceUseStatement setNotes(List<StringType> theNotes) {
this.notes = theNotes;
return this;
}
public boolean hasNotes() { public boolean hasNotes() {
if (this.notes == null) if (this.notes == null)
return false; return false;
@ -549,6 +603,58 @@ public class DeviceUseStatement extends DomainResource {
childrenList.add(new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, java.lang.Integer.MAX_VALUE, timing)); childrenList.add(new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, java.lang.Integer.MAX_VALUE, timing));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // Type
case 2042879511: /*whenUsed*/ return this.whenUsed == null ? new Base[0] : new Base[] {this.whenUsed}; // Period
case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -597168804: /*indication*/ return this.indication == null ? new Base[0] : this.indication.toArray(new Base[this.indication.size()]); // CodeableConcept
case 105008833: /*notes*/ return this.notes == null ? new Base[0] : this.notes.toArray(new Base[this.notes.size()]); // StringType
case 735397551: /*recordedOn*/ return this.recordedOn == null ? new Base[0] : new Base[] {this.recordedOn}; // DateTimeType
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1702620169: // bodySite
this.bodySite = (Type) value; // Type
break;
case 2042879511: // whenUsed
this.whenUsed = castToPeriod(value); // Period
break;
case -1335157162: // device
this.device = castToReference(value); // Reference
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -597168804: // indication
this.getIndication().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 105008833: // notes
this.getNotes().add(castToString(value)); // StringType
break;
case 735397551: // recordedOn
this.recordedOn = castToDateTime(value); // DateTimeType
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -873664438: // timing
this.timing = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("bodySite[x]")) if (name.equals("bodySite[x]"))
@ -573,6 +679,23 @@ public class DeviceUseStatement extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -806219817: return getBodySite(); // Type
case 2042879511: return getWhenUsed(); // Period
case -1335157162: return getDevice(); // Reference
case -1618432855: return addIdentifier(); // Identifier
case -597168804: return addIndication(); // CodeableConcept
case 105008833: throw new FHIRException("Cannot make property notes as it is not a complex type"); // StringType
case 735397551: throw new FHIRException("Cannot make property recordedOn as it is not a complex type"); // DateTimeType
case -1867885268: return getSubject(); // Reference
case 164632566: return getTiming(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("bodySiteCodeableConcept")) { if (name.equals("bodySiteCodeableConcept")) {
@ -683,8 +806,8 @@ public class DeviceUseStatement extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bodySite, whenUsed, device, identifier return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(bodySite, whenUsed, device, identifier
, indication, notes, recordedOn, subject, timing); , indication, notes, recordedOn, subject, timing);
} }
@Override @Override
@ -700,7 +823,9 @@ public class DeviceUseStatement extends DomainResource {
* Path: <b>DeviceUseStatement.subject</b><br> * Path: <b>DeviceUseStatement.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference", target={Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -726,7 +851,9 @@ public class DeviceUseStatement extends DomainResource {
* Path: <b>DeviceUseStatement.subject</b><br> * Path: <b>DeviceUseStatement.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="DeviceUseStatement.subject", description="Search by subject - a patient", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -752,7 +879,9 @@ public class DeviceUseStatement extends DomainResource {
* Path: <b>DeviceUseStatement.device</b><br> * Path: <b>DeviceUseStatement.device</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="device", path="DeviceUseStatement.device", description="Search by device", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) // [Device]
// [Device]
@SearchParamDefinition(name="device", path="DeviceUseStatement.device", description="Search by device", type="reference", target={Device.class} )
public static final String SP_DEVICE = "device"; public static final String SP_DEVICE = "device";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>device</b> * <b>Fluent Client</b> search parameter constant for <b>device</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -659,6 +659,38 @@ public class DiagnosticOrder extends DomainResource {
childrenList.add(new Property("actor", "Reference(Practitioner|Device)", "The person responsible for performing or recording the action.", 0, java.lang.Integer.MAX_VALUE, actor)); childrenList.add(new Property("actor", "Reference(Practitioner|Device)", "The person responsible for performing or recording the action.", 0, java.lang.Integer.MAX_VALUE, actor));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus>
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept
case 1792749467: /*dateTime*/ return this.dateTime == null ? new Base[0] : new Base[] {this.dateTime}; // DateTimeType
case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -892481550: // status
this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus>
break;
case -1724546052: // description
this.description = castToCodeableConcept(value); // CodeableConcept
break;
case 1792749467: // dateTime
this.dateTime = castToDateTime(value); // DateTimeType
break;
case 92645877: // actor
this.actor = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("status")) if (name.equals("status"))
@ -673,6 +705,18 @@ public class DiagnosticOrder extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus>
case -1724546052: return getDescription(); // CodeableConcept
case 1792749467: throw new FHIRException("Cannot make property dateTime as it is not a complex type"); // DateTimeType
case 92645877: return getActor(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("status")) { if (name.equals("status")) {
@ -725,8 +769,8 @@ public class DiagnosticOrder extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, description, dateTime return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, description, dateTime, actor
, actor); );
} }
public String fhirType() { public String fhirType() {
@ -828,6 +872,24 @@ public class DiagnosticOrder extends DomainResource {
return this.specimen; return this.specimen;
} }
/**
* @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist
*/
public Reference getSpecimenFirstRep() {
if (getSpecimen().isEmpty()) {
addSpecimen();
}
return getSpecimen().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrderItemComponent setSpecimen(List<Reference> theSpecimen) {
this.specimen = theSpecimen;
return this;
}
public boolean hasSpecimen() { public boolean hasSpecimen() {
if (this.specimen == null) if (this.specimen == null)
return false; return false;
@ -962,6 +1024,24 @@ public class DiagnosticOrder extends DomainResource {
return this.event; return this.event;
} }
/**
* @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
*/
public DiagnosticOrderEventComponent getEventFirstRep() {
if (getEvent().isEmpty()) {
addEvent();
}
return getEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrderItemComponent setEvent(List<DiagnosticOrderEventComponent> theEvent) {
this.event = theEvent;
return this;
}
public boolean hasEvent() { public boolean hasEvent() {
if (this.event == null) if (this.event == null)
return false; return false;
@ -1002,6 +1082,42 @@ public class DiagnosticOrder extends DomainResource {
childrenList.add(new Property("event", "@DiagnosticOrder.event", "A summary of the events of interest that have occurred as this item of the request is processed.", 0, java.lang.Integer.MAX_VALUE, event)); childrenList.add(new Property("event", "@DiagnosticOrder.event", "A summary of the events of interest that have occurred as this item of the request is processed.", 0, java.lang.Integer.MAX_VALUE, event));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus>
case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // DiagnosticOrderEventComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case -2132868344: // specimen
this.getSpecimen().add(castToReference(value)); // Reference
break;
case 1702620169: // bodySite
this.bodySite = castToCodeableConcept(value); // CodeableConcept
break;
case -892481550: // status
this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus>
break;
case 96891546: // event
this.getEvent().add((DiagnosticOrderEventComponent) value); // DiagnosticOrderEventComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -1018,6 +1134,19 @@ public class DiagnosticOrder extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: return getCode(); // CodeableConcept
case -2132868344: return addSpecimen(); // Reference
case 1702620169: return getBodySite(); // CodeableConcept
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus>
case 96891546: return addEvent(); // DiagnosticOrderEventComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -1082,8 +1211,8 @@ public class DiagnosticOrder extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, specimen, bodySite, status return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, specimen, bodySite, status
, event); , event);
} }
public String fhirType() { public String fhirType() {
@ -1228,6 +1357,24 @@ public class DiagnosticOrder extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1493,6 +1640,24 @@ public class DiagnosticOrder extends DomainResource {
return this.reason; return this.reason;
} }
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setReason(List<CodeableConcept> theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() { public boolean hasReason() {
if (this.reason == null) if (this.reason == null)
return false; return false;
@ -1533,6 +1698,24 @@ public class DiagnosticOrder extends DomainResource {
return this.supportingInformation; return this.supportingInformation;
} }
/**
* @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist
*/
public Reference getSupportingInformationFirstRep() {
if (getSupportingInformation().isEmpty()) {
addSupportingInformation();
}
return getSupportingInformation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setSupportingInformation(List<Reference> theSupportingInformation) {
this.supportingInformation = theSupportingInformation;
return this;
}
public boolean hasSupportingInformation() { public boolean hasSupportingInformation() {
if (this.supportingInformation == null) if (this.supportingInformation == null)
return false; return false;
@ -1582,6 +1765,24 @@ public class DiagnosticOrder extends DomainResource {
return this.specimen; return this.specimen;
} }
/**
* @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist
*/
public Reference getSpecimenFirstRep() {
if (getSpecimen().isEmpty()) {
addSpecimen();
}
return getSpecimen().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setSpecimen(List<Reference> theSpecimen) {
this.specimen = theSpecimen;
return this;
}
public boolean hasSpecimen() { public boolean hasSpecimen() {
if (this.specimen == null) if (this.specimen == null)
return false; return false;
@ -1643,6 +1844,24 @@ public class DiagnosticOrder extends DomainResource {
return this.event; return this.event;
} }
/**
* @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
*/
public DiagnosticOrderEventComponent getEventFirstRep() {
if (getEvent().isEmpty()) {
addEvent();
}
return getEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setEvent(List<DiagnosticOrderEventComponent> theEvent) {
this.event = theEvent;
return this;
}
public boolean hasEvent() { public boolean hasEvent() {
if (this.event == null) if (this.event == null)
return false; return false;
@ -1683,6 +1902,24 @@ public class DiagnosticOrder extends DomainResource {
return this.item; return this.item;
} }
/**
* @return The first repetition of repeating field {@link #item}, creating it if it does not already exist
*/
public DiagnosticOrderItemComponent getItemFirstRep() {
if (getItem().isEmpty()) {
addItem();
}
return getItem().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setItem(List<DiagnosticOrderItemComponent> theItem) {
this.item = theItem;
return this;
}
public boolean hasItem() { public boolean hasItem() {
if (this.item == null) if (this.item == null)
return false; return false;
@ -1723,6 +1960,24 @@ public class DiagnosticOrder extends DomainResource {
return this.note; return this.note;
} }
/**
* @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
*/
public Annotation getNoteFirstRep() {
if (getNote().isEmpty()) {
addNote();
}
return getNote().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticOrder setNote(List<Annotation> theNote) {
this.note = theNote;
return this;
}
public boolean hasNote() { public boolean hasNote() {
if (this.note == null) if (this.note == null)
return false; return false;
@ -1770,6 +2025,70 @@ public class DiagnosticOrder extends DomainResource {
childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\").", 0, java.lang.Integer.MAX_VALUE, note)); childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\").", 0, java.lang.Integer.MAX_VALUE, note));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus>
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<DiagnosticOrderPriority>
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case -1207109509: /*orderer*/ return this.orderer == null ? new Base[0] : new Base[] {this.orderer}; // Reference
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference
case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // DiagnosticOrderEventComponent
case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // DiagnosticOrderItemComponent
case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus>
break;
case -1165461084: // priority
this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration<DiagnosticOrderPriority>
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case -1207109509: // orderer
this.orderer = castToReference(value); // Reference
break;
case -934964668: // reason
this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1248768647: // supportingInformation
this.getSupportingInformation().add(castToReference(value)); // Reference
break;
case -2132868344: // specimen
this.getSpecimen().add(castToReference(value)); // Reference
break;
case 96891546: // event
this.getEvent().add((DiagnosticOrderEventComponent) value); // DiagnosticOrderEventComponent
break;
case 3242771: // item
this.getItem().add((DiagnosticOrderItemComponent) value); // DiagnosticOrderItemComponent
break;
case 3387378: // note
this.getNote().add(castToAnnotation(value)); // Annotation
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1800,6 +2119,26 @@ public class DiagnosticOrder extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus>
case -1165461084: throw new FHIRException("Cannot make property priority as it is not a complex type"); // Enumeration<DiagnosticOrderPriority>
case -1867885268: return getSubject(); // Reference
case 1524132147: return getEncounter(); // Reference
case -1207109509: return getOrderer(); // Reference
case -934964668: return addReason(); // CodeableConcept
case -1248768647: return addSupportingInformation(); // Reference
case -2132868344: return addSpecimen(); // Reference
case 96891546: return addEvent(); // DiagnosticOrderEventComponent
case 3242771: return addItem(); // DiagnosticOrderItemComponent
case 3387378: return addNote(); // Annotation
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1925,9 +2264,8 @@ public class DiagnosticOrder extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, priority return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, priority, subject
, subject, encounter, orderer, reason, supportingInformation, specimen, event, item , encounter, orderer, reason, supportingInformation, specimen, event, item, note);
, note);
} }
@Override @Override
@ -1943,7 +2281,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.item.event.status</b><br> * Path: <b>DiagnosticOrder.item.event.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token", target={} )
public static final String SP_ITEM_PAST_STATUS = "item-past-status"; public static final String SP_ITEM_PAST_STATUS = "item-past-status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>item-past-status</b> * <b>Fluent Client</b> search parameter constant for <b>item-past-status</b>
@ -1963,7 +2303,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.identifier</b><br> * Path: <b>DiagnosticOrder.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1983,7 +2325,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.item.bodySite</b><br> * Path: <b>DiagnosticOrder.item.bodySite</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="Location of requested test (if applicable)", type="token" ) // []
// []
@SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="Location of requested test (if applicable)", type="token", target={} )
public static final String SP_BODYSITE = "bodysite"; public static final String SP_BODYSITE = "bodysite";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>bodysite</b> * <b>Fluent Client</b> search parameter constant for <b>bodysite</b>
@ -2003,7 +2347,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.item.code</b><br> * Path: <b>DiagnosticOrder.item.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -2023,7 +2369,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.event.dateTime</b><br> * Path: <b>DiagnosticOrder.event.dateTime</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) // []
// []
@SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date", target={} )
public static final String SP_EVENT_DATE = "event-date"; public static final String SP_EVENT_DATE = "event-date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>event-date</b> * <b>Fluent Client</b> search parameter constant for <b>event-date</b>
@ -2043,7 +2391,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b></b><br> * Path: <b></b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite", compositeOf={"event-status", "event-date"} ) // []
// []
@SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite", compositeOf={"event-status", "event-date"}, target={} )
public static final String SP_EVENT_STATUS_DATE = "event-status-date"; public static final String SP_EVENT_STATUS_DATE = "event-status-date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>event-status-date</b> * <b>Fluent Client</b> search parameter constant for <b>event-status-date</b>
@ -2063,7 +2413,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.subject</b><br> * Path: <b>DiagnosticOrder.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Group, Device, Patient, Location]
// [Group, Device, Patient, Location]
@SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference", target={Group.class, Device.class, Patient.class, Location.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -2089,7 +2441,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.encounter</b><br> * Path: <b>DiagnosticOrder.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -2115,7 +2469,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.event.actor, DiagnosticOrder.item.event.actor</b><br> * Path: <b>DiagnosticOrder.event.actor, DiagnosticOrder.item.event.actor</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Device]
// [Practitioner, Device]
@SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference", target={Practitioner.class, Device.class} )
public static final String SP_ACTOR = "actor"; public static final String SP_ACTOR = "actor";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>actor</b> * <b>Fluent Client</b> search parameter constant for <b>actor</b>
@ -2141,7 +2497,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.item.event.dateTime</b><br> * Path: <b>DiagnosticOrder.item.event.dateTime</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) // []
// []
@SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date", target={} )
public static final String SP_ITEM_DATE = "item-date"; public static final String SP_ITEM_DATE = "item-date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>item-date</b> * <b>Fluent Client</b> search parameter constant for <b>item-date</b>
@ -2161,7 +2519,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b></b><br> * Path: <b></b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite", compositeOf={"item-past-status", "item-date"} ) // []
// []
@SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite", compositeOf={"item-past-status", "item-date"}, target={} )
public static final String SP_ITEM_STATUS_DATE = "item-status-date"; public static final String SP_ITEM_STATUS_DATE = "item-status-date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>item-status-date</b> * <b>Fluent Client</b> search parameter constant for <b>item-status-date</b>
@ -2181,7 +2541,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.event.status</b><br> * Path: <b>DiagnosticOrder.event.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token", target={} )
public static final String SP_EVENT_STATUS = "event-status"; public static final String SP_EVENT_STATUS = "event-status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>event-status</b> * <b>Fluent Client</b> search parameter constant for <b>event-status</b>
@ -2201,7 +2563,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.item.status</b><br> * Path: <b>DiagnosticOrder.item.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token", target={} )
public static final String SP_ITEM_STATUS = "item-status"; public static final String SP_ITEM_STATUS = "item-status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>item-status</b> * <b>Fluent Client</b> search parameter constant for <b>item-status</b>
@ -2221,7 +2585,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.subject</b><br> * Path: <b>DiagnosticOrder.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) // [Group, Device, Patient, Location]
// [Patient]
@SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference", target={Group.class, Device.class, Patient.class, Location.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -2247,7 +2613,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.orderer</b><br> * Path: <b>DiagnosticOrder.orderer</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner]
// [Practitioner]
@SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference", target={Practitioner.class} )
public static final String SP_ORDERER = "orderer"; public static final String SP_ORDERER = "orderer";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>orderer</b> * <b>Fluent Client</b> search parameter constant for <b>orderer</b>
@ -2273,7 +2641,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.specimen, DiagnosticOrder.item.specimen</b><br> * Path: <b>DiagnosticOrder.specimen, DiagnosticOrder.item.specimen</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen | DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) // [Specimen]
// [Specimen]
@SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen | DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference", target={Specimen.class} )
public static final String SP_SPECIMEN = "specimen"; public static final String SP_SPECIMEN = "specimen";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>specimen</b> * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
@ -2299,7 +2669,9 @@ public class DiagnosticOrder extends DomainResource {
* Path: <b>DiagnosticOrder.status</b><br> * Path: <b>DiagnosticOrder.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -351,6 +351,30 @@ public class DiagnosticReport extends DomainResource {
childrenList.add(new Property("link", "Reference(Media)", "Reference to the image source.", 0, java.lang.Integer.MAX_VALUE, link)); childrenList.add(new Property("link", "Reference(Media)", "Reference to the image source.", 0, java.lang.Integer.MAX_VALUE, link));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
case 3321850: /*link*/ return this.link == null ? new Base[0] : new Base[] {this.link}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 950398559: // comment
this.comment = castToString(value); // StringType
break;
case 3321850: // link
this.link = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("comment")) if (name.equals("comment"))
@ -361,6 +385,16 @@ public class DiagnosticReport extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 950398559: throw new FHIRException("Cannot make property comment as it is not a complex type"); // StringType
case 3321850: return getLink(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("comment")) { if (name.equals("comment")) {
@ -403,7 +437,7 @@ public class DiagnosticReport extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( comment, link); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(comment, link);
} }
public String fhirType() { public String fhirType() {
@ -598,6 +632,24 @@ public class DiagnosticReport extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -943,6 +995,24 @@ public class DiagnosticReport extends DomainResource {
return this.request; return this.request;
} }
/**
* @return The first repetition of repeating field {@link #request}, creating it if it does not already exist
*/
public Reference getRequestFirstRep() {
if (getRequest().isEmpty()) {
addRequest();
}
return getRequest().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setRequest(List<Reference> theRequest) {
this.request = theRequest;
return this;
}
public boolean hasRequest() { public boolean hasRequest() {
if (this.request == null) if (this.request == null)
return false; return false;
@ -992,6 +1062,24 @@ public class DiagnosticReport extends DomainResource {
return this.specimen; return this.specimen;
} }
/**
* @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist
*/
public Reference getSpecimenFirstRep() {
if (getSpecimen().isEmpty()) {
addSpecimen();
}
return getSpecimen().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setSpecimen(List<Reference> theSpecimen) {
this.specimen = theSpecimen;
return this;
}
public boolean hasSpecimen() { public boolean hasSpecimen() {
if (this.specimen == null) if (this.specimen == null)
return false; return false;
@ -1053,6 +1141,24 @@ public class DiagnosticReport extends DomainResource {
return this.result; return this.result;
} }
/**
* @return The first repetition of repeating field {@link #result}, creating it if it does not already exist
*/
public Reference getResultFirstRep() {
if (getResult().isEmpty()) {
addResult();
}
return getResult().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setResult(List<Reference> theResult) {
this.result = theResult;
return this;
}
public boolean hasResult() { public boolean hasResult() {
if (this.result == null) if (this.result == null)
return false; return false;
@ -1114,6 +1220,24 @@ public class DiagnosticReport extends DomainResource {
return this.imagingStudy; return this.imagingStudy;
} }
/**
* @return The first repetition of repeating field {@link #imagingStudy}, creating it if it does not already exist
*/
public Reference getImagingStudyFirstRep() {
if (getImagingStudy().isEmpty()) {
addImagingStudy();
}
return getImagingStudy().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setImagingStudy(List<Reference> theImagingStudy) {
this.imagingStudy = theImagingStudy;
return this;
}
public boolean hasImagingStudy() { public boolean hasImagingStudy() {
if (this.imagingStudy == null) if (this.imagingStudy == null)
return false; return false;
@ -1163,6 +1287,24 @@ public class DiagnosticReport extends DomainResource {
return this.image; return this.image;
} }
/**
* @return The first repetition of repeating field {@link #image}, creating it if it does not already exist
*/
public DiagnosticReportImageComponent getImageFirstRep() {
if (getImage().isEmpty()) {
addImage();
}
return getImage().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setImage(List<DiagnosticReportImageComponent> theImage) {
this.image = theImage;
return this;
}
public boolean hasImage() { public boolean hasImage() {
if (this.image == null) if (this.image == null)
return false; return false;
@ -1252,6 +1394,24 @@ public class DiagnosticReport extends DomainResource {
return this.codedDiagnosis; return this.codedDiagnosis;
} }
/**
* @return The first repetition of repeating field {@link #codedDiagnosis}, creating it if it does not already exist
*/
public CodeableConcept getCodedDiagnosisFirstRep() {
if (getCodedDiagnosis().isEmpty()) {
addCodedDiagnosis();
}
return getCodedDiagnosis().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setCodedDiagnosis(List<CodeableConcept> theCodedDiagnosis) {
this.codedDiagnosis = theCodedDiagnosis;
return this;
}
public boolean hasCodedDiagnosis() { public boolean hasCodedDiagnosis() {
if (this.codedDiagnosis == null) if (this.codedDiagnosis == null)
return false; return false;
@ -1292,6 +1452,24 @@ public class DiagnosticReport extends DomainResource {
return this.presentedForm; return this.presentedForm;
} }
/**
* @return The first repetition of repeating field {@link #presentedForm}, creating it if it does not already exist
*/
public Attachment getPresentedFormFirstRep() {
if (getPresentedForm().isEmpty()) {
addPresentedForm();
}
return getPresentedForm().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DiagnosticReport setPresentedForm(List<Attachment> thePresentedForm) {
this.presentedForm = thePresentedForm;
return this;
}
public boolean hasPresentedForm() { public boolean hasPresentedForm() {
if (this.presentedForm == null) if (this.presentedForm == null)
return false; return false;
@ -1344,6 +1522,90 @@ public class DiagnosticReport extends DomainResource {
childrenList.add(new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm)); childrenList.add(new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticReportStatus>
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Type
case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // InstantType
case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference
case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
case -934426595: /*result*/ return this.result == null ? new Base[0] : this.result.toArray(new Base[this.result.size()]); // Reference
case -814900911: /*imagingStudy*/ return this.imagingStudy == null ? new Base[0] : this.imagingStudy.toArray(new Base[this.imagingStudy.size()]); // Reference
case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // DiagnosticReportImageComponent
case -1731259873: /*conclusion*/ return this.conclusion == null ? new Base[0] : new Base[] {this.conclusion}; // StringType
case -1364269926: /*codedDiagnosis*/ return this.codedDiagnosis == null ? new Base[0] : this.codedDiagnosis.toArray(new Base[this.codedDiagnosis.size()]); // CodeableConcept
case 230090366: /*presentedForm*/ return this.presentedForm == null ? new Base[0] : this.presentedForm.toArray(new Base[this.presentedForm.size()]); // Attachment
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new DiagnosticReportStatusEnumFactory().fromType(value); // Enumeration<DiagnosticReportStatus>
break;
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case -1468651097: // effective
this.effective = (Type) value; // Type
break;
case -1179159893: // issued
this.issued = castToInstant(value); // InstantType
break;
case 481140686: // performer
this.performer = castToReference(value); // Reference
break;
case 1095692943: // request
this.getRequest().add(castToReference(value)); // Reference
break;
case -2132868344: // specimen
this.getSpecimen().add(castToReference(value)); // Reference
break;
case -934426595: // result
this.getResult().add(castToReference(value)); // Reference
break;
case -814900911: // imagingStudy
this.getImagingStudy().add(castToReference(value)); // Reference
break;
case 100313435: // image
this.getImage().add((DiagnosticReportImageComponent) value); // DiagnosticReportImageComponent
break;
case -1731259873: // conclusion
this.conclusion = castToString(value); // StringType
break;
case -1364269926: // codedDiagnosis
this.getCodedDiagnosis().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 230090366: // presentedForm
this.getPresentedForm().add(castToAttachment(value)); // Attachment
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1384,6 +1646,31 @@ public class DiagnosticReport extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticReportStatus>
case 50511102: return getCategory(); // CodeableConcept
case 3059181: return getCode(); // CodeableConcept
case -1867885268: return getSubject(); // Reference
case 1524132147: return getEncounter(); // Reference
case 247104889: return getEffective(); // Type
case -1179159893: throw new FHIRException("Cannot make property issued as it is not a complex type"); // InstantType
case 481140686: return getPerformer(); // Reference
case 1095692943: return addRequest(); // Reference
case -2132868344: return addSpecimen(); // Reference
case -934426595: return addResult(); // Reference
case -814900911: return addImagingStudy(); // Reference
case 100313435: return addImage(); // DiagnosticReportImageComponent
case -1731259873: throw new FHIRException("Cannot make property conclusion as it is not a complex type"); // StringType
case -1364269926: return addCodedDiagnosis(); // CodeableConcept
case 230090366: return addPresentedForm(); // Attachment
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1543,9 +1830,9 @@ public class DiagnosticReport extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, category return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, category, code
, code, subject, encounter, effective, issued, performer, request, specimen, result , subject, encounter, effective, issued, performer, request, specimen, result, imagingStudy
, imagingStudy, image, conclusion, codedDiagnosis, presentedForm); , image, conclusion, codedDiagnosis, presentedForm);
} }
@Override @Override
@ -1561,7 +1848,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.effective[x]</b><br> * Path: <b>DiagnosticReport.effective[x]</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="DiagnosticReport.effective[x]", description="The clinically relevant time of the report", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="DiagnosticReport.effective", description="The clinically relevant time of the report", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1581,7 +1870,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.identifier</b><br> * Path: <b>DiagnosticReport.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1601,7 +1892,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.image.link</b><br> * Path: <b>DiagnosticReport.image.link</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference" ) // [Media]
// [Media]
@SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference", target={Media.class} )
public static final String SP_IMAGE = "image"; public static final String SP_IMAGE = "image";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>image</b> * <b>Fluent Client</b> search parameter constant for <b>image</b>
@ -1627,7 +1920,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.request</b><br> * Path: <b>DiagnosticReport.request</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="request", path="DiagnosticReport.request", description="Reference to the test or procedure request.", type="reference" ) // [ReferralRequest, DiagnosticOrder, ProcedureRequest]
// [ReferralRequest, DiagnosticOrder, ProcedureRequest]
@SearchParamDefinition(name="request", path="DiagnosticReport.request", description="Reference to the test or procedure request.", type="reference", target={ReferralRequest.class, DiagnosticOrder.class, ProcedureRequest.class} )
public static final String SP_REQUEST = "request"; public static final String SP_REQUEST = "request";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>request</b> * <b>Fluent Client</b> search parameter constant for <b>request</b>
@ -1653,7 +1948,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.performer</b><br> * Path: <b>DiagnosticReport.performer</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization]
// [Practitioner, Organization]
@SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference", target={Practitioner.class, Organization.class} )
public static final String SP_PERFORMER = "performer"; public static final String SP_PERFORMER = "performer";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>performer</b> * <b>Fluent Client</b> search parameter constant for <b>performer</b>
@ -1679,7 +1976,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.code</b><br> * Path: <b>DiagnosticReport.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="code", path="DiagnosticReport.code", description="The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result", type="token" ) // []
// []
@SearchParamDefinition(name="code", path="DiagnosticReport.code", description="The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result", type="token", target={} )
public static final String SP_CODE = "code"; public static final String SP_CODE = "code";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>code</b> * <b>Fluent Client</b> search parameter constant for <b>code</b>
@ -1699,7 +1998,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.subject</b><br> * Path: <b>DiagnosticReport.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Group, Device, Patient, Location]
// [Group, Device, Patient, Location]
@SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference", target={Group.class, Device.class, Patient.class, Location.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -1725,7 +2026,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.codedDiagnosis</b><br> * Path: <b>DiagnosticReport.codedDiagnosis</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token" ) // []
// []
@SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token", target={} )
public static final String SP_DIAGNOSIS = "diagnosis"; public static final String SP_DIAGNOSIS = "diagnosis";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>diagnosis</b> * <b>Fluent Client</b> search parameter constant for <b>diagnosis</b>
@ -1745,7 +2048,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.encounter</b><br> * Path: <b>DiagnosticReport.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -1771,7 +2076,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.result</b><br> * Path: <b>DiagnosticReport.result</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" ) // [Observation]
// [Observation]
@SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference", target={Observation.class} )
public static final String SP_RESULT = "result"; public static final String SP_RESULT = "result";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>result</b> * <b>Fluent Client</b> search parameter constant for <b>result</b>
@ -1797,7 +2104,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.subject</b><br> * Path: <b>DiagnosticReport.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" ) // [Group, Device, Patient, Location]
// [Patient]
@SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference", target={Group.class, Device.class, Patient.class, Location.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1823,7 +2132,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.specimen</b><br> * Path: <b>DiagnosticReport.specimen</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference" ) // [Specimen]
// [Specimen]
@SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference", target={Specimen.class} )
public static final String SP_SPECIMEN = "specimen"; public static final String SP_SPECIMEN = "specimen";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>specimen</b> * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
@ -1849,7 +2160,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.issued</b><br> * Path: <b>DiagnosticReport.issued</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) // []
// []
@SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date", target={} )
public static final String SP_ISSUED = "issued"; public static final String SP_ISSUED = "issued";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>issued</b> * <b>Fluent Client</b> search parameter constant for <b>issued</b>
@ -1869,7 +2182,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.category</b><br> * Path: <b>DiagnosticReport.category</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token" ) // []
// []
@SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token", target={} )
public static final String SP_CATEGORY = "category"; public static final String SP_CATEGORY = "category";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>category</b> * <b>Fluent Client</b> search parameter constant for <b>category</b>
@ -1889,7 +2204,9 @@ public class DiagnosticReport extends DomainResource {
* Path: <b>DiagnosticReport.status</b><br> * Path: <b>DiagnosticReport.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

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

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -53,7 +53,7 @@ public class DocumentManifest extends DomainResource {
/** /**
* The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed. * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.
*/ */
@Child(name = "p", type = {Attachment.class, ValueSet.class}, order=1, min=1, max=1, modifier=false, summary=true) @Child(name = "p", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." ) @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." )
protected Type p; protected Type p;
@ -124,6 +124,26 @@ public class DocumentManifest extends DomainResource {
childrenList.add(new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, java.lang.Integer.MAX_VALUE, p)); childrenList.add(new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, java.lang.Integer.MAX_VALUE, p));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 112: /*p*/ return this.p == null ? new Base[0] : new Base[] {this.p}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 112: // p
this.p = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("p[x]")) if (name.equals("p[x]"))
@ -132,6 +152,15 @@ public class DocumentManifest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3427856: return getP(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("pAttachment")) { if (name.equals("pAttachment")) {
@ -174,7 +203,7 @@ public class DocumentManifest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( p); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(p);
} }
public String fhirType() { public String fhirType() {
@ -283,6 +312,30 @@ public class DocumentManifest extends DomainResource {
childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.", 0, java.lang.Integer.MAX_VALUE, ref)); childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.", 0, java.lang.Integer.MAX_VALUE, ref));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 112787: /*ref*/ return this.ref == null ? new Base[0] : new Base[] {this.ref}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 112787: // ref
this.ref = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -293,6 +346,16 @@ public class DocumentManifest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return getIdentifier(); // Identifier
case 112787: return getRef(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -336,7 +399,7 @@ public class DocumentManifest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ref); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref);
} }
public String fhirType() { public String fhirType() {
@ -495,6 +558,24 @@ public class DocumentManifest extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentManifest setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -574,6 +655,24 @@ public class DocumentManifest extends DomainResource {
return this.recipient; return this.recipient;
} }
/**
* @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist
*/
public Reference getRecipientFirstRep() {
if (getRecipient().isEmpty()) {
addRecipient();
}
return getRecipient().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentManifest setRecipient(List<Reference> theRecipient) {
this.recipient = theRecipient;
return this;
}
public boolean hasRecipient() { public boolean hasRecipient() {
if (this.recipient == null) if (this.recipient == null)
return false; return false;
@ -647,6 +746,24 @@ public class DocumentManifest extends DomainResource {
return this.author; return this.author;
} }
/**
* @return The first repetition of repeating field {@link #author}, creating it if it does not already exist
*/
public Reference getAuthorFirstRep() {
if (getAuthor().isEmpty()) {
addAuthor();
}
return getAuthor().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentManifest setAuthor(List<Reference> theAuthor) {
this.author = theAuthor;
return this;
}
public boolean hasAuthor() { public boolean hasAuthor() {
if (this.author == null) if (this.author == null)
return false; return false;
@ -888,6 +1005,24 @@ public class DocumentManifest extends DomainResource {
return this.content; return this.content;
} }
/**
* @return The first repetition of repeating field {@link #content}, creating it if it does not already exist
*/
public DocumentManifestContentComponent getContentFirstRep() {
if (getContent().isEmpty()) {
addContent();
}
return getContent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentManifest setContent(List<DocumentManifestContentComponent> theContent) {
this.content = theContent;
return this;
}
public boolean hasContent() { public boolean hasContent() {
if (this.content == null) if (this.content == null)
return false; return false;
@ -928,6 +1063,24 @@ public class DocumentManifest extends DomainResource {
return this.related; return this.related;
} }
/**
* @return The first repetition of repeating field {@link #related}, creating it if it does not already exist
*/
public DocumentManifestRelatedComponent getRelatedFirstRep() {
if (getRelated().isEmpty()) {
addRelated();
}
return getRelated().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentManifest setRelated(List<DocumentManifestRelatedComponent> theRelated) {
this.related = theRelated;
return this;
}
public boolean hasRelated() { public boolean hasRelated() {
if (this.related == null) if (this.related == null)
return false; return false;
@ -975,6 +1128,70 @@ public class DocumentManifest extends DomainResource {
childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related)); childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 243769515: /*masterIdentifier*/ return this.masterIdentifier == null ? new Base[0] : new Base[] {this.masterIdentifier}; // Identifier
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DocumentReferenceStatus>
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // DocumentManifestContentComponent
case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // DocumentManifestRelatedComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 243769515: // masterIdentifier
this.masterIdentifier = castToIdentifier(value); // Identifier
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 820081177: // recipient
this.getRecipient().add(castToReference(value)); // Reference
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case -1406328437: // author
this.getAuthor().add(castToReference(value)); // Reference
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case -896505829: // source
this.source = castToUri(value); // UriType
break;
case -892481550: // status
this.status = new DocumentReferenceStatusEnumFactory().fromType(value); // Enumeration<DocumentReferenceStatus>
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case 951530617: // content
this.getContent().add((DocumentManifestContentComponent) value); // DocumentManifestContentComponent
break;
case 1090493483: // related
this.getRelated().add((DocumentManifestRelatedComponent) value); // DocumentManifestRelatedComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("masterIdentifier")) if (name.equals("masterIdentifier"))
@ -1005,6 +1222,26 @@ public class DocumentManifest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 243769515: return getMasterIdentifier(); // Identifier
case -1618432855: return addIdentifier(); // Identifier
case -1867885268: return getSubject(); // Reference
case 820081177: return addRecipient(); // Reference
case 3575610: return getType(); // CodeableConcept
case -1406328437: return addAuthor(); // Reference
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case -896505829: throw new FHIRException("Cannot make property source as it is not a complex type"); // UriType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DocumentReferenceStatus>
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case 951530617: return addContent(); // DocumentManifestContentComponent
case 1090493483: return addRelated(); // DocumentManifestRelatedComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("masterIdentifier")) { if (name.equals("masterIdentifier")) {
@ -1123,8 +1360,8 @@ public class DocumentManifest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( masterIdentifier, identifier, subject return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier, subject
, recipient, type, author, created, source, status, description, content, related); , recipient, type, author, created, source, status, description, content, related);
} }
@Override @Override
@ -1140,7 +1377,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br> * Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1160,7 +1399,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.related.identifier</b><br> * Path: <b>DocumentManifest.related.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" ) // []
// []
@SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token", target={} )
public static final String SP_RELATED_ID = "related-id"; public static final String SP_RELATED_ID = "related-id";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>related-id</b> * <b>Fluent Client</b> search parameter constant for <b>related-id</b>
@ -1180,7 +1421,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.content.pReference</b><br> * Path: <b>DocumentManifest.content.pReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="content-ref", path="DocumentManifest.content.pReference", description="Contents of this set of documents", type="reference" ) // [Any]
// [Any]
@SearchParamDefinition(name="content-ref", path="DocumentManifest.content.p.as(Reference)", description="Contents of this set of documents", type="reference" )
public static final String SP_CONTENT_REF = "content-ref"; public static final String SP_CONTENT_REF = "content-ref";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>content-ref</b> * <b>Fluent Client</b> search parameter constant for <b>content-ref</b>
@ -1206,7 +1449,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.subject</b><br> * Path: <b>DocumentManifest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Group, Device, Patient]
// [Practitioner, Group, Device, Patient]
@SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", target={Practitioner.class, Group.class, Device.class, Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -1232,7 +1477,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.author</b><br> * Path: <b>DocumentManifest.author</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_AUTHOR = "author"; public static final String SP_AUTHOR = "author";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>author</b> * <b>Fluent Client</b> search parameter constant for <b>author</b>
@ -1258,7 +1505,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.created</b><br> * Path: <b>DocumentManifest.created</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" ) // []
// []
@SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date", target={} )
public static final String SP_CREATED = "created"; public static final String SP_CREATED = "created";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>created</b> * <b>Fluent Client</b> search parameter constant for <b>created</b>
@ -1278,7 +1527,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.description</b><br> * Path: <b>DocumentManifest.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -1298,7 +1549,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.source</b><br> * Path: <b>DocumentManifest.source</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" ) // []
// []
@SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri", target={} )
public static final String SP_SOURCE = "source"; public static final String SP_SOURCE = "source";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>source</b> * <b>Fluent Client</b> search parameter constant for <b>source</b>
@ -1318,7 +1571,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.type</b><br> * Path: <b>DocumentManifest.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -1338,6 +1593,8 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.related.ref</b><br> * Path: <b>DocumentManifest.related.ref</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" ) @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATED_REF = "related-ref"; public static final String SP_RELATED_REF = "related-ref";
/** /**
@ -1364,7 +1621,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.subject</b><br> * Path: <b>DocumentManifest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) // [Practitioner, Group, Device, Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", target={Practitioner.class, Group.class, Device.class, Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1390,7 +1649,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.recipient</b><br> * Path: <b>DocumentManifest.recipient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization, Patient, RelatedPerson]
// [Practitioner, Organization, Patient, RelatedPerson]
@SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", target={Practitioner.class, Organization.class, Patient.class, RelatedPerson.class} )
public static final String SP_RECIPIENT = "recipient"; public static final String SP_RECIPIENT = "recipient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>recipient</b> * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
@ -1416,7 +1677,9 @@ public class DocumentManifest extends DomainResource {
* Path: <b>DocumentManifest.status</b><br> * Path: <b>DocumentManifest.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -301,6 +301,30 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("target", "Reference(DocumentReference)", "The target document of this relationship.", 0, java.lang.Integer.MAX_VALUE, target)); childrenList.add(new Property("target", "Reference(DocumentReference)", "The target document of this relationship.", 0, java.lang.Integer.MAX_VALUE, target));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<DocumentRelationshipType>
case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = new DocumentRelationshipTypeEnumFactory().fromType(value); // Enumeration<DocumentRelationshipType>
break;
case -880905839: // target
this.target = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -311,6 +335,16 @@ public class DocumentReference extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // Enumeration<DocumentRelationshipType>
case -880905839: return getTarget(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -353,7 +387,7 @@ public class DocumentReference extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, target); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, target);
} }
public String fhirType() { public String fhirType() {
@ -429,6 +463,24 @@ public class DocumentReference extends DomainResource {
return this.format; return this.format;
} }
/**
* @return The first repetition of repeating field {@link #format}, creating it if it does not already exist
*/
public Coding getFormatFirstRep() {
if (getFormat().isEmpty()) {
addFormat();
}
return getFormat().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReferenceContentComponent setFormat(List<Coding> theFormat) {
this.format = theFormat;
return this;
}
public boolean hasFormat() { public boolean hasFormat() {
if (this.format == null) if (this.format == null)
return false; return false;
@ -466,6 +518,30 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("format", "Coding", "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", 0, java.lang.Integer.MAX_VALUE, format)); childrenList.add(new Property("format", "Coding", "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", 0, java.lang.Integer.MAX_VALUE, format));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1963501277: /*attachment*/ return this.attachment == null ? new Base[0] : new Base[] {this.attachment}; // Attachment
case -1268779017: /*format*/ return this.format == null ? new Base[0] : this.format.toArray(new Base[this.format.size()]); // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1963501277: // attachment
this.attachment = castToAttachment(value); // Attachment
break;
case -1268779017: // format
this.getFormat().add(castToCoding(value)); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("attachment")) if (name.equals("attachment"))
@ -476,6 +552,16 @@ public class DocumentReference extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1963501277: return getAttachment(); // Attachment
case -1268779017: return addFormat(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("attachment")) { if (name.equals("attachment")) {
@ -522,7 +608,7 @@ public class DocumentReference extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( attachment, format); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(attachment, format);
} }
public String fhirType() { public String fhirType() {
@ -655,6 +741,24 @@ public class DocumentReference extends DomainResource {
return this.event; return this.event;
} }
/**
* @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
*/
public CodeableConcept getEventFirstRep() {
if (getEvent().isEmpty()) {
addEvent();
}
return getEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReferenceContextComponent setEvent(List<CodeableConcept> theEvent) {
this.event = theEvent;
return this;
}
public boolean hasEvent() { public boolean hasEvent() {
if (this.event == null) if (this.event == null)
return false; return false;
@ -811,6 +915,24 @@ public class DocumentReference extends DomainResource {
return this.related; return this.related;
} }
/**
* @return The first repetition of repeating field {@link #related}, creating it if it does not already exist
*/
public DocumentReferenceContextRelatedComponent getRelatedFirstRep() {
if (getRelated().isEmpty()) {
addRelated();
}
return getRelated().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReferenceContextComponent setRelated(List<DocumentReferenceContextRelatedComponent> theRelated) {
this.related = theRelated;
return this;
}
public boolean hasRelated() { public boolean hasRelated() {
if (this.related == null) if (this.related == null)
return false; return false;
@ -853,6 +975,50 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentReference.", 0, java.lang.Integer.MAX_VALUE, related)); childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentReference.", 0, java.lang.Integer.MAX_VALUE, related));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CodeableConcept
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case 370698365: /*facilityType*/ return this.facilityType == null ? new Base[0] : new Base[] {this.facilityType}; // CodeableConcept
case 331373717: /*practiceSetting*/ return this.practiceSetting == null ? new Base[0] : new Base[] {this.practiceSetting}; // CodeableConcept
case 2031381048: /*sourcePatientInfo*/ return this.sourcePatientInfo == null ? new Base[0] : new Base[] {this.sourcePatientInfo}; // Reference
case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // DocumentReferenceContextRelatedComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1524132147: // encounter
this.encounter = castToReference(value); // Reference
break;
case 96891546: // event
this.getEvent().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case 370698365: // facilityType
this.facilityType = castToCodeableConcept(value); // CodeableConcept
break;
case 331373717: // practiceSetting
this.practiceSetting = castToCodeableConcept(value); // CodeableConcept
break;
case 2031381048: // sourcePatientInfo
this.sourcePatientInfo = castToReference(value); // Reference
break;
case 1090493483: // related
this.getRelated().add((DocumentReferenceContextRelatedComponent) value); // DocumentReferenceContextRelatedComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("encounter")) if (name.equals("encounter"))
@ -873,6 +1039,21 @@ public class DocumentReference extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1524132147: return getEncounter(); // Reference
case 96891546: return addEvent(); // CodeableConcept
case -991726143: return getPeriod(); // Period
case 370698365: return getFacilityType(); // CodeableConcept
case 331373717: return getPracticeSetting(); // CodeableConcept
case 2031381048: return getSourcePatientInfo(); // Reference
case 1090493483: return addRelated(); // DocumentReferenceContextRelatedComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("encounter")) { if (name.equals("encounter")) {
@ -950,8 +1131,8 @@ public class DocumentReference extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( encounter, event, period, facilityType return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(encounter, event, period, facilityType
, practiceSetting, sourcePatientInfo, related); , practiceSetting, sourcePatientInfo, related);
} }
public String fhirType() { public String fhirType() {
@ -1060,6 +1241,30 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.", 0, java.lang.Integer.MAX_VALUE, ref)); childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.", 0, java.lang.Integer.MAX_VALUE, ref));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 112787: /*ref*/ return this.ref == null ? new Base[0] : new Base[] {this.ref}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 112787: // ref
this.ref = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1070,6 +1275,16 @@ public class DocumentReference extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return getIdentifier(); // Identifier
case 112787: return getRef(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1113,7 +1328,7 @@ public class DocumentReference extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ref); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref);
} }
public String fhirType() { public String fhirType() {
@ -1314,6 +1529,24 @@ public class DocumentReference extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReference setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1441,6 +1674,24 @@ public class DocumentReference extends DomainResource {
return this.author; return this.author;
} }
/**
* @return The first repetition of repeating field {@link #author}, creating it if it does not already exist
*/
public Reference getAuthorFirstRep() {
if (getAuthor().isEmpty()) {
addAuthor();
}
return getAuthor().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReference setAuthor(List<Reference> theAuthor) {
this.author = theAuthor;
return this;
}
public boolean hasAuthor() { public boolean hasAuthor() {
if (this.author == null) if (this.author == null)
return false; return false;
@ -1736,6 +1987,24 @@ public class DocumentReference extends DomainResource {
return this.relatesTo; return this.relatesTo;
} }
/**
* @return The first repetition of repeating field {@link #relatesTo}, creating it if it does not already exist
*/
public DocumentReferenceRelatesToComponent getRelatesToFirstRep() {
if (getRelatesTo().isEmpty()) {
addRelatesTo();
}
return getRelatesTo().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReference setRelatesTo(List<DocumentReferenceRelatesToComponent> theRelatesTo) {
this.relatesTo = theRelatesTo;
return this;
}
public boolean hasRelatesTo() { public boolean hasRelatesTo() {
if (this.relatesTo == null) if (this.relatesTo == null)
return false; return false;
@ -1825,6 +2094,24 @@ public class DocumentReference extends DomainResource {
return this.securityLabel; return this.securityLabel;
} }
/**
* @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist
*/
public CodeableConcept getSecurityLabelFirstRep() {
if (getSecurityLabel().isEmpty()) {
addSecurityLabel();
}
return getSecurityLabel().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReference setSecurityLabel(List<CodeableConcept> theSecurityLabel) {
this.securityLabel = theSecurityLabel;
return this;
}
public boolean hasSecurityLabel() { public boolean hasSecurityLabel() {
if (this.securityLabel == null) if (this.securityLabel == null)
return false; return false;
@ -1865,6 +2152,24 @@ public class DocumentReference extends DomainResource {
return this.content; return this.content;
} }
/**
* @return The first repetition of repeating field {@link #content}, creating it if it does not already exist
*/
public DocumentReferenceContentComponent getContentFirstRep() {
if (getContent().isEmpty()) {
addContent();
}
return getContent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DocumentReference setContent(List<DocumentReferenceContentComponent> theContent) {
this.content = theContent;
return this;
}
public boolean hasContent() { public boolean hasContent() {
if (this.content == null) if (this.content == null)
return false; return false;
@ -1941,6 +2246,90 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("context", "", "The clinical context in which the document was prepared.", 0, java.lang.Integer.MAX_VALUE, context)); childrenList.add(new Property("context", "", "The clinical context in which the document was prepared.", 0, java.lang.Integer.MAX_VALUE, context));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 243769515: /*masterIdentifier*/ return this.masterIdentifier == null ? new Base[0] : new Base[] {this.masterIdentifier}; // Identifier
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // CodeableConcept
case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference
case 1815000435: /*authenticator*/ return this.authenticator == null ? new Base[0] : new Base[] {this.authenticator}; // Reference
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case 1943292145: /*indexed*/ return this.indexed == null ? new Base[0] : new Base[] {this.indexed}; // InstantType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DocumentReferenceStatus>
case -23496886: /*docStatus*/ return this.docStatus == null ? new Base[0] : new Base[] {this.docStatus}; // CodeableConcept
case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // DocumentReferenceRelatesToComponent
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // CodeableConcept
case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // DocumentReferenceContentComponent
case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // DocumentReferenceContextComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 243769515: // masterIdentifier
this.masterIdentifier = castToIdentifier(value); // Identifier
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case 94742904: // class
this.class_ = castToCodeableConcept(value); // CodeableConcept
break;
case -1406328437: // author
this.getAuthor().add(castToReference(value)); // Reference
break;
case 1611297262: // custodian
this.custodian = castToReference(value); // Reference
break;
case 1815000435: // authenticator
this.authenticator = castToReference(value); // Reference
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case 1943292145: // indexed
this.indexed = castToInstant(value); // InstantType
break;
case -892481550: // status
this.status = new DocumentReferenceStatusEnumFactory().fromType(value); // Enumeration<DocumentReferenceStatus>
break;
case -23496886: // docStatus
this.docStatus = castToCodeableConcept(value); // CodeableConcept
break;
case -7765931: // relatesTo
this.getRelatesTo().add((DocumentReferenceRelatesToComponent) value); // DocumentReferenceRelatesToComponent
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -722296940: // securityLabel
this.getSecurityLabel().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 951530617: // content
this.getContent().add((DocumentReferenceContentComponent) value); // DocumentReferenceContentComponent
break;
case 951530927: // context
this.context = (DocumentReferenceContextComponent) value; // DocumentReferenceContextComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("masterIdentifier")) if (name.equals("masterIdentifier"))
@ -1981,6 +2370,31 @@ public class DocumentReference extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 243769515: return getMasterIdentifier(); // Identifier
case -1618432855: return addIdentifier(); // Identifier
case -1867885268: return getSubject(); // Reference
case 3575610: return getType(); // CodeableConcept
case 94742904: return getClass_(); // CodeableConcept
case -1406328437: return addAuthor(); // Reference
case 1611297262: return getCustodian(); // Reference
case 1815000435: return getAuthenticator(); // Reference
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case 1943292145: throw new FHIRException("Cannot make property indexed as it is not a complex type"); // InstantType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DocumentReferenceStatus>
case -23496886: return getDocStatus(); // CodeableConcept
case -7765931: return addRelatesTo(); // DocumentReferenceRelatesToComponent
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -722296940: return addSecurityLabel(); // CodeableConcept
case 951530617: return addContent(); // DocumentReferenceContentComponent
case 951530927: return getContext(); // DocumentReferenceContextComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("masterIdentifier")) { if (name.equals("masterIdentifier")) {
@ -2126,9 +2540,9 @@ public class DocumentReference extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( masterIdentifier, identifier, subject return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier, subject
, type, class_, author, custodian, authenticator, created, indexed, status, docStatus , type, class_, author, custodian, authenticator, created, indexed, status, docStatus, relatesTo
, relatesTo, description, securityLabel, content, context); , description, securityLabel, content, context);
} }
@Override @Override
@ -2144,7 +2558,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.securityLabel</b><br> * Path: <b>DocumentReference.securityLabel</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="securitylabel", path="DocumentReference.securityLabel", description="Document security-tags", type="token" ) // []
// []
@SearchParamDefinition(name="securitylabel", path="DocumentReference.securityLabel", description="Document security-tags", type="token", target={} )
public static final String SP_SECURITYLABEL = "securitylabel"; public static final String SP_SECURITYLABEL = "securitylabel";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>securitylabel</b> * <b>Fluent Client</b> search parameter constant for <b>securitylabel</b>
@ -2164,7 +2580,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.subject</b><br> * Path: <b>DocumentReference.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Group, Device, Patient]
// [Practitioner, Group, Device, Patient]
@SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference", target={Practitioner.class, Group.class, Device.class, Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -2190,7 +2608,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.description</b><br> * Path: <b>DocumentReference.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -2210,7 +2630,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.content.attachment.language</b><br> * Path: <b>DocumentReference.content.attachment.language</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="language", path="DocumentReference.content.attachment.language", description="Human language of the content (BCP-47)", type="token" ) // []
// []
@SearchParamDefinition(name="language", path="DocumentReference.content.attachment.language", description="Human language of the content (BCP-47)", type="token", target={} )
public static final String SP_LANGUAGE = "language"; public static final String SP_LANGUAGE = "language";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>language</b> * <b>Fluent Client</b> search parameter constant for <b>language</b>
@ -2230,7 +2652,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.type</b><br> * Path: <b>DocumentReference.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="DocumentReference.type", description="Kind of document (LOINC if possible)", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="DocumentReference.type", description="Kind of document (LOINC if possible)", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -2250,7 +2674,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.relatesTo.code</b><br> * Path: <b>DocumentReference.relatesTo.code</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" ) // []
// []
@SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token", target={} )
public static final String SP_RELATION = "relation"; public static final String SP_RELATION = "relation";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>relation</b> * <b>Fluent Client</b> search parameter constant for <b>relation</b>
@ -2270,7 +2696,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.practiceSetting</b><br> * Path: <b>DocumentReference.context.practiceSetting</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="setting", path="DocumentReference.context.practiceSetting", description="Additional details about where the content was created (e.g. clinical specialty)", type="token" ) // []
// []
@SearchParamDefinition(name="setting", path="DocumentReference.context.practiceSetting", description="Additional details about where the content was created (e.g. clinical specialty)", type="token", target={} )
public static final String SP_SETTING = "setting"; public static final String SP_SETTING = "setting";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>setting</b> * <b>Fluent Client</b> search parameter constant for <b>setting</b>
@ -2290,7 +2718,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.subject</b><br> * Path: <b>DocumentReference.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference" ) // [Practitioner, Group, Device, Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference", target={Practitioner.class, Group.class, Device.class, Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -2316,7 +2746,9 @@ public class DocumentReference extends DomainResource {
* Path: <b></b><br> * Path: <b></b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite", compositeOf={"relatesto", "relation"} ) // []
// []
@SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite", compositeOf={"relatesto", "relation"}, target={} )
public static final String SP_RELATIONSHIP = "relationship"; public static final String SP_RELATIONSHIP = "relationship";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>relationship</b> * <b>Fluent Client</b> search parameter constant for <b>relationship</b>
@ -2336,7 +2768,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.event</b><br> * Path: <b>DocumentReference.context.event</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token" ) // []
// []
@SearchParamDefinition(name="event", path="DocumentReference.context.event", description="Main Clinical Acts Documented", type="token", target={} )
public static final String SP_EVENT = "event"; public static final String SP_EVENT = "event";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>event</b> * <b>Fluent Client</b> search parameter constant for <b>event</b>
@ -2356,7 +2790,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.class</b><br> * Path: <b>DocumentReference.class</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="class", path="DocumentReference.class", description="Categorization of document", type="token" ) // []
// []
@SearchParamDefinition(name="class", path="DocumentReference.class", description="Categorization of document", type="token", target={} )
public static final String SP_CLASS = "class"; public static final String SP_CLASS = "class";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>class</b> * <b>Fluent Client</b> search parameter constant for <b>class</b>
@ -2376,7 +2812,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.authenticator</b><br> * Path: <b>DocumentReference.authenticator</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/what authenticated the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, Organization]
// [Practitioner, Organization]
@SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/what authenticated the document", type="reference", target={Practitioner.class, Organization.class} )
public static final String SP_AUTHENTICATOR = "authenticator"; public static final String SP_AUTHENTICATOR = "authenticator";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>authenticator</b> * <b>Fluent Client</b> search parameter constant for <b>authenticator</b>
@ -2402,7 +2840,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.masterIdentifier, DocumentReference.identifier</b><br> * Path: <b>DocumentReference.masterIdentifier, DocumentReference.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier | DocumentReference.identifier", description="Master Version Specific Identifier", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier | DocumentReference.identifier", description="Master Version Specific Identifier", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -2422,7 +2862,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.period</b><br> * Path: <b>DocumentReference.context.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date" ) // []
// []
@SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date", target={} )
public static final String SP_PERIOD = "period"; public static final String SP_PERIOD = "period";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>period</b> * <b>Fluent Client</b> search parameter constant for <b>period</b>
@ -2442,7 +2884,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.related.identifier</b><br> * Path: <b>DocumentReference.context.related.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="related-id", path="DocumentReference.context.related.identifier", description="Identifier of related objects or events", type="token" ) // []
// []
@SearchParamDefinition(name="related-id", path="DocumentReference.context.related.identifier", description="Identifier of related objects or events", type="token", target={} )
public static final String SP_RELATED_ID = "related-id"; public static final String SP_RELATED_ID = "related-id";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>related-id</b> * <b>Fluent Client</b> search parameter constant for <b>related-id</b>
@ -2462,7 +2906,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.custodian</b><br> * Path: <b>DocumentReference.custodian</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Organization which maintains the document", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Organization which maintains the document", type="reference", target={Organization.class} )
public static final String SP_CUSTODIAN = "custodian"; public static final String SP_CUSTODIAN = "custodian";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>custodian</b> * <b>Fluent Client</b> search parameter constant for <b>custodian</b>
@ -2488,7 +2934,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.indexed</b><br> * Path: <b>DocumentReference.indexed</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" ) // []
// []
@SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date", target={} )
public static final String SP_INDEXED = "indexed"; public static final String SP_INDEXED = "indexed";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>indexed</b> * <b>Fluent Client</b> search parameter constant for <b>indexed</b>
@ -2508,7 +2956,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.author</b><br> * Path: <b>DocumentReference.author</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, Organization, Device, Patient, RelatedPerson]
// [Practitioner, Organization, Device, Patient, RelatedPerson]
@SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference", target={Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class} )
public static final String SP_AUTHOR = "author"; public static final String SP_AUTHOR = "author";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>author</b> * <b>Fluent Client</b> search parameter constant for <b>author</b>
@ -2534,7 +2984,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.created</b><br> * Path: <b>DocumentReference.created</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="created", path="DocumentReference.created", description="Document creation time", type="date" ) // []
// []
@SearchParamDefinition(name="created", path="DocumentReference.created", description="Document creation time", type="date", target={} )
public static final String SP_CREATED = "created"; public static final String SP_CREATED = "created";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>created</b> * <b>Fluent Client</b> search parameter constant for <b>created</b>
@ -2554,7 +3006,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.content.format</b><br> * Path: <b>DocumentReference.content.format</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="format", path="DocumentReference.content.format", description="Format/content rules for the document", type="token" ) // []
// []
@SearchParamDefinition(name="format", path="DocumentReference.content.format", description="Format/content rules for the document", type="token", target={} )
public static final String SP_FORMAT = "format"; public static final String SP_FORMAT = "format";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>format</b> * <b>Fluent Client</b> search parameter constant for <b>format</b>
@ -2574,7 +3028,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.encounter</b><br> * Path: <b>DocumentReference.context.encounter</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="encounter", path="DocumentReference.context.encounter", description="Context of the document content", type="reference" ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="encounter", path="DocumentReference.context.encounter", description="Context of the document content", type="reference", target={Encounter.class} )
public static final String SP_ENCOUNTER = "encounter"; public static final String SP_ENCOUNTER = "encounter";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>encounter</b> * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
@ -2600,6 +3056,8 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.related.ref</b><br> * Path: <b>DocumentReference.context.related.ref</b><br>
* </p> * </p>
*/ */
// [Any]
// [Any]
@SearchParamDefinition(name="related-ref", path="DocumentReference.context.related.ref", description="Related Resource", type="reference" ) @SearchParamDefinition(name="related-ref", path="DocumentReference.context.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATED_REF = "related-ref"; public static final String SP_RELATED_REF = "related-ref";
/** /**
@ -2626,7 +3084,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.content.attachment.url</b><br> * Path: <b>DocumentReference.content.attachment.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location", path="DocumentReference.content.attachment.url", description="Uri where the data can be found", type="uri" ) // []
// []
@SearchParamDefinition(name="location", path="DocumentReference.content.attachment.url", description="Uri where the data can be found", type="uri", target={} )
public static final String SP_LOCATION = "location"; public static final String SP_LOCATION = "location";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location</b> * <b>Fluent Client</b> search parameter constant for <b>location</b>
@ -2646,7 +3106,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.relatesTo.target</b><br> * Path: <b>DocumentReference.relatesTo.target</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" ) // [DocumentReference]
// [DocumentReference]
@SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference", target={DocumentReference.class} )
public static final String SP_RELATESTO = "relatesto"; public static final String SP_RELATESTO = "relatesto";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>relatesto</b> * <b>Fluent Client</b> search parameter constant for <b>relatesto</b>
@ -2672,7 +3134,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.context.facilityType</b><br> * Path: <b>DocumentReference.context.facilityType</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token" ) // []
// []
@SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="Kind of facility where patient was seen", type="token", target={} )
public static final String SP_FACILITY = "facility"; public static final String SP_FACILITY = "facility";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>facility</b> * <b>Fluent Client</b> search parameter constant for <b>facility</b>
@ -2692,7 +3156,9 @@ public class DocumentReference extends DomainResource {
* Path: <b>DocumentReference.status</b><br> * Path: <b>DocumentReference.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superseded | entered-in-error", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="DocumentReference.status", description="current | superseded | entered-in-error", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -115,6 +115,14 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
return this.contained; return this.contained;
} }
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DomainResource setContained(List<Resource> theContained) {
this.contained = theContained;
return this;
}
public boolean hasContained() { public boolean hasContained() {
if (this.contained == null) if (this.contained == null)
return false; return false;
@ -146,6 +154,24 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
return this.extension; return this.extension;
} }
/**
* @return The first repetition of repeating field {@link #extension}, creating it if it does not already exist
*/
public Extension getExtensionFirstRep() {
if (getExtension().isEmpty()) {
addExtension();
}
return getExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DomainResource setExtension(List<Extension> theExtension) {
this.extension = theExtension;
return this;
}
public boolean hasExtension() { public boolean hasExtension() {
if (this.extension == null) if (this.extension == null)
return false; return false;
@ -186,6 +212,24 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
return this.modifierExtension; return this.modifierExtension;
} }
/**
* @return The first repetition of repeating field {@link #modifierExtension}, creating it if it does not already exist
*/
public Extension getModifierExtensionFirstRep() {
if (getModifierExtension().isEmpty()) {
addModifierExtension();
}
return getModifierExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DomainResource setModifierExtension(List<Extension> theModifierExtension) {
this.modifierExtension = theModifierExtension;
return this;
}
public boolean hasModifierExtension() { public boolean hasModifierExtension() {
if (this.modifierExtension == null) if (this.modifierExtension == null)
return false; return false;
@ -254,6 +298,38 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension)); childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // Narrative
case -410956685: /*contained*/ return this.contained == null ? new Base[0] : this.contained.toArray(new Base[this.contained.size()]); // Resource
case -612557761: /*extension*/ return this.extension == null ? new Base[0] : this.extension.toArray(new Base[this.extension.size()]); // Extension
case -298878168: /*modifierExtension*/ return this.modifierExtension == null ? new Base[0] : this.modifierExtension.toArray(new Base[this.modifierExtension.size()]); // Extension
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3556653: // text
this.text = castToNarrative(value); // Narrative
break;
case -410956685: // contained
this.getContained().add(castToResource(value)); // Resource
break;
case -612557761: // extension
this.getExtension().add(castToExtension(value)); // Extension
break;
case -298878168: // modifierExtension
this.getModifierExtension().add(castToExtension(value)); // Extension
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("text")) if (name.equals("text"))
@ -268,6 +344,18 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3556653: return getText(); // Narrative
case -410956685: throw new FHIRException("Cannot make property contained as it is not a complex type"); // Resource
case -612557761: return addExtension(); // Extension
case -298878168: return addModifierExtension(); // Extension
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("text")) { if (name.equals("text")) {
@ -335,7 +423,7 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, contained, extension, modifierExtension return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(text, contained, extension, modifierExtension
); );
} }

View File

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

View File

@ -29,17 +29,17 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.ArrayList;
import java.util.*; import java.util.List;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseElement;
import org.hl7.fhir.instance.model.api.IBaseHasExtensions;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.*;
import org.hl7.fhir.dstu3.exceptions.FHIRException;
/** /**
* Base definition for all elements in a resource. * Base definition for all elements in a resource.
*/ */
@ -126,6 +126,24 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
return this.extension; return this.extension;
} }
/**
* @return The first repetition of repeating field {@link #extension}, creating it if it does not already exist
*/
public Extension getExtensionFirstRep() {
if (getExtension().isEmpty()) {
addExtension();
}
return getExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Element setExtension(List<Extension> theExtension) {
this.extension = theExtension;
return this;
}
public boolean hasExtension() { public boolean hasExtension() {
if (this.extension == null) if (this.extension == null)
return false; return false;
@ -195,6 +213,30 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension)); childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3355: /*id*/ return this.id == null ? new Base[0] : new Base[] {this.id}; // IdType
case -612557761: /*extension*/ return this.extension == null ? new Base[0] : this.extension.toArray(new Base[this.extension.size()]); // Extension
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3355: // id
this.id = castToId(value); // IdType
break;
case -612557761: // extension
this.getExtension().add(castToExtension(value)); // Extension
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("id")) if (name.equals("id"))
@ -205,6 +247,16 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3355: throw new FHIRException("Cannot make property id as it is not a complex type"); // IdType
case -612557761: return addExtension(); // Extension
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("id")) { if (name.equals("id")) {
@ -254,7 +306,7 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( id, extension); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(id, extension);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 19:50-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -618,6 +618,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.discriminator; return this.discriminator;
} }
/**
* @return The first repetition of repeating field {@link #discriminator}, creating it if it does not already exist
*/
public StringType getDiscriminatorFirstRep() {
if (getDiscriminator().isEmpty()) {
addDiscriminatorElement();
}
return getDiscriminator().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinitionSlicingComponent setDiscriminator(List<StringType> theDiscriminator) {
this.discriminator = theDiscriminator;
return this;
}
public boolean hasDiscriminator() { public boolean hasDiscriminator() {
if (this.discriminator == null) if (this.discriminator == null)
return false; return false;
@ -810,6 +828,38 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, java.lang.Integer.MAX_VALUE, rules)); childrenList.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, java.lang.Integer.MAX_VALUE, rules));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1888270692: /*discriminator*/ return this.discriminator == null ? new Base[0] : this.discriminator.toArray(new Base[this.discriminator.size()]); // StringType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1207109523: /*ordered*/ return this.ordered == null ? new Base[0] : new Base[] {this.ordered}; // BooleanType
case 108873975: /*rules*/ return this.rules == null ? new Base[0] : new Base[] {this.rules}; // Enumeration<SlicingRules>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1888270692: // discriminator
this.getDiscriminator().add(castToString(value)); // StringType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1207109523: // ordered
this.ordered = castToBoolean(value); // BooleanType
break;
case 108873975: // rules
this.rules = new SlicingRulesEnumFactory().fromType(value); // Enumeration<SlicingRules>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("discriminator")) if (name.equals("discriminator"))
@ -824,6 +874,18 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1888270692: throw new FHIRException("Cannot make property discriminator as it is not a complex type"); // StringType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1207109523: throw new FHIRException("Cannot make property ordered as it is not a complex type"); // BooleanType
case 108873975: throw new FHIRException("Cannot make property rules as it is not a complex type"); // Enumeration<SlicingRules>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("discriminator")) { if (name.equals("discriminator")) {
@ -879,8 +941,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( discriminator, description, ordered return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(discriminator, description, ordered
, rules); , rules);
} }
public String fhirType() { public String fhirType() {
@ -1074,6 +1136,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, max)); childrenList.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, max));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case 108114: // min
this.min = castToInteger(value); // IntegerType
break;
case 107876: // max
this.max = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -1086,6 +1176,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case 108114: throw new FHIRException("Cannot make property min as it is not a complex type"); // IntegerType
case 107876: throw new FHIRException("Cannot make property max as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -1133,7 +1234,7 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, min, max); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, min, max);
} }
public String fhirType() { public String fhirType() {
@ -1244,6 +1345,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.profile; return this.profile;
} }
/**
* @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
*/
public UriType getProfileFirstRep() {
if (getProfile().isEmpty()) {
addProfileElement();
}
return getProfile().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TypeRefComponent setProfile(List<UriType> theProfile) {
this.profile = theProfile;
return this;
}
public boolean hasProfile() { public boolean hasProfile() {
if (this.profile == null) if (this.profile == null)
return false; return false;
@ -1298,6 +1417,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.aggregation; return this.aggregation;
} }
/**
* @return The first repetition of repeating field {@link #aggregation}, creating it if it does not already exist
*/
public Enumeration<AggregationMode> getAggregationFirstRep() {
if (getAggregation().isEmpty()) {
addAggregationElement();
}
return getAggregation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TypeRefComponent setAggregation(List<Enumeration<AggregationMode>> theAggregation) {
this.aggregation = theAggregation;
return this;
}
public boolean hasAggregation() { public boolean hasAggregation() {
if (this.aggregation == null) if (this.aggregation == null)
return false; return false;
@ -1338,7 +1475,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (this.aggregation == null) if (this.aggregation == null)
return false; return false;
for (Enumeration<AggregationMode> v : this.aggregation) for (Enumeration<AggregationMode> v : this.aggregation)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -1400,6 +1537,38 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whetehr either can be used.", 0, java.lang.Integer.MAX_VALUE, versioning)); childrenList.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whetehr either can be used.", 0, java.lang.Integer.MAX_VALUE, versioning));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // UriType
case 841524962: /*aggregation*/ return this.aggregation == null ? new Base[0] : this.aggregation.toArray(new Base[this.aggregation.size()]); // Enumeration<AggregationMode>
case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ReferenceVersionRules>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case -309425751: // profile
this.getProfile().add(castToUri(value)); // UriType
break;
case 841524962: // aggregation
this.getAggregation().add(new AggregationModeEnumFactory().fromType(value)); // Enumeration<AggregationMode>
break;
case -670487542: // versioning
this.versioning = new ReferenceVersionRulesEnumFactory().fromType(value); // Enumeration<ReferenceVersionRules>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -1414,6 +1583,18 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case -309425751: throw new FHIRException("Cannot make property profile as it is not a complex type"); // UriType
case 841524962: throw new FHIRException("Cannot make property aggregation as it is not a complex type"); // Enumeration<AggregationMode>
case -670487542: throw new FHIRException("Cannot make property versioning as it is not a complex type"); // Enumeration<ReferenceVersionRules>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -1473,7 +1654,7 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, profile, aggregation, versioning return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, aggregation, versioning
); );
} }
@ -1836,6 +2017,46 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath)); childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 106079: /*key*/ return this.key == null ? new Base[0] : new Base[] {this.key}; // IdType
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<ConstraintSeverity>
case 99639597: /*human*/ return this.human == null ? new Base[0] : new Base[] {this.human}; // StringType
case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 106079: // key
this.key = castToId(value); // IdType
break;
case -1619874672: // requirements
this.requirements = castToString(value); // StringType
break;
case 1478300413: // severity
this.severity = new ConstraintSeverityEnumFactory().fromType(value); // Enumeration<ConstraintSeverity>
break;
case 99639597: // human
this.human = castToString(value); // StringType
break;
case -1795452264: // expression
this.expression = castToString(value); // StringType
break;
case 114256029: // xpath
this.xpath = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("key")) if (name.equals("key"))
@ -1854,6 +2075,20 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 106079: throw new FHIRException("Cannot make property key as it is not a complex type"); // IdType
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType
case 1478300413: throw new FHIRException("Cannot make property severity as it is not a complex type"); // Enumeration<ConstraintSeverity>
case 99639597: throw new FHIRException("Cannot make property human as it is not a complex type"); // StringType
case -1795452264: throw new FHIRException("Cannot make property expression as it is not a complex type"); // StringType
case 114256029: throw new FHIRException("Cannot make property xpath as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("key")) { if (name.equals("key")) {
@ -1915,8 +2150,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( key, requirements, severity, human return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(key, requirements, severity, human
, expression, xpath); , expression, xpath);
} }
public String fhirType() { public String fhirType() {
@ -2112,6 +2347,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet)); childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1791316033: // strength
this.strength = new BindingStrengthEnumFactory().fromType(value); // Enumeration<BindingStrength>
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1410174671: // valueSet
this.valueSet = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("strength")) if (name.equals("strength"))
@ -2124,6 +2387,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1791316033: throw new FHIRException("Cannot make property strength as it is not a complex type"); // Enumeration<BindingStrength>
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1438410321: return getValueSet(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("strength")) { if (name.equals("strength")) {
@ -2176,7 +2450,7 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( strength, description, valueSet return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, description, valueSet
); );
} }
@ -2374,6 +2648,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, map)); childrenList.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, map));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 107868: /*map*/ return this.map == null ? new Base[0] : new Base[] {this.map}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -135761730: // identity
this.identity = castToId(value); // IdType
break;
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 107868: // map
this.map = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identity")) if (name.equals("identity"))
@ -2386,6 +2688,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -135761730: throw new FHIRException("Cannot make property identity as it is not a complex type"); // IdType
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 107868: throw new FHIRException("Cannot make property map as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identity")) { if (name.equals("identity")) {
@ -2433,7 +2746,7 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, language, map); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, language, map);
} }
public String fhirType() { public String fhirType() {
@ -2731,6 +3044,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.representation; return this.representation;
} }
/**
* @return The first repetition of repeating field {@link #representation}, creating it if it does not already exist
*/
public Enumeration<PropertyRepresentation> getRepresentationFirstRep() {
if (getRepresentation().isEmpty()) {
addRepresentationElement();
}
return getRepresentation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setRepresentation(List<Enumeration<PropertyRepresentation>> theRepresentation) {
this.representation = theRepresentation;
return this;
}
public boolean hasRepresentation() { public boolean hasRepresentation() {
if (this.representation == null) if (this.representation == null)
return false; return false;
@ -2771,7 +3102,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (this.representation == null) if (this.representation == null)
return false; return false;
for (Enumeration<PropertyRepresentation> v : this.representation) for (Enumeration<PropertyRepresentation> v : this.representation)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -2883,6 +3214,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.code; return this.code;
} }
/**
* @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
*/
public Coding getCodeFirstRep() {
if (getCode().isEmpty()) {
addCode();
}
return getCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setCode(List<Coding> theCode) {
this.code = theCode;
return this;
}
public boolean hasCode() { public boolean hasCode() {
if (this.code == null) if (this.code == null)
return false; return false;
@ -3143,6 +3492,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.alias; return this.alias;
} }
/**
* @return The first repetition of repeating field {@link #alias}, creating it if it does not already exist
*/
public StringType getAliasFirstRep() {
if (getAlias().isEmpty()) {
addAliasElement();
}
return getAlias().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setAlias(List<StringType> theAlias) {
this.alias = theAlias;
return this;
}
public boolean hasAlias() { public boolean hasAlias() {
if (this.alias == null) if (this.alias == null)
return false; return false;
@ -3364,6 +3731,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public TypeRefComponent getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setType(List<TypeRefComponent> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -3612,6 +3997,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.condition; return this.condition;
} }
/**
* @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist
*/
public IdType getConditionFirstRep() {
if (getCondition().isEmpty()) {
addConditionElement();
}
return getCondition().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setCondition(List<IdType> theCondition) {
this.condition = theCondition;
return this;
}
public boolean hasCondition() { public boolean hasCondition() {
if (this.condition == null) if (this.condition == null)
return false; return false;
@ -3666,6 +4069,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.constraint; return this.constraint;
} }
/**
* @return The first repetition of repeating field {@link #constraint}, creating it if it does not already exist
*/
public ElementDefinitionConstraintComponent getConstraintFirstRep() {
if (getConstraint().isEmpty()) {
addConstraint();
}
return getConstraint().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setConstraint(List<ElementDefinitionConstraintComponent> theConstraint) {
this.constraint = theConstraint;
return this;
}
public boolean hasConstraint() { public boolean hasConstraint() {
if (this.constraint == null) if (this.constraint == null)
return false; return false;
@ -3865,6 +4286,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.mapping; return this.mapping;
} }
/**
* @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist
*/
public ElementDefinitionMappingComponent getMappingFirstRep() {
if (getMapping().isEmpty()) {
addMapping();
}
return getMapping().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setMapping(List<ElementDefinitionMappingComponent> theMapping) {
this.mapping = theMapping;
return this;
}
public boolean hasMapping() { public boolean hasMapping() {
if (this.mapping == null) if (this.mapping == null)
return false; return false;
@ -3931,6 +4370,146 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping)); childrenList.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -671065907: /*representation*/ return this.representation == null ? new Base[0] : this.representation.toArray(new Base[this.representation.size()]); // Enumeration<PropertyRepresentation>
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding
case -2119287345: /*slicing*/ return this.slicing == null ? new Base[0] : new Base[] {this.slicing}; // ElementDefinitionSlicingComponent
case 109413500: /*short*/ return this.short_ == null ? new Base[0] : new Base[] {this.short_}; // StringType
case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType
case -602415628: /*comments*/ return this.comments == null ? new Base[0] : new Base[] {this.comments}; // MarkdownType
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType
case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // ElementDefinitionBaseComponent
case 1193747154: /*contentReference*/ return this.contentReference == null ? new Base[0] : new Base[] {this.contentReference}; // UriType
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // TypeRefComponent
case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // org.hl7.fhir.dstu3.model.Type
case 1857257103: /*meaningWhenMissing*/ return this.meaningWhenMissing == null ? new Base[0] : new Base[] {this.meaningWhenMissing}; // MarkdownType
case 97445748: /*fixed*/ return this.fixed == null ? new Base[0] : new Base[] {this.fixed}; // org.hl7.fhir.dstu3.model.Type
case -791090288: /*pattern*/ return this.pattern == null ? new Base[0] : new Base[] {this.pattern}; // org.hl7.fhir.dstu3.model.Type
case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // org.hl7.fhir.dstu3.model.Type
case -1376969153: /*minValue*/ return this.minValue == null ? new Base[0] : new Base[] {this.minValue}; // org.hl7.fhir.dstu3.model.Type
case 399227501: /*maxValue*/ return this.maxValue == null ? new Base[0] : new Base[] {this.maxValue}; // org.hl7.fhir.dstu3.model.Type
case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType
case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // IdType
case -190376483: /*constraint*/ return this.constraint == null ? new Base[0] : this.constraint.toArray(new Base[this.constraint.size()]); // ElementDefinitionConstraintComponent
case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : new Base[] {this.mustSupport}; // BooleanType
case -1408783839: /*isModifier*/ return this.isModifier == null ? new Base[0] : new Base[] {this.isModifier}; // BooleanType
case 1857548060: /*isSummary*/ return this.isSummary == null ? new Base[0] : new Base[] {this.isSummary}; // BooleanType
case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // ElementDefinitionBindingComponent
case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // ElementDefinitionMappingComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -671065907: // representation
this.getRepresentation().add(new PropertyRepresentationEnumFactory().fromType(value)); // Enumeration<PropertyRepresentation>
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 102727412: // label
this.label = castToString(value); // StringType
break;
case 3059181: // code
this.getCode().add(castToCoding(value)); // Coding
break;
case -2119287345: // slicing
this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
break;
case 109413500: // short
this.short_ = castToString(value); // StringType
break;
case -1014418093: // definition
this.definition = castToMarkdown(value); // MarkdownType
break;
case -602415628: // comments
this.comments = castToMarkdown(value); // MarkdownType
break;
case -1619874672: // requirements
this.requirements = castToMarkdown(value); // MarkdownType
break;
case 92902992: // alias
this.getAlias().add(castToString(value)); // StringType
break;
case 108114: // min
this.min = castToInteger(value); // IntegerType
break;
case 107876: // max
this.max = castToString(value); // StringType
break;
case 3016401: // base
this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
break;
case 1193747154: // contentReference
this.contentReference = castToUri(value); // UriType
break;
case 3575610: // type
this.getType().add((TypeRefComponent) value); // TypeRefComponent
break;
case -659125328: // defaultValue
this.defaultValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case 1857257103: // meaningWhenMissing
this.meaningWhenMissing = castToMarkdown(value); // MarkdownType
break;
case 97445748: // fixed
this.fixed = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -791090288: // pattern
this.pattern = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -1322970774: // example
this.example = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -1376969153: // minValue
this.minValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case 399227501: // maxValue
this.maxValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -791400086: // maxLength
this.maxLength = castToInteger(value); // IntegerType
break;
case -861311717: // condition
this.getCondition().add(castToId(value)); // IdType
break;
case -190376483: // constraint
this.getConstraint().add((ElementDefinitionConstraintComponent) value); // ElementDefinitionConstraintComponent
break;
case -1402857082: // mustSupport
this.mustSupport = castToBoolean(value); // BooleanType
break;
case -1408783839: // isModifier
this.isModifier = castToBoolean(value); // BooleanType
break;
case 1857548060: // isSummary
this.isSummary = castToBoolean(value); // BooleanType
break;
case -108220795: // binding
this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
break;
case 837556430: // mapping
this.getMapping().add((ElementDefinitionMappingComponent) value); // ElementDefinitionMappingComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -3999,6 +4578,45 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -671065907: throw new FHIRException("Cannot make property representation as it is not a complex type"); // Enumeration<PropertyRepresentation>
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType
case 3059181: return addCode(); // Coding
case -2119287345: return getSlicing(); // ElementDefinitionSlicingComponent
case 109413500: throw new FHIRException("Cannot make property short as it is not a complex type"); // StringType
case -1014418093: throw new FHIRException("Cannot make property definition as it is not a complex type"); // MarkdownType
case -602415628: throw new FHIRException("Cannot make property comments as it is not a complex type"); // MarkdownType
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // MarkdownType
case 92902992: throw new FHIRException("Cannot make property alias as it is not a complex type"); // StringType
case 108114: throw new FHIRException("Cannot make property min as it is not a complex type"); // IntegerType
case 107876: throw new FHIRException("Cannot make property max as it is not a complex type"); // StringType
case 3016401: return getBase(); // ElementDefinitionBaseComponent
case 1193747154: throw new FHIRException("Cannot make property contentReference as it is not a complex type"); // UriType
case 3575610: return addType(); // TypeRefComponent
case 587922128: return getDefaultValue(); // org.hl7.fhir.dstu3.model.Type
case 1857257103: throw new FHIRException("Cannot make property meaningWhenMissing as it is not a complex type"); // MarkdownType
case -391522164: return getFixed(); // org.hl7.fhir.dstu3.model.Type
case -885125392: return getPattern(); // org.hl7.fhir.dstu3.model.Type
case -2002328874: return getExample(); // org.hl7.fhir.dstu3.model.Type
case -55301663: return getMinValue(); // org.hl7.fhir.dstu3.model.Type
case 622130931: return getMaxValue(); // org.hl7.fhir.dstu3.model.Type
case -791400086: throw new FHIRException("Cannot make property maxLength as it is not a complex type"); // IntegerType
case -861311717: throw new FHIRException("Cannot make property condition as it is not a complex type"); // IdType
case -190376483: return addConstraint(); // ElementDefinitionConstraintComponent
case -1402857082: throw new FHIRException("Cannot make property mustSupport as it is not a complex type"); // BooleanType
case -1408783839: throw new FHIRException("Cannot make property isModifier as it is not a complex type"); // BooleanType
case 1857548060: throw new FHIRException("Cannot make property isSummary as it is not a complex type"); // BooleanType
case -108220795: return getBinding(); // ElementDefinitionBindingComponent
case 837556430: return addMapping(); // ElementDefinitionMappingComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -4986,11 +5604,10 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, representation, name, label return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, representation, name, label
, code, slicing, short_, definition, comments, requirements, alias, min, max, base , code, slicing, short_, definition, comments, requirements, alias, min, max, base, contentReference
, contentReference, type, defaultValue, meaningWhenMissing, fixed, pattern, example, minValue , type, defaultValue, meaningWhenMissing, fixed, pattern, example, minValue, maxValue, maxLength
, maxValue, maxLength, condition, constraint, mustSupport, isModifier, isSummary, binding , condition, constraint, mustSupport, isModifier, isSummary, binding, mapping);
, mapping);
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -178,6 +178,24 @@ public class EligibilityRequest extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EligibilityRequest setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -807,6 +825,86 @@ public class EligibilityRequest extends DomainResource {
childrenList.add(new Property("benefitSubCategory", "Coding", "Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.", 0, java.lang.Integer.MAX_VALUE, benefitSubCategory)); childrenList.add(new Property("benefitSubCategory", "Coding", "Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.", 0, java.lang.Integer.MAX_VALUE, benefitSubCategory));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type
case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Type
case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Coding
case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Type
case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Type
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Type
case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Type
case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType
case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // Type
case -1023390027: /*benefitCategory*/ return this.benefitCategory == null ? new Base[0] : new Base[] {this.benefitCategory}; // Coding
case 1987878471: /*benefitSubCategory*/ return this.benefitSubCategory == null ? new Base[0] : new Base[] {this.benefitSubCategory}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 1548678118: // ruleset
this.ruleset = castToCoding(value); // Coding
break;
case 1089373397: // originalRuleset
this.originalRuleset = castToCoding(value); // Coding
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case -880905839: // target
this.target = (Type) value; // Type
break;
case -987494927: // provider
this.provider = (Type) value; // Type
break;
case 1178922291: // organization
this.organization = (Type) value; // Type
break;
case -1165461084: // priority
this.priority = castToCoding(value); // Coding
break;
case -1591951995: // enterer
this.enterer = (Type) value; // Type
break;
case 501116579: // facility
this.facility = (Type) value; // Type
break;
case -791418107: // patient
this.patient = (Type) value; // Type
break;
case -351767064: // coverage
this.coverage = (Type) value; // Type
break;
case 259920682: // businessArrangement
this.businessArrangement = castToString(value); // StringType
break;
case 1379209295: // serviced
this.serviced = (Type) value; // Type
break;
case -1023390027: // benefitCategory
this.benefitCategory = castToCoding(value); // Coding
break;
case 1987878471: // benefitSubCategory
this.benefitSubCategory = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -845,6 +943,30 @@ public class EligibilityRequest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 1548678118: return getRuleset(); // Coding
case 1089373397: return getOriginalRuleset(); // Coding
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case -815579825: return getTarget(); // Type
case 2064698607: return getProvider(); // Type
case 1326483053: return getOrganization(); // Type
case -1165461084: return getPriority(); // Coding
case -812909349: return getEnterer(); // Type
case -542224643: return getFacility(); // Type
case -2061246629: return getPatient(); // Type
case 227689880: return getCoverage(); // Type
case 259920682: throw new FHIRException("Cannot make property businessArrangement as it is not a complex type"); // StringType
case -1927922223: return getServiced(); // Type
case -1023390027: return getBenefitCategory(); // Coding
case 1987878471: return getBenefitSubCategory(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1007,9 +1129,9 @@ public class EligibilityRequest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ruleset, originalRuleset return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ruleset, originalRuleset
, created, target, provider, organization, priority, enterer, facility, patient, coverage , created, target, provider, organization, priority, enterer, facility, patient, coverage, businessArrangement
, businessArrangement, serviced, benefitCategory, benefitSubCategory); , serviced, benefitCategory, benefitSubCategory);
} }
@Override @Override
@ -1025,7 +1147,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.identifier</b><br> * Path: <b>EligibilityRequest.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="EligibilityRequest.identifier", description="The business identifier of the Eligibility", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="EligibilityRequest.identifier", description="The business identifier of the Eligibility", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1045,7 +1169,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.facilityReference</b><br> * Path: <b>EligibilityRequest.facilityReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="facilityreference", path="EligibilityRequest.facilityReference", description="Facility responsible for the goods and services", type="reference" ) // [Location]
// [Location]
@SearchParamDefinition(name="facilityreference", path="EligibilityRequest.facility.as(Reference)", description="Facility responsible for the goods and services", type="reference", target={Location.class} )
public static final String SP_FACILITYREFERENCE = "facilityreference"; public static final String SP_FACILITYREFERENCE = "facilityreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>facilityreference</b> * <b>Fluent Client</b> search parameter constant for <b>facilityreference</b>
@ -1071,7 +1197,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.patientIdentifier</b><br> * Path: <b>EligibilityRequest.patientIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patientidentifier", path="EligibilityRequest.patientIdentifier", description="The reference to the patient", type="token" ) // []
// []
@SearchParamDefinition(name="patientidentifier", path="EligibilityRequest.patient.as(Identifier)", description="The reference to the patient", type="token", target={} )
public static final String SP_PATIENTIDENTIFIER = "patientidentifier"; public static final String SP_PATIENTIDENTIFIER = "patientidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patientidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>patientidentifier</b>
@ -1091,7 +1219,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.organizationidentifier</b><br> * Path: <b>EligibilityRequest.organizationidentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organizationidentifier", path="EligibilityRequest.organizationidentifier", description="The reference to the providing organization", type="token" ) // []
// []
@SearchParamDefinition(name="organizationidentifier", path="EligibilityRequest.organization.as(identifier)", description="The reference to the providing organization", type="token", target={} )
public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b>
@ -1111,7 +1241,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.created</b><br> * Path: <b>EligibilityRequest.created</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="created", path="EligibilityRequest.created", description="The creation date for the EOB", type="date" ) // []
// []
@SearchParamDefinition(name="created", path="EligibilityRequest.created", description="The creation date for the EOB", type="date", target={} )
public static final String SP_CREATED = "created"; public static final String SP_CREATED = "created";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>created</b> * <b>Fluent Client</b> search parameter constant for <b>created</b>
@ -1131,7 +1263,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.patientReference</b><br> * Path: <b>EligibilityRequest.patientReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patientreference", path="EligibilityRequest.patientReference", description="The reference to the patient", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patientreference", path="EligibilityRequest.patient.as(Reference)", description="The reference to the patient", type="reference", target={Patient.class} )
public static final String SP_PATIENTREFERENCE = "patientreference"; public static final String SP_PATIENTREFERENCE = "patientreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patientreference</b> * <b>Fluent Client</b> search parameter constant for <b>patientreference</b>
@ -1157,7 +1291,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.providerReference</b><br> * Path: <b>EligibilityRequest.providerReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="providerreference", path="EligibilityRequest.providerReference", description="The reference to the provider", type="reference" ) // [Practitioner]
// [Practitioner]
@SearchParamDefinition(name="providerreference", path="EligibilityRequest.provider.as(Reference)", description="The reference to the provider", type="reference", target={Practitioner.class} )
public static final String SP_PROVIDERREFERENCE = "providerreference"; public static final String SP_PROVIDERREFERENCE = "providerreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>providerreference</b> * <b>Fluent Client</b> search parameter constant for <b>providerreference</b>
@ -1183,7 +1319,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.organizationReference</b><br> * Path: <b>EligibilityRequest.organizationReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organizationreference", path="EligibilityRequest.organizationReference", description="The reference to the providing organization", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="organizationreference", path="EligibilityRequest.organization.as(Reference)", description="The reference to the providing organization", type="reference", target={Organization.class} )
public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; public static final String SP_ORGANIZATIONREFERENCE = "organizationreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organizationreference</b> * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b>
@ -1209,7 +1347,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.provideridentifier</b><br> * Path: <b>EligibilityRequest.provideridentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="provideridentifier", path="EligibilityRequest.provideridentifier", description="The reference to the provider", type="token" ) // []
// []
@SearchParamDefinition(name="provideridentifier", path="EligibilityRequest.provider.as(identifier)", description="The reference to the provider", type="token", target={} )
public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; public static final String SP_PROVIDERIDENTIFIER = "provideridentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>provideridentifier</b> * <b>Fluent Client</b> search parameter constant for <b>provideridentifier</b>
@ -1229,7 +1369,9 @@ public class EligibilityRequest extends DomainResource {
* Path: <b>EligibilityRequest.facilityidentifier</b><br> * Path: <b>EligibilityRequest.facilityidentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="facilityidentifier", path="EligibilityRequest.facilityidentifier", description="Facility responsible for the goods and services", type="token" ) // []
// []
@SearchParamDefinition(name="facilityidentifier", path="EligibilityRequest.facility.as(identifier)", description="Facility responsible for the goods and services", type="token", target={} )
public static final String SP_FACILITYIDENTIFIER = "facilityidentifier"; public static final String SP_FACILITYIDENTIFIER = "facilityidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>facilityidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>facilityidentifier</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -238,6 +238,24 @@ public class EligibilityResponse extends DomainResource {
return this.financial; return this.financial;
} }
/**
* @return The first repetition of repeating field {@link #financial}, creating it if it does not already exist
*/
public BenefitComponent getFinancialFirstRep() {
if (getFinancial().isEmpty()) {
addFinancial();
}
return getFinancial().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BenefitsComponent setFinancial(List<BenefitComponent> theFinancial) {
this.financial = theFinancial;
return this;
}
public boolean hasFinancial() { public boolean hasFinancial() {
if (this.financial == null) if (this.financial == null)
return false; return false;
@ -279,6 +297,46 @@ public class EligibilityResponse extends DomainResource {
childrenList.add(new Property("financial", "", "Benefits Used to date.", 0, java.lang.Integer.MAX_VALUE, financial)); childrenList.add(new Property("financial", "", "Benefits Used to date.", 0, java.lang.Integer.MAX_VALUE, financial));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Coding
case 1365024606: /*subCategory*/ return this.subCategory == null ? new Base[0] : new Base[] {this.subCategory}; // Coding
case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // Coding
case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // Coding
case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // Coding
case 357555337: /*financial*/ return this.financial == null ? new Base[0] : this.financial.toArray(new Base[this.financial.size()]); // BenefitComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 50511102: // category
this.category = castToCoding(value); // Coding
break;
case 1365024606: // subCategory
this.subCategory = castToCoding(value); // Coding
break;
case 1843485230: // network
this.network = castToCoding(value); // Coding
break;
case 3594628: // unit
this.unit = castToCoding(value); // Coding
break;
case 3556460: // term
this.term = castToCoding(value); // Coding
break;
case 357555337: // financial
this.getFinancial().add((BenefitComponent) value); // BenefitComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("category")) if (name.equals("category"))
@ -297,6 +355,20 @@ public class EligibilityResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: return getCategory(); // Coding
case 1365024606: return getSubCategory(); // Coding
case 1843485230: return getNetwork(); // Coding
case 3594628: return getUnit(); // Coding
case 3556460: return getTerm(); // Coding
case 357555337: return addFinancial(); // BenefitComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("category")) { if (name.equals("category")) {
@ -365,8 +437,8 @@ public class EligibilityResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, subCategory, network return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, subCategory, network
, unit, term, financial); , unit, term, financial);
} }
public String fhirType() { public String fhirType() {
@ -537,6 +609,34 @@ public class EligibilityResponse extends DomainResource {
childrenList.add(new Property("benefitUsed[x]", "unsignedInt|Money", "Benefits used.", 0, java.lang.Integer.MAX_VALUE, benefitUsed)); childrenList.add(new Property("benefitUsed[x]", "unsignedInt|Money", "Benefits used.", 0, java.lang.Integer.MAX_VALUE, benefitUsed));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case -222710633: /*benefit*/ return this.benefit == null ? new Base[0] : new Base[] {this.benefit}; // Type
case -549981964: /*benefitUsed*/ return this.benefitUsed == null ? new Base[0] : new Base[] {this.benefitUsed}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case -222710633: // benefit
this.benefit = (Type) value; // Type
break;
case -549981964: // benefitUsed
this.benefitUsed = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -549,6 +649,17 @@ public class EligibilityResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // Coding
case 952095881: return getBenefit(); // Type
case 787635980: return getBenefitUsed(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -606,7 +717,7 @@ public class EligibilityResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, benefit, benefitUsed); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, benefit, benefitUsed);
} }
public String fhirType() { public String fhirType() {
@ -671,6 +782,26 @@ public class EligibilityResponse extends DomainResource {
childrenList.add(new Property("code", "Coding", "An error code,from a specified code system, which details why the eligibility check could not be performed.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("code", "Coding", "An error code,from a specified code system, which details why the eligibility check could not be performed.", 0, java.lang.Integer.MAX_VALUE, code));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -679,6 +810,15 @@ public class EligibilityResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: return getCode(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -717,7 +857,7 @@ public class EligibilityResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code);
} }
public String fhirType() { public String fhirType() {
@ -855,6 +995,24 @@ public class EligibilityResponse extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EligibilityResponse setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -1383,6 +1541,24 @@ public class EligibilityResponse extends DomainResource {
return this.benefitBalance; return this.benefitBalance;
} }
/**
* @return The first repetition of repeating field {@link #benefitBalance}, creating it if it does not already exist
*/
public BenefitsComponent getBenefitBalanceFirstRep() {
if (getBenefitBalance().isEmpty()) {
addBenefitBalance();
}
return getBenefitBalance().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EligibilityResponse setBenefitBalance(List<BenefitsComponent> theBenefitBalance) {
this.benefitBalance = theBenefitBalance;
return this;
}
public boolean hasBenefitBalance() { public boolean hasBenefitBalance() {
if (this.benefitBalance == null) if (this.benefitBalance == null)
return false; return false;
@ -1423,6 +1599,24 @@ public class EligibilityResponse extends DomainResource {
return this.error; return this.error;
} }
/**
* @return The first repetition of repeating field {@link #error}, creating it if it does not already exist
*/
public ErrorsComponent getErrorFirstRep() {
if (getError().isEmpty()) {
addError();
}
return getError().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EligibilityResponse setError(List<ErrorsComponent> theError) {
this.error = theError;
return this;
}
public boolean hasError() { public boolean hasError() {
if (this.error == null) if (this.error == null)
return false; return false;
@ -1473,6 +1667,82 @@ public class EligibilityResponse extends DomainResource {
childrenList.add(new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error)); childrenList.add(new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type
case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome>
case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type
case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Type
case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Type
case 1945431270: /*inforce*/ return this.inforce == null ? new Base[0] : new Base[] {this.inforce}; // BooleanType
case -566947566: /*contract*/ return this.contract == null ? new Base[0] : new Base[] {this.contract}; // Reference
case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // Coding
case 596003397: /*benefitBalance*/ return this.benefitBalance == null ? new Base[0] : this.benefitBalance.toArray(new Base[this.benefitBalance.size()]); // BenefitsComponent
case 96784904: /*error*/ return this.error == null ? new Base[0] : this.error.toArray(new Base[this.error.size()]); // ErrorsComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 1095692943: // request
this.request = (Type) value; // Type
break;
case -1106507950: // outcome
this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
break;
case 583380919: // disposition
this.disposition = castToString(value); // StringType
break;
case 1548678118: // ruleset
this.ruleset = castToCoding(value); // Coding
break;
case 1089373397: // originalRuleset
this.originalRuleset = castToCoding(value); // Coding
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case 1178922291: // organization
this.organization = (Type) value; // Type
break;
case 1601527200: // requestProvider
this.requestProvider = (Type) value; // Type
break;
case 599053666: // requestOrganization
this.requestOrganization = (Type) value; // Type
break;
case 1945431270: // inforce
this.inforce = castToBoolean(value); // BooleanType
break;
case -566947566: // contract
this.contract = castToReference(value); // Reference
break;
case 3148996: // form
this.form = castToCoding(value); // Coding
break;
case 596003397: // benefitBalance
this.getBenefitBalance().add((BenefitsComponent) value); // BenefitsComponent
break;
case 96784904: // error
this.getError().add((ErrorsComponent) value); // ErrorsComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1509,6 +1779,29 @@ public class EligibilityResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 37106577: return getRequest(); // Type
case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Enumeration<RemittanceOutcome>
case 583380919: throw new FHIRException("Cannot make property disposition as it is not a complex type"); // StringType
case 1548678118: return getRuleset(); // Coding
case 1089373397: return getOriginalRuleset(); // Coding
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case 1326483053: return getOrganization(); // Type
case -1694784800: return getRequestProvider(); // Type
case 818740190: return getRequestOrganization(); // Type
case 1945431270: throw new FHIRException("Cannot make property inforce as it is not a complex type"); // BooleanType
case -566947566: return getContract(); // Reference
case 3148996: return getForm(); // Coding
case 596003397: return addBenefitBalance(); // BenefitsComponent
case 96784904: return addError(); // ErrorsComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1653,9 +1946,9 @@ public class EligibilityResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, request, outcome, disposition
, disposition, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization , ruleset, originalRuleset, created, organization, requestProvider, requestOrganization, inforce
, inforce, contract, form, benefitBalance, error); , contract, form, benefitBalance, error);
} }
@Override @Override
@ -1671,7 +1964,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestProviderIdentifier</b><br> * Path: <b>EligibilityResponse.requestProviderIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestprovideridentifier", path="EligibilityResponse.requestProviderIdentifier", description="The EligibilityRequest provider", type="token" ) // []
// []
@SearchParamDefinition(name="requestprovideridentifier", path="EligibilityResponse.requestProvider.as(Identifier)", description="The EligibilityRequest provider", type="token", target={} )
public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier"; public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestprovideridentifier</b> * <b>Fluent Client</b> search parameter constant for <b>requestprovideridentifier</b>
@ -1691,7 +1986,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestOrganizationIdentifier</b><br> * Path: <b>EligibilityResponse.requestOrganizationIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestorganizationidentifier", path="EligibilityResponse.requestOrganizationIdentifier", description="The EligibilityRequest organization", type="token" ) // []
// []
@SearchParamDefinition(name="requestorganizationidentifier", path="EligibilityResponse.requestOrganization.as(Identifier)", description="The EligibilityRequest organization", type="token", target={} )
public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier"; public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestorganizationidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>requestorganizationidentifier</b>
@ -1711,7 +2008,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.identifier</b><br> * Path: <b>EligibilityResponse.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="EligibilityResponse.identifier", description="The business identifier", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="EligibilityResponse.identifier", description="The business identifier", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1731,7 +2030,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.disposition</b><br> * Path: <b>EligibilityResponse.disposition</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="disposition", path="EligibilityResponse.disposition", description="The contents of the disposition message", type="string" ) // []
// []
@SearchParamDefinition(name="disposition", path="EligibilityResponse.disposition", description="The contents of the disposition message", type="string", target={} )
public static final String SP_DISPOSITION = "disposition"; public static final String SP_DISPOSITION = "disposition";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>disposition</b> * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
@ -1751,7 +2052,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.organizationIdentifier</b><br> * Path: <b>EligibilityResponse.organizationIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organizationidentifier", path="EligibilityResponse.organizationIdentifier", description="The organization which generated this resource", type="token" ) // []
// []
@SearchParamDefinition(name="organizationidentifier", path="EligibilityResponse.organization.as(Identifier)", description="The organization which generated this resource", type="token", target={} )
public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b>
@ -1771,7 +2074,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.created</b><br> * Path: <b>EligibilityResponse.created</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="created", path="EligibilityResponse.created", description="The creation date", type="date" ) // []
// []
@SearchParamDefinition(name="created", path="EligibilityResponse.created", description="The creation date", type="date", target={} )
public static final String SP_CREATED = "created"; public static final String SP_CREATED = "created";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>created</b> * <b>Fluent Client</b> search parameter constant for <b>created</b>
@ -1791,7 +2096,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestIdentifier</b><br> * Path: <b>EligibilityResponse.requestIdentifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestidentifier", path="EligibilityResponse.requestIdentifier", description="The EligibilityRequest reference", type="token" ) // []
// []
@SearchParamDefinition(name="requestidentifier", path="EligibilityResponse.request.as(Identifier)", description="The EligibilityRequest reference", type="token", target={} )
public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; public static final String SP_REQUESTIDENTIFIER = "requestidentifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestidentifier</b> * <b>Fluent Client</b> search parameter constant for <b>requestidentifier</b>
@ -1811,7 +2118,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.organizationReference</b><br> * Path: <b>EligibilityResponse.organizationReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organizationreference", path="EligibilityResponse.organizationReference", description="The organization which generated this resource", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="organizationreference", path="EligibilityResponse.organization.as(Reference)", description="The organization which generated this resource", type="reference", target={Organization.class} )
public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; public static final String SP_ORGANIZATIONREFERENCE = "organizationreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organizationreference</b> * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b>
@ -1837,7 +2146,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestProviderReference</b><br> * Path: <b>EligibilityResponse.requestProviderReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestproviderreference", path="EligibilityResponse.requestProviderReference", description="The EligibilityRequest provider", type="reference" ) // [Practitioner]
// [Practitioner]
@SearchParamDefinition(name="requestproviderreference", path="EligibilityResponse.requestProvider.as(Reference)", description="The EligibilityRequest provider", type="reference", target={Practitioner.class} )
public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference"; public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestproviderreference</b> * <b>Fluent Client</b> search parameter constant for <b>requestproviderreference</b>
@ -1863,7 +2174,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestOrganizationReference</b><br> * Path: <b>EligibilityResponse.requestOrganizationReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestorganizationreference", path="EligibilityResponse.requestOrganizationReference", description="The EligibilityRequest organization", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="requestorganizationreference", path="EligibilityResponse.requestOrganization.as(Reference)", description="The EligibilityRequest organization", type="reference", target={Organization.class} )
public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference"; public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestorganizationreference</b> * <b>Fluent Client</b> search parameter constant for <b>requestorganizationreference</b>
@ -1889,7 +2202,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.requestReference</b><br> * Path: <b>EligibilityResponse.requestReference</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="requestreference", path="EligibilityResponse.requestReference", description="The EligibilityRequest reference", type="reference" ) // [EligibilityRequest]
// [EligibilityRequest]
@SearchParamDefinition(name="requestreference", path="EligibilityResponse.request.as(Reference)", description="The EligibilityRequest reference", type="reference", target={EligibilityRequest.class} )
public static final String SP_REQUESTREFERENCE = "requestreference"; public static final String SP_REQUESTREFERENCE = "requestreference";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>requestreference</b> * <b>Fluent Client</b> search parameter constant for <b>requestreference</b>
@ -1915,7 +2230,9 @@ public class EligibilityResponse extends DomainResource {
* Path: <b>EligibilityResponse.outcome</b><br> * Path: <b>EligibilityResponse.outcome</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="outcome", path="EligibilityResponse.outcome", description="The processing outcome", type="token" ) // []
// []
@SearchParamDefinition(name="outcome", path="EligibilityResponse.outcome", description="The processing outcome", type="token", target={} )
public static final String SP_OUTCOME = "outcome"; public static final String SP_OUTCOME = "outcome";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>outcome</b> * <b>Fluent Client</b> search parameter constant for <b>outcome</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -629,6 +629,30 @@ Not to be used when the patient is currently at the location
childrenList.add(new Property("period", "Period", "The time that the episode was in the specified status.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "The time that the episode was in the specified status.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EncounterState>
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -892481550: // status
this.status = new EncounterStateEnumFactory().fromType(value); // Enumeration<EncounterState>
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("status")) if (name.equals("status"))
@ -639,6 +663,16 @@ Not to be used when the patient is currently at the location
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<EncounterState>
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("status")) { if (name.equals("status")) {
@ -681,7 +715,7 @@ Not to be used when the patient is currently at the location
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, period); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, period);
} }
public String fhirType() { public String fhirType() {
@ -737,6 +771,24 @@ Not to be used when the patient is currently at the location
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterParticipantComponent setType(List<CodeableConcept> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -838,6 +890,34 @@ Not to be used when the patient is currently at the location
childrenList.add(new Property("individual", "Reference(Practitioner|RelatedPerson)", "Persons involved in the encounter other than the patient.", 0, java.lang.Integer.MAX_VALUE, individual)); childrenList.add(new Property("individual", "Reference(Practitioner|RelatedPerson)", "Persons involved in the encounter other than the patient.", 0, java.lang.Integer.MAX_VALUE, individual));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -46292327: /*individual*/ return this.individual == null ? new Base[0] : new Base[] {this.individual}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.getType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -46292327: // individual
this.individual = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -850,6 +930,17 @@ Not to be used when the patient is currently at the location
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return addType(); // CodeableConcept
case -991726143: return getPeriod(); // Period
case -46292327: return getIndividual(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -902,7 +993,7 @@ Not to be used when the patient is currently at the location
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, period, individual); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, individual);
} }
public String fhirType() { public String fhirType() {
@ -1121,6 +1212,24 @@ Not to be used when the patient is currently at the location
return this.admittingDiagnosis; return this.admittingDiagnosis;
} }
/**
* @return The first repetition of repeating field {@link #admittingDiagnosis}, creating it if it does not already exist
*/
public Reference getAdmittingDiagnosisFirstRep() {
if (getAdmittingDiagnosis().isEmpty()) {
addAdmittingDiagnosis();
}
return getAdmittingDiagnosis().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterHospitalizationComponent setAdmittingDiagnosis(List<Reference> theAdmittingDiagnosis) {
this.admittingDiagnosis = theAdmittingDiagnosis;
return this;
}
public boolean hasAdmittingDiagnosis() { public boolean hasAdmittingDiagnosis() {
if (this.admittingDiagnosis == null) if (this.admittingDiagnosis == null)
return false; return false;
@ -1206,6 +1315,24 @@ Not to be used when the patient is currently at the location
return this.dietPreference; return this.dietPreference;
} }
/**
* @return The first repetition of repeating field {@link #dietPreference}, creating it if it does not already exist
*/
public CodeableConcept getDietPreferenceFirstRep() {
if (getDietPreference().isEmpty()) {
addDietPreference();
}
return getDietPreference().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterHospitalizationComponent setDietPreference(List<CodeableConcept> theDietPreference) {
this.dietPreference = theDietPreference;
return this;
}
public boolean hasDietPreference() { public boolean hasDietPreference() {
if (this.dietPreference == null) if (this.dietPreference == null)
return false; return false;
@ -1246,6 +1373,24 @@ Not to be used when the patient is currently at the location
return this.specialCourtesy; return this.specialCourtesy;
} }
/**
* @return The first repetition of repeating field {@link #specialCourtesy}, creating it if it does not already exist
*/
public CodeableConcept getSpecialCourtesyFirstRep() {
if (getSpecialCourtesy().isEmpty()) {
addSpecialCourtesy();
}
return getSpecialCourtesy().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterHospitalizationComponent setSpecialCourtesy(List<CodeableConcept> theSpecialCourtesy) {
this.specialCourtesy = theSpecialCourtesy;
return this;
}
public boolean hasSpecialCourtesy() { public boolean hasSpecialCourtesy() {
if (this.specialCourtesy == null) if (this.specialCourtesy == null)
return false; return false;
@ -1286,6 +1431,24 @@ Not to be used when the patient is currently at the location
return this.specialArrangement; return this.specialArrangement;
} }
/**
* @return The first repetition of repeating field {@link #specialArrangement}, creating it if it does not already exist
*/
public CodeableConcept getSpecialArrangementFirstRep() {
if (getSpecialArrangement().isEmpty()) {
addSpecialArrangement();
}
return getSpecialArrangement().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterHospitalizationComponent setSpecialArrangement(List<CodeableConcept> theSpecialArrangement) {
this.specialArrangement = theSpecialArrangement;
return this;
}
public boolean hasSpecialArrangement() { public boolean hasSpecialArrangement() {
if (this.specialArrangement == null) if (this.specialArrangement == null)
return false; return false;
@ -1394,6 +1557,24 @@ Not to be used when the patient is currently at the location
return this.dischargeDiagnosis; return this.dischargeDiagnosis;
} }
/**
* @return The first repetition of repeating field {@link #dischargeDiagnosis}, creating it if it does not already exist
*/
public Reference getDischargeDiagnosisFirstRep() {
if (getDischargeDiagnosis().isEmpty()) {
addDischargeDiagnosis();
}
return getDischargeDiagnosis().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EncounterHospitalizationComponent setDischargeDiagnosis(List<Reference> theDischargeDiagnosis) {
this.dischargeDiagnosis = theDischargeDiagnosis;
return this;
}
public boolean hasDischargeDiagnosis() { public boolean hasDischargeDiagnosis() {
if (this.dischargeDiagnosis == null) if (this.dischargeDiagnosis == null)
return false; return false;
@ -1461,6 +1642,66 @@ Not to be used when the patient is currently at the location
childrenList.add(new Property("dischargeDiagnosis", "Reference(Condition)", "The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.", 0, java.lang.Integer.MAX_VALUE, dischargeDiagnosis)); childrenList.add(new Property("dischargeDiagnosis", "Reference(Condition)", "The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.", 0, java.lang.Integer.MAX_VALUE, dischargeDiagnosis));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -965394961: /*preAdmissionIdentifier*/ return this.preAdmissionIdentifier == null ? new Base[0] : new Base[] {this.preAdmissionIdentifier}; // Identifier
case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // Reference
case 538887120: /*admitSource*/ return this.admitSource == null ? new Base[0] : new Base[] {this.admitSource}; // CodeableConcept
case 2048045678: /*admittingDiagnosis*/ return this.admittingDiagnosis == null ? new Base[0] : this.admittingDiagnosis.toArray(new Base[this.admittingDiagnosis.size()]); // Reference
case 669348630: /*reAdmission*/ return this.reAdmission == null ? new Base[0] : new Base[] {this.reAdmission}; // CodeableConcept
case -1360641041: /*dietPreference*/ return this.dietPreference == null ? new Base[0] : this.dietPreference.toArray(new Base[this.dietPreference.size()]); // CodeableConcept
case 1583588345: /*specialCourtesy*/ return this.specialCourtesy == null ? new Base[0] : this.specialCourtesy.toArray(new Base[this.specialCourtesy.size()]); // CodeableConcept
case 47410321: /*specialArrangement*/ return this.specialArrangement == null ? new Base[0] : this.specialArrangement.toArray(new Base[this.specialArrangement.size()]); // CodeableConcept
case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference
case 528065941: /*dischargeDisposition*/ return this.dischargeDisposition == null ? new Base[0] : new Base[] {this.dischargeDisposition}; // CodeableConcept
case -1985183665: /*dischargeDiagnosis*/ return this.dischargeDiagnosis == null ? new Base[0] : this.dischargeDiagnosis.toArray(new Base[this.dischargeDiagnosis.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -965394961: // preAdmissionIdentifier
this.preAdmissionIdentifier = castToIdentifier(value); // Identifier
break;
case -1008619738: // origin
this.origin = castToReference(value); // Reference
break;
case 538887120: // admitSource
this.admitSource = castToCodeableConcept(value); // CodeableConcept
break;
case 2048045678: // admittingDiagnosis
this.getAdmittingDiagnosis().add(castToReference(value)); // Reference
break;
case 669348630: // reAdmission
this.reAdmission = castToCodeableConcept(value); // CodeableConcept
break;
case -1360641041: // dietPreference
this.getDietPreference().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 1583588345: // specialCourtesy
this.getSpecialCourtesy().add(castToCodeableConcept(value)); // CodeableConcept
break;
case 47410321: // specialArrangement
this.getSpecialArrangement().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1429847026: // destination
this.destination = castToReference(value); // Reference
break;
case 528065941: // dischargeDisposition
this.dischargeDisposition = castToCodeableConcept(value); // CodeableConcept
break;
case -1985183665: // dischargeDiagnosis
this.getDischargeDiagnosis().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("preAdmissionIdentifier")) if (name.equals("preAdmissionIdentifier"))
@ -1489,6 +1730,25 @@ Not to be used when the patient is currently at the location
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -965394961: return getPreAdmissionIdentifier(); // Identifier
case -1008619738: return getOrigin(); // Reference
case 538887120: return getAdmitSource(); // CodeableConcept
case 2048045678: return addAdmittingDiagnosis(); // Reference
case 669348630: return getReAdmission(); // CodeableConcept
case -1360641041: return addDietPreference(); // CodeableConcept
case 1583588345: return addSpecialCourtesy(); // CodeableConcept
case 47410321: return addSpecialArrangement(); // CodeableConcept
case -1429847026: return getDestination(); // Reference
case 528065941: return getDischargeDisposition(); // CodeableConcept
case -1985183665: return addDischargeDiagnosis(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("preAdmissionIdentifier")) { if (name.equals("preAdmissionIdentifier")) {
@ -1597,9 +1857,9 @@ Not to be used when the patient is currently at the location
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( preAdmissionIdentifier, origin return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(preAdmissionIdentifier, origin
, admitSource, admittingDiagnosis, reAdmission, dietPreference, specialCourtesy, specialArrangement , admitSource, admittingDiagnosis, reAdmission, dietPreference, specialCourtesy, specialArrangement
, destination, dischargeDisposition, dischargeDiagnosis); , destination, dischargeDisposition, dischargeDiagnosis);
} }
public String fhirType() { public String fhirType() {
@ -1778,6 +2038,34 @@ Not to be used when the patient is currently at the location
childrenList.add(new Property("period", "Period", "Time period during which the patient was present at the location.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Time period during which the patient was present at the location.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EncounterLocationStatus>
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1901043637: // location
this.location = castToReference(value); // Reference
break;
case -892481550: // status
this.status = new EncounterLocationStatusEnumFactory().fromType(value); // Enumeration<EncounterLocationStatus>
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("location")) if (name.equals("location"))
@ -1790,6 +2078,17 @@ Not to be used when the patient is currently at the location
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1901043637: return getLocation(); // Reference
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<EncounterLocationStatus>
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("location")) { if (name.equals("location")) {
@ -1838,7 +2137,7 @@ Not to be used when the patient is currently at the location
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( location, status, period); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(location, status, period);
} }
public String fhirType() { public String fhirType() {
@ -2042,6 +2341,24 @@ Not to be used when the patient is currently at the location
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -2127,6 +2444,24 @@ Not to be used when the patient is currently at the location
return this.statusHistory; return this.statusHistory;
} }
/**
* @return The first repetition of repeating field {@link #statusHistory}, creating it if it does not already exist
*/
public EncounterStatusHistoryComponent getStatusHistoryFirstRep() {
if (getStatusHistory().isEmpty()) {
addStatusHistory();
}
return getStatusHistory().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setStatusHistory(List<EncounterStatusHistoryComponent> theStatusHistory) {
this.statusHistory = theStatusHistory;
return this;
}
public boolean hasStatusHistory() { public boolean hasStatusHistory() {
if (this.statusHistory == null) if (this.statusHistory == null)
return false; return false;
@ -2216,6 +2551,24 @@ Not to be used when the patient is currently at the location
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setType(List<CodeableConcept> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -2324,6 +2677,24 @@ Not to be used when the patient is currently at the location
return this.episodeOfCare; return this.episodeOfCare;
} }
/**
* @return The first repetition of repeating field {@link #episodeOfCare}, creating it if it does not already exist
*/
public Reference getEpisodeOfCareFirstRep() {
if (getEpisodeOfCare().isEmpty()) {
addEpisodeOfCare();
}
return getEpisodeOfCare().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setEpisodeOfCare(List<Reference> theEpisodeOfCare) {
this.episodeOfCare = theEpisodeOfCare;
return this;
}
public boolean hasEpisodeOfCare() { public boolean hasEpisodeOfCare() {
if (this.episodeOfCare == null) if (this.episodeOfCare == null)
return false; return false;
@ -2385,6 +2756,24 @@ Not to be used when the patient is currently at the location
return this.incomingReferral; return this.incomingReferral;
} }
/**
* @return The first repetition of repeating field {@link #incomingReferral}, creating it if it does not already exist
*/
public Reference getIncomingReferralFirstRep() {
if (getIncomingReferral().isEmpty()) {
addIncomingReferral();
}
return getIncomingReferral().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setIncomingReferral(List<Reference> theIncomingReferral) {
this.incomingReferral = theIncomingReferral;
return this;
}
public boolean hasIncomingReferral() { public boolean hasIncomingReferral() {
if (this.incomingReferral == null) if (this.incomingReferral == null)
return false; return false;
@ -2446,6 +2835,24 @@ Not to be used when the patient is currently at the location
return this.participant; return this.participant;
} }
/**
* @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
*/
public EncounterParticipantComponent getParticipantFirstRep() {
if (getParticipant().isEmpty()) {
addParticipant();
}
return getParticipant().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setParticipant(List<EncounterParticipantComponent> theParticipant) {
this.participant = theParticipant;
return this;
}
public boolean hasParticipant() { public boolean hasParticipant() {
if (this.participant == null) if (this.participant == null)
return false; return false;
@ -2578,6 +2985,24 @@ Not to be used when the patient is currently at the location
return this.reason; return this.reason;
} }
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setReason(List<CodeableConcept> theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() { public boolean hasReason() {
if (this.reason == null) if (this.reason == null)
return false; return false;
@ -2618,6 +3043,24 @@ Not to be used when the patient is currently at the location
return this.indication; return this.indication;
} }
/**
* @return The first repetition of repeating field {@link #indication}, creating it if it does not already exist
*/
public Reference getIndicationFirstRep() {
if (getIndication().isEmpty()) {
addIndication();
}
return getIndication().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setIndication(List<Reference> theIndication) {
this.indication = theIndication;
return this;
}
public boolean hasIndication() { public boolean hasIndication() {
if (this.indication == null) if (this.indication == null)
return false; return false;
@ -2691,6 +3134,24 @@ Not to be used when the patient is currently at the location
return this.location; return this.location;
} }
/**
* @return The first repetition of repeating field {@link #location}, creating it if it does not already exist
*/
public EncounterLocationComponent getLocationFirstRep() {
if (getLocation().isEmpty()) {
addLocation();
}
return getLocation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Encounter setLocation(List<EncounterLocationComponent> theLocation) {
this.location = theLocation;
return this;
}
public boolean hasLocation() { public boolean hasLocation() {
if (this.location == null) if (this.location == null)
return false; return false;
@ -2833,6 +3294,98 @@ Not to be used when the patient is currently at the location
childrenList.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, java.lang.Integer.MAX_VALUE, partOf)); childrenList.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, java.lang.Integer.MAX_VALUE, partOf));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EncounterState>
case -986695614: /*statusHistory*/ return this.statusHistory == null ? new Base[0] : this.statusHistory.toArray(new Base[this.statusHistory.size()]); // EncounterStatusHistoryComponent
case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // Enumeration<EncounterClass>
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case -1892140189: /*episodeOfCare*/ return this.episodeOfCare == null ? new Base[0] : this.episodeOfCare.toArray(new Base[this.episodeOfCare.size()]); // Reference
case -1258204701: /*incomingReferral*/ return this.incomingReferral == null ? new Base[0] : this.incomingReferral.toArray(new Base[this.incomingReferral.size()]); // Reference
case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // EncounterParticipantComponent
case -1474995297: /*appointment*/ return this.appointment == null ? new Base[0] : new Base[] {this.appointment}; // Reference
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // Duration
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case -597168804: /*indication*/ return this.indication == null ? new Base[0] : this.indication.toArray(new Base[this.indication.size()]); // Reference
case 1057894634: /*hospitalization*/ return this.hospitalization == null ? new Base[0] : new Base[] {this.hospitalization}; // EncounterHospitalizationComponent
case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // EncounterLocationComponent
case 243182534: /*serviceProvider*/ return this.serviceProvider == null ? new Base[0] : new Base[] {this.serviceProvider}; // Reference
case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new EncounterStateEnumFactory().fromType(value); // Enumeration<EncounterState>
break;
case -986695614: // statusHistory
this.getStatusHistory().add((EncounterStatusHistoryComponent) value); // EncounterStatusHistoryComponent
break;
case 94742904: // class
this.class_ = new EncounterClassEnumFactory().fromType(value); // Enumeration<EncounterClass>
break;
case 3575610: // type
this.getType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1165461084: // priority
this.priority = castToCodeableConcept(value); // CodeableConcept
break;
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case -1892140189: // episodeOfCare
this.getEpisodeOfCare().add(castToReference(value)); // Reference
break;
case -1258204701: // incomingReferral
this.getIncomingReferral().add(castToReference(value)); // Reference
break;
case 767422259: // participant
this.getParticipant().add((EncounterParticipantComponent) value); // EncounterParticipantComponent
break;
case -1474995297: // appointment
this.appointment = castToReference(value); // Reference
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -1106363674: // length
this.length = castToDuration(value); // Duration
break;
case -934964668: // reason
this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -597168804: // indication
this.getIndication().add(castToReference(value)); // Reference
break;
case 1057894634: // hospitalization
this.hospitalization = (EncounterHospitalizationComponent) value; // EncounterHospitalizationComponent
break;
case 1901043637: // location
this.getLocation().add((EncounterLocationComponent) value); // EncounterLocationComponent
break;
case 243182534: // serviceProvider
this.serviceProvider = castToReference(value); // Reference
break;
case -995410646: // partOf
this.partOf = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -2877,6 +3430,33 @@ Not to be used when the patient is currently at the location
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<EncounterState>
case -986695614: return addStatusHistory(); // EncounterStatusHistoryComponent
case 94742904: throw new FHIRException("Cannot make property class as it is not a complex type"); // Enumeration<EncounterClass>
case 3575610: return addType(); // CodeableConcept
case -1165461084: return getPriority(); // CodeableConcept
case -791418107: return getPatient(); // Reference
case -1892140189: return addEpisodeOfCare(); // Reference
case -1258204701: return addIncomingReferral(); // Reference
case 767422259: return addParticipant(); // EncounterParticipantComponent
case -1474995297: return getAppointment(); // Reference
case -991726143: return getPeriod(); // Period
case -1106363674: return getLength(); // Duration
case -934964668: return addReason(); // CodeableConcept
case -597168804: return addIndication(); // Reference
case 1057894634: return getHospitalization(); // EncounterHospitalizationComponent
case 1901043637: return addLocation(); // EncounterLocationComponent
case 243182534: return getServiceProvider(); // Reference
case -995410646: return getPartOf(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -3046,10 +3626,9 @@ Not to be used when the patient is currently at the location
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, statusHistory return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusHistory
, class_, type, priority, patient, episodeOfCare, incomingReferral, participant, appointment , class_, type, priority, patient, episodeOfCare, incomingReferral, participant, appointment
, period, length, reason, indication, hospitalization, location, serviceProvider, partOf , period, length, reason, indication, hospitalization, location, serviceProvider, partOf);
);
} }
@Override @Override
@ -3065,7 +3644,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.period</b><br> * Path: <b>Encounter.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -3085,7 +3666,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.identifier</b><br> * Path: <b>Encounter.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="Encounter.identifier", description="Identifier(s) by which this encounter is known", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="Encounter.identifier", description="Identifier(s) by which this encounter is known", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -3105,7 +3688,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.reason</b><br> * Path: <b>Encounter.reason</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="reason", path="Encounter.reason", description="Reason the encounter takes place (code)", type="token" ) // []
// []
@SearchParamDefinition(name="reason", path="Encounter.reason", description="Reason the encounter takes place (code)", type="token", target={} )
public static final String SP_REASON = "reason"; public static final String SP_REASON = "reason";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>reason</b> * <b>Fluent Client</b> search parameter constant for <b>reason</b>
@ -3125,7 +3710,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.episodeOfCare</b><br> * Path: <b>Encounter.episodeOfCare</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="Episode(s) of care that this encounter should be recorded against", type="reference" ) // [EpisodeOfCare]
// [EpisodeOfCare]
@SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="Episode(s) of care that this encounter should be recorded against", type="reference", target={EpisodeOfCare.class} )
public static final String SP_EPISODEOFCARE = "episodeofcare"; public static final String SP_EPISODEOFCARE = "episodeofcare";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>episodeofcare</b> * <b>Fluent Client</b> search parameter constant for <b>episodeofcare</b>
@ -3151,7 +3738,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.participant.type</b><br> * Path: <b>Encounter.participant.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) // []
// []
@SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token", target={} )
public static final String SP_PARTICIPANT_TYPE = "participant-type"; public static final String SP_PARTICIPANT_TYPE = "participant-type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>participant-type</b> * <b>Fluent Client</b> search parameter constant for <b>participant-type</b>
@ -3171,7 +3760,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.incomingReferral</b><br> * Path: <b>Encounter.incomingReferral</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="incomingreferral", path="Encounter.incomingReferral", description="The ReferralRequest that initiated this encounter", type="reference" ) // [ReferralRequest]
// [ReferralRequest]
@SearchParamDefinition(name="incomingreferral", path="Encounter.incomingReferral", description="The ReferralRequest that initiated this encounter", type="reference", target={ReferralRequest.class} )
public static final String SP_INCOMINGREFERRAL = "incomingreferral"; public static final String SP_INCOMINGREFERRAL = "incomingreferral";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>incomingreferral</b> * <b>Fluent Client</b> search parameter constant for <b>incomingreferral</b>
@ -3197,7 +3788,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.participant.individual</b><br> * Path: <b>Encounter.participant.individual</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner, RelatedPerson]
// [Practitioner]
@SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", target={Practitioner.class, RelatedPerson.class} )
public static final String SP_PRACTITIONER = "practitioner"; public static final String SP_PRACTITIONER = "practitioner";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>practitioner</b> * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
@ -3223,7 +3816,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.length</b><br> * Path: <b>Encounter.length</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) // []
// []
@SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number", target={} )
public static final String SP_LENGTH = "length"; public static final String SP_LENGTH = "length";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>length</b> * <b>Fluent Client</b> search parameter constant for <b>length</b>
@ -3243,7 +3838,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.appointment</b><br> * Path: <b>Encounter.appointment</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="appointment", path="Encounter.appointment", description="The appointment that scheduled this encounter", type="reference" ) // [Appointment]
// [Appointment]
@SearchParamDefinition(name="appointment", path="Encounter.appointment", description="The appointment that scheduled this encounter", type="reference", target={Appointment.class} )
public static final String SP_APPOINTMENT = "appointment"; public static final String SP_APPOINTMENT = "appointment";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>appointment</b> * <b>Fluent Client</b> search parameter constant for <b>appointment</b>
@ -3269,7 +3866,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.partOf</b><br> * Path: <b>Encounter.partOf</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference" ) // [Encounter]
// [Encounter]
@SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference", target={Encounter.class} )
public static final String SP_PART_OF = "part-of"; public static final String SP_PART_OF = "part-of";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>part-of</b> * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
@ -3295,7 +3894,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.indication</b><br> * Path: <b>Encounter.indication</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="procedure", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) // [Condition, Procedure]
// [Procedure]
@SearchParamDefinition(name="procedure", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference", target={Condition.class, Procedure.class} )
public static final String SP_PROCEDURE = "procedure"; public static final String SP_PROCEDURE = "procedure";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>procedure</b> * <b>Fluent Client</b> search parameter constant for <b>procedure</b>
@ -3321,7 +3922,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.type</b><br> * Path: <b>Encounter.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -3341,7 +3944,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.participant.individual</b><br> * Path: <b>Encounter.participant.individual</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) // [Practitioner, RelatedPerson]
// [Practitioner, RelatedPerson]
@SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", target={Practitioner.class, RelatedPerson.class} )
public static final String SP_PARTICIPANT = "participant"; public static final String SP_PARTICIPANT = "participant";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>participant</b> * <b>Fluent Client</b> search parameter constant for <b>participant</b>
@ -3367,7 +3972,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.indication</b><br> * Path: <b>Encounter.indication</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="condition", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) // [Condition, Procedure]
// [Condition]
@SearchParamDefinition(name="condition", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference", target={Condition.class, Procedure.class} )
public static final String SP_CONDITION = "condition"; public static final String SP_CONDITION = "condition";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>condition</b> * <b>Fluent Client</b> search parameter constant for <b>condition</b>
@ -3393,7 +4000,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.patient</b><br> * Path: <b>Encounter.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -3419,7 +4028,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.location.period</b><br> * Path: <b>Encounter.location.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date" ) // []
// []
@SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date", target={} )
public static final String SP_LOCATION_PERIOD = "location-period"; public static final String SP_LOCATION_PERIOD = "location-period";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location-period</b> * <b>Fluent Client</b> search parameter constant for <b>location-period</b>
@ -3439,7 +4050,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.location.location</b><br> * Path: <b>Encounter.location.location</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference" ) // [Location]
// [Location]
@SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference", target={Location.class} )
public static final String SP_LOCATION = "location"; public static final String SP_LOCATION = "location";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>location</b> * <b>Fluent Client</b> search parameter constant for <b>location</b>
@ -3465,7 +4078,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.indication</b><br> * Path: <b>Encounter.indication</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" ) // [Condition, Procedure]
// [Condition, Procedure]
@SearchParamDefinition(name="indication", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference", target={Condition.class, Procedure.class} )
public static final String SP_INDICATION = "indication"; public static final String SP_INDICATION = "indication";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>indication</b> * <b>Fluent Client</b> search parameter constant for <b>indication</b>
@ -3491,7 +4106,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.hospitalization.specialArrangement</b><br> * Path: <b>Encounter.hospitalization.specialArrangement</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc.", type="token" ) // []
// []
@SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="Wheelchair, translator, stretcher, etc.", type="token", target={} )
public static final String SP_SPECIAL_ARRANGEMENT = "special-arrangement"; public static final String SP_SPECIAL_ARRANGEMENT = "special-arrangement";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>special-arrangement</b> * <b>Fluent Client</b> search parameter constant for <b>special-arrangement</b>
@ -3511,7 +4128,9 @@ Not to be used when the patient is currently at the location
* Path: <b>Encounter.status</b><br> * Path: <b>Encounter.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="Encounter.status", description="planned | arrived | in-progress | onleave | finished | cancelled", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -170,6 +170,24 @@ public class EnrollmentRequest extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EnrollmentRequest setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -556,6 +574,62 @@ public class EnrollmentRequest extends DomainResource {
childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference
case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference
case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 1548678118: // ruleset
this.ruleset = castToCoding(value); // Coding
break;
case 1089373397: // originalRuleset
this.originalRuleset = castToCoding(value); // Coding
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case -880905839: // target
this.target = castToReference(value); // Reference
break;
case -987494927: // provider
this.provider = castToReference(value); // Reference
break;
case 1178922291: // organization
this.organization = castToReference(value); // Reference
break;
case -1867885268: // subject
this.subject = castToReference(value); // Reference
break;
case -351767064: // coverage
this.coverage = castToReference(value); // Reference
break;
case -261851592: // relationship
this.relationship = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -582,6 +656,24 @@ public class EnrollmentRequest extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 1548678118: return getRuleset(); // Coding
case 1089373397: return getOriginalRuleset(); // Coding
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case -880905839: return getTarget(); // Reference
case -987494927: return getProvider(); // Reference
case 1178922291: return getOrganization(); // Reference
case -1867885268: return getSubject(); // Reference
case -351767064: return getCoverage(); // Reference
case -261851592: return getRelationship(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -679,8 +771,8 @@ public class EnrollmentRequest extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ruleset, originalRuleset return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ruleset, originalRuleset
, created, target, provider, organization, subject, coverage, relationship); , created, target, provider, organization, subject, coverage, relationship);
} }
@Override @Override
@ -696,7 +788,9 @@ public class EnrollmentRequest extends DomainResource {
* Path: <b>EnrollmentRequest.identifier</b><br> * Path: <b>EnrollmentRequest.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="EnrollmentRequest.identifier", description="The business identifier of the Enrollment", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="EnrollmentRequest.identifier", description="The business identifier of the Enrollment", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -716,7 +810,9 @@ public class EnrollmentRequest extends DomainResource {
* Path: <b>EnrollmentRequest.subject</b><br> * Path: <b>EnrollmentRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference", target={Patient.class} )
public static final String SP_SUBJECT = "subject"; public static final String SP_SUBJECT = "subject";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>subject</b> * <b>Fluent Client</b> search parameter constant for <b>subject</b>
@ -742,7 +838,9 @@ public class EnrollmentRequest extends DomainResource {
* Path: <b>EnrollmentRequest.subject</b><br> * Path: <b>EnrollmentRequest.subject</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -156,6 +156,24 @@ public class EnrollmentResponse extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EnrollmentResponse setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -572,6 +590,62 @@ public class EnrollmentResponse extends DomainResource {
childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome>
case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference
case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 1095692943: // request
this.request = castToReference(value); // Reference
break;
case -1106507950: // outcome
this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
break;
case 583380919: // disposition
this.disposition = castToString(value); // StringType
break;
case 1548678118: // ruleset
this.ruleset = castToCoding(value); // Coding
break;
case 1089373397: // originalRuleset
this.originalRuleset = castToCoding(value); // Coding
break;
case 1028554472: // created
this.created = castToDateTime(value); // DateTimeType
break;
case 1178922291: // organization
this.organization = castToReference(value); // Reference
break;
case 1601527200: // requestProvider
this.requestProvider = castToReference(value); // Reference
break;
case 599053666: // requestOrganization
this.requestOrganization = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -598,6 +672,24 @@ public class EnrollmentResponse extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case 1095692943: return getRequest(); // Reference
case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Enumeration<RemittanceOutcome>
case 583380919: throw new FHIRException("Cannot make property disposition as it is not a complex type"); // StringType
case 1548678118: return getRuleset(); // Coding
case 1089373397: return getOriginalRuleset(); // Coding
case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
case 1178922291: return getOrganization(); // Reference
case 1601527200: return getRequestProvider(); // Reference
case 599053666: return getRequestOrganization(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -694,9 +786,8 @@ public class EnrollmentResponse extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, request, outcome, disposition
, disposition, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization , ruleset, originalRuleset, created, organization, requestProvider, requestOrganization);
);
} }
@Override @Override
@ -712,7 +803,9 @@ public class EnrollmentResponse extends DomainResource {
* Path: <b>EnrollmentResponse.identifier</b><br> * Path: <b>EnrollmentResponse.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="EnrollmentResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="EnrollmentResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>

View File

@ -49,13 +49,14 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
/** /**
* Constructor * Constructor
*
* @deprecated This no-arg constructor is provided for serialization only - Do not use * @deprecated This no-arg constructor is provided for serialization only - Do not use
*/ */
@Deprecated @Deprecated
public Enumeration() { public Enumeration() {
// nothing // nothing
} }
/** /**
* Constructor * Constructor
*/ */
@ -113,7 +114,7 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
} }
return null; return null;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException { public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException {
@ -121,10 +122,13 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
super.readExternal(theIn); super.readExternal(theIn);
} }
public String toSystem() {
return getEnumFactory().toSystem(getValue());
}
@Override @Override
public void writeExternal(ObjectOutput theOut) throws IOException { public void writeExternal(ObjectOutput theOut) throws IOException {
theOut.writeObject(myEnumFactory); theOut.writeObject(myEnumFactory);
super.writeExternal(theOut); super.writeExternal(theOut);
} }
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -307,6 +307,30 @@ public class EpisodeOfCare extends DomainResource {
childrenList.add(new Property("period", "Period", "The period during this EpisodeOfCare that the specific status applied.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "The period during this EpisodeOfCare that the specific status applied.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EpisodeOfCareStatus>
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -892481550: // status
this.status = new EpisodeOfCareStatusEnumFactory().fromType(value); // Enumeration<EpisodeOfCareStatus>
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("status")) if (name.equals("status"))
@ -317,6 +341,16 @@ public class EpisodeOfCare extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<EpisodeOfCareStatus>
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("status")) { if (name.equals("status")) {
@ -359,7 +393,7 @@ public class EpisodeOfCare extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, period); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, period);
} }
public String fhirType() { public String fhirType() {
@ -503,6 +537,24 @@ public class EpisodeOfCare extends DomainResource {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -588,6 +640,24 @@ public class EpisodeOfCare extends DomainResource {
return this.statusHistory; return this.statusHistory;
} }
/**
* @return The first repetition of repeating field {@link #statusHistory}, creating it if it does not already exist
*/
public EpisodeOfCareStatusHistoryComponent getStatusHistoryFirstRep() {
if (getStatusHistory().isEmpty()) {
addStatusHistory();
}
return getStatusHistory().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setStatusHistory(List<EpisodeOfCareStatusHistoryComponent> theStatusHistory) {
this.statusHistory = theStatusHistory;
return this;
}
public boolean hasStatusHistory() { public boolean hasStatusHistory() {
if (this.statusHistory == null) if (this.statusHistory == null)
return false; return false;
@ -628,6 +698,24 @@ public class EpisodeOfCare extends DomainResource {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setType(List<CodeableConcept> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -668,6 +756,24 @@ public class EpisodeOfCare extends DomainResource {
return this.condition; return this.condition;
} }
/**
* @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist
*/
public Reference getConditionFirstRep() {
if (getCondition().isEmpty()) {
addCondition();
}
return getCondition().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setCondition(List<Reference> theCondition) {
this.condition = theCondition;
return this;
}
public boolean hasCondition() { public boolean hasCondition() {
if (this.condition == null) if (this.condition == null)
return false; return false;
@ -841,6 +947,24 @@ public class EpisodeOfCare extends DomainResource {
return this.referralRequest; return this.referralRequest;
} }
/**
* @return The first repetition of repeating field {@link #referralRequest}, creating it if it does not already exist
*/
public Reference getReferralRequestFirstRep() {
if (getReferralRequest().isEmpty()) {
addReferralRequest();
}
return getReferralRequest().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setReferralRequest(List<Reference> theReferralRequest) {
this.referralRequest = theReferralRequest;
return this;
}
public boolean hasReferralRequest() { public boolean hasReferralRequest() {
if (this.referralRequest == null) if (this.referralRequest == null)
return false; return false;
@ -946,6 +1070,24 @@ public class EpisodeOfCare extends DomainResource {
return this.team; return this.team;
} }
/**
* @return The first repetition of repeating field {@link #team}, creating it if it does not already exist
*/
public Reference getTeamFirstRep() {
if (getTeam().isEmpty()) {
addTeam();
}
return getTeam().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public EpisodeOfCare setTeam(List<Reference> theTeam) {
this.team = theTeam;
return this;
}
public boolean hasTeam() { public boolean hasTeam() {
if (this.team == null) if (this.team == null)
return false; return false;
@ -1013,6 +1155,66 @@ public class EpisodeOfCare extends DomainResource {
childrenList.add(new Property("team", "Reference(CareTeam)", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, team)); childrenList.add(new Property("team", "Reference(CareTeam)", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, team));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EpisodeOfCareStatus>
case -986695614: /*statusHistory*/ return this.statusHistory == null ? new Base[0] : this.statusHistory.toArray(new Base[this.statusHistory.size()]); // EpisodeOfCareStatusHistoryComponent
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // Reference
case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -310299598: /*referralRequest*/ return this.referralRequest == null ? new Base[0] : this.referralRequest.toArray(new Base[this.referralRequest.size()]); // Reference
case -1147746468: /*careManager*/ return this.careManager == null ? new Base[0] : new Base[] {this.careManager}; // Reference
case 3555933: /*team*/ return this.team == null ? new Base[0] : this.team.toArray(new Base[this.team.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case -892481550: // status
this.status = new EpisodeOfCareStatusEnumFactory().fromType(value); // Enumeration<EpisodeOfCareStatus>
break;
case -986695614: // statusHistory
this.getStatusHistory().add((EpisodeOfCareStatusHistoryComponent) value); // EpisodeOfCareStatusHistoryComponent
break;
case 3575610: // type
this.getType().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -861311717: // condition
this.getCondition().add(castToReference(value)); // Reference
break;
case -791418107: // patient
this.patient = castToReference(value); // Reference
break;
case -2058947787: // managingOrganization
this.managingOrganization = castToReference(value); // Reference
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -310299598: // referralRequest
this.getReferralRequest().add(castToReference(value)); // Reference
break;
case -1147746468: // careManager
this.careManager = castToReference(value); // Reference
break;
case 3555933: // team
this.getTeam().add(castToReference(value)); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identifier")) if (name.equals("identifier"))
@ -1041,6 +1243,25 @@ public class EpisodeOfCare extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1618432855: return addIdentifier(); // Identifier
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<EpisodeOfCareStatus>
case -986695614: return addStatusHistory(); // EpisodeOfCareStatusHistoryComponent
case 3575610: return addType(); // CodeableConcept
case -861311717: return addCondition(); // Reference
case -791418107: return getPatient(); // Reference
case -2058947787: return getManagingOrganization(); // Reference
case -991726143: return getPeriod(); // Period
case -310299598: return addReferralRequest(); // Reference
case -1147746468: return getCareManager(); // Reference
case 3555933: return addTeam(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) { if (name.equals("identifier")) {
@ -1159,9 +1380,9 @@ public class EpisodeOfCare extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, statusHistory return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusHistory
, type, condition, patient, managingOrganization, period, referralRequest, careManager , type, condition, patient, managingOrganization, period, referralRequest, careManager, team
, team); );
} }
@Override @Override
@ -1177,7 +1398,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.period</b><br> * Path: <b>EpisodeOfCare.period</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="EpisodeOfCare.period", description="The provided date search value falls within the episode of care's period", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="EpisodeOfCare.period", description="The provided date search value falls within the episode of care's period", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -1197,7 +1420,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.identifier</b><br> * Path: <b>EpisodeOfCare.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="EpisodeOfCare.identifier", description="Identifier(s) for the EpisodeOfCare", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="EpisodeOfCare.identifier", description="Identifier(s) for the EpisodeOfCare", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -1217,7 +1442,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.condition</b><br> * Path: <b>EpisodeOfCare.condition</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="Conditions/problems/diagnoses this episode of care is for", type="reference" ) // [Condition]
// [Condition]
@SearchParamDefinition(name="condition", path="EpisodeOfCare.condition", description="Conditions/problems/diagnoses this episode of care is for", type="reference", target={Condition.class} )
public static final String SP_CONDITION = "condition"; public static final String SP_CONDITION = "condition";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>condition</b> * <b>Fluent Client</b> search parameter constant for <b>condition</b>
@ -1243,7 +1470,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.referralRequest</b><br> * Path: <b>EpisodeOfCare.referralRequest</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="incomingreferral", path="EpisodeOfCare.referralRequest", description="Incoming Referral Request", type="reference" ) // [ReferralRequest]
// [ReferralRequest]
@SearchParamDefinition(name="incomingreferral", path="EpisodeOfCare.referralRequest", description="Incoming Referral Request", type="reference", target={ReferralRequest.class} )
public static final String SP_INCOMINGREFERRAL = "incomingreferral"; public static final String SP_INCOMINGREFERRAL = "incomingreferral";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>incomingreferral</b> * <b>Fluent Client</b> search parameter constant for <b>incomingreferral</b>
@ -1269,7 +1498,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.patient</b><br> * Path: <b>EpisodeOfCare.patient</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="Patient for this episode of care", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) // [Patient]
// [Patient]
@SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="Patient for this episode of care", type="reference", target={Patient.class} )
public static final String SP_PATIENT = "patient"; public static final String SP_PATIENT = "patient";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>patient</b> * <b>Fluent Client</b> search parameter constant for <b>patient</b>
@ -1295,7 +1526,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.managingOrganization</b><br> * Path: <b>EpisodeOfCare.managingOrganization</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities of this EpisodeOfCare", type="reference" ) // [Organization]
// [Organization]
@SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities of this EpisodeOfCare", type="reference", target={Organization.class} )
public static final String SP_ORGANIZATION = "organization"; public static final String SP_ORGANIZATION = "organization";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>organization</b> * <b>Fluent Client</b> search parameter constant for <b>organization</b>
@ -1321,7 +1554,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.type</b><br> * Path: <b>EpisodeOfCare.type</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Type/class - e.g. specialist referral, disease management", type="token" ) // []
// []
@SearchParamDefinition(name="type", path="EpisodeOfCare.type", description="Type/class - e.g. specialist referral, disease management", type="token", target={} )
public static final String SP_TYPE = "type"; public static final String SP_TYPE = "type";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>type</b> * <b>Fluent Client</b> search parameter constant for <b>type</b>
@ -1341,7 +1576,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.careManager</b><br> * Path: <b>EpisodeOfCare.careManager</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="Care manager/care co-ordinator for the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) // [Practitioner]
// [Practitioner]
@SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="Care manager/care co-ordinator for the patient", type="reference", target={Practitioner.class} )
public static final String SP_CARE_MANAGER = "care-manager"; public static final String SP_CARE_MANAGER = "care-manager";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>care-manager</b> * <b>Fluent Client</b> search parameter constant for <b>care-manager</b>
@ -1367,7 +1604,9 @@ public class EpisodeOfCare extends DomainResource {
* Path: <b>EpisodeOfCare.status</b><br> * Path: <b>EpisodeOfCare.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="EpisodeOfCare.status", description="The current status of the Episode of Care as provided (does not check the status history collection)", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="EpisodeOfCare.status", description="The current status of the Episode of Care as provided (does not check the status history collection)", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Mon, May 2, 2016 06:53-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -131,6 +131,24 @@ public class ExpansionProfile extends DomainResource {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ExpansionProfileContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -168,6 +186,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -178,6 +220,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -223,7 +275,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, telecom);
} }
public String fhirType() { public String fhirType() {
@ -312,6 +364,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("exclude", "", "Code systems to be excluded from value set expansions.", 0, java.lang.Integer.MAX_VALUE, exclude)); childrenList.add(new Property("exclude", "", "Code systems to be excluded from value set expansions.", 0, java.lang.Integer.MAX_VALUE, exclude));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1942574248: /*include*/ return this.include == null ? new Base[0] : new Base[] {this.include}; // CodeSystemIncludeComponent
case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // CodeSystemExcludeComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1942574248: // include
this.include = (CodeSystemIncludeComponent) value; // CodeSystemIncludeComponent
break;
case -1321148966: // exclude
this.exclude = (CodeSystemExcludeComponent) value; // CodeSystemExcludeComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("include")) if (name.equals("include"))
@ -322,6 +398,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1942574248: return getInclude(); // CodeSystemIncludeComponent
case -1321148966: return getExclude(); // CodeSystemExcludeComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("include")) { if (name.equals("include")) {
@ -365,7 +451,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( include, exclude); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(include, exclude);
} }
public String fhirType() { public String fhirType() {
@ -402,6 +488,24 @@ public class ExpansionProfile extends DomainResource {
return this.codeSystem; return this.codeSystem;
} }
/**
* @return The first repetition of repeating field {@link #codeSystem}, creating it if it does not already exist
*/
public CodeSystemIncludeCodeSystemComponent getCodeSystemFirstRep() {
if (getCodeSystem().isEmpty()) {
addCodeSystem();
}
return getCodeSystem().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CodeSystemIncludeComponent setCodeSystem(List<CodeSystemIncludeCodeSystemComponent> theCodeSystem) {
this.codeSystem = theCodeSystem;
return this;
}
public boolean hasCodeSystem() { public boolean hasCodeSystem() {
if (this.codeSystem == null) if (this.codeSystem == null)
return false; return false;
@ -438,6 +542,26 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("codeSystem", "", "A data group for each code system to be included.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("codeSystem", "", "A data group for each code system to be included.", 0, java.lang.Integer.MAX_VALUE, codeSystem));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -916511108: /*codeSystem*/ return this.codeSystem == null ? new Base[0] : this.codeSystem.toArray(new Base[this.codeSystem.size()]); // CodeSystemIncludeCodeSystemComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -916511108: // codeSystem
this.getCodeSystem().add((CodeSystemIncludeCodeSystemComponent) value); // CodeSystemIncludeCodeSystemComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("codeSystem")) if (name.equals("codeSystem"))
@ -446,6 +570,15 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -916511108: return addCodeSystem(); // CodeSystemIncludeCodeSystemComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("codeSystem")) { if (name.equals("codeSystem")) {
@ -487,7 +620,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( codeSystem); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(codeSystem);
} }
public String fhirType() { public String fhirType() {
@ -630,6 +763,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be included.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be included.", 0, java.lang.Integer.MAX_VALUE, version));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -640,6 +797,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -681,7 +848,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version);
} }
public String fhirType() { public String fhirType() {
@ -718,6 +885,24 @@ public class ExpansionProfile extends DomainResource {
return this.codeSystem; return this.codeSystem;
} }
/**
* @return The first repetition of repeating field {@link #codeSystem}, creating it if it does not already exist
*/
public CodeSystemExcludeCodeSystemComponent getCodeSystemFirstRep() {
if (getCodeSystem().isEmpty()) {
addCodeSystem();
}
return getCodeSystem().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CodeSystemExcludeComponent setCodeSystem(List<CodeSystemExcludeCodeSystemComponent> theCodeSystem) {
this.codeSystem = theCodeSystem;
return this;
}
public boolean hasCodeSystem() { public boolean hasCodeSystem() {
if (this.codeSystem == null) if (this.codeSystem == null)
return false; return false;
@ -754,6 +939,26 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("codeSystem", "", "A data group for each code system to be excluded.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("codeSystem", "", "A data group for each code system to be excluded.", 0, java.lang.Integer.MAX_VALUE, codeSystem));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -916511108: /*codeSystem*/ return this.codeSystem == null ? new Base[0] : this.codeSystem.toArray(new Base[this.codeSystem.size()]); // CodeSystemExcludeCodeSystemComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -916511108: // codeSystem
this.getCodeSystem().add((CodeSystemExcludeCodeSystemComponent) value); // CodeSystemExcludeCodeSystemComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("codeSystem")) if (name.equals("codeSystem"))
@ -762,6 +967,15 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -916511108: return addCodeSystem(); // CodeSystemExcludeCodeSystemComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("codeSystem")) { if (name.equals("codeSystem")) {
@ -803,7 +1017,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( codeSystem); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(codeSystem);
} }
public String fhirType() { public String fhirType() {
@ -946,6 +1160,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be excluded.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("version", "string", "The version of the code system from which codes in the expansion should be excluded.", 0, java.lang.Integer.MAX_VALUE, version));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -956,6 +1194,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -997,7 +1245,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version);
} }
public String fhirType() { public String fhirType() {
@ -1086,6 +1334,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("exclude", "", "Designations to be excluded.", 0, java.lang.Integer.MAX_VALUE, exclude)); childrenList.add(new Property("exclude", "", "Designations to be excluded.", 0, java.lang.Integer.MAX_VALUE, exclude));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1942574248: /*include*/ return this.include == null ? new Base[0] : new Base[] {this.include}; // DesignationIncludeComponent
case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // DesignationExcludeComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1942574248: // include
this.include = (DesignationIncludeComponent) value; // DesignationIncludeComponent
break;
case -1321148966: // exclude
this.exclude = (DesignationExcludeComponent) value; // DesignationExcludeComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("include")) if (name.equals("include"))
@ -1096,6 +1368,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1942574248: return getInclude(); // DesignationIncludeComponent
case -1321148966: return getExclude(); // DesignationExcludeComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("include")) { if (name.equals("include")) {
@ -1139,7 +1421,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( include, exclude); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(include, exclude);
} }
public String fhirType() { public String fhirType() {
@ -1176,6 +1458,24 @@ public class ExpansionProfile extends DomainResource {
return this.designation; return this.designation;
} }
/**
* @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist
*/
public DesignationIncludeDesignationComponent getDesignationFirstRep() {
if (getDesignation().isEmpty()) {
addDesignation();
}
return getDesignation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DesignationIncludeComponent setDesignation(List<DesignationIncludeDesignationComponent> theDesignation) {
this.designation = theDesignation;
return this;
}
public boolean hasDesignation() { public boolean hasDesignation() {
if (this.designation == null) if (this.designation == null)
return false; return false;
@ -1212,6 +1512,26 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("designation", "", "A data group for each designation to be included.", 0, java.lang.Integer.MAX_VALUE, designation)); childrenList.add(new Property("designation", "", "A data group for each designation to be included.", 0, java.lang.Integer.MAX_VALUE, designation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // DesignationIncludeDesignationComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -900931593: // designation
this.getDesignation().add((DesignationIncludeDesignationComponent) value); // DesignationIncludeDesignationComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("designation")) if (name.equals("designation"))
@ -1220,6 +1540,15 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -900931593: return addDesignation(); // DesignationIncludeDesignationComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("designation")) { if (name.equals("designation")) {
@ -1261,7 +1590,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( designation); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(designation);
} }
public String fhirType() { public String fhirType() {
@ -1375,6 +1704,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("use", "Coding", "Designation uses for inclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use)); childrenList.add(new Property("use", "Coding", "Designation uses for inclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 116103: // use
this.use = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("language")) if (name.equals("language"))
@ -1385,6 +1738,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 116103: return getUse(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("language")) { if (name.equals("language")) {
@ -1427,7 +1790,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use);
} }
public String fhirType() { public String fhirType() {
@ -1464,6 +1827,24 @@ public class ExpansionProfile extends DomainResource {
return this.designation; return this.designation;
} }
/**
* @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist
*/
public DesignationExcludeDesignationComponent getDesignationFirstRep() {
if (getDesignation().isEmpty()) {
addDesignation();
}
return getDesignation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DesignationExcludeComponent setDesignation(List<DesignationExcludeDesignationComponent> theDesignation) {
this.designation = theDesignation;
return this;
}
public boolean hasDesignation() { public boolean hasDesignation() {
if (this.designation == null) if (this.designation == null)
return false; return false;
@ -1500,6 +1881,26 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("designation", "", "A data group for each designation to be excluded.", 0, java.lang.Integer.MAX_VALUE, designation)); childrenList.add(new Property("designation", "", "A data group for each designation to be excluded.", 0, java.lang.Integer.MAX_VALUE, designation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // DesignationExcludeDesignationComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -900931593: // designation
this.getDesignation().add((DesignationExcludeDesignationComponent) value); // DesignationExcludeDesignationComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("designation")) if (name.equals("designation"))
@ -1508,6 +1909,15 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -900931593: return addDesignation(); // DesignationExcludeDesignationComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("designation")) { if (name.equals("designation")) {
@ -1549,7 +1959,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( designation); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(designation);
} }
public String fhirType() { public String fhirType() {
@ -1663,6 +2073,30 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("use", "Coding", "Designation uses for exclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use)); childrenList.add(new Property("use", "Coding", "Designation uses for exclusion in the expansion.", 0, java.lang.Integer.MAX_VALUE, use));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 116103: // use
this.use = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("language")) if (name.equals("language"))
@ -1673,6 +2107,16 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 116103: return getUse(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("language")) { if (name.equals("language")) {
@ -1715,7 +2159,7 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use); return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use);
} }
public String fhirType() { public String fhirType() {
@ -2201,6 +2645,24 @@ public class ExpansionProfile extends DomainResource {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public ExpansionProfileContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ExpansionProfile setContact(List<ExpansionProfileContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -2766,6 +3228,102 @@ public class ExpansionProfile extends DomainResource {
childrenList.add(new Property("limitedExpansion", "boolean", "If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete.", 0, java.lang.Integer.MAX_VALUE, limitedExpansion)); childrenList.add(new Property("limitedExpansion", "boolean", "If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete.", 0, java.lang.Integer.MAX_VALUE, limitedExpansion));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus>
case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ExpansionProfileContactComponent
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -916511108: /*codeSystem*/ return this.codeSystem == null ? new Base[0] : new Base[] {this.codeSystem}; // ExpansionProfileCodeSystemComponent
case 461507620: /*includeDesignations*/ return this.includeDesignations == null ? new Base[0] : new Base[] {this.includeDesignations}; // BooleanType
case -900931593: /*designation*/ return this.designation == null ? new Base[0] : new Base[] {this.designation}; // ExpansionProfileDesignationComponent
case 127972379: /*includeDefinition*/ return this.includeDefinition == null ? new Base[0] : new Base[] {this.includeDefinition}; // BooleanType
case 1634790707: /*includeInactive*/ return this.includeInactive == null ? new Base[0] : new Base[] {this.includeInactive}; // BooleanType
case 424992625: /*excludeNested*/ return this.excludeNested == null ? new Base[0] : new Base[] {this.excludeNested}; // BooleanType
case 667582980: /*excludeNotForUI*/ return this.excludeNotForUI == null ? new Base[0] : new Base[] {this.excludeNotForUI}; // BooleanType
case 563335154: /*excludePostCoordinated*/ return this.excludePostCoordinated == null ? new Base[0] : new Base[] {this.excludePostCoordinated}; // BooleanType
case 1486237242: /*displayLanguage*/ return this.displayLanguage == null ? new Base[0] : new Base[] {this.displayLanguage}; // CodeType
case 597771333: /*limitedExpansion*/ return this.limitedExpansion == null ? new Base[0] : new Base[] {this.limitedExpansion}; // BooleanType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case -1618432855: // identifier
this.identifier = castToIdentifier(value); // Identifier
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -892481550: // status
this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
break;
case -404562712: // experimental
this.experimental = castToBoolean(value); // BooleanType
break;
case 1447404028: // publisher
this.publisher = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((ExpansionProfileContactComponent) value); // ExpansionProfileContactComponent
break;
case 3076014: // date
this.date = castToDateTime(value); // DateTimeType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -916511108: // codeSystem
this.codeSystem = (ExpansionProfileCodeSystemComponent) value; // ExpansionProfileCodeSystemComponent
break;
case 461507620: // includeDesignations
this.includeDesignations = castToBoolean(value); // BooleanType
break;
case -900931593: // designation
this.designation = (ExpansionProfileDesignationComponent) value; // ExpansionProfileDesignationComponent
break;
case 127972379: // includeDefinition
this.includeDefinition = castToBoolean(value); // BooleanType
break;
case 1634790707: // includeInactive
this.includeInactive = castToBoolean(value); // BooleanType
break;
case 424992625: // excludeNested
this.excludeNested = castToBoolean(value); // BooleanType
break;
case 667582980: // excludeNotForUI
this.excludeNotForUI = castToBoolean(value); // BooleanType
break;
case 563335154: // excludePostCoordinated
this.excludePostCoordinated = castToBoolean(value); // BooleanType
break;
case 1486237242: // displayLanguage
this.displayLanguage = castToCode(value); // CodeType
break;
case 597771333: // limitedExpansion
this.limitedExpansion = castToBoolean(value); // BooleanType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -2812,6 +3370,34 @@ public class ExpansionProfile extends DomainResource {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case -1618432855: return getIdentifier(); // Identifier
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus>
case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
case 951526432: return addContact(); // ExpansionProfileContactComponent
case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -916511108: return getCodeSystem(); // ExpansionProfileCodeSystemComponent
case 461507620: throw new FHIRException("Cannot make property includeDesignations as it is not a complex type"); // BooleanType
case -900931593: return getDesignation(); // ExpansionProfileDesignationComponent
case 127972379: throw new FHIRException("Cannot make property includeDefinition as it is not a complex type"); // BooleanType
case 1634790707: throw new FHIRException("Cannot make property includeInactive as it is not a complex type"); // BooleanType
case 424992625: throw new FHIRException("Cannot make property excludeNested as it is not a complex type"); // BooleanType
case 667582980: throw new FHIRException("Cannot make property excludeNotForUI as it is not a complex type"); // BooleanType
case 563335154: throw new FHIRException("Cannot make property excludePostCoordinated as it is not a complex type"); // BooleanType
case 1486237242: throw new FHIRException("Cannot make property displayLanguage as it is not a complex type"); // CodeType
case 597771333: throw new FHIRException("Cannot make property limitedExpansion as it is not a complex type"); // BooleanType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -2955,10 +3541,10 @@ public class ExpansionProfile extends DomainResource {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version, name
, status, experimental, publisher, contact, date, description, codeSystem, includeDesignations , status, experimental, publisher, contact, date, description, codeSystem, includeDesignations
, designation, includeDefinition, includeInactive, excludeNested, excludeNotForUI, excludePostCoordinated , designation, includeDefinition, includeInactive, excludeNested, excludeNotForUI, excludePostCoordinated
, displayLanguage, limitedExpansion); , displayLanguage, limitedExpansion);
} }
@Override @Override
@ -2974,7 +3560,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.date</b><br> * Path: <b>ExpansionProfile.date</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="date", path="ExpansionProfile.date", description="The expansion profile publication date", type="date" ) // []
// []
@SearchParamDefinition(name="date", path="ExpansionProfile.date", description="The expansion profile publication date", type="date", target={} )
public static final String SP_DATE = "date"; public static final String SP_DATE = "date";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>date</b> * <b>Fluent Client</b> search parameter constant for <b>date</b>
@ -2994,7 +3582,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.identifier</b><br> * Path: <b>ExpansionProfile.identifier</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="identifier", path="ExpansionProfile.identifier", description="The identifier for the expansion profile", type="token" ) // []
// []
@SearchParamDefinition(name="identifier", path="ExpansionProfile.identifier", description="The identifier for the expansion profile", type="token", target={} )
public static final String SP_IDENTIFIER = "identifier"; public static final String SP_IDENTIFIER = "identifier";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b> * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
@ -3014,7 +3604,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.name</b><br> * Path: <b>ExpansionProfile.name</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="name", path="ExpansionProfile.name", description="The name of the expansion profile", type="string" ) // []
// []
@SearchParamDefinition(name="name", path="ExpansionProfile.name", description="The name of the expansion profile", type="string", target={} )
public static final String SP_NAME = "name"; public static final String SP_NAME = "name";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>name</b> * <b>Fluent Client</b> search parameter constant for <b>name</b>
@ -3034,7 +3626,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.publisher</b><br> * Path: <b>ExpansionProfile.publisher</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="publisher", path="ExpansionProfile.publisher", description="Name of the publisher of the expansion profile", type="string" ) // []
// []
@SearchParamDefinition(name="publisher", path="ExpansionProfile.publisher", description="Name of the publisher of the expansion profile", type="string", target={} )
public static final String SP_PUBLISHER = "publisher"; public static final String SP_PUBLISHER = "publisher";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>publisher</b> * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
@ -3054,7 +3648,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.description</b><br> * Path: <b>ExpansionProfile.description</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="description", path="ExpansionProfile.description", description="Text search in the description of the expansion profile", type="string" ) // []
// []
@SearchParamDefinition(name="description", path="ExpansionProfile.description", description="Text search in the description of the expansion profile", type="string", target={} )
public static final String SP_DESCRIPTION = "description"; public static final String SP_DESCRIPTION = "description";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>description</b> * <b>Fluent Client</b> search parameter constant for <b>description</b>
@ -3074,7 +3670,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.version</b><br> * Path: <b>ExpansionProfile.version</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="version", path="ExpansionProfile.version", description="The version identifier of the expansion profile", type="token" ) // []
// []
@SearchParamDefinition(name="version", path="ExpansionProfile.version", description="The version identifier of the expansion profile", type="token", target={} )
public static final String SP_VERSION = "version"; public static final String SP_VERSION = "version";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>version</b> * <b>Fluent Client</b> search parameter constant for <b>version</b>
@ -3094,7 +3692,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.url</b><br> * Path: <b>ExpansionProfile.url</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="url", path="ExpansionProfile.url", description="The logical URL for the expansion profile", type="uri" ) // []
// []
@SearchParamDefinition(name="url", path="ExpansionProfile.url", description="The logical URL for the expansion profile", type="uri", target={} )
public static final String SP_URL = "url"; public static final String SP_URL = "url";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>url</b> * <b>Fluent Client</b> search parameter constant for <b>url</b>
@ -3114,7 +3714,9 @@ public class ExpansionProfile extends DomainResource {
* Path: <b>ExpansionProfile.status</b><br> * Path: <b>ExpansionProfile.status</b><br>
* </p> * </p>
*/ */
@SearchParamDefinition(name="status", path="ExpansionProfile.status", description="The status of the expansion profile", type="token" ) // []
// []
@SearchParamDefinition(name="status", path="ExpansionProfile.status", description="The status of the expansion profile", type="token", target={} )
public static final String SP_STATUS = "status"; public static final String SP_STATUS = "status";
/** /**
* <b>Fluent Client</b> search parameter constant for <b>status</b> * <b>Fluent Client</b> search parameter constant for <b>status</b>

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