Merge branch 'versions'

Conflicts:
	hapi-fhir-base/examples/pom.xml
	hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java
	hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java
	hapi-fhir-base/testmindeps/pom.xml
	hapi-fhir-jpaserver-uhnfhirtest/pom.xml
	hapi-fhir-testpage-overlay/pom.xml
	hapi-tinder-plugin/pom.xml
	hapi-tinder-test/pom.xml
	restful-server-example-test/pom.xml
	restful-server-example/.settings/org.eclipse.wst.common.component
	restful-server-example/pom.xml
This commit is contained in:
James Agnew 2014-10-29 15:34:59 -04:00
commit 094a617644
560 changed files with 188184 additions and 82927 deletions

View File

@ -0,0 +1,81 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hapi-deployable-pom</artifactId>
<packaging>pom</packaging>
<name>HAPI FHIR - Deployable Artifact Parent POM</name>
<profiles>
<profile>
<id>DIST</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>1g</maxmemory>
<linksource>true</linksource>
<verbose>false</verbose>
<debug>false</debug>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven_source_plugin_version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${maven_license_plugin_version}</version>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<licenseName>apache_v2</licenseName>
<canUpdateDescription>true</canUpdateDescription>
<canUpdateCopyright>true</canUpdateCopyright>
<roots>
<root>src/main/java</root>
</roots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -1,2 +1,3 @@
/target /target
/bin /bin
/target/

View File

@ -1,6 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8 encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8 encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8

View File

@ -19,6 +19,11 @@
<artifactId>hapi-fhir-base</artifactId> <artifactId>hapi-fhir-base</artifactId>
<version>0.8-SNAPSHOT</version> <version>0.8-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu</artifactId>
<version>0.8-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>

View File

@ -0,0 +1,55 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>0.8-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>hapi-fhir-base-examples</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR - Examples (for site)</name>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<version>0.8-SNAPSHOT</version>
<<<<<<< HEAD
=======
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu</artifactId>
<version>0.8-SNAPSHOT</version>
>>>>>>> versions
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -6,6 +6,8 @@ import java.util.List;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.dstu.resource.Conformance;
import ca.uhn.fhir.model.dstu.resource.Observation; import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.dstu.resource.OperationOutcome;
@ -82,19 +84,19 @@ public class GenericClientExample {
// START SNIPPET: conformance // START SNIPPET: conformance
// Retrieve the server's conformance statement and print its // Retrieve the server's conformance statement and print its
// description // description
Conformance conf = client.conformance(); BaseConformance conf = client.conformance();
System.out.println(conf.getDescription().getValue()); System.out.println(conf.getDescriptionElement().getValue());
// END SNIPPET: conformance // END SNIPPET: conformance
} }
{ {
// START SNIPPET: delete // START SNIPPET: delete
// Retrieve the server's conformance statement and print its // Retrieve the server's conformance statement and print its
// description // description
OperationOutcome outcome = client.delete().resourceById(new IdDt("Patient", "1234")).execute(); BaseOperationOutcome outcome = client.delete().resourceById(new IdDt("Patient", "1234")).execute();
// outcome may be null if the server didn't return one // outcome may be null if the server didn't return one
if (outcome != null) { if (outcome != null) {
System.out.println(outcome.getIssueFirstRep().getDetails().getValue()); System.out.println(outcome.getIssueFirstRep().getDetailsElement().getValue());
} }
// END SNIPPET: delete // END SNIPPET: delete
} }

View File

@ -19,6 +19,7 @@ import ca.uhn.fhir.model.api.Tag;
import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
import ca.uhn.fhir.rest.annotation.TagListParam; import ca.uhn.fhir.rest.annotation.TagListParam;
import ca.uhn.fhir.model.dstu.composite.CodingDt; import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.dstu.resource.Conformance;
@ -430,7 +431,7 @@ public List<Observation> searchByObservationNames(
// The list here will contain 0..* codings, and any observations which match any of the // The list here will contain 0..* codings, and any observations which match any of the
// given codings should be returned // given codings should be returned
List<CodingDt> wantedCodings = theCodings.getListAsCodings(); List<BaseCodingDt> wantedCodings = theCodings.getListAsCodings();
List<Observation> retVal = new ArrayList<Observation>(); List<Observation> retVal = new ArrayList<Observation>();
// ...populate... // ...populate...

View File

@ -3,9 +3,9 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>0.8-SNAPSHOT</version> <version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>
<artifactId>hapi-fhir-base</artifactId> <artifactId>hapi-fhir-base</artifactId>
@ -178,138 +178,10 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version> <version>${servlet_api_version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.1.1.v20140108</version>
<scope>test</scope>
</dependency>
<!-- UNIT TEST DEPENDENCIES -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15-sources</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>directory-naming</groupId>
<artifactId>naming-java</artifactId>
<version>0.8</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava_version}</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring_security_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring_security_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
<version>1.0.2.RELEASE</version>
<scope>test</scope>
</dependency>
-->
</dependencies> </dependencies>
@ -666,39 +538,6 @@
<id>DIST</id> <id>DIST</id>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>1g</maxmemory>
<linksource>true</linksource>
<verbose>false</verbose>
<debug>false</debug>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven_source_plugin_version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>${maven_assembly_plugin_version}</version> <version>${maven_assembly_plugin_version}</version>
@ -718,28 +557,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${maven_license_plugin_version}</version>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<licenseName>apache_v2</licenseName>
<canUpdateDescription>true</canUpdateDescription>
<canUpdateCopyright>true</canUpdateCopyright>
<roots>
<root>src/main/java</root>
</roots>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>

View File

@ -81,10 +81,10 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
if (ourUseMethodAccessors == null) { if (ourUseMethodAccessors == null) {
try { try {
myField.setAccessible(true); myField.setAccessible(true);
ourUseMethodAccessors = true; ourUseMethodAccessors = false;
} catch (SecurityException e) { } catch (SecurityException e) {
ourLog.info("Can not use field accessors/mutators, going to use methods instead"); ourLog.info("Can not use field accessors/mutators, going to use methods instead");
ourUseMethodAccessors = false; ourUseMethodAccessors = true;
} }
} }

View File

@ -32,6 +32,7 @@ import org.apache.commons.lang3.text.WordUtils;
import ca.uhn.fhir.i18n.HapiLocalizer; import ca.uhn.fhir.i18n.HapiLocalizer;
import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IFhirVersion;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.view.ViewGenerator; import ca.uhn.fhir.model.view.ViewGenerator;
import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator;
@ -72,6 +73,7 @@ public class FhirContext {
private volatile INarrativeGenerator myNarrativeGenerator; private volatile INarrativeGenerator myNarrativeGenerator;
private volatile IRestfulClientFactory myRestfulClientFactory; private volatile IRestfulClientFactory myRestfulClientFactory;
private volatile RuntimeChildUndeclaredExtensionDefinition myRuntimeChildUndeclaredExtensionDefinition; private volatile RuntimeChildUndeclaredExtensionDefinition myRuntimeChildUndeclaredExtensionDefinition;
private IFhirVersion myVersion;
/** /**
* Default constructor. In most cases this is the right constructor to use. * Default constructor. In most cases this is the right constructor to use.
@ -90,6 +92,13 @@ public class FhirContext {
public FhirContext(Collection<Class<? extends IResource>> theResourceTypes) { public FhirContext(Collection<Class<? extends IResource>> theResourceTypes) {
scanResourceTypes(theResourceTypes); scanResourceTypes(theResourceTypes);
if (FhirVersionEnum.DSTU1.isPresentOnClasspath()) {
myVersion = FhirVersionEnum.DSTU1.getVersionImplementation();
} else {
throw new IllegalStateException("Could not find any HAPI-FHIR structure JARs on the classpath. Note that as of HAPI-FHIR v0.8, a separate FHIR strcture JAR must be added to your classpath or project pom.xml");
}
} }
/** /**
@ -197,6 +206,10 @@ public class FhirContext {
return myRuntimeChildUndeclaredExtensionDefinition; return myRuntimeChildUndeclaredExtensionDefinition;
} }
public IFhirVersion getVersion() {
return myVersion;
}
/** /**
* Create and return a new JSON parser. * Create and return a new JSON parser.
* *
@ -282,7 +295,7 @@ public class FhirContext {
} }
private Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> scanResourceTypes(Collection<Class<? extends IResource>> theResourceTypes) { private Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> scanResourceTypes(Collection<Class<? extends IResource>> theResourceTypes) {
ModelScanner scanner = new ModelScanner(myClassToElementDefinition, theResourceTypes); ModelScanner scanner = new ModelScanner(this, myClassToElementDefinition, theResourceTypes);
if (myRuntimeChildUndeclaredExtensionDefinition == null) { if (myRuntimeChildUndeclaredExtensionDefinition == null) {
myRuntimeChildUndeclaredExtensionDefinition = scanner.getRuntimeChildUndeclaredExtensionDefinition(); myRuntimeChildUndeclaredExtensionDefinition = scanner.getRuntimeChildUndeclaredExtensionDefinition();
} }

View File

@ -0,0 +1,69 @@
package ca.uhn.fhir.context;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import ca.uhn.fhir.model.api.IFhirVersion;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
public enum FhirVersionEnum {
DSTU1("ca.uhn.fhir.model.dstu.FhirDstu1");
private final String myVersionClass;
private volatile Boolean myPresentOnClasspath;
private volatile IFhirVersion myVersionImplementation;
FhirVersionEnum(String theVersionClass) {
myVersionClass = theVersionClass;
}
/**
* Returns true if the given version is present on the classpath
*/
public boolean isPresentOnClasspath() {
Boolean retVal = myPresentOnClasspath;
if (retVal==null) {
try {
Class.forName(myVersionClass);
retVal= true;
} catch (Exception e) {
retVal= false;
}
myPresentOnClasspath = retVal;
}
return retVal;
}
public IFhirVersion getVersionImplementation() {
if (!isPresentOnClasspath()) {
throw new IllegalStateException("Version " + name() + " is not present on classpath");
}
if (myVersionImplementation == null) {
try {
myVersionImplementation = (IFhirVersion) Class.forName(myVersionClass).newInstance();
} catch (Exception e) {
throw new InternalErrorException("Failed to instantiate FHIR version " + name(), e);
}
}
return myVersionImplementation;
}
}

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.*; import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -45,6 +45,7 @@ import java.util.TreeSet;
import ca.uhn.fhir.model.api.CodeableConceptElement; import ca.uhn.fhir.model.api.CodeableConceptElement;
import ca.uhn.fhir.model.api.ExtensionDt; import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IBoundCodeableConcept;
import ca.uhn.fhir.model.api.ICodeEnum; import ca.uhn.fhir.model.api.ICodeEnum;
import ca.uhn.fhir.model.api.ICompositeDatatype; import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.ICompositeElement; import ca.uhn.fhir.model.api.ICompositeElement;
@ -64,10 +65,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt;
import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.ContainedDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt; import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.ICodedDatatype; import ca.uhn.fhir.model.primitive.ICodedDatatype;
import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.model.primitive.XhtmlDt;
import ca.uhn.fhir.util.ReflectionUtil; import ca.uhn.fhir.util.ReflectionUtil;
@ -91,17 +90,22 @@ class ModelScanner {
private Set<Class<? extends ICodeEnum>> myScanAlsoCodeTable = new HashSet<Class<? extends ICodeEnum>>(); private Set<Class<? extends ICodeEnum>> myScanAlsoCodeTable = new HashSet<Class<? extends ICodeEnum>>();
ModelScanner(Class<? extends IResource> theResourceTypes) throws ConfigurationException { private FhirContext myContext;
ModelScanner(FhirContext theContext, Class<? extends IResource> theResourceTypes) throws ConfigurationException {
myContext=theContext;
Set<Class<? extends IElement>> singleton = new HashSet<Class<? extends IElement>>(); Set<Class<? extends IElement>> singleton = new HashSet<Class<? extends IElement>>();
singleton.add(theResourceTypes); singleton.add(theResourceTypes);
init(null, singleton); init(null, singleton);
} }
ModelScanner(Collection<Class<? extends IResource>> theResourceTypes) throws ConfigurationException { ModelScanner(FhirContext theContext, Collection<Class<? extends IResource>> theResourceTypes) throws ConfigurationException {
myContext=theContext;
init(null, new HashSet<Class<? extends IElement>>(theResourceTypes)); init(null, new HashSet<Class<? extends IElement>>(theResourceTypes));
} }
ModelScanner(Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theExistingDefinitions, Collection<Class<? extends IResource>> theResourceTypes) throws ConfigurationException { ModelScanner(FhirContext theContext, Map<Class<? extends IElement>, BaseRuntimeElementDefinition<?>> theExistingDefinitions, Collection<Class<? extends IResource>> theResourceTypes) throws ConfigurationException {
myContext=theContext;
init(theExistingDefinitions, new HashSet<Class<? extends IElement>>(theResourceTypes)); init(theExistingDefinitions, new HashSet<Class<? extends IElement>>(theResourceTypes));
} }
@ -479,7 +483,7 @@ class ModelScanner {
RuntimeChildContainedResources def = new RuntimeChildContainedResources(next, childAnnotation, descriptionAnnotation, elementName); RuntimeChildContainedResources def = new RuntimeChildContainedResources(next, childAnnotation, descriptionAnnotation, elementName);
orderMap.put(order, def); orderMap.put(order, def);
} else if (choiceTypes.size() > 1 && !ResourceReferenceDt.class.isAssignableFrom(nextElementType)) { } else if (choiceTypes.size() > 1 && !BaseResourceReferenceDt.class.isAssignableFrom(nextElementType)) {
/* /*
* Child is a choice element * Child is a choice element
*/ */
@ -514,7 +518,7 @@ class ModelScanner {
List<Class<? extends IResource>> refTypesList = new ArrayList<Class<? extends IResource>>(); List<Class<? extends IResource>> refTypesList = new ArrayList<Class<? extends IResource>>();
for (Class<? extends IElement> nextType : childAnnotation.type()) { for (Class<? extends IElement> nextType : childAnnotation.type()) {
if (IResource.class.isAssignableFrom(nextType) == false) { if (IResource.class.isAssignableFrom(nextType) == false) {
throw new ConfigurationException("Field '" + next.getName() + "' in class '" + next.getDeclaringClass().getCanonicalName() + "' is of type " + ResourceReferenceDt.class + " but contains a non-resource type: " + nextType.getCanonicalName()); throw new ConfigurationException("Field '" + next.getName() + "' in class '" + next.getDeclaringClass().getCanonicalName() + "' is of type " + BaseResourceReferenceDt.class + " but contains a non-resource type: " + nextType.getCanonicalName());
} }
refTypesList.add((Class<? extends IResource>) nextType); refTypesList.add((Class<? extends IResource>) nextType);
addScanAlso(nextType); addScanAlso(nextType);
@ -551,7 +555,7 @@ class ModelScanner {
def = new RuntimeChildPrimitiveDatatypeDefinition(next, elementName, descriptionAnnotation, childAnnotation, nextDatatype); def = new RuntimeChildPrimitiveDatatypeDefinition(next, elementName, descriptionAnnotation, childAnnotation, nextDatatype);
} }
} else { } else {
if (nextElementType.equals(BoundCodeableConceptDt.class)) { if (IBoundCodeableConcept.class.isAssignableFrom(nextElementType)) {
IValueSetEnumBinder<Enum<?>> binder = getBoundCodeBinder(next); IValueSetEnumBinder<Enum<?>> binder = getBoundCodeBinder(next);
def = new RuntimeChildCompositeBoundDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype, binder); def = new RuntimeChildCompositeBoundDatatypeDefinition(next, elementName, childAnnotation, descriptionAnnotation, nextDatatype, binder);
} else if (NarrativeDt.class.getSimpleName().equals(nextElementType.getSimpleName())) { } else if (NarrativeDt.class.getSimpleName().equals(nextElementType.getSimpleName())) {
@ -649,7 +653,7 @@ class ModelScanner {
} }
} }
RuntimeResourceDefinition resourceDef = new RuntimeResourceDefinition(resourceName, theClass, resourceDefinition); RuntimeResourceDefinition resourceDef = new RuntimeResourceDefinition(myContext, resourceName, theClass, resourceDefinition);
myClassToElementDefinitions.put(theClass, resourceDef); myClassToElementDefinitions.put(theClass, resourceDef);
if (primaryNameProvider) { if (primaryNameProvider) {
myNameToResourceDefinitions.put(resourceName, resourceDef); myNameToResourceDefinitions.put(resourceName, resourceDef);

View File

@ -20,52 +20,40 @@ package ca.uhn.fhir.context;
* #L% * #L%
*/ */
import static org.apache.commons.lang3.StringUtils.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.resource.Profile;
import ca.uhn.fhir.model.dstu.resource.Profile.ExtensionDefn;
import ca.uhn.fhir.model.dstu.resource.Profile.Structure;
import ca.uhn.fhir.model.dstu.resource.Profile.StructureElement;
import ca.uhn.fhir.model.dstu.resource.Profile.StructureElementDefinitionType;
import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
import ca.uhn.fhir.model.primitive.IdDt;
public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefinition<IResource> { public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefinition<IResource> {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RuntimeResourceDefinition.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RuntimeResourceDefinition.class);
private RuntimeResourceDefinition myBaseDefinition; private RuntimeResourceDefinition myBaseDefinition;
private Map<RuntimeChildDeclaredExtensionDefinition, String> myExtensionDefToCode = new HashMap<RuntimeChildDeclaredExtensionDefinition, String>();
private String myId;
private Map<String, RuntimeSearchParam> myNameToSearchParam = new LinkedHashMap<String, RuntimeSearchParam>(); private Map<String, RuntimeSearchParam> myNameToSearchParam = new LinkedHashMap<String, RuntimeSearchParam>();
private Profile myProfileDef; private IResource myProfileDef;
private String myResourceProfile; private String myResourceProfile;
private List<RuntimeSearchParam> mySearchParams; private List<RuntimeSearchParam> mySearchParams;
private FhirContext myContext;
private String myId;
public RuntimeResourceDefinition(String theResourceName, Class<? extends IResource> theClass, ResourceDef theResourceAnnotation) { public RuntimeResourceDefinition(FhirContext theContext, String theResourceName, Class<? extends IResource> theClass, ResourceDef theResourceAnnotation) {
super(theResourceName, theClass); super(theResourceName, theClass);
myContext= theContext;
myResourceProfile = theResourceAnnotation.profile(); myResourceProfile = theResourceAnnotation.profile();
myId = theResourceAnnotation.id(); myId = theResourceAnnotation.id();
} }
public String getId() {
return myId;
}
public void addSearchParam(RuntimeSearchParam theParam) { public void addSearchParam(RuntimeSearchParam theParam) {
myNameToSearchParam.put(theParam.getName(), theParam); myNameToSearchParam.put(theParam.getName(), theParam);
} }
@ -129,253 +117,17 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini
} while (target.equals(Object.class)==false); } while (target.equals(Object.class)==false);
} }
public synchronized Profile toProfile() { public synchronized IResource toProfile() {
if (myProfileDef != null) { if (myProfileDef != null) {
return myProfileDef; return myProfileDef;
} }
Profile retVal = new Profile(); IResource retVal = myContext.getVersion().generateProfile(this);
RuntimeResourceDefinition def = this;
if (StringUtils.isBlank(myId)) {
myId = getName().toLowerCase();
}
retVal.setId(new IdDt(myId));
// Scan for extensions
scanForExtensions(retVal, def);
Collections.sort(retVal.getExtensionDefn(), new Comparator<ExtensionDefn>() {
@Override
public int compare(ExtensionDefn theO1, ExtensionDefn theO2) {
return theO1.getCode().compareTo(theO2.getCode());
}
});
// Scan for children
retVal.setName(getName());
Structure struct = retVal.addStructure();
LinkedList<String> path = new LinkedList<String>();
StructureElement element = struct.addElement();
element.getDefinition().setMin(1);
element.getDefinition().setMax("1");
fillProfile(struct, element, def, path, null);
retVal.getStructure().get(0).getElement().get(0).getDefinition().addType().getCode().setValue("Resource");
myProfileDef = retVal; myProfileDef = retVal;
return retVal; return retVal;
} }
private void fillBasics(StructureElement theElement, BaseRuntimeElementDefinition<?> def, LinkedList<String> path, BaseRuntimeDeclaredChildDefinition theChild) {
if (path.isEmpty()) {
path.add(def.getName());
theElement.setName(def.getName());
} else {
path.add(WordUtils.uncapitalize(theChild.getElementName()));
theElement.setName(theChild.getElementName());
}
theElement.setPath(StringUtils.join(path, '.'));
}
private void fillExtensions(Structure theStruct, LinkedList<String> path, List<RuntimeChildDeclaredExtensionDefinition> extList, String elementName, boolean theIsModifier) {
if (extList.size() > 0) {
StructureElement extSlice = theStruct.addElement();
extSlice.setName(elementName);
extSlice.setPath(join(path, '.') + '.' + elementName);
extSlice.getSlicing().getDiscriminator().setValue("url");
extSlice.getSlicing().setOrdered(false);
extSlice.getSlicing().setRules(SlicingRulesEnum.OPEN);
extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
for (RuntimeChildDeclaredExtensionDefinition nextExt : extList) {
StructureElement nextProfileExt = theStruct.addElement();
nextProfileExt.getDefinition().setIsModifier(theIsModifier);
nextProfileExt.setName(extSlice.getName());
nextProfileExt.setPath(extSlice.getPath());
fillMinAndMaxAndDefinitions(nextExt, nextProfileExt);
StructureElementDefinitionType type = nextProfileExt.getDefinition().addType();
type.setCode(DataTypeEnum.EXTENSION);
if (nextExt.isDefinedLocally()) {
type.setProfile(nextExt.getExtensionUrl().substring(nextExt.getExtensionUrl().indexOf('#')));
} else {
type.setProfile(nextExt.getExtensionUrl());
}
}
} else {
StructureElement extSlice = theStruct.addElement();
extSlice.setName(elementName);
extSlice.setPath(join(path, '.') + '.' + elementName);
extSlice.getDefinition().setIsModifier(theIsModifier);
extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
extSlice.getDefinition().setMin(0);
extSlice.getDefinition().setMax("*");
}
}
private void fillMinAndMaxAndDefinitions(BaseRuntimeDeclaredChildDefinition child, StructureElement elem) {
elem.getDefinition().setMin(child.getMin());
if (child.getMax() == Child.MAX_UNLIMITED) {
elem.getDefinition().setMax("*");
} else {
elem.getDefinition().setMax(Integer.toString(child.getMax()));
}
if (isNotBlank(child.getShortDefinition())) {
elem.getDefinition().getShort().setValue(child.getShortDefinition());
}
if (isNotBlank(child.getFormalDefinition())) {
elem.getDefinition().getFormal().setValue(child.getFormalDefinition());
}
}
private void fillName(StructureElement elem, BaseRuntimeElementDefinition<?> nextDef) {
if (nextDef instanceof RuntimeResourceReferenceDefinition) {
RuntimeResourceReferenceDefinition rr = (RuntimeResourceReferenceDefinition) nextDef;
for (Class<? extends IResource> next : rr.getResourceTypes()) {
StructureElementDefinitionType type = elem.getDefinition().addType();
type.getCode().setValue("ResourceReference");
if (next != IResource.class) {
RuntimeResourceDefinition resDef = rr.getDefinitionForResourceType(next);
type.getProfile().setValueAsString(resDef.getResourceProfile());
}
}
return;
}
StructureElementDefinitionType type = elem.getDefinition().addType();
String name = nextDef.getName();
DataTypeEnum fromCodeString = DataTypeEnum.VALUESET_BINDER.fromCodeString(name);
if (fromCodeString == null) {
throw new ConfigurationException("Unknown type: " + name);
}
type.setCode(fromCodeString);
}
private void fillProfile(Structure theStruct, StructureElement theElement, BaseRuntimeElementDefinition<?> def, LinkedList<String> path, BaseRuntimeDeclaredChildDefinition theChild) {
fillBasics(theElement, def, path, theChild);
String expectedPath = StringUtils.join(path, '.');
ourLog.info("Filling profile for: {} - Path: {}", expectedPath);
String name = def.getName();
if (!expectedPath.equals(name)) {
path.pollLast();
theElement.getDefinition().getNameReference().setValue(def.getName());
return;
}
fillExtensions(theStruct, path, def.getExtensionsNonModifier(), "extension", false);
fillExtensions(theStruct, path, def.getExtensionsModifier(), "modifierExtension", true);
if (def.getChildType() == ChildTypeEnum.RESOURCE) {
StructureElement narrative = theStruct.addElement();
narrative.setName("text");
narrative.setPath(join(path, '.') + ".text");
narrative.getDefinition().addType().setCode(DataTypeEnum.NARRATIVE);
narrative.getDefinition().setIsModifier(false);
narrative.getDefinition().setMin(0);
narrative.getDefinition().setMax("1");
StructureElement contained = theStruct.addElement();
contained.setName("contained");
contained.setPath(join(path, '.') + ".contained");
contained.getDefinition().addType().getCode().setValue("Resource");
contained.getDefinition().setIsModifier(false);
contained.getDefinition().setMin(0);
contained.getDefinition().setMax("1");
}
if (def instanceof BaseRuntimeElementCompositeDefinition) {
BaseRuntimeElementCompositeDefinition<?> cdef = ((BaseRuntimeElementCompositeDefinition<?>) def);
for (BaseRuntimeChildDefinition nextChild : cdef.getChildren()) {
if (nextChild instanceof RuntimeChildUndeclaredExtensionDefinition) {
continue;
}
BaseRuntimeDeclaredChildDefinition child = (BaseRuntimeDeclaredChildDefinition) nextChild;
StructureElement elem = theStruct.addElement();
fillMinAndMaxAndDefinitions(child, elem);
if (child instanceof RuntimeChildResourceBlockDefinition) {
RuntimeResourceBlockDefinition nextDef = (RuntimeResourceBlockDefinition) child.getSingleChildOrThrow();
fillProfile(theStruct, elem, nextDef, path, child);
} else if (child instanceof RuntimeChildContainedResources) {
// ignore
} else if (child instanceof RuntimeChildDeclaredExtensionDefinition) {
throw new IllegalStateException("Unexpected child type: " + child.getClass().getCanonicalName());
} else if (child instanceof RuntimeChildCompositeDatatypeDefinition || child instanceof RuntimeChildPrimitiveDatatypeDefinition || child instanceof RuntimeChildChoiceDefinition
|| child instanceof RuntimeChildResourceDefinition) {
Iterator<String> childNamesIter = child.getValidChildNames().iterator();
String nextName = childNamesIter.next();
BaseRuntimeElementDefinition<?> nextDef = child.getChildByName(nextName);
fillBasics(elem, nextDef, path, child);
fillName(elem, nextDef);
while (childNamesIter.hasNext()) {
nextDef = child.getChildByName(childNamesIter.next());
fillName(elem, nextDef);
}
path.pollLast();
} else {
throw new IllegalStateException("Unexpected child type: " + child.getClass().getCanonicalName());
}
}
} else {
throw new IllegalStateException("Unexpected child type: " + def.getClass().getCanonicalName());
}
path.pollLast();
}
private void scanForExtensions(Profile theProfile, BaseRuntimeElementDefinition<?> def) {
BaseRuntimeElementCompositeDefinition<?> cdef = ((BaseRuntimeElementCompositeDefinition<?>) def);
for (RuntimeChildDeclaredExtensionDefinition nextChild : cdef.getExtensions()) {
if (myExtensionDefToCode.containsKey(nextChild)) {
continue;
}
if (nextChild.isDefinedLocally() == false) {
continue;
}
ExtensionDefn defn = theProfile.addExtensionDefn();
String code = null;
if (nextChild.getExtensionUrl().contains("#") && !nextChild.getExtensionUrl().endsWith("#")) {
code = nextChild.getExtensionUrl().substring(nextChild.getExtensionUrl().indexOf('#') + 1);
} else {
throw new ConfigurationException("Locally defined extension has no '#[code]' part in extension URL: " + nextChild.getExtensionUrl());
}
defn.setCode(code);
if (myExtensionDefToCode.values().contains(code)) {
throw new IllegalStateException("Duplicate extension code: " + code);
}
myExtensionDefToCode.put(nextChild, code);
if (nextChild.getChildType() != null && IPrimitiveDatatype.class.isAssignableFrom(nextChild.getChildType())) {
RuntimePrimitiveDatatypeDefinition pdef = (RuntimePrimitiveDatatypeDefinition) nextChild.getSingleChildOrThrow();
defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
} else {
RuntimeResourceBlockDefinition pdef = (RuntimeResourceBlockDefinition) nextChild.getSingleChildOrThrow();
scanForExtensions(theProfile, pdef);
for (RuntimeChildDeclaredExtensionDefinition nextChildExt : pdef.getExtensions()) {
StructureElementDefinitionType type = defn.getDefinition().addType();
type.setCode(DataTypeEnum.EXTENSION);
type.setProfile("#" + myExtensionDefToCode.get(nextChildExt));
}
}
}
}
} }

View File

@ -0,0 +1,25 @@
package ca.uhn.fhir.model.api;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public interface IBoundCodeableConcept {
}

View File

@ -0,0 +1,35 @@
package ca.uhn.fhir.model.api;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.RestfulServer;
public interface IFhirVersion {
IResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition);
Object createServerConformanceProvider(RestfulServer theServer);
IResourceProvider createServerProfilesProvider(RestfulServer theRestfulServer);
}

View File

@ -24,7 +24,6 @@ import java.util.Map;
import ca.uhn.fhir.model.dstu.composite.ContainedDt; import ca.uhn.fhir.model.dstu.composite.ContainedDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt; import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
@ -38,7 +37,7 @@ public interface IResource extends ICompositeElement {
* encoding, and copying contained resources from this list to their * encoding, and copying contained resources from this list to their
* appropriate references when parsing) so it is generally not neccesary to * appropriate references when parsing) so it is generally not neccesary to
* interact with this list directly. Instead, in a server you can place * interact with this list directly. Instead, in a server you can place
* resource instances in reference fields (such as {@link Patient#setManagingOrganization(ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt)}) * resource instances in reference fields (such as {@link ca.uhn.fhir.model.dstu.resource.Patient#setManagingOrganization(ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt)})
* and the resource will be automatically contained. In a client, contained resources will * and the resource will be automatically contained. In a client, contained resources will
* be automatically populated into their appropriate fields by the HAPI parser. * be automatically populated into their appropriate fields by the HAPI parser.
* </p> * </p>

View File

@ -25,7 +25,6 @@ import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.model.api.BaseIdentifiableElement; import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype; import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.param.ParameterUtil;
@ -39,7 +38,7 @@ public abstract class BaseCodingDt extends BaseIdentifiableElement implements IC
* <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) * <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
* </p> * </p>
*/ */
public abstract CodeDt getCode(); public abstract CodeDt getCodeElement();
@Override @Override
public String getQueryParameterQualifier() { public String getQueryParameterQualifier() {
@ -53,17 +52,17 @@ public abstract class BaseCodingDt extends BaseIdentifiableElement implements IC
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code. * <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
* </p> * </p>
*/ */
public abstract UriDt getSystem(); public abstract UriDt getSystemElement();
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override @Override
public String getValueAsQueryToken() { public String getValueAsQueryToken() {
if (getSystem().getValueAsString() != null) { if (getSystemElement().getValueAsString() != null) {
return ParameterUtil.escape(StringUtils.defaultString(getSystem().getValueAsString())) + '|' + ParameterUtil.escape(getCode().getValueAsString()); return ParameterUtil.escape(StringUtils.defaultString(getSystemElement().getValueAsString())) + '|' + ParameterUtil.escape(getCodeElement().getValueAsString());
} else { } else {
return ParameterUtil.escape(getCode().getValueAsString()); return ParameterUtil.escape(getCodeElement().getValueAsString());
} }
} }
@ -82,14 +81,14 @@ public abstract class BaseCodingDt extends BaseIdentifiableElement implements IC
} }
/** /**
* Returns true if <code>this</code> Coding has the same {@link CodingDt#getCode() Code} and {@link CodingDt#getSystem() system} (as compared by simple equals comparison). Does not compare other * Returns true if <code>this</code> Coding has the same {@link ca.uhn.fhir.model.dstu.composite.InternalCodingDt#getCode() Code} and {@link ca.uhn.fhir.model.dstu.composite.InternalCodingDt#getSystem() system} (as compared by simple equals comparison). Does not compare other
* Codes (e.g. {@link CodingDt#getUse() use}) or any extensions. * Codes (e.g. {@link ca.uhn.fhir.model.dstu.composite.InternalCodingDt#getUse() use}) or any extensions.
*/ */
public boolean matchesSystemAndCode(BaseCodingDt theCoding) { public boolean matchesSystemAndCode(BaseCodingDt theCoding) {
if (theCoding == null) { if (theCoding == null) {
return false; return false;
} }
return getCode().equals(theCoding.getCode()) && getSystem().equals(theCoding.getSystem()); return getCodeElement().equals(theCoding.getCodeElement()) && getSystemElement().equals(theCoding.getSystemElement());
} }
/** /**

View File

@ -0,0 +1,25 @@
package ca.uhn.fhir.model.base.composite;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public class BaseContainedDt {
}

View File

@ -23,9 +23,9 @@ package ca.uhn.fhir.model.base.composite;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.model.api.BaseIdentifiableElement; import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.ICompositeDatatype; import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.param.ParameterUtil;
@ -38,83 +38,73 @@ public abstract class BaseIdentifierDt extends BaseIdentifiableElement implement
} }
/** /**
* Gets the value(s) for <b>system</b> (The namespace for the identifier). * Gets the value(s) for <b>system</b> (The namespace for the identifier). creating it if it does not exist. Will not return <code>null</code>.
* creating it if it does
* not exist. Will not return <code>null</code>.
* *
* <p> * <p>
* <b>Definition:</b> * <b>Definition:</b> Establishes the namespace in which set of possible id values is unique.
* Establishes the namespace in which set of possible id values is unique. * </p>
* </p>
*/ */
public abstract UriDt getSystem() ; public abstract UriDt getSystemElement();
/** /**
* Gets the value(s) for <b>value</b> (The value that is unique). * Gets the value(s) for <b>value</b> (The value that is unique). creating it if it does not exist. Will not return <code>null</code>.
* creating it if it does
* not exist. Will not return <code>null</code>.
* *
* <p> * <p>
* <b>Definition:</b> * <b>Definition:</b> The portion of the identifier typically displayed to the user and which is unique within the context of the system.
* The portion of the identifier typically displayed to the user and which is unique within the context of the system. * </p>
* </p>
*/ */
public abstract StringDt getValue(); public abstract StringDt getValueElement();
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override @Override
public String getValueAsQueryToken() { public String getValueAsQueryToken() {
if (getSystem().getValueAsString() != null) { UriDt system = (UriDt) getSystemElement();
return ParameterUtil.escape(StringUtils.defaultString(getSystem().getValueAsString())) + '|' + ParameterUtil.escape(getValue().getValueAsString()); StringDt value = (StringDt) getValueElement();
} else { if (system.getValueAsString() != null) {
return ParameterUtil.escape(getValue().getValueAsString()); return ParameterUtil.escape(StringUtils.defaultString(system.getValueAsString())) + '|' + ParameterUtil.escape(value.getValueAsString());
} } else {
} return ParameterUtil.escape(value.getValueAsString());
}
}
/** /**
* Returns true if <code>this</code> identifier has the same {@link IdentifierDt#getValue() value} * Returns true if <code>this</code> identifier has the same {@link ca.uhn.fhir.model.dstu.composite.IdentifierDt#getValue() value} and
* and {@link IdentifierDt#getSystem() system} (as compared by simple equals comparison). * {@link ca.uhn.fhir.model.dstu.composite.IdentifierDt#getSystem() system} (as compared by simple equals comparison). Does not compare other values (e.g.
* Does not compare other values (e.g. {@link IdentifierDt#getUse() use}) or any extensions. * {@link ca.uhn.fhir.model.dstu.composite.IdentifierDt#getUse() use}) or any extensions.
*/ */
public boolean matchesSystemAndValue(BaseIdentifierDt theIdentifier) { public boolean matchesSystemAndValue(BaseIdentifierDt theIdentifier) {
if (theIdentifier == null) { if (theIdentifier == null) {
return false; return false;
} }
return getValue().equals(theIdentifier.getValue()) && getSystem().equals(theIdentifier.getSystem()); return getValueElement().equals(theIdentifier.getValueElement()) && getSystemElement().equals(theIdentifier.getSystemElement());
} }
/**
/**
* Sets the value for <b>system</b> (The namespace for the identifier) * Sets the value for <b>system</b> (The namespace for the identifier)
* *
* <p> * <p>
* <b>Definition:</b> * <b>Definition:</b> Establishes the namespace in which set of possible id values is unique.
* Establishes the namespace in which set of possible id values is unique. * </p>
* </p>
*/ */
public abstract BaseIdentifierDt setSystem( String theUri); public abstract BaseIdentifierDt setSystem(String theUri);
/** /**
* Sets the value for <b>value</b> (The value that is unique) * Sets the value for <b>value</b> (The value that is unique)
* *
* <p> * <p>
* <b>Definition:</b> * <b>Definition:</b> The portion of the identifier typically displayed to the user and which is unique within the context of the system.
* The portion of the identifier typically displayed to the user and which is unique within the context of the system. * </p>
* </p>
*/ */
public abstract BaseIdentifierDt setValue( String theString); public abstract BaseIdentifierDt setValue(String theString);
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override @Override
public void setValueAsQueryToken(String theQualifier, String theParameter) { public void setValueAsQueryToken(String theQualifier, String theParameter) {
int barIndex = ParameterUtil.nonEscapedIndexOf(theParameter,'|'); int barIndex = ParameterUtil.nonEscapedIndexOf(theParameter, '|');
if (barIndex != -1) { if (barIndex != -1) {
setSystem(theParameter.substring(0, barIndex)); setSystem(theParameter.substring(0, barIndex));
setValue(ParameterUtil.unescape(theParameter.substring(barIndex + 1))); setValue(ParameterUtil.unescape(theParameter.substring(barIndex + 1)));
@ -122,5 +112,5 @@ public abstract class BaseIdentifierDt extends BaseIdentifiableElement implement
setValue(ParameterUtil.unescape(theParameter)); setValue(ParameterUtil.unescape(theParameter));
} }
} }
} }

View File

@ -50,7 +50,7 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
@Override @Override
public void setValueAsQueryToken(String theQualifier, String theValue) { public void setValueAsQueryToken(String theQualifier, String theValue) {
getComparator().setValue(null); getComparatorElement().setValue(null);
setCode( null); setCode( null);
setSystem(null); setSystem(null);
setUnits( null); setUnits( null);
@ -62,16 +62,16 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
String[] parts = theValue.split("\\|"); String[] parts = theValue.split("\\|");
if (parts.length > 0 && StringUtils.isNotBlank(parts[0])) { if (parts.length > 0 && StringUtils.isNotBlank(parts[0])) {
if (parts[0].startsWith("<=")) { if (parts[0].startsWith("<=")) {
getComparator().setValue(QuantityCompararatorEnum.LESSTHAN_OR_EQUALS.getCode()); getComparatorElement().setValue(QuantityCompararatorEnum.LESSTHAN_OR_EQUALS.getCode());
setValue(new BigDecimal(parts[0].substring(2))); setValue(new BigDecimal(parts[0].substring(2)));
} else if (parts[0].startsWith("<")) { } else if (parts[0].startsWith("<")) {
getComparator().setValue(QuantityCompararatorEnum.LESSTHAN.getCode()); getComparatorElement().setValue(QuantityCompararatorEnum.LESSTHAN.getCode());
setValue(new BigDecimal(parts[0].substring(1))); setValue(new BigDecimal(parts[0].substring(1)));
} else if (parts[0].startsWith(">=")) { } else if (parts[0].startsWith(">=")) {
getComparator().setValue(QuantityCompararatorEnum.GREATERTHAN_OR_EQUALS.getCode()); getComparatorElement().setValue(QuantityCompararatorEnum.GREATERTHAN_OR_EQUALS.getCode());
setValue(new BigDecimal(parts[0].substring(2))); setValue(new BigDecimal(parts[0].substring(2)));
} else if (parts[0].startsWith(">")) { } else if (parts[0].startsWith(">")) {
getComparator().setValue(QuantityCompararatorEnum.GREATERTHAN.getCode()); getComparatorElement().setValue(QuantityCompararatorEnum.GREATERTHAN.getCode());
setValue(new BigDecimal(parts[0].substring(1))); setValue(new BigDecimal(parts[0].substring(1)));
} else { } else {
setValue(new BigDecimal(parts[0])); setValue(new BigDecimal(parts[0]));
@ -96,24 +96,24 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
* </p> * </p>
*/ */
public abstract BoundCodeDt<?> getComparator(); public abstract BoundCodeDt<?> getComparatorElement();
@Override @Override
public String getValueAsQueryToken() { public String getValueAsQueryToken() {
StringBuilder b= new StringBuilder(); StringBuilder b= new StringBuilder();
if (getComparator() != null) { if (getComparatorElement() != null) {
b.append(getComparator().getValue()); b.append(getComparatorElement().getValue());
} }
if (!getValue().isEmpty()) { if (!getValueElement().isEmpty()) {
b.append(getValue().getValueAsString()); b.append(getValueElement().getValueAsString());
} }
b.append('|'); b.append('|');
if (!getSystem().isEmpty()) { if (!getSystemElement().isEmpty()) {
b.append(getSystem().getValueAsString()); b.append(getSystemElement().getValueAsString());
} }
b.append('|'); b.append('|');
if (!getUnits().isEmpty()) { if (!getUnitsElement().isEmpty()) {
b.append(getUnits().getValueAsString()); b.append(getUnitsElement().getValueAsString());
} }
return b.toString(); return b.toString();
@ -150,7 +150,7 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
* The identification of the system that provides the coded form of the unit * The identification of the system that provides the coded form of the unit
* </p> * </p>
*/ */
public abstract UriDt getSystem(); public abstract UriDt getSystemElement();
@ -174,7 +174,7 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
* A computer processable form of the units in some unit representation system * A computer processable form of the units in some unit representation system
* </p> * </p>
*/ */
public abstract CodeDt getCode(); public abstract CodeDt getCodeElement();
/** /**
* Sets the value for <b>code</b> (Coded form of the unit) * Sets the value for <b>code</b> (Coded form of the unit)
@ -195,7 +195,7 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
* A human-readable form of the units * A human-readable form of the units
* </p> * </p>
*/ */
public abstract StringDt getUnits() ; public abstract StringDt getUnitsElement() ;
/** /**
* Gets the value(s) for <b>value</b> (Numerical value (with implicit precision)). * Gets the value(s) for <b>value</b> (Numerical value (with implicit precision)).
* creating it if it does * creating it if it does
@ -206,5 +206,5 @@ public abstract class BaseQuantityDt extends BaseIdentifiableElement implements
* The value of the measured amount. The value includes an implicit precision in the presentation of the value * The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p> * </p>
*/ */
public abstract DecimalDt getValue(); public abstract DecimalDt getValueElement();
} }

View File

@ -0,0 +1,35 @@
package ca.uhn.fhir.model.base.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.primitive.StringDt;
//@ResourceDef(name="Conformance")
public abstract class BaseConformance extends BaseResource implements IResource {
public abstract StringDt getDescriptionElement();
public abstract StringDt getPublisherElement();
}

View File

@ -0,0 +1,59 @@
package ca.uhn.fhir.model.base.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
public abstract class BaseOperationOutcome extends BaseResource implements IResource {
public abstract BaseIssue addIssue();
public abstract List<? extends BaseIssue> getIssue();
public abstract BaseIssue getIssueFirstRep();
public static abstract class BaseIssue extends BaseIdentifiableElement implements IResourceBlock {
public abstract CodeDt getSeverityElement();
public abstract StringDt getDetailsElement();
public abstract BaseCodingDt getType();
public abstract BaseIssue addLocation( String theString);
public abstract BaseIssue setDetails(String theString);
public abstract StringDt getLocationFirstRep();
}
}

View File

@ -1,980 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.CausalityExpectationEnum;
import ca.uhn.fhir.model.dstu.valueset.ExposureTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ReactionSeverityEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>AdverseReaction</b> Resource
* (Specific reactions to a substance)
*
* <p>
* <b>Definition:</b>
* Records an unexpected reaction suspected to be related to the exposure of the reaction subject to a substance
* </p>
*
* <p>
* <b>Requirements:</b>
* Used to track reactions when it is unknown the exact cause but there's a desire to flag/track potential causes. Also used to capture reactions that are significant for inclusion in the health record or as evidence for an allergy or intolerance.
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/AdverseReaction">http://hl7.org/fhir/profiles/AdverseReaction</a>
* </p>
*
*/
@ResourceDef(name="AdverseReaction", profile="http://hl7.org/fhir/profiles/AdverseReaction", id="adversereaction")
public class AdverseReaction extends BaseResource implements IResource {
/**
* Search parameter constant for <b>symptom</b>
* <p>
* Description: <b>One of the symptoms of the reaction</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AdverseReaction.symptom.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="symptom", path="AdverseReaction.symptom.code", description="One of the symptoms of the reaction", type="token" )
public static final String SP_SYMPTOM = "symptom";
/**
* <b>Fluent Client</b> search parameter constant for <b>symptom</b>
* <p>
* Description: <b>One of the symptoms of the reaction</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AdverseReaction.symptom.code</b><br/>
* </p>
*/
public static final TokenClientParam SYMPTOM = new TokenClientParam(SP_SYMPTOM);
/**
* Search parameter constant for <b>substance</b>
* <p>
* Description: <b>The name or code of the substance that produces the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.exposure.substance</b><br/>
* </p>
*/
@SearchParamDefinition(name="substance", path="AdverseReaction.exposure.substance", description="The name or code of the substance that produces the sensitivity", type="reference" )
public static final String SP_SUBSTANCE = "substance";
/**
* <b>Fluent Client</b> search parameter constant for <b>substance</b>
* <p>
* Description: <b>The name or code of the substance that produces the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.exposure.substance</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBSTANCE = new ReferenceClientParam(SP_SUBSTANCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AdverseReaction.exposure.substance</b>".
*/
public static final Include INCLUDE_EXPOSURE_SUBSTANCE = new Include("AdverseReaction.exposure.substance");
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b>The date of the reaction</b><br/>
* Type: <b>date</b><br/>
* Path: <b>AdverseReaction.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="AdverseReaction.date", description="The date of the reaction", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b>The date of the reaction</b><br/>
* Type: <b>date</b><br/>
* Path: <b>AdverseReaction.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the sensitivity is about</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="AdverseReaction.subject", description="The subject that the sensitivity is about", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the sensitivity is about</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AdverseReaction.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AdverseReaction.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("AdverseReaction.subject");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this adverse reaction",
formalDefinition="This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="date", type=DateTimeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="When the reaction occurred",
formalDefinition="The date (and possibly time) when the reaction began"
)
private DateTimeDt myDate;
@Child(name="subject", order=2, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Who had the reaction",
formalDefinition="The subject of the adverse reaction"
)
private ResourceReferenceDt mySubject;
@Child(name="didNotOccurFlag", type=BooleanDt.class, order=3, min=1, max=1)
@Description(
shortDefinition="Indicates lack of reaction",
formalDefinition="If true, indicates that no reaction occurred."
)
private BooleanDt myDidNotOccurFlag;
@Child(name="recorder", order=4, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Who recorded the reaction",
formalDefinition="Identifies the individual responsible for the information in the reaction record."
)
private ResourceReferenceDt myRecorder;
@Child(name="symptom", order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="What was reaction?",
formalDefinition="The signs and symptoms that were observed as part of the reaction"
)
private java.util.List<Symptom> mySymptom;
@Child(name="exposure", order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Suspected substance",
formalDefinition="An exposure to a substance that preceded a reaction occurrence"
)
private java.util.List<Exposure> myExposure;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myDate, mySubject, myDidNotOccurFlag, myRecorder, mySymptom, myExposure);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, mySubject, myDidNotOccurFlag, myRecorder, mySymptom, myExposure);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this adverse reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public AdverseReaction setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this adverse reaction),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AdverseReaction addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this adverse reaction)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this reaction that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AdverseReaction addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>date</b> (When the reaction occurred).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When the reaction occurred)
*
* <p>
* <b>Definition:</b>
* The date (and possibly time) when the reaction began
* </p>
*/
public AdverseReaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who had the reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The subject of the adverse reaction
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Who had the reaction)
*
* <p>
* <b>Definition:</b>
* The subject of the adverse reaction
* </p>
*/
public AdverseReaction setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>didNotOccurFlag</b> (Indicates lack of reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public BooleanDt getDidNotOccurFlag() {
if (myDidNotOccurFlag == null) {
myDidNotOccurFlag = new BooleanDt();
}
return myDidNotOccurFlag;
}
/**
* Sets the value(s) for <b>didNotOccurFlag</b> (Indicates lack of reaction)
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public AdverseReaction setDidNotOccurFlag(BooleanDt theValue) {
myDidNotOccurFlag = theValue;
return this;
}
/**
* Sets the value for <b>didNotOccurFlag</b> (Indicates lack of reaction)
*
* <p>
* <b>Definition:</b>
* If true, indicates that no reaction occurred.
* </p>
*/
public AdverseReaction setDidNotOccurFlag( boolean theBoolean) {
myDidNotOccurFlag = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>recorder</b> (Who recorded the reaction).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the individual responsible for the information in the reaction record.
* </p>
*/
public ResourceReferenceDt getRecorder() {
if (myRecorder == null) {
myRecorder = new ResourceReferenceDt();
}
return myRecorder;
}
/**
* Sets the value(s) for <b>recorder</b> (Who recorded the reaction)
*
* <p>
* <b>Definition:</b>
* Identifies the individual responsible for the information in the reaction record.
* </p>
*/
public AdverseReaction setRecorder(ResourceReferenceDt theValue) {
myRecorder = theValue;
return this;
}
/**
* Gets the value(s) for <b>symptom</b> (What was reaction?).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public java.util.List<Symptom> getSymptom() {
if (mySymptom == null) {
mySymptom = new java.util.ArrayList<Symptom>();
}
return mySymptom;
}
/**
* Sets the value(s) for <b>symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public AdverseReaction setSymptom(java.util.List<Symptom> theValue) {
mySymptom = theValue;
return this;
}
/**
* Adds and returns a new value for <b>symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public Symptom addSymptom() {
Symptom newType = new Symptom();
getSymptom().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>symptom</b> (What was reaction?),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
public Symptom getSymptomFirstRep() {
if (getSymptom().isEmpty()) {
return addSymptom();
}
return getSymptom().get(0);
}
/**
* Gets the value(s) for <b>exposure</b> (Suspected substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public java.util.List<Exposure> getExposure() {
if (myExposure == null) {
myExposure = new java.util.ArrayList<Exposure>();
}
return myExposure;
}
/**
* Sets the value(s) for <b>exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public AdverseReaction setExposure(java.util.List<Exposure> theValue) {
myExposure = theValue;
return this;
}
/**
* Adds and returns a new value for <b>exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public Exposure addExposure() {
Exposure newType = new Exposure();
getExposure().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>exposure</b> (Suspected substance),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
public Exposure getExposureFirstRep() {
if (getExposure().isEmpty()) {
return addExposure();
}
return getExposure().get(0);
}
/**
* Block class for child element: <b>AdverseReaction.symptom</b> (What was reaction?)
*
* <p>
* <b>Definition:</b>
* The signs and symptoms that were observed as part of the reaction
* </p>
*/
@Block()
public static class Symptom extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="E.g. Rash, vomiting",
formalDefinition="Indicates the specific sign or symptom that was observed"
)
private CodeableConceptDt myCode;
@Child(name="severity", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="severe | serious | moderate | minor",
formalDefinition="The severity of the sign or symptom"
)
private BoundCodeDt<ReactionSeverityEnum> mySeverity;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, mySeverity);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, mySeverity);
}
/**
* Gets the value(s) for <b>code</b> (E.g. Rash, vomiting).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates the specific sign or symptom that was observed
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (E.g. Rash, vomiting)
*
* <p>
* <b>Definition:</b>
* Indicates the specific sign or symptom that was observed
* </p>
*/
public Symptom setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>severity</b> (severe | serious | moderate | minor).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public BoundCodeDt<ReactionSeverityEnum> getSeverity() {
if (mySeverity == null) {
mySeverity = new BoundCodeDt<ReactionSeverityEnum>(ReactionSeverityEnum.VALUESET_BINDER);
}
return mySeverity;
}
/**
* Sets the value(s) for <b>severity</b> (severe | serious | moderate | minor)
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public Symptom setSeverity(BoundCodeDt<ReactionSeverityEnum> theValue) {
mySeverity = theValue;
return this;
}
/**
* Sets the value(s) for <b>severity</b> (severe | serious | moderate | minor)
*
* <p>
* <b>Definition:</b>
* The severity of the sign or symptom
* </p>
*/
public Symptom setSeverity(ReactionSeverityEnum theValue) {
getSeverity().setValueAsEnum(theValue);
return this;
}
}
/**
* Block class for child element: <b>AdverseReaction.exposure</b> (Suspected substance)
*
* <p>
* <b>Definition:</b>
* An exposure to a substance that preceded a reaction occurrence
* </p>
*/
@Block()
public static class Exposure extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="When the exposure occurred",
formalDefinition="Identifies the initial date of the exposure that is suspected to be related to the reaction"
)
private DateTimeDt myDate;
@Child(name="type", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="drugadmin | immuniz | coincidental",
formalDefinition="The type of exposure: Drug Administration, Immunization, Coincidental"
)
private BoundCodeDt<ExposureTypeEnum> myType;
@Child(name="causalityExpectation", type=CodeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="likely | unlikely | confirmed | unknown",
formalDefinition="A statement of how confident that the recorder was that this exposure caused the reaction"
)
private BoundCodeDt<CausalityExpectationEnum> myCausalityExpectation;
@Child(name="substance", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class })
@Description(
shortDefinition="Presumed causative substance",
formalDefinition="Substance that is presumed to have caused the adverse reaction"
)
private ResourceReferenceDt mySubstance;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDate, myType, myCausalityExpectation, mySubstance);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDate, myType, myCausalityExpectation, mySubstance);
}
/**
* Gets the value(s) for <b>date</b> (When the exposure occurred).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When the exposure occurred)
*
* <p>
* <b>Definition:</b>
* Identifies the initial date of the exposure that is suspected to be related to the reaction
* </p>
*/
public Exposure setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public BoundCodeDt<ExposureTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeDt<ExposureTypeEnum>(ExposureTypeEnum.VALUESET_BINDER);
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental)
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public Exposure setType(BoundCodeDt<ExposureTypeEnum> theValue) {
myType = theValue;
return this;
}
/**
* Sets the value(s) for <b>type</b> (drugadmin | immuniz | coincidental)
*
* <p>
* <b>Definition:</b>
* The type of exposure: Drug Administration, Immunization, Coincidental
* </p>
*/
public Exposure setType(ExposureTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public BoundCodeDt<CausalityExpectationEnum> getCausalityExpectation() {
if (myCausalityExpectation == null) {
myCausalityExpectation = new BoundCodeDt<CausalityExpectationEnum>(CausalityExpectationEnum.VALUESET_BINDER);
}
return myCausalityExpectation;
}
/**
* Sets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown)
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public Exposure setCausalityExpectation(BoundCodeDt<CausalityExpectationEnum> theValue) {
myCausalityExpectation = theValue;
return this;
}
/**
* Sets the value(s) for <b>causalityExpectation</b> (likely | unlikely | confirmed | unknown)
*
* <p>
* <b>Definition:</b>
* A statement of how confident that the recorder was that this exposure caused the reaction
* </p>
*/
public Exposure setCausalityExpectation(CausalityExpectationEnum theValue) {
getCausalityExpectation().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>substance</b> (Presumed causative substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Substance that is presumed to have caused the adverse reaction
* </p>
*/
public ResourceReferenceDt getSubstance() {
if (mySubstance == null) {
mySubstance = new ResourceReferenceDt();
}
return mySubstance;
}
/**
* Sets the value(s) for <b>substance</b> (Presumed causative substance)
*
* <p>
* <b>Definition:</b>
* Substance that is presumed to have caused the adverse reaction
* </p>
*/
public Exposure setSubstance(ResourceReferenceDt theValue) {
mySubstance = theValue;
return this;
}
}
}

View File

@ -1,446 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AlertStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
/**
* HAPI/FHIR <b>Alert</b> Resource
* (Key information to flag to healthcare providers)
*
* <p>
* <b>Definition:</b>
* Prospective warnings of potential issues when providing care to the patient
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Alert">http://hl7.org/fhir/profiles/Alert</a>
* </p>
*
*/
@ResourceDef(name="Alert", profile="http://hl7.org/fhir/profiles/Alert", id="alert")
public class Alert extends BaseResource implements IResource {
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The identity of a subject to list alerts for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Alert.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The identity of a subject to list alerts for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Alert.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Alert.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("Alert.subject");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Business identifier",
formalDefinition="Identifier assigned to the alert for external use (outside the FHIR environment)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="category", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Clinical, administrative, etc.",
formalDefinition="Allows an alert to be divided into different categories like clinical, administrative etc."
)
private CodeableConceptDt myCategory;
@Child(name="status", type=CodeDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="active | inactive | entered in error",
formalDefinition="Supports basic workflow"
)
private BoundCodeDt<AlertStatusEnum> myStatus;
@Child(name="subject", order=3, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Who is alert about?",
formalDefinition="The person who this alert concerns"
)
private ResourceReferenceDt mySubject;
@Child(name="author", order=4, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Device.class })
@Description(
shortDefinition="Alert creator",
formalDefinition="The person or device that created the alert"
)
private ResourceReferenceDt myAuthor;
@Child(name="note", type=StringDt.class, order=5, min=1, max=1)
@Description(
shortDefinition="Text of alert",
formalDefinition="The textual component of the alert to display to the user"
)
private StringDt myNote;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myCategory, myStatus, mySubject, myAuthor, myNote);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCategory, myStatus, mySubject, myAuthor, myNote);
}
/**
* Gets the value(s) for <b>identifier</b> (Business identifier).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*/
public Alert setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Business identifier),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Alert addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the alert for external use (outside the FHIR environment)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Alert addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>category</b> (Clinical, administrative, etc.).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Allows an alert to be divided into different categories like clinical, administrative etc.
* </p>
*/
public CodeableConceptDt getCategory() {
if (myCategory == null) {
myCategory = new CodeableConceptDt();
}
return myCategory;
}
/**
* Sets the value(s) for <b>category</b> (Clinical, administrative, etc.)
*
* <p>
* <b>Definition:</b>
* Allows an alert to be divided into different categories like clinical, administrative etc.
* </p>
*/
public Alert setCategory(CodeableConceptDt theValue) {
myCategory = theValue;
return this;
}
/**
* Gets the value(s) for <b>status</b> (active | inactive | entered in error).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Supports basic workflow
* </p>
*/
public BoundCodeDt<AlertStatusEnum> getStatus() {
if (myStatus == null) {
myStatus = new BoundCodeDt<AlertStatusEnum>(AlertStatusEnum.VALUESET_BINDER);
}
return myStatus;
}
/**
* Sets the value(s) for <b>status</b> (active | inactive | entered in error)
*
* <p>
* <b>Definition:</b>
* Supports basic workflow
* </p>
*/
public Alert setStatus(BoundCodeDt<AlertStatusEnum> theValue) {
myStatus = theValue;
return this;
}
/**
* Sets the value(s) for <b>status</b> (active | inactive | entered in error)
*
* <p>
* <b>Definition:</b>
* Supports basic workflow
* </p>
*/
public Alert setStatus(AlertStatusEnum theValue) {
getStatus().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who is alert about?).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The person who this alert concerns
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Who is alert about?)
*
* <p>
* <b>Definition:</b>
* The person who this alert concerns
* </p>
*/
public Alert setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>author</b> (Alert creator).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The person or device that created the alert
* </p>
*/
public ResourceReferenceDt getAuthor() {
if (myAuthor == null) {
myAuthor = new ResourceReferenceDt();
}
return myAuthor;
}
/**
* Sets the value(s) for <b>author</b> (Alert creator)
*
* <p>
* <b>Definition:</b>
* The person or device that created the alert
* </p>
*/
public Alert setAuthor(ResourceReferenceDt theValue) {
myAuthor = theValue;
return this;
}
/**
* Gets the value(s) for <b>note</b> (Text of alert).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The textual component of the alert to display to the user
* </p>
*/
public StringDt getNote() {
if (myNote == null) {
myNote = new StringDt();
}
return myNote;
}
/**
* Sets the value(s) for <b>note</b> (Text of alert)
*
* <p>
* <b>Definition:</b>
* The textual component of the alert to display to the user
* </p>
*/
public Alert setNote(StringDt theValue) {
myNote = theValue;
return this;
}
/**
* Sets the value for <b>note</b> (Text of alert)
*
* <p>
* <b>Definition:</b>
* The textual component of the alert to display to the user
* </p>
*/
public Alert setNote( String theString) {
myNote = new StringDt(theString);
return this;
}
}

View File

@ -1,788 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.CriticalityEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.SensitivityStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.SensitivityTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>AllergyIntolerance</b> Resource
* (Drug, food, environmental and others)
*
* <p>
* <b>Definition:</b>
* Indicates the patient has a susceptibility to an adverse reaction upon exposure to a specified substance
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/AllergyIntolerance">http://hl7.org/fhir/profiles/AllergyIntolerance</a>
* </p>
*
*/
@ResourceDef(name="AllergyIntolerance", profile="http://hl7.org/fhir/profiles/AllergyIntolerance", id="allergyintolerance")
public class AllergyIntolerance extends BaseResource implements IResource {
/**
* Search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of sensitivity</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AllergyIntolerance.sensitivityType</b><br/>
* </p>
*/
@SearchParamDefinition(name="type", path="AllergyIntolerance.sensitivityType", description="The type of sensitivity", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of sensitivity</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AllergyIntolerance.sensitivityType</b><br/>
* </p>
*/
public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
/**
* Search parameter constant for <b>substance</b>
* <p>
* Description: <b>The name or code of the substance that produces the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.substance</b><br/>
* </p>
*/
@SearchParamDefinition(name="substance", path="AllergyIntolerance.substance", description="The name or code of the substance that produces the sensitivity", type="reference" )
public static final String SP_SUBSTANCE = "substance";
/**
* <b>Fluent Client</b> search parameter constant for <b>substance</b>
* <p>
* Description: <b>The name or code of the substance that produces the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.substance</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBSTANCE = new ReferenceClientParam(SP_SUBSTANCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AllergyIntolerance.substance</b>".
*/
public static final Include INCLUDE_SUBSTANCE = new Include("AllergyIntolerance.substance");
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b>Recorded date/time.</b><br/>
* Type: <b>date</b><br/>
* Path: <b>AllergyIntolerance.recordedDate</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="Recorded date/time.", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b>Recorded date/time.</b><br/>
* Type: <b>date</b><br/>
* Path: <b>AllergyIntolerance.recordedDate</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>status</b>
* <p>
* Description: <b>The status of the sensitivity</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AllergyIntolerance.status</b><br/>
* </p>
*/
@SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="The status of the sensitivity", type="token" )
public static final String SP_STATUS = "status";
/**
* <b>Fluent Client</b> search parameter constant for <b>status</b>
* <p>
* Description: <b>The status of the sensitivity</b><br/>
* Type: <b>token</b><br/>
* Path: <b>AllergyIntolerance.status</b><br/>
* </p>
*/
public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the sensitivity is about</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="The subject that the sensitivity is about", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the sensitivity is about</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AllergyIntolerance.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("AllergyIntolerance.subject");
/**
* Search parameter constant for <b>recorder</b>
* <p>
* Description: <b>Who recorded the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.recorder</b><br/>
* </p>
*/
@SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" )
public static final String SP_RECORDER = "recorder";
/**
* <b>Fluent Client</b> search parameter constant for <b>recorder</b>
* <p>
* Description: <b>Who recorded the sensitivity</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AllergyIntolerance.recorder</b><br/>
* </p>
*/
public static final ReferenceClientParam RECORDER = new ReferenceClientParam(SP_RECORDER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AllergyIntolerance.recorder</b>".
*/
public static final Include INCLUDE_RECORDER = new Include("AllergyIntolerance.recorder");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this item",
formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="criticality", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="fatal | high | medium | low",
formalDefinition="Criticality of the sensitivity"
)
private BoundCodeDt<CriticalityEnum> myCriticality;
@Child(name="sensitivityType", type=CodeDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="allergy | intolerance | unknown",
formalDefinition="Type of the sensitivity"
)
private BoundCodeDt<SensitivityTypeEnum> mySensitivityType;
@Child(name="recordedDate", type=DateTimeDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="When recorded",
formalDefinition="Date when the sensitivity was recorded"
)
private DateTimeDt myRecordedDate;
@Child(name="status", type=CodeDt.class, order=4, min=1, max=1)
@Description(
shortDefinition="suspected | confirmed | refuted | resolved",
formalDefinition="Status of the sensitivity"
)
private BoundCodeDt<SensitivityStatusEnum> myStatus;
@Child(name="subject", order=5, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Who the sensitivity is for",
formalDefinition="The patient who has the allergy or intolerance"
)
private ResourceReferenceDt mySubject;
@Child(name="recorder", order=6, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Who recorded the sensitivity",
formalDefinition="Indicates who has responsibility for the record"
)
private ResourceReferenceDt myRecorder;
@Child(name="substance", order=7, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class })
@Description(
shortDefinition="The substance that causes the sensitivity",
formalDefinition="The substance that causes the sensitivity"
)
private ResourceReferenceDt mySubstance;
@Child(name="reaction", order=8, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.AdverseReaction.class })
@Description(
shortDefinition="Reactions associated with the sensitivity",
formalDefinition="Reactions associated with the sensitivity"
)
private java.util.List<ResourceReferenceDt> myReaction;
@Child(name="sensitivityTest", order=9, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.Observation.class })
@Description(
shortDefinition="Observations that confirm or refute",
formalDefinition="Observations that confirm or refute the sensitivity"
)
private java.util.List<ResourceReferenceDt> mySensitivityTest;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myCriticality, mySensitivityType, myRecordedDate, myStatus, mySubject, myRecorder, mySubstance, myReaction, mySensitivityTest);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCriticality, mySensitivityType, myRecordedDate, myStatus, mySubject, myRecorder, mySubstance, myReaction, mySensitivityTest);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public AllergyIntolerance setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this item),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AllergyIntolerance addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AllergyIntolerance addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>criticality</b> (fatal | high | medium | low).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Criticality of the sensitivity
* </p>
*/
public BoundCodeDt<CriticalityEnum> getCriticality() {
if (myCriticality == null) {
myCriticality = new BoundCodeDt<CriticalityEnum>(CriticalityEnum.VALUESET_BINDER);
}
return myCriticality;
}
/**
* Sets the value(s) for <b>criticality</b> (fatal | high | medium | low)
*
* <p>
* <b>Definition:</b>
* Criticality of the sensitivity
* </p>
*/
public AllergyIntolerance setCriticality(BoundCodeDt<CriticalityEnum> theValue) {
myCriticality = theValue;
return this;
}
/**
* Sets the value(s) for <b>criticality</b> (fatal | high | medium | low)
*
* <p>
* <b>Definition:</b>
* Criticality of the sensitivity
* </p>
*/
public AllergyIntolerance setCriticality(CriticalityEnum theValue) {
getCriticality().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>sensitivityType</b> (allergy | intolerance | unknown).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Type of the sensitivity
* </p>
*/
public BoundCodeDt<SensitivityTypeEnum> getSensitivityType() {
if (mySensitivityType == null) {
mySensitivityType = new BoundCodeDt<SensitivityTypeEnum>(SensitivityTypeEnum.VALUESET_BINDER);
}
return mySensitivityType;
}
/**
* Sets the value(s) for <b>sensitivityType</b> (allergy | intolerance | unknown)
*
* <p>
* <b>Definition:</b>
* Type of the sensitivity
* </p>
*/
public AllergyIntolerance setSensitivityType(BoundCodeDt<SensitivityTypeEnum> theValue) {
mySensitivityType = theValue;
return this;
}
/**
* Sets the value(s) for <b>sensitivityType</b> (allergy | intolerance | unknown)
*
* <p>
* <b>Definition:</b>
* Type of the sensitivity
* </p>
*/
public AllergyIntolerance setSensitivityType(SensitivityTypeEnum theValue) {
getSensitivityType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>recordedDate</b> (When recorded).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Date when the sensitivity was recorded
* </p>
*/
public DateTimeDt getRecordedDate() {
if (myRecordedDate == null) {
myRecordedDate = new DateTimeDt();
}
return myRecordedDate;
}
/**
* Sets the value(s) for <b>recordedDate</b> (When recorded)
*
* <p>
* <b>Definition:</b>
* Date when the sensitivity was recorded
* </p>
*/
public AllergyIntolerance setRecordedDate(DateTimeDt theValue) {
myRecordedDate = theValue;
return this;
}
/**
* Sets the value for <b>recordedDate</b> (When recorded)
*
* <p>
* <b>Definition:</b>
* Date when the sensitivity was recorded
* </p>
*/
public AllergyIntolerance setRecordedDateWithSecondsPrecision( Date theDate) {
myRecordedDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>recordedDate</b> (When recorded)
*
* <p>
* <b>Definition:</b>
* Date when the sensitivity was recorded
* </p>
*/
public AllergyIntolerance setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myRecordedDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>status</b> (suspected | confirmed | refuted | resolved).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Status of the sensitivity
* </p>
*/
public BoundCodeDt<SensitivityStatusEnum> getStatus() {
if (myStatus == null) {
myStatus = new BoundCodeDt<SensitivityStatusEnum>(SensitivityStatusEnum.VALUESET_BINDER);
}
return myStatus;
}
/**
* Sets the value(s) for <b>status</b> (suspected | confirmed | refuted | resolved)
*
* <p>
* <b>Definition:</b>
* Status of the sensitivity
* </p>
*/
public AllergyIntolerance setStatus(BoundCodeDt<SensitivityStatusEnum> theValue) {
myStatus = theValue;
return this;
}
/**
* Sets the value(s) for <b>status</b> (suspected | confirmed | refuted | resolved)
*
* <p>
* <b>Definition:</b>
* Status of the sensitivity
* </p>
*/
public AllergyIntolerance setStatus(SensitivityStatusEnum theValue) {
getStatus().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who the sensitivity is for).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The patient who has the allergy or intolerance
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Who the sensitivity is for)
*
* <p>
* <b>Definition:</b>
* The patient who has the allergy or intolerance
* </p>
*/
public AllergyIntolerance setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>recorder</b> (Who recorded the sensitivity).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates who has responsibility for the record
* </p>
*/
public ResourceReferenceDt getRecorder() {
if (myRecorder == null) {
myRecorder = new ResourceReferenceDt();
}
return myRecorder;
}
/**
* Sets the value(s) for <b>recorder</b> (Who recorded the sensitivity)
*
* <p>
* <b>Definition:</b>
* Indicates who has responsibility for the record
* </p>
*/
public AllergyIntolerance setRecorder(ResourceReferenceDt theValue) {
myRecorder = theValue;
return this;
}
/**
* Gets the value(s) for <b>substance</b> (The substance that causes the sensitivity).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The substance that causes the sensitivity
* </p>
*/
public ResourceReferenceDt getSubstance() {
if (mySubstance == null) {
mySubstance = new ResourceReferenceDt();
}
return mySubstance;
}
/**
* Sets the value(s) for <b>substance</b> (The substance that causes the sensitivity)
*
* <p>
* <b>Definition:</b>
* The substance that causes the sensitivity
* </p>
*/
public AllergyIntolerance setSubstance(ResourceReferenceDt theValue) {
mySubstance = theValue;
return this;
}
/**
* Gets the value(s) for <b>reaction</b> (Reactions associated with the sensitivity).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Reactions associated with the sensitivity
* </p>
*/
public java.util.List<ResourceReferenceDt> getReaction() {
if (myReaction == null) {
myReaction = new java.util.ArrayList<ResourceReferenceDt>();
}
return myReaction;
}
/**
* Sets the value(s) for <b>reaction</b> (Reactions associated with the sensitivity)
*
* <p>
* <b>Definition:</b>
* Reactions associated with the sensitivity
* </p>
*/
public AllergyIntolerance setReaction(java.util.List<ResourceReferenceDt> theValue) {
myReaction = theValue;
return this;
}
/**
* Adds and returns a new value for <b>reaction</b> (Reactions associated with the sensitivity)
*
* <p>
* <b>Definition:</b>
* Reactions associated with the sensitivity
* </p>
*/
public ResourceReferenceDt addReaction() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getReaction().add(newType);
return newType;
}
/**
* Gets the value(s) for <b>sensitivityTest</b> (Observations that confirm or refute).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Observations that confirm or refute the sensitivity
* </p>
*/
public java.util.List<ResourceReferenceDt> getSensitivityTest() {
if (mySensitivityTest == null) {
mySensitivityTest = new java.util.ArrayList<ResourceReferenceDt>();
}
return mySensitivityTest;
}
/**
* Sets the value(s) for <b>sensitivityTest</b> (Observations that confirm or refute)
*
* <p>
* <b>Definition:</b>
* Observations that confirm or refute the sensitivity
* </p>
*/
public AllergyIntolerance setSensitivityTest(java.util.List<ResourceReferenceDt> theValue) {
mySensitivityTest = theValue;
return this;
}
/**
* Adds and returns a new value for <b>sensitivityTest</b> (Observations that confirm or refute)
*
* <p>
* <b>Definition:</b>
* Observations that confirm or refute the sensitivity
* </p>
*/
public ResourceReferenceDt addSensitivityTest() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getSensitivityTest().add(newType);
return newType;
}
}

View File

@ -1,894 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.composite.ScheduleDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
/**
* HAPI/FHIR <b>AppointmentResponse</b> Resource
* ((informative) A response to a scheduled appointment for a patient and/or practitioner(s))
*
* <p>
* <b>Definition:</b>
* A scheduled appointment for a patient and/or practitioner(s) where a service may take place.
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/AppointmentResponse">http://hl7.org/fhir/profiles/AppointmentResponse</a>
* </p>
*
*/
@ResourceDef(name="AppointmentResponse", profile="http://hl7.org/fhir/profiles/AppointmentResponse", id="appointmentresponse")
public class AppointmentResponse extends BaseResource implements IResource {
/**
* Search parameter constant for <b>partstatus</b>
* <p>
* Description: <b>The overall status of the appointment</b><br/>
* Type: <b>string</b><br/>
* Path: <b>AppointmentResponse.participantStatus</b><br/>
* </p>
*/
@SearchParamDefinition(name="partstatus", path="AppointmentResponse.participantStatus", description="The overall status of the appointment", type="string" )
public static final String SP_PARTSTATUS = "partstatus";
/**
* <b>Fluent Client</b> search parameter constant for <b>partstatus</b>
* <p>
* Description: <b>The overall status of the appointment</b><br/>
* Type: <b>string</b><br/>
* Path: <b>AppointmentResponse.participantStatus</b><br/>
* </p>
*/
public static final StringClientParam PARTSTATUS = new StringClientParam(SP_PARTSTATUS);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the appointment response replies for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AppointmentResponse.individual</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="AppointmentResponse.individual", description="The subject that the appointment response replies for", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The subject that the appointment response replies for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AppointmentResponse.individual</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AppointmentResponse.individual</b>".
*/
public static final Include INCLUDE_INDIVIDUAL = new Include("AppointmentResponse.individual");
/**
* Search parameter constant for <b>appointment</b>
* <p>
* Description: <b>The appointment that the response is attached to</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AppointmentResponse.appointment</b><br/>
* </p>
*/
@SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference" )
public static final String SP_APPOINTMENT = "appointment";
/**
* <b>Fluent Client</b> search parameter constant for <b>appointment</b>
* <p>
* Description: <b>The appointment that the response is attached to</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>AppointmentResponse.appointment</b><br/>
* </p>
*/
public static final ReferenceClientParam APPOINTMENT = new ReferenceClientParam(SP_APPOINTMENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>AppointmentResponse.appointment</b>".
*/
public static final Include INCLUDE_APPOINTMENT = new Include("AppointmentResponse.appointment");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this item",
formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="appointment", order=1, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Appointment.class })
@Description(
shortDefinition="Parent appointment that this response is replying to",
formalDefinition=""
)
private ResourceReferenceDt myAppointment;
@Child(name="participantType", type=CodeableConceptDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Role of participant in the appointment",
formalDefinition=""
)
private java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> myParticipantType;
@Child(name="individual", order=3, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class, ca.uhn.fhir.model.dstu.resource.Device.class })
@Description(
shortDefinition="A Person of device that is participating in the appointment",
formalDefinition=""
)
private java.util.List<ResourceReferenceDt> myIndividual;
@Child(name="participantStatus", type=CodeDt.class, order=4, min=1, max=1)
@Description(
shortDefinition="accepted | declined | tentative | in-process | completed | needs-action",
formalDefinition="Participation status of the Patient"
)
private CodeDt myParticipantStatus;
@Child(name="comment", type=StringDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Additional comments about the appointment",
formalDefinition=""
)
private StringDt myComment;
@Child(name="start", type=InstantDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Date/Time that the appointment is to take place",
formalDefinition=""
)
private InstantDt myStart;
@Child(name="end", type=InstantDt.class, order=7, min=0, max=1)
@Description(
shortDefinition="Date/Time that the appointment is to conclude",
formalDefinition=""
)
private InstantDt myEnd;
@Child(name="schedule", type=ScheduleDt.class, order=8, min=0, max=1)
@Description(
shortDefinition="The recurrence schedule for the appointment. The end date in the schedule marks the end of the recurrence(s), not the end of an individual appointment",
formalDefinition=""
)
private ScheduleDt mySchedule;
@Child(name="timezone", type=StringDt.class, order=9, min=0, max=1)
@Description(
shortDefinition="The timezone that the times are to be converted to. Required for recurring appointments to remain accurate where the schedule makes the appointment cross a daylight saving boundry",
formalDefinition="The timezone should be a value referenced from a timezone database"
)
private StringDt myTimezone;
@Child(name="recorder", order=10, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class })
@Description(
shortDefinition="Who recorded the appointment response",
formalDefinition=""
)
private ResourceReferenceDt myRecorder;
@Child(name="recordedDate", type=DateTimeDt.class, order=11, min=0, max=1)
@Description(
shortDefinition="Date when the response was recorded or last updated",
formalDefinition=""
)
private DateTimeDt myRecordedDate;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myAppointment, myParticipantType, myIndividual, myParticipantStatus, myComment, myStart, myEnd, mySchedule, myTimezone, myRecorder, myRecordedDate);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myAppointment, myParticipantType, myIndividual, myParticipantStatus, myComment, myStart, myEnd, mySchedule, myTimezone, myRecorder, myRecordedDate);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public AppointmentResponse setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this item),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AppointmentResponse addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AppointmentResponse addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>appointment</b> (Parent appointment that this response is replying to).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getAppointment() {
if (myAppointment == null) {
myAppointment = new ResourceReferenceDt();
}
return myAppointment;
}
/**
* Sets the value(s) for <b>appointment</b> (Parent appointment that this response is replying to)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setAppointment(ResourceReferenceDt theValue) {
myAppointment = theValue;
return this;
}
/**
* Gets the value(s) for <b>participantType</b> (Role of participant in the appointment).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> getParticipantType() {
if (myParticipantType == null) {
myParticipantType = new java.util.ArrayList<BoundCodeableConceptDt<ParticipantTypeEnum>>();
}
return myParticipantType;
}
/**
* Sets the value(s) for <b>participantType</b> (Role of participant in the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setParticipantType(java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> theValue) {
myParticipantType = theValue;
return this;
}
/**
* Add a value for <b>participantType</b> (Role of participant in the appointment) using an enumerated type. This
* is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
* or contain the desirable codes. If you wish to use codes other than those which are built-in,
* you may also use the {@link #addType()} method.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public BoundCodeableConceptDt<ParticipantTypeEnum> addParticipantType(ParticipantTypeEnum theValue) {
BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue);
getParticipantType().add(retVal);
return retVal;
}
/**
* Gets the first repetition for <b>participantType</b> (Role of participant in the appointment),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public BoundCodeableConceptDt<ParticipantTypeEnum> getParticipantTypeFirstRep() {
if (getParticipantType().size() == 0) {
addParticipantType();
}
return getParticipantType().get(0);
}
/**
* Add a value for <b>participantType</b> (Role of participant in the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public BoundCodeableConceptDt<ParticipantTypeEnum> addParticipantType() {
BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER);
getParticipantType().add(retVal);
return retVal;
}
/**
* Sets the value(s), and clears any existing value(s) for <b>participantType</b> (Role of participant in the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setParticipantType(ParticipantTypeEnum theValue) {
getParticipantType().clear();
addParticipantType(theValue);
return this;
}
/**
* Gets the value(s) for <b>individual</b> (A Person of device that is participating in the appointment).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ResourceReferenceDt> getIndividual() {
if (myIndividual == null) {
myIndividual = new java.util.ArrayList<ResourceReferenceDt>();
}
return myIndividual;
}
/**
* Sets the value(s) for <b>individual</b> (A Person of device that is participating in the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setIndividual(java.util.List<ResourceReferenceDt> theValue) {
myIndividual = theValue;
return this;
}
/**
* Adds and returns a new value for <b>individual</b> (A Person of device that is participating in the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt addIndividual() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getIndividual().add(newType);
return newType;
}
/**
* Gets the value(s) for <b>participantStatus</b> (accepted | declined | tentative | in-process | completed | needs-action).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Participation status of the Patient
* </p>
*/
public CodeDt getParticipantStatus() {
if (myParticipantStatus == null) {
myParticipantStatus = new CodeDt();
}
return myParticipantStatus;
}
/**
* Sets the value(s) for <b>participantStatus</b> (accepted | declined | tentative | in-process | completed | needs-action)
*
* <p>
* <b>Definition:</b>
* Participation status of the Patient
* </p>
*/
public AppointmentResponse setParticipantStatus(CodeDt theValue) {
myParticipantStatus = theValue;
return this;
}
/**
* Sets the value for <b>participantStatus</b> (accepted | declined | tentative | in-process | completed | needs-action)
*
* <p>
* <b>Definition:</b>
* Participation status of the Patient
* </p>
*/
public AppointmentResponse setParticipantStatus( String theCode) {
myParticipantStatus = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>comment</b> (Additional comments about the appointment).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public StringDt getComment() {
if (myComment == null) {
myComment = new StringDt();
}
return myComment;
}
/**
* Sets the value(s) for <b>comment</b> (Additional comments about the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setComment(StringDt theValue) {
myComment = theValue;
return this;
}
/**
* Sets the value for <b>comment</b> (Additional comments about the appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setComment( String theString) {
myComment = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>start</b> (Date/Time that the appointment is to take place).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public InstantDt getStart() {
if (myStart == null) {
myStart = new InstantDt();
}
return myStart;
}
/**
* Sets the value(s) for <b>start</b> (Date/Time that the appointment is to take place)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setStart(InstantDt theValue) {
myStart = theValue;
return this;
}
/**
* Sets the value for <b>start</b> (Date/Time that the appointment is to take place)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
myStart = new InstantDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>start</b> (Date/Time that the appointment is to take place)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setStartWithMillisPrecision( Date theDate) {
myStart = new InstantDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>end</b> (Date/Time that the appointment is to conclude).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public InstantDt getEnd() {
if (myEnd == null) {
myEnd = new InstantDt();
}
return myEnd;
}
/**
* Sets the value(s) for <b>end</b> (Date/Time that the appointment is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setEnd(InstantDt theValue) {
myEnd = theValue;
return this;
}
/**
* Sets the value for <b>end</b> (Date/Time that the appointment is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
myEnd = new InstantDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>end</b> (Date/Time that the appointment is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setEndWithMillisPrecision( Date theDate) {
myEnd = new InstantDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>schedule</b> (The recurrence schedule for the appointment. The end date in the schedule marks the end of the recurrence(s), not the end of an individual appointment).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ScheduleDt getSchedule() {
if (mySchedule == null) {
mySchedule = new ScheduleDt();
}
return mySchedule;
}
/**
* Sets the value(s) for <b>schedule</b> (The recurrence schedule for the appointment. The end date in the schedule marks the end of the recurrence(s), not the end of an individual appointment)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setSchedule(ScheduleDt theValue) {
mySchedule = theValue;
return this;
}
/**
* Gets the value(s) for <b>timezone</b> (The timezone that the times are to be converted to. Required for recurring appointments to remain accurate where the schedule makes the appointment cross a daylight saving boundry).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The timezone should be a value referenced from a timezone database
* </p>
*/
public StringDt getTimezone() {
if (myTimezone == null) {
myTimezone = new StringDt();
}
return myTimezone;
}
/**
* Sets the value(s) for <b>timezone</b> (The timezone that the times are to be converted to. Required for recurring appointments to remain accurate where the schedule makes the appointment cross a daylight saving boundry)
*
* <p>
* <b>Definition:</b>
* The timezone should be a value referenced from a timezone database
* </p>
*/
public AppointmentResponse setTimezone(StringDt theValue) {
myTimezone = theValue;
return this;
}
/**
* Sets the value for <b>timezone</b> (The timezone that the times are to be converted to. Required for recurring appointments to remain accurate where the schedule makes the appointment cross a daylight saving boundry)
*
* <p>
* <b>Definition:</b>
* The timezone should be a value referenced from a timezone database
* </p>
*/
public AppointmentResponse setTimezone( String theString) {
myTimezone = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>recorder</b> (Who recorded the appointment response).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getRecorder() {
if (myRecorder == null) {
myRecorder = new ResourceReferenceDt();
}
return myRecorder;
}
/**
* Sets the value(s) for <b>recorder</b> (Who recorded the appointment response)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setRecorder(ResourceReferenceDt theValue) {
myRecorder = theValue;
return this;
}
/**
* Gets the value(s) for <b>recordedDate</b> (Date when the response was recorded or last updated).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public DateTimeDt getRecordedDate() {
if (myRecordedDate == null) {
myRecordedDate = new DateTimeDt();
}
return myRecordedDate;
}
/**
* Sets the value(s) for <b>recordedDate</b> (Date when the response was recorded or last updated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setRecordedDate(DateTimeDt theValue) {
myRecordedDate = theValue;
return this;
}
/**
* Sets the value for <b>recordedDate</b> (Date when the response was recorded or last updated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setRecordedDateWithSecondsPrecision( Date theDate) {
myRecordedDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>recordedDate</b> (Date when the response was recorded or last updated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public AppointmentResponse setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myRecordedDate = new DateTimeDt(theDate, thePrecision);
return this;
}
}

View File

@ -1,520 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Availability</b> Resource
* ((informative) A container for slot(s) of time that may be available for booking appointments)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Availability">http://hl7.org/fhir/profiles/Availability</a>
* </p>
*
*/
@ResourceDef(name="Availability", profile="http://hl7.org/fhir/profiles/Availability", id="availability")
public class Availability extends BaseResource implements IResource {
/**
* Search parameter constant for <b>individual</b>
* <p>
* Description: <b>The individual to find an availability for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Availability.individual</b><br/>
* </p>
*/
@SearchParamDefinition(name="individual", path="Availability.individual", description="The individual to find an availability for", type="reference" )
public static final String SP_INDIVIDUAL = "individual";
/**
* <b>Fluent Client</b> search parameter constant for <b>individual</b>
* <p>
* Description: <b>The individual to find an availability for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Availability.individual</b><br/>
* </p>
*/
public static final ReferenceClientParam INDIVIDUAL = new ReferenceClientParam(SP_INDIVIDUAL);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Availability.individual</b>".
*/
public static final Include INCLUDE_INDIVIDUAL = new Include("Availability.individual");
/**
* Search parameter constant for <b>slottype</b>
* <p>
* Description: <b>The type of appointments that can be booked into associated slot(s)</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Availability.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="slottype", path="Availability.type", description="The type of appointments that can be booked into associated slot(s)", type="token" )
public static final String SP_SLOTTYPE = "slottype";
/**
* <b>Fluent Client</b> search parameter constant for <b>slottype</b>
* <p>
* Description: <b>The type of appointments that can be booked into associated slot(s)</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Availability.type</b><br/>
* </p>
*/
public static final TokenClientParam SLOTTYPE = new TokenClientParam(SP_SLOTTYPE);
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this item",
formalDefinition=""
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="type", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="The type of appointments that can be booked into slots attached to this availability resource (ideally this would be an identifiable service - which is at a location, rather than the location itself) - change to CodeableConcept",
formalDefinition=""
)
private CodeableConceptDt myType;
@Child(name="individual", order=2, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Location.class, ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class })
@Description(
shortDefinition="The type of resource this availability resource is providing availability information for",
formalDefinition=""
)
private ResourceReferenceDt myIndividual;
@Child(name="period", type=PeriodDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="The period of time that the slots that are attached to this availability resource cover (even if none exist)",
formalDefinition=""
)
private PeriodDt myPeriod;
@Child(name="comment", type=StringDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated",
formalDefinition=""
)
private StringDt myComment;
@Child(name="author", order=5, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class })
@Description(
shortDefinition="Who authored the availability",
formalDefinition=""
)
private ResourceReferenceDt myAuthor;
@Child(name="authorDate", type=DateTimeDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="When this availability was created, or last revised",
formalDefinition=""
)
private DateTimeDt myAuthorDate;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myIndividual, myPeriod, myComment, myAuthor, myAuthorDate);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myIndividual, myPeriod, myComment, myAuthor, myAuthorDate);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this item),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Availability addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Availability addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>type</b> (The type of appointments that can be booked into slots attached to this availability resource (ideally this would be an identifiable service - which is at a location, rather than the location itself) - change to CodeableConcept).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public CodeableConceptDt getType() {
if (myType == null) {
myType = new CodeableConceptDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (The type of appointments that can be booked into slots attached to this availability resource (ideally this would be an identifiable service - which is at a location, rather than the location itself) - change to CodeableConcept)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setType(CodeableConceptDt theValue) {
myType = theValue;
return this;
}
/**
* Gets the value(s) for <b>individual</b> (The type of resource this availability resource is providing availability information for).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getIndividual() {
if (myIndividual == null) {
myIndividual = new ResourceReferenceDt();
}
return myIndividual;
}
/**
* Sets the value(s) for <b>individual</b> (The type of resource this availability resource is providing availability information for)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setIndividual(ResourceReferenceDt theValue) {
myIndividual = theValue;
return this;
}
/**
* Gets the value(s) for <b>period</b> (The period of time that the slots that are attached to this availability resource cover (even if none exist)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (The period of time that the slots that are attached to this availability resource cover (even if none exist))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
/**
* Gets the value(s) for <b>comment</b> (Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public StringDt getComment() {
if (myComment == null) {
myComment = new StringDt();
}
return myComment;
}
/**
* Sets the value(s) for <b>comment</b> (Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setComment(StringDt theValue) {
myComment = theValue;
return this;
}
/**
* Sets the value for <b>comment</b> (Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setComment( String theString) {
myComment = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>author</b> (Who authored the availability).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getAuthor() {
if (myAuthor == null) {
myAuthor = new ResourceReferenceDt();
}
return myAuthor;
}
/**
* Sets the value(s) for <b>author</b> (Who authored the availability)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setAuthor(ResourceReferenceDt theValue) {
myAuthor = theValue;
return this;
}
/**
* Gets the value(s) for <b>authorDate</b> (When this availability was created, or last revised).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public DateTimeDt getAuthorDate() {
if (myAuthorDate == null) {
myAuthorDate = new DateTimeDt();
}
return myAuthorDate;
}
/**
* Sets the value(s) for <b>authorDate</b> (When this availability was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setAuthorDate(DateTimeDt theValue) {
myAuthorDate = theValue;
return this;
}
/**
* Sets the value for <b>authorDate</b> (When this availability was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setAuthorDateWithSecondsPrecision( Date theDate) {
myAuthorDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>authorDate</b> (When this availability was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Availability setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myAuthorDate = new DateTimeDt(theDate, thePrecision);
return this;
}
}

View File

@ -1,977 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Coverage</b> Resource
* (Insurance or medical plan)
*
* <p>
* <b>Definition:</b>
* Financial instrument by which payment information for health care
* </p>
*
* <p>
* <b>Requirements:</b>
* Health care programs and insurers are significant payors of health service costs
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Coverage">http://hl7.org/fhir/profiles/Coverage</a>
* </p>
*
*/
@ResourceDef(name="Coverage", profile="http://hl7.org/fhir/profiles/Coverage", id="coverage")
public class Coverage extends BaseResource implements IResource {
/**
* Search parameter constant for <b>issuer</b>
* <p>
* Description: <b>The identity of the insurer</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Coverage.issuer</b><br/>
* </p>
*/
@SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" )
public static final String SP_ISSUER = "issuer";
/**
* <b>Fluent Client</b> search parameter constant for <b>issuer</b>
* <p>
* Description: <b>The identity of the insurer</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Coverage.issuer</b><br/>
* </p>
*/
public static final ReferenceClientParam ISSUER = new ReferenceClientParam(SP_ISSUER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Coverage.issuer</b>".
*/
public static final Include INCLUDE_ISSUER = new Include("Coverage.issuer");
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b>The primary identifier of the insured</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b>The primary identifier of the insured</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>type</b>
* <p>
* Description: <b>The kind of coverage</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b>The kind of coverage</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.type</b><br/>
* </p>
*/
public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
/**
* Search parameter constant for <b>plan</b>
* <p>
* Description: <b>A plan or policy identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.plan</b><br/>
* </p>
*/
@SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" )
public static final String SP_PLAN = "plan";
/**
* <b>Fluent Client</b> search parameter constant for <b>plan</b>
* <p>
* Description: <b>A plan or policy identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.plan</b><br/>
* </p>
*/
public static final TokenClientParam PLAN = new TokenClientParam(SP_PLAN);
/**
* Search parameter constant for <b>subplan</b>
* <p>
* Description: <b>Sub-plan identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.subplan</b><br/>
* </p>
*/
@SearchParamDefinition(name="subplan", path="Coverage.subplan", description="Sub-plan identifier", type="token" )
public static final String SP_SUBPLAN = "subplan";
/**
* <b>Fluent Client</b> search parameter constant for <b>subplan</b>
* <p>
* Description: <b>Sub-plan identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.subplan</b><br/>
* </p>
*/
public static final TokenClientParam SUBPLAN = new TokenClientParam(SP_SUBPLAN);
/**
* Search parameter constant for <b>group</b>
* <p>
* Description: <b>Group identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.group</b><br/>
* </p>
*/
@SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" )
public static final String SP_GROUP = "group";
/**
* <b>Fluent Client</b> search parameter constant for <b>group</b>
* <p>
* Description: <b>Group identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.group</b><br/>
* </p>
*/
public static final TokenClientParam GROUP = new TokenClientParam(SP_GROUP);
/**
* Search parameter constant for <b>dependent</b>
* <p>
* Description: <b>Dependent number</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.dependent</b><br/>
* </p>
*/
@SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" )
public static final String SP_DEPENDENT = "dependent";
/**
* <b>Fluent Client</b> search parameter constant for <b>dependent</b>
* <p>
* Description: <b>Dependent number</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.dependent</b><br/>
* </p>
*/
public static final TokenClientParam DEPENDENT = new TokenClientParam(SP_DEPENDENT);
/**
* Search parameter constant for <b>sequence</b>
* <p>
* Description: <b>Sequence number</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.sequence</b><br/>
* </p>
*/
@SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" )
public static final String SP_SEQUENCE = "sequence";
/**
* <b>Fluent Client</b> search parameter constant for <b>sequence</b>
* <p>
* Description: <b>Sequence number</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.sequence</b><br/>
* </p>
*/
public static final TokenClientParam SEQUENCE = new TokenClientParam(SP_SEQUENCE);
/**
* Search parameter constant for <b>name</b>
* <p>
* Description: <b>The name of the subscriber</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.subscriber.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="name", path="Coverage.subscriber.name", description="The name of the subscriber", type="token" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b>The name of the subscriber</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Coverage.subscriber.name</b><br/>
* </p>
*/
public static final TokenClientParam NAME = new TokenClientParam(SP_NAME);
@Child(name="issuer", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@Description(
shortDefinition="An identifier for the plan issuer",
formalDefinition="The program or plan underwriter or payor."
)
private ResourceReferenceDt myIssuer;
@Child(name="period", type=PeriodDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Coverage start and end dates",
formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force."
)
private PeriodDt myPeriod;
@Child(name="type", type=CodingDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Type of coverage",
formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health."
)
private CodingDt myType;
@Child(name="identifier", type=IdentifierDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="The primary coverage ID",
formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID."
)
private IdentifierDt myIdentifier;
@Child(name="group", type=IdentifierDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="An identifier for the group",
formalDefinition="Todo"
)
private IdentifierDt myGroup;
@Child(name="plan", type=IdentifierDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="An identifier for the plan",
formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID."
)
private IdentifierDt myPlan;
@Child(name="subplan", type=IdentifierDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="An identifier for the subsection of the plan",
formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID."
)
private IdentifierDt mySubplan;
@Child(name="dependent", type=IntegerDt.class, order=7, min=0, max=1)
@Description(
shortDefinition="The dependent number",
formalDefinition="A unique identifier for a dependent under the coverage."
)
private IntegerDt myDependent;
@Child(name="sequence", type=IntegerDt.class, order=8, min=0, max=1)
@Description(
shortDefinition="The plan instance or sequence counter",
formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal."
)
private IntegerDt mySequence;
@Child(name="subscriber", order=9, min=0, max=1)
@Description(
shortDefinition="Planholder information",
formalDefinition=""
)
private Subscriber mySubscriber;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIssuer, myPeriod, myType, myIdentifier, myGroup, myPlan, mySubplan, myDependent, mySequence, mySubscriber);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIssuer, myPeriod, myType, myIdentifier, myGroup, myPlan, mySubplan, myDependent, mySequence, mySubscriber);
}
/**
* Gets the value(s) for <b>issuer</b> (An identifier for the plan issuer).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The program or plan underwriter or payor.
* </p>
*/
public ResourceReferenceDt getIssuer() {
if (myIssuer == null) {
myIssuer = new ResourceReferenceDt();
}
return myIssuer;
}
/**
* Sets the value(s) for <b>issuer</b> (An identifier for the plan issuer)
*
* <p>
* <b>Definition:</b>
* The program or plan underwriter or payor.
* </p>
*/
public Coverage setIssuer(ResourceReferenceDt theValue) {
myIssuer = theValue;
return this;
}
/**
* Gets the value(s) for <b>period</b> (Coverage start and end dates).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Coverage start and end dates)
*
* <p>
* <b>Definition:</b>
* Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.
* </p>
*/
public Coverage setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
/**
* Gets the value(s) for <b>type</b> (Type of coverage).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.
* </p>
*/
public CodingDt getType() {
if (myType == null) {
myType = new CodingDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (Type of coverage)
*
* <p>
* <b>Definition:</b>
* The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.
* </p>
*/
public Coverage setType(CodingDt theValue) {
myType = theValue;
return this;
}
/**
* Gets the value(s) for <b>identifier</b> (The primary coverage ID).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID.
* </p>
*/
public IdentifierDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new IdentifierDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (The primary coverage ID)
*
* <p>
* <b>Definition:</b>
* The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID.
* </p>
*/
public Coverage setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (The primary coverage ID)
*
* <p>
* <b>Definition:</b>
* The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID.
* </p>
*/
public Coverage setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (The primary coverage ID)
*
* <p>
* <b>Definition:</b>
* The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID.
* </p>
*/
public Coverage setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>group</b> (An identifier for the group).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Todo
* </p>
*/
public IdentifierDt getGroup() {
if (myGroup == null) {
myGroup = new IdentifierDt();
}
return myGroup;
}
/**
* Sets the value(s) for <b>group</b> (An identifier for the group)
*
* <p>
* <b>Definition:</b>
* Todo
* </p>
*/
public Coverage setGroup(IdentifierDt theValue) {
myGroup = theValue;
return this;
}
/**
* Sets the value for <b>group</b> (An identifier for the group)
*
* <p>
* <b>Definition:</b>
* Todo
* </p>
*/
public Coverage setGroup( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myGroup = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>group</b> (An identifier for the group)
*
* <p>
* <b>Definition:</b>
* Todo
* </p>
*/
public Coverage setGroup( String theSystem, String theValue) {
myGroup = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>plan</b> (An identifier for the plan).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
* </p>
*/
public IdentifierDt getPlan() {
if (myPlan == null) {
myPlan = new IdentifierDt();
}
return myPlan;
}
/**
* Sets the value(s) for <b>plan</b> (An identifier for the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
* </p>
*/
public Coverage setPlan(IdentifierDt theValue) {
myPlan = theValue;
return this;
}
/**
* Sets the value for <b>plan</b> (An identifier for the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
* </p>
*/
public Coverage setPlan( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myPlan = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>plan</b> (An identifier for the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
* </p>
*/
public Coverage setPlan( String theSystem, String theValue) {
myPlan = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>subplan</b> (An identifier for the subsection of the plan).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.
* </p>
*/
public IdentifierDt getSubplan() {
if (mySubplan == null) {
mySubplan = new IdentifierDt();
}
return mySubplan;
}
/**
* Sets the value(s) for <b>subplan</b> (An identifier for the subsection of the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.
* </p>
*/
public Coverage setSubplan(IdentifierDt theValue) {
mySubplan = theValue;
return this;
}
/**
* Sets the value for <b>subplan</b> (An identifier for the subsection of the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.
* </p>
*/
public Coverage setSubplan( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
mySubplan = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>subplan</b> (An identifier for the subsection of the plan)
*
* <p>
* <b>Definition:</b>
* Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.
* </p>
*/
public Coverage setSubplan( String theSystem, String theValue) {
mySubplan = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>dependent</b> (The dependent number).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A unique identifier for a dependent under the coverage.
* </p>
*/
public IntegerDt getDependent() {
if (myDependent == null) {
myDependent = new IntegerDt();
}
return myDependent;
}
/**
* Sets the value(s) for <b>dependent</b> (The dependent number)
*
* <p>
* <b>Definition:</b>
* A unique identifier for a dependent under the coverage.
* </p>
*/
public Coverage setDependent(IntegerDt theValue) {
myDependent = theValue;
return this;
}
/**
* Sets the value for <b>dependent</b> (The dependent number)
*
* <p>
* <b>Definition:</b>
* A unique identifier for a dependent under the coverage.
* </p>
*/
public Coverage setDependent( int theInteger) {
myDependent = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>sequence</b> (The plan instance or sequence counter).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An optional counter for a particular instance of the identified coverage which increments upon each renewal.
* </p>
*/
public IntegerDt getSequence() {
if (mySequence == null) {
mySequence = new IntegerDt();
}
return mySequence;
}
/**
* Sets the value(s) for <b>sequence</b> (The plan instance or sequence counter)
*
* <p>
* <b>Definition:</b>
* An optional counter for a particular instance of the identified coverage which increments upon each renewal.
* </p>
*/
public Coverage setSequence(IntegerDt theValue) {
mySequence = theValue;
return this;
}
/**
* Sets the value for <b>sequence</b> (The plan instance or sequence counter)
*
* <p>
* <b>Definition:</b>
* An optional counter for a particular instance of the identified coverage which increments upon each renewal.
* </p>
*/
public Coverage setSequence( int theInteger) {
mySequence = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>subscriber</b> (Planholder information).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Subscriber getSubscriber() {
if (mySubscriber == null) {
mySubscriber = new Subscriber();
}
return mySubscriber;
}
/**
* Sets the value(s) for <b>subscriber</b> (Planholder information)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Coverage setSubscriber(Subscriber theValue) {
mySubscriber = theValue;
return this;
}
/**
* Block class for child element: <b>Coverage.subscriber</b> (Planholder information)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
@Block()
public static class Subscriber extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="PolicyHolder name",
formalDefinition="The name of the PolicyHolder"
)
private HumanNameDt myName;
@Child(name="address", type=AddressDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="PolicyHolder address",
formalDefinition="The mailing address, typically home, of the PolicyHolder"
)
private AddressDt myAddress;
@Child(name="birthdate", type=DateDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="PolicyHolder date of birth",
formalDefinition="The date of birth of the PolicyHolder"
)
private DateDt myBirthdate;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myAddress, myBirthdate);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myAddress, myBirthdate);
}
/**
* Gets the value(s) for <b>name</b> (PolicyHolder name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The name of the PolicyHolder
* </p>
*/
public HumanNameDt getName() {
if (myName == null) {
myName = new HumanNameDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (PolicyHolder name)
*
* <p>
* <b>Definition:</b>
* The name of the PolicyHolder
* </p>
*/
public Subscriber setName(HumanNameDt theValue) {
myName = theValue;
return this;
}
/**
* Gets the value(s) for <b>address</b> (PolicyHolder address).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The mailing address, typically home, of the PolicyHolder
* </p>
*/
public AddressDt getAddress() {
if (myAddress == null) {
myAddress = new AddressDt();
}
return myAddress;
}
/**
* Sets the value(s) for <b>address</b> (PolicyHolder address)
*
* <p>
* <b>Definition:</b>
* The mailing address, typically home, of the PolicyHolder
* </p>
*/
public Subscriber setAddress(AddressDt theValue) {
myAddress = theValue;
return this;
}
/**
* Gets the value(s) for <b>birthdate</b> (PolicyHolder date of birth).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The date of birth of the PolicyHolder
* </p>
*/
public DateDt getBirthdate() {
if (myBirthdate == null) {
myBirthdate = new DateDt();
}
return myBirthdate;
}
/**
* Sets the value(s) for <b>birthdate</b> (PolicyHolder date of birth)
*
* <p>
* <b>Definition:</b>
* The date of birth of the PolicyHolder
* </p>
*/
public Subscriber setBirthdate(DateDt theValue) {
myBirthdate = theValue;
return this;
}
/**
* Sets the value for <b>birthdate</b> (PolicyHolder date of birth)
*
* <p>
* <b>Definition:</b>
* The date of birth of the PolicyHolder
* </p>
*/
public Subscriber setBirthdateWithDayPrecision( Date theDate) {
myBirthdate = new DateDt(theDate);
return this;
}
/**
* Sets the value for <b>birthdate</b> (PolicyHolder date of birth)
*
* <p>
* <b>Definition:</b>
* The date of birth of the PolicyHolder
* </p>
*/
public Subscriber setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
myBirthdate = new DateDt(theDate, thePrecision);
return this;
}
}
}

View File

@ -1,824 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>DeviceObservationReport</b> Resource
* (Describes the data produced by a device at a point in time)
*
* <p>
* <b>Definition:</b>
* Describes the data produced by a device at a point in time
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/DeviceObservationReport">http://hl7.org/fhir/profiles/DeviceObservationReport</a>
* </p>
*
*/
@ResourceDef(name="DeviceObservationReport", profile="http://hl7.org/fhir/profiles/DeviceObservationReport", id="deviceobservationreport")
public class DeviceObservationReport extends BaseResource implements IResource {
/**
* Search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.source</b><br/>
* </p>
*/
@SearchParamDefinition(name="source", path="DeviceObservationReport.source", description="", type="reference" )
public static final String SP_SOURCE = "source";
/**
* <b>Fluent Client</b> search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.source</b><br/>
* </p>
*/
public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>DeviceObservationReport.source</b>".
*/
public static final Include INCLUDE_SOURCE = new Include("DeviceObservationReport.source");
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b>The compatment code</b><br/>
* Type: <b>token</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="DeviceObservationReport.virtualDevice.code", description="The compatment code", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b>The compatment code</b><br/>
* Type: <b>token</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for <b>channel</b>
* <p>
* Description: <b>The channel code</b><br/>
* Type: <b>token</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.channel.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="channel", path="DeviceObservationReport.virtualDevice.channel.code", description="The channel code", type="token" )
public static final String SP_CHANNEL = "channel";
/**
* <b>Fluent Client</b> search parameter constant for <b>channel</b>
* <p>
* Description: <b>The channel code</b><br/>
* Type: <b>token</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.channel.code</b><br/>
* </p>
*/
public static final TokenClientParam CHANNEL = new TokenClientParam(SP_CHANNEL);
/**
* Search parameter constant for <b>observation</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.channel.metric.observation</b><br/>
* </p>
*/
@SearchParamDefinition(name="observation", path="DeviceObservationReport.virtualDevice.channel.metric.observation", description="", type="reference" )
public static final String SP_OBSERVATION = "observation";
/**
* <b>Fluent Client</b> search parameter constant for <b>observation</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.virtualDevice.channel.metric.observation</b><br/>
* </p>
*/
public static final ReferenceClientParam OBSERVATION = new ReferenceClientParam(SP_OBSERVATION);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>DeviceObservationReport.virtualDevice.channel.metric.observation</b>".
*/
public static final Include INCLUDE_VIRTUALDEVICE_CHANNEL_METRIC_OBSERVATION = new Include("DeviceObservationReport.virtualDevice.channel.metric.observation");
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="DeviceObservationReport.subject", description="", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>DeviceObservationReport.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>DeviceObservationReport.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("DeviceObservationReport.subject");
@Child(name="instant", type=InstantDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="When the data values are reported",
formalDefinition="The point in time that the values are reported"
)
private InstantDt myInstant;
@Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="As assigned by the source device",
formalDefinition="An identifier assigned to this observation bu the source device that made the observation"
)
private IdentifierDt myIdentifier;
@Child(name="source", order=2, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Device.class })
@Description(
shortDefinition="Identifies/describes where the data came from",
formalDefinition="Identification information for the device that is the source of the data"
)
private ResourceReferenceDt mySource;
@Child(name="subject", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Location.class })
@Description(
shortDefinition="Subject of the measurement",
formalDefinition="The subject of the measurement"
)
private ResourceReferenceDt mySubject;
@Child(name="virtualDevice", order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="A medical-related subsystem of a medical device",
formalDefinition="A medical-related subsystem of a medical device"
)
private java.util.List<VirtualDevice> myVirtualDevice;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myInstant, myIdentifier, mySource, mySubject, myVirtualDevice);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myInstant, myIdentifier, mySource, mySubject, myVirtualDevice);
}
/**
* Gets the value(s) for <b>instant</b> (When the data values are reported).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The point in time that the values are reported
* </p>
*/
public InstantDt getInstant() {
if (myInstant == null) {
myInstant = new InstantDt();
}
return myInstant;
}
/**
* Sets the value(s) for <b>instant</b> (When the data values are reported)
*
* <p>
* <b>Definition:</b>
* The point in time that the values are reported
* </p>
*/
public DeviceObservationReport setInstant(InstantDt theValue) {
myInstant = theValue;
return this;
}
/**
* Sets the value for <b>instant</b> (When the data values are reported)
*
* <p>
* <b>Definition:</b>
* The point in time that the values are reported
* </p>
*/
public DeviceObservationReport setInstant( Date theDate, TemporalPrecisionEnum thePrecision) {
myInstant = new InstantDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>instant</b> (When the data values are reported)
*
* <p>
* <b>Definition:</b>
* The point in time that the values are reported
* </p>
*/
public DeviceObservationReport setInstantWithMillisPrecision( Date theDate) {
myInstant = new InstantDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>identifier</b> (As assigned by the source device).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An identifier assigned to this observation bu the source device that made the observation
* </p>
*/
public IdentifierDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new IdentifierDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (As assigned by the source device)
*
* <p>
* <b>Definition:</b>
* An identifier assigned to this observation bu the source device that made the observation
* </p>
*/
public DeviceObservationReport setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (As assigned by the source device)
*
* <p>
* <b>Definition:</b>
* An identifier assigned to this observation bu the source device that made the observation
* </p>
*/
public DeviceObservationReport setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (As assigned by the source device)
*
* <p>
* <b>Definition:</b>
* An identifier assigned to this observation bu the source device that made the observation
* </p>
*/
public DeviceObservationReport setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>source</b> (Identifies/describes where the data came from).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identification information for the device that is the source of the data
* </p>
*/
public ResourceReferenceDt getSource() {
if (mySource == null) {
mySource = new ResourceReferenceDt();
}
return mySource;
}
/**
* Sets the value(s) for <b>source</b> (Identifies/describes where the data came from)
*
* <p>
* <b>Definition:</b>
* Identification information for the device that is the source of the data
* </p>
*/
public DeviceObservationReport setSource(ResourceReferenceDt theValue) {
mySource = theValue;
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Subject of the measurement).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The subject of the measurement
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Subject of the measurement)
*
* <p>
* <b>Definition:</b>
* The subject of the measurement
* </p>
*/
public DeviceObservationReport setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>virtualDevice</b> (A medical-related subsystem of a medical device).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A medical-related subsystem of a medical device
* </p>
*/
public java.util.List<VirtualDevice> getVirtualDevice() {
if (myVirtualDevice == null) {
myVirtualDevice = new java.util.ArrayList<VirtualDevice>();
}
return myVirtualDevice;
}
/**
* Sets the value(s) for <b>virtualDevice</b> (A medical-related subsystem of a medical device)
*
* <p>
* <b>Definition:</b>
* A medical-related subsystem of a medical device
* </p>
*/
public DeviceObservationReport setVirtualDevice(java.util.List<VirtualDevice> theValue) {
myVirtualDevice = theValue;
return this;
}
/**
* Adds and returns a new value for <b>virtualDevice</b> (A medical-related subsystem of a medical device)
*
* <p>
* <b>Definition:</b>
* A medical-related subsystem of a medical device
* </p>
*/
public VirtualDevice addVirtualDevice() {
VirtualDevice newType = new VirtualDevice();
getVirtualDevice().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>virtualDevice</b> (A medical-related subsystem of a medical device),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A medical-related subsystem of a medical device
* </p>
*/
public VirtualDevice getVirtualDeviceFirstRep() {
if (getVirtualDevice().isEmpty()) {
return addVirtualDevice();
}
return getVirtualDevice().get(0);
}
/**
* Block class for child element: <b>DeviceObservationReport.virtualDevice</b> (A medical-related subsystem of a medical device)
*
* <p>
* <b>Definition:</b>
* A medical-related subsystem of a medical device
* </p>
*/
@Block()
public static class VirtualDevice extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Describes the compartment",
formalDefinition="Describes the compartment"
)
private CodeableConceptDt myCode;
@Child(name="channel", order=1, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Groups related data items",
formalDefinition="Groups together physiological measurement data and derived data"
)
private java.util.List<VirtualDeviceChannel> myChannel;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myChannel);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myChannel);
}
/**
* Gets the value(s) for <b>code</b> (Describes the compartment).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Describes the compartment
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Describes the compartment)
*
* <p>
* <b>Definition:</b>
* Describes the compartment
* </p>
*/
public VirtualDevice setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>channel</b> (Groups related data items).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Groups together physiological measurement data and derived data
* </p>
*/
public java.util.List<VirtualDeviceChannel> getChannel() {
if (myChannel == null) {
myChannel = new java.util.ArrayList<VirtualDeviceChannel>();
}
return myChannel;
}
/**
* Sets the value(s) for <b>channel</b> (Groups related data items)
*
* <p>
* <b>Definition:</b>
* Groups together physiological measurement data and derived data
* </p>
*/
public VirtualDevice setChannel(java.util.List<VirtualDeviceChannel> theValue) {
myChannel = theValue;
return this;
}
/**
* Adds and returns a new value for <b>channel</b> (Groups related data items)
*
* <p>
* <b>Definition:</b>
* Groups together physiological measurement data and derived data
* </p>
*/
public VirtualDeviceChannel addChannel() {
VirtualDeviceChannel newType = new VirtualDeviceChannel();
getChannel().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>channel</b> (Groups related data items),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Groups together physiological measurement data and derived data
* </p>
*/
public VirtualDeviceChannel getChannelFirstRep() {
if (getChannel().isEmpty()) {
return addChannel();
}
return getChannel().get(0);
}
}
/**
* Block class for child element: <b>DeviceObservationReport.virtualDevice.channel</b> (Groups related data items)
*
* <p>
* <b>Definition:</b>
* Groups together physiological measurement data and derived data
* </p>
*/
@Block()
public static class VirtualDeviceChannel extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Describes the channel",
formalDefinition="Describes the channel"
)
private CodeableConceptDt myCode;
@Child(name="metric", order=1, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Piece of data reported by device",
formalDefinition="A piece of measured or derived data that is reported by the machine"
)
private java.util.List<VirtualDeviceChannelMetric> myMetric;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myMetric);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myMetric);
}
/**
* Gets the value(s) for <b>code</b> (Describes the channel).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Describes the channel
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Describes the channel)
*
* <p>
* <b>Definition:</b>
* Describes the channel
* </p>
*/
public VirtualDeviceChannel setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>metric</b> (Piece of data reported by device).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A piece of measured or derived data that is reported by the machine
* </p>
*/
public java.util.List<VirtualDeviceChannelMetric> getMetric() {
if (myMetric == null) {
myMetric = new java.util.ArrayList<VirtualDeviceChannelMetric>();
}
return myMetric;
}
/**
* Sets the value(s) for <b>metric</b> (Piece of data reported by device)
*
* <p>
* <b>Definition:</b>
* A piece of measured or derived data that is reported by the machine
* </p>
*/
public VirtualDeviceChannel setMetric(java.util.List<VirtualDeviceChannelMetric> theValue) {
myMetric = theValue;
return this;
}
/**
* Adds and returns a new value for <b>metric</b> (Piece of data reported by device)
*
* <p>
* <b>Definition:</b>
* A piece of measured or derived data that is reported by the machine
* </p>
*/
public VirtualDeviceChannelMetric addMetric() {
VirtualDeviceChannelMetric newType = new VirtualDeviceChannelMetric();
getMetric().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>metric</b> (Piece of data reported by device),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A piece of measured or derived data that is reported by the machine
* </p>
*/
public VirtualDeviceChannelMetric getMetricFirstRep() {
if (getMetric().isEmpty()) {
return addMetric();
}
return getMetric().get(0);
}
}
/**
* Block class for child element: <b>DeviceObservationReport.virtualDevice.channel.metric</b> (Piece of data reported by device)
*
* <p>
* <b>Definition:</b>
* A piece of measured or derived data that is reported by the machine
* </p>
*/
@Block()
public static class VirtualDeviceChannelMetric extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="observation", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Observation.class })
@Description(
shortDefinition="The data for the metric",
formalDefinition="The data for the metric"
)
private ResourceReferenceDt myObservation;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myObservation);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myObservation);
}
/**
* Gets the value(s) for <b>observation</b> (The data for the metric).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The data for the metric
* </p>
*/
public ResourceReferenceDt getObservation() {
if (myObservation == null) {
myObservation = new ResourceReferenceDt();
}
return myObservation;
}
/**
* Sets the value(s) for <b>observation</b> (The data for the metric)
*
* <p>
* <b>Definition:</b>
* The data for the metric
* </p>
*/
public VirtualDeviceChannelMetric setObservation(ResourceReferenceDt theValue) {
myObservation = theValue;
return this;
}
}
}

View File

@ -1,885 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AgeDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.RangeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
/**
* HAPI/FHIR <b>FamilyHistory</b> Resource
* (Information about patient's relatives, relevant for patient)
*
* <p>
* <b>Definition:</b>
* Significant health events and conditions for people related to the subject relevant in the context of care for the subject
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/FamilyHistory">http://hl7.org/fhir/profiles/FamilyHistory</a>
* </p>
*
*/
@ResourceDef(name="FamilyHistory", profile="http://hl7.org/fhir/profiles/FamilyHistory", id="familyhistory")
public class FamilyHistory extends BaseResource implements IResource {
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>The identity of a subject to list family history items for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>FamilyHistory.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="FamilyHistory.subject", description="The identity of a subject to list family history items for", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The identity of a subject to list family history items for</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>FamilyHistory.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>FamilyHistory.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("FamilyHistory.subject");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Id(s) for this record",
formalDefinition="This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="subject", order=1, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Patient history is about",
formalDefinition="The person who this history concerns"
)
private ResourceReferenceDt mySubject;
@Child(name="note", type=StringDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Additional details not covered elsewhere",
formalDefinition="Conveys information about family history not specific to individual relations."
)
private StringDt myNote;
@Child(name="relation", order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Relative described by history",
formalDefinition="The related person. Each FamilyHistory resource contains the entire family history for a single person."
)
private java.util.List<Relation> myRelation;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, mySubject, myNote, myRelation);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, mySubject, myNote, myRelation);
}
/**
* Gets the value(s) for <b>identifier</b> (External Id(s) for this record).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Id(s) for this record)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public FamilyHistory setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Id(s) for this record)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Id(s) for this record),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Id(s) for this record)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public FamilyHistory addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Id(s) for this record)
*
* <p>
* <b>Definition:</b>
* This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public FamilyHistory addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Patient history is about).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The person who this history concerns
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Patient history is about)
*
* <p>
* <b>Definition:</b>
* The person who this history concerns
* </p>
*/
public FamilyHistory setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>note</b> (Additional details not covered elsewhere).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Conveys information about family history not specific to individual relations.
* </p>
*/
public StringDt getNote() {
if (myNote == null) {
myNote = new StringDt();
}
return myNote;
}
/**
* Sets the value(s) for <b>note</b> (Additional details not covered elsewhere)
*
* <p>
* <b>Definition:</b>
* Conveys information about family history not specific to individual relations.
* </p>
*/
public FamilyHistory setNote(StringDt theValue) {
myNote = theValue;
return this;
}
/**
* Sets the value for <b>note</b> (Additional details not covered elsewhere)
*
* <p>
* <b>Definition:</b>
* Conveys information about family history not specific to individual relations.
* </p>
*/
public FamilyHistory setNote( String theString) {
myNote = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>relation</b> (Relative described by history).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
* </p>
*/
public java.util.List<Relation> getRelation() {
if (myRelation == null) {
myRelation = new java.util.ArrayList<Relation>();
}
return myRelation;
}
/**
* Sets the value(s) for <b>relation</b> (Relative described by history)
*
* <p>
* <b>Definition:</b>
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
* </p>
*/
public FamilyHistory setRelation(java.util.List<Relation> theValue) {
myRelation = theValue;
return this;
}
/**
* Adds and returns a new value for <b>relation</b> (Relative described by history)
*
* <p>
* <b>Definition:</b>
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
* </p>
*/
public Relation addRelation() {
Relation newType = new Relation();
getRelation().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>relation</b> (Relative described by history),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
* </p>
*/
public Relation getRelationFirstRep() {
if (getRelation().isEmpty()) {
return addRelation();
}
return getRelation().get(0);
}
/**
* Block class for child element: <b>FamilyHistory.relation</b> (Relative described by history)
*
* <p>
* <b>Definition:</b>
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
* </p>
*/
@Block()
public static class Relation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="The family member described",
formalDefinition="This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\""
)
private StringDt myName;
@Child(name="relationship", type=CodeableConceptDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Relationship to the subject",
formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)"
)
private CodeableConceptDt myRelationship;
@Child(name="born", order=2, min=0, max=1, type={
PeriodDt.class, DateDt.class, StringDt.class })
@Description(
shortDefinition="(approximate) date of birth",
formalDefinition="The actual or approximate date of birth of the relative"
)
private IDatatype myBorn;
@Child(name="deceased", order=3, min=0, max=1, type={
BooleanDt.class, AgeDt.class, RangeDt.class, DateDt.class, StringDt.class })
@Description(
shortDefinition="Dead? How old/when?",
formalDefinition="If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set."
)
private IDatatype myDeceased;
@Child(name="note", type=StringDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="General note about related person",
formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible."
)
private StringDt myNote;
@Child(name="condition", order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Condition that the related person had",
formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition."
)
private java.util.List<RelationCondition> myCondition;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myRelationship, myBorn, myDeceased, myNote, myCondition);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myRelationship, myBorn, myDeceased, myNote, myCondition);
}
/**
* Gets the value(s) for <b>name</b> (The family member described).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\"
* </p>
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (The family member described)
*
* <p>
* <b>Definition:</b>
* This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\"
* </p>
*/
public Relation setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (The family member described)
*
* <p>
* <b>Definition:</b>
* This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\"
* </p>
*/
public Relation setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>relationship</b> (Relationship to the subject).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The type of relationship this person has to the patient (father, mother, brother etc.)
* </p>
*/
public CodeableConceptDt getRelationship() {
if (myRelationship == null) {
myRelationship = new CodeableConceptDt();
}
return myRelationship;
}
/**
* Sets the value(s) for <b>relationship</b> (Relationship to the subject)
*
* <p>
* <b>Definition:</b>
* The type of relationship this person has to the patient (father, mother, brother etc.)
* </p>
*/
public Relation setRelationship(CodeableConceptDt theValue) {
myRelationship = theValue;
return this;
}
/**
* Gets the value(s) for <b>born[x]</b> ((approximate) date of birth).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual or approximate date of birth of the relative
* </p>
*/
public IDatatype getBorn() {
return myBorn;
}
/**
* Sets the value(s) for <b>born[x]</b> ((approximate) date of birth)
*
* <p>
* <b>Definition:</b>
* The actual or approximate date of birth of the relative
* </p>
*/
public Relation setBorn(IDatatype theValue) {
myBorn = theValue;
return this;
}
/**
* Gets the value(s) for <b>deceased[x]</b> (Dead? How old/when?).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.
* </p>
*/
public IDatatype getDeceased() {
return myDeceased;
}
/**
* Sets the value(s) for <b>deceased[x]</b> (Dead? How old/when?)
*
* <p>
* <b>Definition:</b>
* If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.
* </p>
*/
public Relation setDeceased(IDatatype theValue) {
myDeceased = theValue;
return this;
}
/**
* Gets the value(s) for <b>note</b> (General note about related person).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
* </p>
*/
public StringDt getNote() {
if (myNote == null) {
myNote = new StringDt();
}
return myNote;
}
/**
* Sets the value(s) for <b>note</b> (General note about related person)
*
* <p>
* <b>Definition:</b>
* This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
* </p>
*/
public Relation setNote(StringDt theValue) {
myNote = theValue;
return this;
}
/**
* Sets the value for <b>note</b> (General note about related person)
*
* <p>
* <b>Definition:</b>
* This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
* </p>
*/
public Relation setNote( String theString) {
myNote = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>condition</b> (Condition that the related person had).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
* </p>
*/
public java.util.List<RelationCondition> getCondition() {
if (myCondition == null) {
myCondition = new java.util.ArrayList<RelationCondition>();
}
return myCondition;
}
/**
* Sets the value(s) for <b>condition</b> (Condition that the related person had)
*
* <p>
* <b>Definition:</b>
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
* </p>
*/
public Relation setCondition(java.util.List<RelationCondition> theValue) {
myCondition = theValue;
return this;
}
/**
* Adds and returns a new value for <b>condition</b> (Condition that the related person had)
*
* <p>
* <b>Definition:</b>
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
* </p>
*/
public RelationCondition addCondition() {
RelationCondition newType = new RelationCondition();
getCondition().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>condition</b> (Condition that the related person had),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
* </p>
*/
public RelationCondition getConditionFirstRep() {
if (getCondition().isEmpty()) {
return addCondition();
}
return getCondition().get(0);
}
}
/**
* Block class for child element: <b>FamilyHistory.relation.condition</b> (Condition that the related person had)
*
* <p>
* <b>Definition:</b>
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
* </p>
*/
@Block()
public static class RelationCondition extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Condition suffered by relation",
formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system"
)
private CodeableConceptDt myType;
@Child(name="outcome", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="deceased | permanent disability | etc.",
formalDefinition="Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation."
)
private CodeableConceptDt myOutcome;
@Child(name="onset", order=2, min=0, max=1, type={
AgeDt.class, RangeDt.class, StringDt.class })
@Description(
shortDefinition="When condition first manifested",
formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence."
)
private IDatatype myOnset;
@Child(name="note", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Extra information about condition",
formalDefinition="An area where general notes can be placed about this specific condition."
)
private StringDt myNote;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myOutcome, myOnset, myNote);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myOutcome, myOnset, myNote);
}
/**
* Gets the value(s) for <b>type</b> (Condition suffered by relation).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system
* </p>
*/
public CodeableConceptDt getType() {
if (myType == null) {
myType = new CodeableConceptDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (Condition suffered by relation)
*
* <p>
* <b>Definition:</b>
* The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system
* </p>
*/
public RelationCondition setType(CodeableConceptDt theValue) {
myType = theValue;
return this;
}
/**
* Gets the value(s) for <b>outcome</b> (deceased | permanent disability | etc.).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.
* </p>
*/
public CodeableConceptDt getOutcome() {
if (myOutcome == null) {
myOutcome = new CodeableConceptDt();
}
return myOutcome;
}
/**
* Sets the value(s) for <b>outcome</b> (deceased | permanent disability | etc.)
*
* <p>
* <b>Definition:</b>
* Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.
* </p>
*/
public RelationCondition setOutcome(CodeableConceptDt theValue) {
myOutcome = theValue;
return this;
}
/**
* Gets the value(s) for <b>onset[x]</b> (When condition first manifested).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.
* </p>
*/
public IDatatype getOnset() {
return myOnset;
}
/**
* Sets the value(s) for <b>onset[x]</b> (When condition first manifested)
*
* <p>
* <b>Definition:</b>
* Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.
* </p>
*/
public RelationCondition setOnset(IDatatype theValue) {
myOnset = theValue;
return this;
}
/**
* Gets the value(s) for <b>note</b> (Extra information about condition).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An area where general notes can be placed about this specific condition.
* </p>
*/
public StringDt getNote() {
if (myNote == null) {
myNote = new StringDt();
}
return myNote;
}
/**
* Sets the value(s) for <b>note</b> (Extra information about condition)
*
* <p>
* <b>Definition:</b>
* An area where general notes can be placed about this specific condition.
* </p>
*/
public RelationCondition setNote(StringDt theValue) {
myNote = theValue;
return this;
}
/**
* Sets the value for <b>note</b> (Extra information about condition)
*
* <p>
* <b>Definition:</b>
* An area where general notes can be placed about this specific condition.
* </p>
*/
public RelationCondition setNote( String theString) {
myNote = new StringDt(theString);
return this;
}
}
}

View File

@ -1,879 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.RangeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.CompositeClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Group</b> Resource
* (Group of multiple entities)
*
* <p>
* <b>Definition:</b>
* Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized. I.e. A collection of entities that isn't an Organization
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Group">http://hl7.org/fhir/profiles/Group</a>
* </p>
*
*/
@ResourceDef(name="Group", profile="http://hl7.org/fhir/profiles/Group", id="group")
public class Group extends BaseResource implements IResource {
/**
* Search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of resources the group contains</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of resources the group contains</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.type</b><br/>
* </p>
*/
public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b>The kind of resources contained</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b>The kind of resources contained</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for <b>actual</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.actual</b><br/>
* </p>
*/
@SearchParamDefinition(name="actual", path="Group.actual", description="", type="token" )
public static final String SP_ACTUAL = "actual";
/**
* <b>Fluent Client</b> search parameter constant for <b>actual</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.actual</b><br/>
* </p>
*/
public static final TokenClientParam ACTUAL = new TokenClientParam(SP_ACTUAL);
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Group.identifier", description="", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>member</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Group.member</b><br/>
* </p>
*/
@SearchParamDefinition(name="member", path="Group.member", description="", type="reference" )
public static final String SP_MEMBER = "member";
/**
* <b>Fluent Client</b> search parameter constant for <b>member</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Group.member</b><br/>
* </p>
*/
public static final ReferenceClientParam MEMBER = new ReferenceClientParam(SP_MEMBER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Group.member</b>".
*/
public static final Include INCLUDE_MEMBER = new Include("Group.member");
/**
* Search parameter constant for <b>characteristic</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="", type="token" )
public static final String SP_CHARACTERISTIC = "characteristic";
/**
* <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.code</b><br/>
* </p>
*/
public static final TokenClientParam CHARACTERISTIC = new TokenClientParam(SP_CHARACTERISTIC);
/**
* Search parameter constant for <b>value</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.value[x]</b><br/>
* </p>
*/
@SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="", type="token" )
public static final String SP_VALUE = "value";
/**
* <b>Fluent Client</b> search parameter constant for <b>value</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.value[x]</b><br/>
* </p>
*/
public static final TokenClientParam VALUE = new TokenClientParam(SP_VALUE);
/**
* Search parameter constant for <b>exclude</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.exclude</b><br/>
* </p>
*/
@SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="", type="token" )
public static final String SP_EXCLUDE = "exclude";
/**
* <b>Fluent Client</b> search parameter constant for <b>exclude</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Group.characteristic.exclude</b><br/>
* </p>
*/
public static final TokenClientParam EXCLUDE = new TokenClientParam(SP_EXCLUDE);
/**
* Search parameter constant for <b>characteristic-value</b>
* <p>
* Description: <b>A composite of both characteristic and value</b><br/>
* Type: <b>composite</b><br/>
* Path: <b>characteristic & value</b><br/>
* </p>
*/
@SearchParamDefinition(name="characteristic-value", path="characteristic & value", description="A composite of both characteristic and value", type="composite" , compositeOf={ "characteristic", "value" } )
public static final String SP_CHARACTERISTIC_VALUE = "characteristic-value";
/**
* <b>Fluent Client</b> search parameter constant for <b>characteristic-value</b>
* <p>
* Description: <b>A composite of both characteristic and value</b><br/>
* Type: <b>composite</b><br/>
* Path: <b>characteristic & value</b><br/>
* </p>
*/
public static final CompositeClientParam<TokenClientParam, TokenClientParam> CHARACTERISTIC_VALUE = new CompositeClientParam<TokenClientParam, TokenClientParam>(SP_CHARACTERISTIC_VALUE);
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Unique id",
formalDefinition="A unique business identifier for this group"
)
private IdentifierDt myIdentifier;
@Child(name="type", type=CodeDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="person | animal | practitioner | device | medication | substance",
formalDefinition="Identifies the broad classification of the kind of resources the group includes"
)
private BoundCodeDt<GroupTypeEnum> myType;
@Child(name="actual", type=BooleanDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Descriptive or actual",
formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals"
)
private BooleanDt myActual;
@Child(name="code", type=CodeableConceptDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Kind of Group members",
formalDefinition="Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc."
)
private CodeableConceptDt myCode;
@Child(name="name", type=StringDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Label for Group",
formalDefinition="A label assigned to the group for human identification and communication"
)
private StringDt myName;
@Child(name="quantity", type=IntegerDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Number of members",
formalDefinition="A count of the number of resource instances that are part of the group"
)
private IntegerDt myQuantity;
@Child(name="characteristic", order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Trait of group members",
formalDefinition="Identifies the traits shared by members of the group"
)
private java.util.List<Characteristic> myCharacteristic;
@Child(name="member", order=7, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Medication.class, ca.uhn.fhir.model.dstu.resource.Substance.class })
@Description(
shortDefinition="Who is in group",
formalDefinition="Identifies the resource instances that are members of the group."
)
private java.util.List<ResourceReferenceDt> myMember;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myActual, myCode, myName, myQuantity, myCharacteristic, myMember);
}
/**
* Gets the value(s) for <b>identifier</b> (Unique id).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public IdentifierDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new IdentifierDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Unique id)
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public Group setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique id)
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public Group setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Unique id)
*
* <p>
* <b>Definition:</b>
* A unique business identifier for this group
* </p>
*/
public Group setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>type</b> (person | animal | practitioner | device | medication | substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the broad classification of the kind of resources the group includes
* </p>
*/
public BoundCodeDt<GroupTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeDt<GroupTypeEnum>(GroupTypeEnum.VALUESET_BINDER);
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (person | animal | practitioner | device | medication | substance)
*
* <p>
* <b>Definition:</b>
* Identifies the broad classification of the kind of resources the group includes
* </p>
*/
public Group setType(BoundCodeDt<GroupTypeEnum> theValue) {
myType = theValue;
return this;
}
/**
* Sets the value(s) for <b>type</b> (person | animal | practitioner | device | medication | substance)
*
* <p>
* <b>Definition:</b>
* Identifies the broad classification of the kind of resources the group includes
* </p>
*/
public Group setType(GroupTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>actual</b> (Descriptive or actual).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals
* </p>
*/
public BooleanDt getActual() {
if (myActual == null) {
myActual = new BooleanDt();
}
return myActual;
}
/**
* Sets the value(s) for <b>actual</b> (Descriptive or actual)
*
* <p>
* <b>Definition:</b>
* If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals
* </p>
*/
public Group setActual(BooleanDt theValue) {
myActual = theValue;
return this;
}
/**
* Sets the value for <b>actual</b> (Descriptive or actual)
*
* <p>
* <b>Definition:</b>
* If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals
* </p>
*/
public Group setActual( boolean theBoolean) {
myActual = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>code</b> (Kind of Group members).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc.
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Kind of Group members)
*
* <p>
* <b>Definition:</b>
* Provides a specific type of resource the group includes. E.g. \"cow\", \"syringe\", etc.
* </p>
*/
public Group setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>name</b> (Label for Group).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A label assigned to the group for human identification and communication
* </p>
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Label for Group)
*
* <p>
* <b>Definition:</b>
* A label assigned to the group for human identification and communication
* </p>
*/
public Group setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Label for Group)
*
* <p>
* <b>Definition:</b>
* A label assigned to the group for human identification and communication
* </p>
*/
public Group setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>quantity</b> (Number of members).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A count of the number of resource instances that are part of the group
* </p>
*/
public IntegerDt getQuantity() {
if (myQuantity == null) {
myQuantity = new IntegerDt();
}
return myQuantity;
}
/**
* Sets the value(s) for <b>quantity</b> (Number of members)
*
* <p>
* <b>Definition:</b>
* A count of the number of resource instances that are part of the group
* </p>
*/
public Group setQuantity(IntegerDt theValue) {
myQuantity = theValue;
return this;
}
/**
* Sets the value for <b>quantity</b> (Number of members)
*
* <p>
* <b>Definition:</b>
* A count of the number of resource instances that are part of the group
* </p>
*/
public Group setQuantity( int theInteger) {
myQuantity = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>characteristic</b> (Trait of group members).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the traits shared by members of the group
* </p>
*/
public java.util.List<Characteristic> getCharacteristic() {
if (myCharacteristic == null) {
myCharacteristic = new java.util.ArrayList<Characteristic>();
}
return myCharacteristic;
}
/**
* Sets the value(s) for <b>characteristic</b> (Trait of group members)
*
* <p>
* <b>Definition:</b>
* Identifies the traits shared by members of the group
* </p>
*/
public Group setCharacteristic(java.util.List<Characteristic> theValue) {
myCharacteristic = theValue;
return this;
}
/**
* Adds and returns a new value for <b>characteristic</b> (Trait of group members)
*
* <p>
* <b>Definition:</b>
* Identifies the traits shared by members of the group
* </p>
*/
public Characteristic addCharacteristic() {
Characteristic newType = new Characteristic();
getCharacteristic().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>characteristic</b> (Trait of group members),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifies the traits shared by members of the group
* </p>
*/
public Characteristic getCharacteristicFirstRep() {
if (getCharacteristic().isEmpty()) {
return addCharacteristic();
}
return getCharacteristic().get(0);
}
/**
* Gets the value(s) for <b>member</b> (Who is in group).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the resource instances that are members of the group.
* </p>
*/
public java.util.List<ResourceReferenceDt> getMember() {
if (myMember == null) {
myMember = new java.util.ArrayList<ResourceReferenceDt>();
}
return myMember;
}
/**
* Sets the value(s) for <b>member</b> (Who is in group)
*
* <p>
* <b>Definition:</b>
* Identifies the resource instances that are members of the group.
* </p>
*/
public Group setMember(java.util.List<ResourceReferenceDt> theValue) {
myMember = theValue;
return this;
}
/**
* Adds and returns a new value for <b>member</b> (Who is in group)
*
* <p>
* <b>Definition:</b>
* Identifies the resource instances that are members of the group.
* </p>
*/
public ResourceReferenceDt addMember() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getMember().add(newType);
return newType;
}
/**
* Block class for child element: <b>Group.characteristic</b> (Trait of group members)
*
* <p>
* <b>Definition:</b>
* Identifies the traits shared by members of the group
* </p>
*/
@Block()
public static class Characteristic extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Kind of characteristic",
formalDefinition="A code that identifies the kind of trait being asserted"
)
private CodeableConceptDt myCode;
@Child(name="value", order=1, min=1, max=1, type={
CodeableConceptDt.class, BooleanDt.class, QuantityDt.class, RangeDt.class })
@Description(
shortDefinition="Value held by characteristic",
formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group"
)
private IDatatype myValue;
@Child(name="exclude", type=BooleanDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Group includes or excludes",
formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group"
)
private BooleanDt myExclude;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myValue, myExclude);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myValue, myExclude);
}
/**
* Gets the value(s) for <b>code</b> (Kind of characteristic).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A code that identifies the kind of trait being asserted
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Kind of characteristic)
*
* <p>
* <b>Definition:</b>
* A code that identifies the kind of trait being asserted
* </p>
*/
public Characteristic setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>value[x]</b> (Value held by characteristic).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The value of the trait that holds (or does not hold - see 'exclude') for members of the group
* </p>
*/
public IDatatype getValue() {
return myValue;
}
/**
* Sets the value(s) for <b>value[x]</b> (Value held by characteristic)
*
* <p>
* <b>Definition:</b>
* The value of the trait that holds (or does not hold - see 'exclude') for members of the group
* </p>
*/
public Characteristic setValue(IDatatype theValue) {
myValue = theValue;
return this;
}
/**
* Gets the value(s) for <b>exclude</b> (Group includes or excludes).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If true, indicates the characteristic is one that is NOT held by members of the group
* </p>
*/
public BooleanDt getExclude() {
if (myExclude == null) {
myExclude = new BooleanDt();
}
return myExclude;
}
/**
* Sets the value(s) for <b>exclude</b> (Group includes or excludes)
*
* <p>
* <b>Definition:</b>
* If true, indicates the characteristic is one that is NOT held by members of the group
* </p>
*/
public Characteristic setExclude(BooleanDt theValue) {
myExclude = theValue;
return this;
}
/**
* Sets the value for <b>exclude</b> (Group includes or excludes)
*
* <p>
* <b>Definition:</b>
* If true, indicates the characteristic is one that is NOT held by members of the group
* </p>
*/
public Characteristic setExclude( boolean theBoolean) {
myExclude = new BooleanDt(theBoolean);
return this;
}
}
}

View File

@ -1,987 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ListModeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>List</b> Resource
* (Information summarized from a list of other resources)
*
* <p>
* <b>Definition:</b>
* A set of information summarized from a list of other resources
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/List">http://hl7.org/fhir/profiles/List</a>
* </p>
*
*/
@ResourceDef(name="List", profile="http://hl7.org/fhir/profiles/List", id="list")
public class ListResource extends BaseResource implements IResource {
/**
* Search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.source</b><br/>
* </p>
*/
@SearchParamDefinition(name="source", path="List.source", description="", type="reference" )
public static final String SP_SOURCE = "source";
/**
* <b>Fluent Client</b> search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.source</b><br/>
* </p>
*/
public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>List.source</b>".
*/
public static final Include INCLUDE_SOURCE = new Include("List.source");
/**
* Search parameter constant for <b>item</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.entry.item</b><br/>
* </p>
*/
@SearchParamDefinition(name="item", path="List.entry.item", description="", type="reference" )
public static final String SP_ITEM = "item";
/**
* <b>Fluent Client</b> search parameter constant for <b>item</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.entry.item</b><br/>
* </p>
*/
public static final ReferenceClientParam ITEM = new ReferenceClientParam(SP_ITEM);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>List.entry.item</b>".
*/
public static final Include INCLUDE_ENTRY_ITEM = new Include("List.entry.item");
/**
* Search parameter constant for <b>empty-reason</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>List.emptyReason</b><br/>
* </p>
*/
@SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="", type="token" )
public static final String SP_EMPTY_REASON = "empty-reason";
/**
* <b>Fluent Client</b> search parameter constant for <b>empty-reason</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>List.emptyReason</b><br/>
* </p>
*/
public static final TokenClientParam EMPTY_REASON = new TokenClientParam(SP_EMPTY_REASON);
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>List.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="List.date", description="", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>List.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>List.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="List.code", description="", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>List.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="List.subject", description="", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>List.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>List.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("List.subject");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Business identifier",
formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR."
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="What the purpose of this list is",
formalDefinition="This code defines the purpose of the list - why it was created"
)
private CodeableConceptDt myCode;
@Child(name="subject", order=2, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Group.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Location.class })
@Description(
shortDefinition="If all resources have the same subject",
formalDefinition="The common subject (or patient) of the resources that are in the list, if there is one"
)
private ResourceReferenceDt mySubject;
@Child(name="source", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Device.class })
@Description(
shortDefinition="Who and/or what defined the list contents",
formalDefinition="The entity responsible for deciding what the contents of the list were"
)
private ResourceReferenceDt mySource;
@Child(name="date", type=DateTimeDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="When the list was prepared",
formalDefinition="The date that the list was prepared"
)
private DateTimeDt myDate;
@Child(name="ordered", type=BooleanDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Whether items in the list have a meaningful order",
formalDefinition="Whether items in the list have a meaningful order"
)
private BooleanDt myOrdered;
@Child(name="mode", type=CodeDt.class, order=6, min=1, max=1)
@Description(
shortDefinition="working | snapshot | changes",
formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted"
)
private BoundCodeDt<ListModeEnum> myMode;
@Child(name="entry", order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Entries in the list",
formalDefinition="Entries in this list"
)
private java.util.List<Entry> myEntry;
@Child(name="emptyReason", type=CodeableConceptDt.class, order=8, min=0, max=1)
@Description(
shortDefinition="Why list is empty",
formalDefinition="If the list is empty, why the list is empty"
)
private CodeableConceptDt myEmptyReason;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myCode, mySubject, mySource, myDate, myOrdered, myMode, myEntry, myEmptyReason);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCode, mySubject, mySource, myDate, myOrdered, myMode, myEntry, myEmptyReason);
}
/**
* Gets the value(s) for <b>identifier</b> (Business identifier).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*/
public ListResource setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Business identifier),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public ListResource addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier for the List assigned for business purposes outside the context of FHIR.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public ListResource addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>code</b> (What the purpose of this list is).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This code defines the purpose of the list - why it was created
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (What the purpose of this list is)
*
* <p>
* <b>Definition:</b>
* This code defines the purpose of the list - why it was created
* </p>
*/
public ListResource setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>subject</b> (If all resources have the same subject).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The common subject (or patient) of the resources that are in the list, if there is one
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (If all resources have the same subject)
*
* <p>
* <b>Definition:</b>
* The common subject (or patient) of the resources that are in the list, if there is one
* </p>
*/
public ListResource setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>source</b> (Who and/or what defined the list contents).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The entity responsible for deciding what the contents of the list were
* </p>
*/
public ResourceReferenceDt getSource() {
if (mySource == null) {
mySource = new ResourceReferenceDt();
}
return mySource;
}
/**
* Sets the value(s) for <b>source</b> (Who and/or what defined the list contents)
*
* <p>
* <b>Definition:</b>
* The entity responsible for deciding what the contents of the list were
* </p>
*/
public ListResource setSource(ResourceReferenceDt theValue) {
mySource = theValue;
return this;
}
/**
* Gets the value(s) for <b>date</b> (When the list was prepared).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The date that the list was prepared
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the list was prepared)
*
* <p>
* <b>Definition:</b>
* The date that the list was prepared
* </p>
*/
public ListResource setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the list was prepared)
*
* <p>
* <b>Definition:</b>
* The date that the list was prepared
* </p>
*/
public ListResource setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When the list was prepared)
*
* <p>
* <b>Definition:</b>
* The date that the list was prepared
* </p>
*/
public ListResource setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>ordered</b> (Whether items in the list have a meaningful order).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Whether items in the list have a meaningful order
* </p>
*/
public BooleanDt getOrdered() {
if (myOrdered == null) {
myOrdered = new BooleanDt();
}
return myOrdered;
}
/**
* Sets the value(s) for <b>ordered</b> (Whether items in the list have a meaningful order)
*
* <p>
* <b>Definition:</b>
* Whether items in the list have a meaningful order
* </p>
*/
public ListResource setOrdered(BooleanDt theValue) {
myOrdered = theValue;
return this;
}
/**
* Sets the value for <b>ordered</b> (Whether items in the list have a meaningful order)
*
* <p>
* <b>Definition:</b>
* Whether items in the list have a meaningful order
* </p>
*/
public ListResource setOrdered( boolean theBoolean) {
myOrdered = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>mode</b> (working | snapshot | changes).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
* </p>
*/
public BoundCodeDt<ListModeEnum> getMode() {
if (myMode == null) {
myMode = new BoundCodeDt<ListModeEnum>(ListModeEnum.VALUESET_BINDER);
}
return myMode;
}
/**
* Sets the value(s) for <b>mode</b> (working | snapshot | changes)
*
* <p>
* <b>Definition:</b>
* How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
* </p>
*/
public ListResource setMode(BoundCodeDt<ListModeEnum> theValue) {
myMode = theValue;
return this;
}
/**
* Sets the value(s) for <b>mode</b> (working | snapshot | changes)
*
* <p>
* <b>Definition:</b>
* How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
* </p>
*/
public ListResource setMode(ListModeEnum theValue) {
getMode().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>entry</b> (Entries in the list).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Entries in this list
* </p>
*/
public java.util.List<Entry> getEntry() {
if (myEntry == null) {
myEntry = new java.util.ArrayList<Entry>();
}
return myEntry;
}
/**
* Sets the value(s) for <b>entry</b> (Entries in the list)
*
* <p>
* <b>Definition:</b>
* Entries in this list
* </p>
*/
public ListResource setEntry(java.util.List<Entry> theValue) {
myEntry = theValue;
return this;
}
/**
* Adds and returns a new value for <b>entry</b> (Entries in the list)
*
* <p>
* <b>Definition:</b>
* Entries in this list
* </p>
*/
public Entry addEntry() {
Entry newType = new Entry();
getEntry().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>entry</b> (Entries in the list),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Entries in this list
* </p>
*/
public Entry getEntryFirstRep() {
if (getEntry().isEmpty()) {
return addEntry();
}
return getEntry().get(0);
}
/**
* Gets the value(s) for <b>emptyReason</b> (Why list is empty).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* If the list is empty, why the list is empty
* </p>
*/
public CodeableConceptDt getEmptyReason() {
if (myEmptyReason == null) {
myEmptyReason = new CodeableConceptDt();
}
return myEmptyReason;
}
/**
* Sets the value(s) for <b>emptyReason</b> (Why list is empty)
*
* <p>
* <b>Definition:</b>
* If the list is empty, why the list is empty
* </p>
*/
public ListResource setEmptyReason(CodeableConceptDt theValue) {
myEmptyReason = theValue;
return this;
}
/**
* Block class for child element: <b>List.entry</b> (Entries in the list)
*
* <p>
* <b>Definition:</b>
* Entries in this list
* </p>
*/
@Block()
public static class Entry extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="flag", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Workflow information about this item",
formalDefinition="The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list"
)
private java.util.List<CodeableConceptDt> myFlag;
@Child(name="deleted", type=BooleanDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="If this item is actually marked as deleted",
formalDefinition="True if this item is marked as deleted in the list."
)
private BooleanDt myDeleted;
@Child(name="date", type=DateTimeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="When item added to list",
formalDefinition="When this item was added to the list"
)
private DateTimeDt myDate;
@Child(name="item", order=3, min=1, max=1, type={
IResource.class })
@Description(
shortDefinition="Actual entry",
formalDefinition="A reference to the actual resource from which data was derived"
)
private ResourceReferenceDt myItem;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myFlag, myDeleted, myDate, myItem);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myFlag, myDeleted, myDate, myItem);
}
/**
* Gets the value(s) for <b>flag</b> (Workflow information about this item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list
* </p>
*/
public java.util.List<CodeableConceptDt> getFlag() {
if (myFlag == null) {
myFlag = new java.util.ArrayList<CodeableConceptDt>();
}
return myFlag;
}
/**
* Sets the value(s) for <b>flag</b> (Workflow information about this item)
*
* <p>
* <b>Definition:</b>
* The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list
* </p>
*/
public Entry setFlag(java.util.List<CodeableConceptDt> theValue) {
myFlag = theValue;
return this;
}
/**
* Adds and returns a new value for <b>flag</b> (Workflow information about this item)
*
* <p>
* <b>Definition:</b>
* The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list
* </p>
*/
public CodeableConceptDt addFlag() {
CodeableConceptDt newType = new CodeableConceptDt();
getFlag().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>flag</b> (Workflow information about this item),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list
* </p>
*/
public CodeableConceptDt getFlagFirstRep() {
if (getFlag().isEmpty()) {
return addFlag();
}
return getFlag().get(0);
}
/**
* Gets the value(s) for <b>deleted</b> (If this item is actually marked as deleted).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* True if this item is marked as deleted in the list.
* </p>
*/
public BooleanDt getDeleted() {
if (myDeleted == null) {
myDeleted = new BooleanDt();
}
return myDeleted;
}
/**
* Sets the value(s) for <b>deleted</b> (If this item is actually marked as deleted)
*
* <p>
* <b>Definition:</b>
* True if this item is marked as deleted in the list.
* </p>
*/
public Entry setDeleted(BooleanDt theValue) {
myDeleted = theValue;
return this;
}
/**
* Sets the value for <b>deleted</b> (If this item is actually marked as deleted)
*
* <p>
* <b>Definition:</b>
* True if this item is marked as deleted in the list.
* </p>
*/
public Entry setDeleted( boolean theBoolean) {
myDeleted = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>date</b> (When item added to list).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* When this item was added to the list
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When item added to list)
*
* <p>
* <b>Definition:</b>
* When this item was added to the list
* </p>
*/
public Entry setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When item added to list)
*
* <p>
* <b>Definition:</b>
* When this item was added to the list
* </p>
*/
public Entry setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When item added to list)
*
* <p>
* <b>Definition:</b>
* When this item was added to the list
* </p>
*/
public Entry setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>item</b> (Actual entry).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A reference to the actual resource from which data was derived
* </p>
*/
public ResourceReferenceDt getItem() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Sets the value(s) for <b>item</b> (Actual entry)
*
* <p>
* <b>Definition:</b>
* A reference to the actual resource from which data was derived
* </p>
*/
public Entry setItem(ResourceReferenceDt theValue) {
myItem = theValue;
return this;
}
}
}

View File

@ -1,929 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Media</b> Resource
* (A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference)
*
* <p>
* <b>Definition:</b>
* A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Media">http://hl7.org/fhir/profiles/Media</a>
* </p>
*
*/
@ResourceDef(name="Media", profile="http://hl7.org/fhir/profiles/Media", id="media")
public class Media extends BaseResource implements IResource {
/**
* Search parameter constant for <b>type</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="type", path="Media.type", description="", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.type</b><br/>
* </p>
*/
public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
/**
* Search parameter constant for <b>subtype</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.subtype</b><br/>
* </p>
*/
@SearchParamDefinition(name="subtype", path="Media.subtype", description="", type="token" )
public static final String SP_SUBTYPE = "subtype";
/**
* <b>Fluent Client</b> search parameter constant for <b>subtype</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.subtype</b><br/>
* </p>
*/
public static final TokenClientParam SUBTYPE = new TokenClientParam(SP_SUBTYPE);
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Media.identifier", description="", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Media.dateTime</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="Media.dateTime", description="", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Media.dateTime</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Media.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="Media.subject", description="", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Media.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Media.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("Media.subject");
/**
* Search parameter constant for <b>operator</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Media.operator</b><br/>
* </p>
*/
@SearchParamDefinition(name="operator", path="Media.operator", description="", type="reference" )
public static final String SP_OPERATOR = "operator";
/**
* <b>Fluent Client</b> search parameter constant for <b>operator</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Media.operator</b><br/>
* </p>
*/
public static final ReferenceClientParam OPERATOR = new ReferenceClientParam(SP_OPERATOR);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Media.operator</b>".
*/
public static final Include INCLUDE_OPERATOR = new Include("Media.operator");
/**
* Search parameter constant for <b>view</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.view</b><br/>
* </p>
*/
@SearchParamDefinition(name="view", path="Media.view", description="", type="token" )
public static final String SP_VIEW = "view";
/**
* <b>Fluent Client</b> search parameter constant for <b>view</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Media.view</b><br/>
* </p>
*/
public static final TokenClientParam VIEW = new TokenClientParam(SP_VIEW);
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="photo | video | audio",
formalDefinition="Whether the media is a photo (still image), an audio recording, or a video recording"
)
private BoundCodeDt<MediaTypeEnum> myType;
@Child(name="subtype", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="The type of acquisition equipment/process",
formalDefinition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality"
)
private CodeableConceptDt mySubtype;
@Child(name="identifier", type=IdentifierDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Identifier(s) for the image",
formalDefinition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="dateTime", type=DateTimeDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="When the media was taken/recorded (end)",
formalDefinition="When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording"
)
private DateTimeDt myDateTime;
@Child(name="subject", order=4, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Group.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Specimen.class })
@Description(
shortDefinition="Who/What this Media is a record of",
formalDefinition="Who/What this Media is a record of"
)
private ResourceReferenceDt mySubject;
@Child(name="operator", order=5, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class })
@Description(
shortDefinition="The person who generated the image",
formalDefinition="The person who administered the collection of the image"
)
private ResourceReferenceDt myOperator;
@Child(name="view", type=CodeableConceptDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Imaging view e.g Lateral or Antero-posterior",
formalDefinition="The name of the imaging view e.g Lateral or Antero-posterior (AP)."
)
private CodeableConceptDt myView;
@Child(name="deviceName", type=StringDt.class, order=7, min=0, max=1)
@Description(
shortDefinition="Name of the device/manufacturer",
formalDefinition="The name of the device / manufacturer of the device that was used to make the recording"
)
private StringDt myDeviceName;
@Child(name="height", type=IntegerDt.class, order=8, min=0, max=1)
@Description(
shortDefinition="Height of the image in pixels(photo/video)",
formalDefinition="Height of the image in pixels(photo/video)"
)
private IntegerDt myHeight;
@Child(name="width", type=IntegerDt.class, order=9, min=0, max=1)
@Description(
shortDefinition="Width of the image in pixels (photo/video)",
formalDefinition="Width of the image in pixels (photo/video)"
)
private IntegerDt myWidth;
@Child(name="frames", type=IntegerDt.class, order=10, min=0, max=1)
@Description(
shortDefinition="Number of frames if > 1 (photo)",
formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required"
)
private IntegerDt myFrames;
@Child(name="length", type=IntegerDt.class, order=11, min=0, max=1)
@Description(
shortDefinition="Length in seconds (audio / video)",
formalDefinition="The length of the recording in seconds - for audio and video"
)
private IntegerDt myLength;
@Child(name="content", type=AttachmentDt.class, order=12, min=1, max=1)
@Description(
shortDefinition="Actual Media - reference or data",
formalDefinition="The actual content of the media - inline or by direct reference to the media source file"
)
private AttachmentDt myContent;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, mySubtype, myIdentifier, myDateTime, mySubject, myOperator, myView, myDeviceName, myHeight, myWidth, myFrames, myLength, myContent);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, mySubtype, myIdentifier, myDateTime, mySubject, myOperator, myView, myDeviceName, myHeight, myWidth, myFrames, myLength, myContent);
}
/**
* Gets the value(s) for <b>type</b> (photo | video | audio).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Whether the media is a photo (still image), an audio recording, or a video recording
* </p>
*/
public BoundCodeDt<MediaTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeDt<MediaTypeEnum>(MediaTypeEnum.VALUESET_BINDER);
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (photo | video | audio)
*
* <p>
* <b>Definition:</b>
* Whether the media is a photo (still image), an audio recording, or a video recording
* </p>
*/
public Media setType(BoundCodeDt<MediaTypeEnum> theValue) {
myType = theValue;
return this;
}
/**
* Sets the value(s) for <b>type</b> (photo | video | audio)
*
* <p>
* <b>Definition:</b>
* Whether the media is a photo (still image), an audio recording, or a video recording
* </p>
*/
public Media setType(MediaTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>subtype</b> (The type of acquisition equipment/process).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality
* </p>
*/
public CodeableConceptDt getSubtype() {
if (mySubtype == null) {
mySubtype = new CodeableConceptDt();
}
return mySubtype;
}
/**
* Sets the value(s) for <b>subtype</b> (The type of acquisition equipment/process)
*
* <p>
* <b>Definition:</b>
* Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality
* </p>
*/
public Media setSubtype(CodeableConceptDt theValue) {
mySubtype = theValue;
return this;
}
/**
* Gets the value(s) for <b>identifier</b> (Identifier(s) for the image).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*/
public Media setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Identifier(s) for the image),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Media addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifier(s) for the image)
*
* <p>
* <b>Definition:</b>
* Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Media addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>dateTime</b> (When the media was taken/recorded (end)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
* </p>
*/
public DateTimeDt getDateTime() {
if (myDateTime == null) {
myDateTime = new DateTimeDt();
}
return myDateTime;
}
/**
* Sets the value(s) for <b>dateTime</b> (When the media was taken/recorded (end))
*
* <p>
* <b>Definition:</b>
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
* </p>
*/
public Media setDateTime(DateTimeDt theValue) {
myDateTime = theValue;
return this;
}
/**
* Sets the value for <b>dateTime</b> (When the media was taken/recorded (end))
*
* <p>
* <b>Definition:</b>
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
* </p>
*/
public Media setDateTimeWithSecondsPrecision( Date theDate) {
myDateTime = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>dateTime</b> (When the media was taken/recorded (end))
*
* <p>
* <b>Definition:</b>
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
* </p>
*/
public Media setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
myDateTime = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Who/What this Media is a record of).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Who/What this Media is a record of
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Who/What this Media is a record of)
*
* <p>
* <b>Definition:</b>
* Who/What this Media is a record of
* </p>
*/
public Media setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>operator</b> (The person who generated the image).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The person who administered the collection of the image
* </p>
*/
public ResourceReferenceDt getOperator() {
if (myOperator == null) {
myOperator = new ResourceReferenceDt();
}
return myOperator;
}
/**
* Sets the value(s) for <b>operator</b> (The person who generated the image)
*
* <p>
* <b>Definition:</b>
* The person who administered the collection of the image
* </p>
*/
public Media setOperator(ResourceReferenceDt theValue) {
myOperator = theValue;
return this;
}
/**
* Gets the value(s) for <b>view</b> (Imaging view e.g Lateral or Antero-posterior).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The name of the imaging view e.g Lateral or Antero-posterior (AP).
* </p>
*/
public CodeableConceptDt getView() {
if (myView == null) {
myView = new CodeableConceptDt();
}
return myView;
}
/**
* Sets the value(s) for <b>view</b> (Imaging view e.g Lateral or Antero-posterior)
*
* <p>
* <b>Definition:</b>
* The name of the imaging view e.g Lateral or Antero-posterior (AP).
* </p>
*/
public Media setView(CodeableConceptDt theValue) {
myView = theValue;
return this;
}
/**
* Gets the value(s) for <b>deviceName</b> (Name of the device/manufacturer).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The name of the device / manufacturer of the device that was used to make the recording
* </p>
*/
public StringDt getDeviceName() {
if (myDeviceName == null) {
myDeviceName = new StringDt();
}
return myDeviceName;
}
/**
* Sets the value(s) for <b>deviceName</b> (Name of the device/manufacturer)
*
* <p>
* <b>Definition:</b>
* The name of the device / manufacturer of the device that was used to make the recording
* </p>
*/
public Media setDeviceName(StringDt theValue) {
myDeviceName = theValue;
return this;
}
/**
* Sets the value for <b>deviceName</b> (Name of the device/manufacturer)
*
* <p>
* <b>Definition:</b>
* The name of the device / manufacturer of the device that was used to make the recording
* </p>
*/
public Media setDeviceName( String theString) {
myDeviceName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>height</b> (Height of the image in pixels(photo/video)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Height of the image in pixels(photo/video)
* </p>
*/
public IntegerDt getHeight() {
if (myHeight == null) {
myHeight = new IntegerDt();
}
return myHeight;
}
/**
* Sets the value(s) for <b>height</b> (Height of the image in pixels(photo/video))
*
* <p>
* <b>Definition:</b>
* Height of the image in pixels(photo/video)
* </p>
*/
public Media setHeight(IntegerDt theValue) {
myHeight = theValue;
return this;
}
/**
* Sets the value for <b>height</b> (Height of the image in pixels(photo/video))
*
* <p>
* <b>Definition:</b>
* Height of the image in pixels(photo/video)
* </p>
*/
public Media setHeight( int theInteger) {
myHeight = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>width</b> (Width of the image in pixels (photo/video)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Width of the image in pixels (photo/video)
* </p>
*/
public IntegerDt getWidth() {
if (myWidth == null) {
myWidth = new IntegerDt();
}
return myWidth;
}
/**
* Sets the value(s) for <b>width</b> (Width of the image in pixels (photo/video))
*
* <p>
* <b>Definition:</b>
* Width of the image in pixels (photo/video)
* </p>
*/
public Media setWidth(IntegerDt theValue) {
myWidth = theValue;
return this;
}
/**
* Sets the value for <b>width</b> (Width of the image in pixels (photo/video))
*
* <p>
* <b>Definition:</b>
* Width of the image in pixels (photo/video)
* </p>
*/
public Media setWidth( int theInteger) {
myWidth = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>frames</b> (Number of frames if > 1 (photo)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required
* </p>
*/
public IntegerDt getFrames() {
if (myFrames == null) {
myFrames = new IntegerDt();
}
return myFrames;
}
/**
* Sets the value(s) for <b>frames</b> (Number of frames if > 1 (photo))
*
* <p>
* <b>Definition:</b>
* The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required
* </p>
*/
public Media setFrames(IntegerDt theValue) {
myFrames = theValue;
return this;
}
/**
* Sets the value for <b>frames</b> (Number of frames if > 1 (photo))
*
* <p>
* <b>Definition:</b>
* The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required
* </p>
*/
public Media setFrames( int theInteger) {
myFrames = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>length</b> (Length in seconds (audio / video)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The length of the recording in seconds - for audio and video
* </p>
*/
public IntegerDt getLength() {
if (myLength == null) {
myLength = new IntegerDt();
}
return myLength;
}
/**
* Sets the value(s) for <b>length</b> (Length in seconds (audio / video))
*
* <p>
* <b>Definition:</b>
* The length of the recording in seconds - for audio and video
* </p>
*/
public Media setLength(IntegerDt theValue) {
myLength = theValue;
return this;
}
/**
* Sets the value for <b>length</b> (Length in seconds (audio / video))
*
* <p>
* <b>Definition:</b>
* The length of the recording in seconds - for audio and video
* </p>
*/
public Media setLength( int theInteger) {
myLength = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>content</b> (Actual Media - reference or data).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual content of the media - inline or by direct reference to the media source file
* </p>
*/
public AttachmentDt getContent() {
if (myContent == null) {
myContent = new AttachmentDt();
}
return myContent;
}
/**
* Sets the value(s) for <b>content</b> (Actual Media - reference or data)
*
* <p>
* <b>Definition:</b>
* The actual content of the media - inline or by direct reference to the media source file
* </p>
*/
public Media setContent(AttachmentDt theValue) {
myContent = theValue;
return this;
}
}

View File

@ -1,821 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Medication</b> Resource
* (Definition of a Medication)
*
* <p>
* <b>Definition:</b>
* Primarily used for identification and definition of Medication, but also covers ingredients and packaging
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Medication">http://hl7.org/fhir/profiles/Medication</a>
* </p>
*
*/
@ResourceDef(name="Medication", profile="http://hl7.org/fhir/profiles/Medication", id="medication")
public class Medication extends BaseResource implements IResource {
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="Medication.code", description="", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for <b>name</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>Medication.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="name", path="Medication.name", description="", type="string" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>Medication.name</b><br/>
* </p>
*/
public static final StringClientParam NAME = new StringClientParam(SP_NAME);
/**
* Search parameter constant for <b>manufacturer</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.manufacturer</b><br/>
* </p>
*/
@SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="", type="reference" )
public static final String SP_MANUFACTURER = "manufacturer";
/**
* <b>Fluent Client</b> search parameter constant for <b>manufacturer</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.manufacturer</b><br/>
* </p>
*/
public static final ReferenceClientParam MANUFACTURER = new ReferenceClientParam(SP_MANUFACTURER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Medication.manufacturer</b>".
*/
public static final Include INCLUDE_MANUFACTURER = new Include("Medication.manufacturer");
/**
* Search parameter constant for <b>form</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.product.form</b><br/>
* </p>
*/
@SearchParamDefinition(name="form", path="Medication.product.form", description="", type="token" )
public static final String SP_FORM = "form";
/**
* <b>Fluent Client</b> search parameter constant for <b>form</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.product.form</b><br/>
* </p>
*/
public static final TokenClientParam FORM = new TokenClientParam(SP_FORM);
/**
* Search parameter constant for <b>ingredient</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.product.ingredient.item</b><br/>
* </p>
*/
@SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="", type="reference" )
public static final String SP_INGREDIENT = "ingredient";
/**
* <b>Fluent Client</b> search parameter constant for <b>ingredient</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.product.ingredient.item</b><br/>
* </p>
*/
public static final ReferenceClientParam INGREDIENT = new ReferenceClientParam(SP_INGREDIENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Medication.product.ingredient.item</b>".
*/
public static final Include INCLUDE_PRODUCT_INGREDIENT_ITEM = new Include("Medication.product.ingredient.item");
/**
* Search parameter constant for <b>container</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.package.container</b><br/>
* </p>
*/
@SearchParamDefinition(name="container", path="Medication.package.container", description="", type="token" )
public static final String SP_CONTAINER = "container";
/**
* <b>Fluent Client</b> search parameter constant for <b>container</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Medication.package.container</b><br/>
* </p>
*/
public static final TokenClientParam CONTAINER = new TokenClientParam(SP_CONTAINER);
/**
* Search parameter constant for <b>content</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.package.content.item</b><br/>
* </p>
*/
@SearchParamDefinition(name="content", path="Medication.package.content.item", description="", type="reference" )
public static final String SP_CONTENT = "content";
/**
* <b>Fluent Client</b> search parameter constant for <b>content</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Medication.package.content.item</b><br/>
* </p>
*/
public static final ReferenceClientParam CONTENT = new ReferenceClientParam(SP_CONTENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Medication.package.content.item</b>".
*/
public static final Include INCLUDE_PACKAGE_CONTENT_ITEM = new Include("Medication.package.content.item");
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Common / Commercial name",
formalDefinition="The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code"
)
private StringDt myName;
@Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Codes that identify this medication",
formalDefinition="A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes"
)
private CodeableConceptDt myCode;
@Child(name="isBrand", type=BooleanDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="True if a brand",
formalDefinition="Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)"
)
private BooleanDt myIsBrand;
@Child(name="manufacturer", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@Description(
shortDefinition="Manufacturer of the item",
formalDefinition="Describes the details of the manufacturer"
)
private ResourceReferenceDt myManufacturer;
@Child(name="kind", type=CodeDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="product | package",
formalDefinition="Medications are either a single administrable product or a package that contains one or more products."
)
private BoundCodeDt<MedicationKindEnum> myKind;
@Child(name="product", order=5, min=0, max=1)
@Description(
shortDefinition="Administrable medication details",
formalDefinition="Information that only applies to products (not packages)"
)
private Product myProduct;
@Child(name="package", type=CodeDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Details about packaged medications",
formalDefinition="Information that only applies to packages (not products)"
)
private CodeDt myPackage;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage);
}
/**
* Gets the value(s) for <b>name</b> (Common / Commercial name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
* </p>
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Common / Commercial name)
*
* <p>
* <b>Definition:</b>
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
* </p>
*/
public Medication setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Common / Commercial name)
*
* <p>
* <b>Definition:</b>
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
* </p>
*/
public Medication setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>code</b> (Codes that identify this medication).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Codes that identify this medication)
*
* <p>
* <b>Definition:</b>
* A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes
* </p>
*/
public Medication setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>isBrand</b> (True if a brand).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
* </p>
*/
public BooleanDt getIsBrand() {
if (myIsBrand == null) {
myIsBrand = new BooleanDt();
}
return myIsBrand;
}
/**
* Sets the value(s) for <b>isBrand</b> (True if a brand)
*
* <p>
* <b>Definition:</b>
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
* </p>
*/
public Medication setIsBrand(BooleanDt theValue) {
myIsBrand = theValue;
return this;
}
/**
* Sets the value for <b>isBrand</b> (True if a brand)
*
* <p>
* <b>Definition:</b>
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
* </p>
*/
public Medication setIsBrand( boolean theBoolean) {
myIsBrand = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>manufacturer</b> (Manufacturer of the item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Describes the details of the manufacturer
* </p>
*/
public ResourceReferenceDt getManufacturer() {
if (myManufacturer == null) {
myManufacturer = new ResourceReferenceDt();
}
return myManufacturer;
}
/**
* Sets the value(s) for <b>manufacturer</b> (Manufacturer of the item)
*
* <p>
* <b>Definition:</b>
* Describes the details of the manufacturer
* </p>
*/
public Medication setManufacturer(ResourceReferenceDt theValue) {
myManufacturer = theValue;
return this;
}
/**
* Gets the value(s) for <b>kind</b> (product | package).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Medications are either a single administrable product or a package that contains one or more products.
* </p>
*/
public BoundCodeDt<MedicationKindEnum> getKind() {
if (myKind == null) {
myKind = new BoundCodeDt<MedicationKindEnum>(MedicationKindEnum.VALUESET_BINDER);
}
return myKind;
}
/**
* Sets the value(s) for <b>kind</b> (product | package)
*
* <p>
* <b>Definition:</b>
* Medications are either a single administrable product or a package that contains one or more products.
* </p>
*/
public Medication setKind(BoundCodeDt<MedicationKindEnum> theValue) {
myKind = theValue;
return this;
}
/**
* Sets the value(s) for <b>kind</b> (product | package)
*
* <p>
* <b>Definition:</b>
* Medications are either a single administrable product or a package that contains one or more products.
* </p>
*/
public Medication setKind(MedicationKindEnum theValue) {
getKind().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>product</b> (Administrable medication details).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Information that only applies to products (not packages)
* </p>
*/
public Product getProduct() {
if (myProduct == null) {
myProduct = new Product();
}
return myProduct;
}
/**
* Sets the value(s) for <b>product</b> (Administrable medication details)
*
* <p>
* <b>Definition:</b>
* Information that only applies to products (not packages)
* </p>
*/
public Medication setProduct(Product theValue) {
myProduct = theValue;
return this;
}
/**
* Gets the value(s) for <b>package</b> (Details about packaged medications).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Information that only applies to packages (not products)
* </p>
*/
public CodeDt getPackage() {
if (myPackage == null) {
myPackage = new CodeDt();
}
return myPackage;
}
/**
* Sets the value(s) for <b>package</b> (Details about packaged medications)
*
* <p>
* <b>Definition:</b>
* Information that only applies to packages (not products)
* </p>
*/
public Medication setPackage(CodeDt theValue) {
myPackage = theValue;
return this;
}
/**
* Sets the value for <b>package</b> (Details about packaged medications)
*
* <p>
* <b>Definition:</b>
* Information that only applies to packages (not products)
* </p>
*/
public Medication setPackage( String theCode) {
myPackage = new CodeDt(theCode);
return this;
}
/**
* Block class for child element: <b>Medication.product</b> (Administrable medication details)
*
* <p>
* <b>Definition:</b>
* Information that only applies to products (not packages)
* </p>
*/
@Block()
public static class Product extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="powder | tablets | carton +",
formalDefinition="Describes the form of the item. Powder; tables; carton"
)
private CodeableConceptDt myForm;
@Child(name="ingredient", order=1, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Active or inactive ingredient",
formalDefinition="Identifies a particular constituent of interest in the product"
)
private java.util.List<ProductIngredient> myIngredient;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myForm, myIngredient);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myForm, myIngredient);
}
/**
* Gets the value(s) for <b>form</b> (powder | tablets | carton +).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Describes the form of the item. Powder; tables; carton
* </p>
*/
public CodeableConceptDt getForm() {
if (myForm == null) {
myForm = new CodeableConceptDt();
}
return myForm;
}
/**
* Sets the value(s) for <b>form</b> (powder | tablets | carton +)
*
* <p>
* <b>Definition:</b>
* Describes the form of the item. Powder; tables; carton
* </p>
*/
public Product setForm(CodeableConceptDt theValue) {
myForm = theValue;
return this;
}
/**
* Gets the value(s) for <b>ingredient</b> (Active or inactive ingredient).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies a particular constituent of interest in the product
* </p>
*/
public java.util.List<ProductIngredient> getIngredient() {
if (myIngredient == null) {
myIngredient = new java.util.ArrayList<ProductIngredient>();
}
return myIngredient;
}
/**
* Sets the value(s) for <b>ingredient</b> (Active or inactive ingredient)
*
* <p>
* <b>Definition:</b>
* Identifies a particular constituent of interest in the product
* </p>
*/
public Product setIngredient(java.util.List<ProductIngredient> theValue) {
myIngredient = theValue;
return this;
}
/**
* Adds and returns a new value for <b>ingredient</b> (Active or inactive ingredient)
*
* <p>
* <b>Definition:</b>
* Identifies a particular constituent of interest in the product
* </p>
*/
public ProductIngredient addIngredient() {
ProductIngredient newType = new ProductIngredient();
getIngredient().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>ingredient</b> (Active or inactive ingredient),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifies a particular constituent of interest in the product
* </p>
*/
public ProductIngredient getIngredientFirstRep() {
if (getIngredient().isEmpty()) {
return addIngredient();
}
return getIngredient().get(0);
}
}
/**
* Block class for child element: <b>Medication.product.ingredient</b> (Active or inactive ingredient)
*
* <p>
* <b>Definition:</b>
* Identifies a particular constituent of interest in the product
* </p>
*/
@Block()
public static class ProductIngredient extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="item", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class, ca.uhn.fhir.model.dstu.resource.Medication.class })
@Description(
shortDefinition="The product contained",
formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication"
)
private ResourceReferenceDt myItem;
@Child(name="amount", type=RatioDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="How much ingredient in product",
formalDefinition="Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet"
)
private RatioDt myAmount;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount);
}
/**
* Gets the value(s) for <b>item</b> (The product contained).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual ingredient - either a substance (simple ingredient) or another medication
* </p>
*/
public ResourceReferenceDt getItem() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Sets the value(s) for <b>item</b> (The product contained)
*
* <p>
* <b>Definition:</b>
* The actual ingredient - either a substance (simple ingredient) or another medication
* </p>
*/
public ProductIngredient setItem(ResourceReferenceDt theValue) {
myItem = theValue;
return this;
}
/**
* Gets the value(s) for <b>amount</b> (How much ingredient in product).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet
* </p>
*/
public RatioDt getAmount() {
if (myAmount == null) {
myAmount = new RatioDt();
}
return myAmount;
}
/**
* Sets the value(s) for <b>amount</b> (How much ingredient in product)
*
* <p>
* <b>Definition:</b>
* Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet
* </p>
*/
public ProductIngredient setAmount(RatioDt theValue) {
myAmount = theValue;
return this;
}
}
}

View File

@ -1,413 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.valueset.IssueSeverityEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>OperationOutcome</b> Resource
* (Information about the success/failure of an action)
*
* <p>
* <b>Definition:</b>
* A collection of error, warning or information messages that result from a system action
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/OperationOutcome">http://hl7.org/fhir/profiles/OperationOutcome</a>
* </p>
*
*/
@ResourceDef(name="OperationOutcome", profile="http://hl7.org/fhir/profiles/OperationOutcome", id="operationoutcome")
public class OperationOutcome extends BaseResource implements IResource {
@Child(name="issue", order=0, min=1, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="A single issue associated with the action",
formalDefinition="An error, warning or information message that results from a system action"
)
private java.util.List<Issue> myIssue;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIssue);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIssue);
}
/**
* Gets the value(s) for <b>issue</b> (A single issue associated with the action).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An error, warning or information message that results from a system action
* </p>
*/
public java.util.List<Issue> getIssue() {
if (myIssue == null) {
myIssue = new java.util.ArrayList<Issue>();
}
return myIssue;
}
/**
* Sets the value(s) for <b>issue</b> (A single issue associated with the action)
*
* <p>
* <b>Definition:</b>
* An error, warning or information message that results from a system action
* </p>
*/
public OperationOutcome setIssue(java.util.List<Issue> theValue) {
myIssue = theValue;
return this;
}
/**
* Adds and returns a new value for <b>issue</b> (A single issue associated with the action)
*
* <p>
* <b>Definition:</b>
* An error, warning or information message that results from a system action
* </p>
*/
public Issue addIssue() {
Issue newType = new Issue();
getIssue().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>issue</b> (A single issue associated with the action),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* An error, warning or information message that results from a system action
* </p>
*/
public Issue getIssueFirstRep() {
if (getIssue().isEmpty()) {
return addIssue();
}
return getIssue().get(0);
}
/**
* Block class for child element: <b>OperationOutcome.issue</b> (A single issue associated with the action)
*
* <p>
* <b>Definition:</b>
* An error, warning or information message that results from a system action
* </p>
*/
@Block()
public static class Issue extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="severity", type=CodeDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="fatal | error | warning | information",
formalDefinition="Indicates whether the issue indicates a variation from successful processing"
)
private BoundCodeDt<IssueSeverityEnum> mySeverity;
@Child(name="type", type=CodingDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Error or warning code",
formalDefinition="A code indicating the type of error, warning or information message."
)
private CodingDt myType;
@Child(name="details", type=StringDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Additional description of the issue",
formalDefinition="Additional description of the issue"
)
private StringDt myDetails;
@Child(name="location", type=StringDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="XPath of element(s) related to issue",
formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised."
)
private java.util.List<StringDt> myLocation;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySeverity, myType, myDetails, myLocation);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySeverity, myType, myDetails, myLocation);
}
/**
* Gets the value(s) for <b>severity</b> (fatal | error | warning | information).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates whether the issue indicates a variation from successful processing
* </p>
*/
public BoundCodeDt<IssueSeverityEnum> getSeverity() {
if (mySeverity == null) {
mySeverity = new BoundCodeDt<IssueSeverityEnum>(IssueSeverityEnum.VALUESET_BINDER);
}
return mySeverity;
}
/**
* Sets the value(s) for <b>severity</b> (fatal | error | warning | information)
*
* <p>
* <b>Definition:</b>
* Indicates whether the issue indicates a variation from successful processing
* </p>
*/
public Issue setSeverity(BoundCodeDt<IssueSeverityEnum> theValue) {
mySeverity = theValue;
return this;
}
/**
* Sets the value(s) for <b>severity</b> (fatal | error | warning | information)
*
* <p>
* <b>Definition:</b>
* Indicates whether the issue indicates a variation from successful processing
* </p>
*/
public Issue setSeverity(IssueSeverityEnum theValue) {
getSeverity().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>type</b> (Error or warning code).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A code indicating the type of error, warning or information message.
* </p>
*/
public CodingDt getType() {
if (myType == null) {
myType = new CodingDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (Error or warning code)
*
* <p>
* <b>Definition:</b>
* A code indicating the type of error, warning or information message.
* </p>
*/
public Issue setType(CodingDt theValue) {
myType = theValue;
return this;
}
/**
* Gets the value(s) for <b>details</b> (Additional description of the issue).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Additional description of the issue
* </p>
*/
public StringDt getDetails() {
if (myDetails == null) {
myDetails = new StringDt();
}
return myDetails;
}
/**
* Sets the value(s) for <b>details</b> (Additional description of the issue)
*
* <p>
* <b>Definition:</b>
* Additional description of the issue
* </p>
*/
public Issue setDetails(StringDt theValue) {
myDetails = theValue;
return this;
}
/**
* Sets the value for <b>details</b> (Additional description of the issue)
*
* <p>
* <b>Definition:</b>
* Additional description of the issue
* </p>
*/
public Issue setDetails( String theString) {
myDetails = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>location</b> (XPath of element(s) related to issue).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
* </p>
*/
public java.util.List<StringDt> getLocation() {
if (myLocation == null) {
myLocation = new java.util.ArrayList<StringDt>();
}
return myLocation;
}
/**
* Sets the value(s) for <b>location</b> (XPath of element(s) related to issue)
*
* <p>
* <b>Definition:</b>
* A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
* </p>
*/
public Issue setLocation(java.util.List<StringDt> theValue) {
myLocation = theValue;
return this;
}
/**
* Adds and returns a new value for <b>location</b> (XPath of element(s) related to issue)
*
* <p>
* <b>Definition:</b>
* A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
* </p>
*/
public StringDt addLocation() {
StringDt newType = new StringDt();
getLocation().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>location</b> (XPath of element(s) related to issue),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
* </p>
*/
public StringDt getLocationFirstRep() {
if (getLocation().isEmpty()) {
return addLocation();
}
return getLocation().get(0);
}
/**
* Adds a new value for <b>location</b> (XPath of element(s) related to issue)
*
* <p>
* <b>Definition:</b>
* A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Issue addLocation( String theString) {
if (myLocation == null) {
myLocation = new java.util.ArrayList<StringDt>();
}
myLocation.add(new StringDt(theString));
return this;
}
}
}

View File

@ -1,853 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.composite.ScheduleDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Order</b> Resource
* (A request to perform an action)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Order">http://hl7.org/fhir/profiles/Order</a>
* </p>
*
*/
@ResourceDef(name="Order", profile="http://hl7.org/fhir/profiles/Order", id="order")
public class Order extends BaseResource implements IResource {
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Order.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="Order.date", description="", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Order.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="Order.subject", description="", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Order.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("Order.subject");
/**
* Search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.source</b><br/>
* </p>
*/
@SearchParamDefinition(name="source", path="Order.source", description="", type="reference" )
public static final String SP_SOURCE = "source";
/**
* <b>Fluent Client</b> search parameter constant for <b>source</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.source</b><br/>
* </p>
*/
public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Order.source</b>".
*/
public static final Include INCLUDE_SOURCE = new Include("Order.source");
/**
* Search parameter constant for <b>target</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.target</b><br/>
* </p>
*/
@SearchParamDefinition(name="target", path="Order.target", description="", type="reference" )
public static final String SP_TARGET = "target";
/**
* <b>Fluent Client</b> search parameter constant for <b>target</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.target</b><br/>
* </p>
*/
public static final ReferenceClientParam TARGET = new ReferenceClientParam(SP_TARGET);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Order.target</b>".
*/
public static final Include INCLUDE_TARGET = new Include("Order.target");
/**
* Search parameter constant for <b>authority</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.authority</b><br/>
* </p>
*/
@SearchParamDefinition(name="authority", path="Order.authority", description="", type="reference" )
public static final String SP_AUTHORITY = "authority";
/**
* <b>Fluent Client</b> search parameter constant for <b>authority</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.authority</b><br/>
* </p>
*/
public static final ReferenceClientParam AUTHORITY = new ReferenceClientParam(SP_AUTHORITY);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Order.authority</b>".
*/
public static final Include INCLUDE_AUTHORITY = new Include("Order.authority");
/**
* Search parameter constant for <b>when_code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Order.when.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="when_code", path="Order.when.code", description="", type="token" )
public static final String SP_WHEN_CODE = "when_code";
/**
* <b>Fluent Client</b> search parameter constant for <b>when_code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Order.when.code</b><br/>
* </p>
*/
public static final TokenClientParam WHEN_CODE = new TokenClientParam(SP_WHEN_CODE);
/**
* Search parameter constant for <b>when</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Order.when.schedule</b><br/>
* </p>
*/
@SearchParamDefinition(name="when", path="Order.when.schedule", description="", type="date" )
public static final String SP_WHEN = "when";
/**
* <b>Fluent Client</b> search parameter constant for <b>when</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Order.when.schedule</b><br/>
* </p>
*/
public static final DateClientParam WHEN = new DateClientParam(SP_WHEN);
/**
* Search parameter constant for <b>detail</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.detail</b><br/>
* </p>
*/
@SearchParamDefinition(name="detail", path="Order.detail", description="", type="reference" )
public static final String SP_DETAIL = "detail";
/**
* <b>Fluent Client</b> search parameter constant for <b>detail</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Order.detail</b><br/>
* </p>
*/
public static final ReferenceClientParam DETAIL = new ReferenceClientParam(SP_DETAIL);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Order.detail</b>".
*/
public static final Include INCLUDE_DETAIL = new Include("Order.detail");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Identifiers assigned to this order by the orderer or by the receiver",
formalDefinition=""
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="date", type=DateTimeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="When the order was made",
formalDefinition=""
)
private DateTimeDt myDate;
@Child(name="subject", order=2, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Patient this order is about",
formalDefinition=""
)
private ResourceReferenceDt mySubject;
@Child(name="source", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class })
@Description(
shortDefinition="Who initiated the order",
formalDefinition=""
)
private ResourceReferenceDt mySource;
@Child(name="target", order=4, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class, ca.uhn.fhir.model.dstu.resource.Device.class, ca.uhn.fhir.model.dstu.resource.Practitioner.class })
@Description(
shortDefinition="Who is intended to fulfill the order",
formalDefinition=""
)
private ResourceReferenceDt myTarget;
@Child(name="reason", order=5, min=0, max=1, type={
CodeableConceptDt.class, IResource.class })
@Description(
shortDefinition="Text - why the order was made",
formalDefinition=""
)
private IDatatype myReason;
@Child(name="authority", order=6, min=0, max=1, type={
IResource.class })
@Description(
shortDefinition="If required by policy",
formalDefinition=""
)
private ResourceReferenceDt myAuthority;
@Child(name="when", order=7, min=0, max=1)
@Description(
shortDefinition="When order should be fulfilled",
formalDefinition=""
)
private When myWhen;
@Child(name="detail", order=8, min=1, max=Child.MAX_UNLIMITED, type={
IResource.class })
@Description(
shortDefinition="What action is being ordered",
formalDefinition=""
)
private java.util.List<ResourceReferenceDt> myDetail;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myDate, mySubject, mySource, myTarget, myReason, myAuthority, myWhen, myDetail);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, mySubject, mySource, myTarget, myReason, myAuthority, myWhen, myDetail);
}
/**
* Gets the value(s) for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Order addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Order addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>date</b> (When the order was made).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the order was made)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the order was made)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When the order was made)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Patient this order is about).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Patient this order is about)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>source</b> (Who initiated the order).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getSource() {
if (mySource == null) {
mySource = new ResourceReferenceDt();
}
return mySource;
}
/**
* Sets the value(s) for <b>source</b> (Who initiated the order)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setSource(ResourceReferenceDt theValue) {
mySource = theValue;
return this;
}
/**
* Gets the value(s) for <b>target</b> (Who is intended to fulfill the order).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getTarget() {
if (myTarget == null) {
myTarget = new ResourceReferenceDt();
}
return myTarget;
}
/**
* Sets the value(s) for <b>target</b> (Who is intended to fulfill the order)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setTarget(ResourceReferenceDt theValue) {
myTarget = theValue;
return this;
}
/**
* Gets the value(s) for <b>reason[x]</b> (Text - why the order was made).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IDatatype getReason() {
return myReason;
}
/**
* Sets the value(s) for <b>reason[x]</b> (Text - why the order was made)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setReason(IDatatype theValue) {
myReason = theValue;
return this;
}
/**
* Gets the value(s) for <b>authority</b> (If required by policy).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getAuthority() {
if (myAuthority == null) {
myAuthority = new ResourceReferenceDt();
}
return myAuthority;
}
/**
* Sets the value(s) for <b>authority</b> (If required by policy)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setAuthority(ResourceReferenceDt theValue) {
myAuthority = theValue;
return this;
}
/**
* Gets the value(s) for <b>when</b> (When order should be fulfilled).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public When getWhen() {
if (myWhen == null) {
myWhen = new When();
}
return myWhen;
}
/**
* Sets the value(s) for <b>when</b> (When order should be fulfilled)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setWhen(When theValue) {
myWhen = theValue;
return this;
}
/**
* Gets the value(s) for <b>detail</b> (What action is being ordered).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ResourceReferenceDt> getDetail() {
if (myDetail == null) {
myDetail = new java.util.ArrayList<ResourceReferenceDt>();
}
return myDetail;
}
/**
* Sets the value(s) for <b>detail</b> (What action is being ordered)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Order setDetail(java.util.List<ResourceReferenceDt> theValue) {
myDetail = theValue;
return this;
}
/**
* Adds and returns a new value for <b>detail</b> (What action is being ordered)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt addDetail() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getDetail().add(newType);
return newType;
}
/**
* Block class for child element: <b>Order.when</b> (When order should be fulfilled)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
@Block()
public static class When extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Code specifies when request should be done. The code may simply be a priority code",
formalDefinition=""
)
private CodeableConceptDt myCode;
@Child(name="schedule", type=ScheduleDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="A formal schedule",
formalDefinition=""
)
private ScheduleDt mySchedule;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, mySchedule);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, mySchedule);
}
/**
* Gets the value(s) for <b>code</b> (Code specifies when request should be done. The code may simply be a priority code).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Code specifies when request should be done. The code may simply be a priority code)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public When setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>schedule</b> (A formal schedule).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ScheduleDt getSchedule() {
if (mySchedule == null) {
mySchedule = new ScheduleDt();
}
return mySchedule;
}
/**
* Sets the value(s) for <b>schedule</b> (A formal schedule)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public When setSchedule(ScheduleDt theValue) {
mySchedule = theValue;
return this;
}
}
}

View File

@ -1,662 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.OrderOutcomeStatusEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>OrderResponse</b> Resource
* (A response to an order)
*
* <p>
* <b>Definition:</b>
* A response to an order
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/OrderResponse">http://hl7.org/fhir/profiles/OrderResponse</a>
* </p>
*
*/
@ResourceDef(name="OrderResponse", profile="http://hl7.org/fhir/profiles/OrderResponse", id="orderresponse")
public class OrderResponse extends BaseResource implements IResource {
/**
* Search parameter constant for <b>request</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.request</b><br/>
* </p>
*/
@SearchParamDefinition(name="request", path="OrderResponse.request", description="", type="reference" )
public static final String SP_REQUEST = "request";
/**
* <b>Fluent Client</b> search parameter constant for <b>request</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.request</b><br/>
* </p>
*/
public static final ReferenceClientParam REQUEST = new ReferenceClientParam(SP_REQUEST);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>OrderResponse.request</b>".
*/
public static final Include INCLUDE_REQUEST = new Include("OrderResponse.request");
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>OrderResponse.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="OrderResponse.date", description="", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>OrderResponse.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>who</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.who</b><br/>
* </p>
*/
@SearchParamDefinition(name="who", path="OrderResponse.who", description="", type="reference" )
public static final String SP_WHO = "who";
/**
* <b>Fluent Client</b> search parameter constant for <b>who</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.who</b><br/>
* </p>
*/
public static final ReferenceClientParam WHO = new ReferenceClientParam(SP_WHO);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>OrderResponse.who</b>".
*/
public static final Include INCLUDE_WHO = new Include("OrderResponse.who");
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>OrderResponse.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="OrderResponse.code", description="", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>OrderResponse.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for <b>fulfillment</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.fulfillment</b><br/>
* </p>
*/
@SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="", type="reference" )
public static final String SP_FULFILLMENT = "fulfillment";
/**
* <b>Fluent Client</b> search parameter constant for <b>fulfillment</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>OrderResponse.fulfillment</b><br/>
* </p>
*/
public static final ReferenceClientParam FULFILLMENT = new ReferenceClientParam(SP_FULFILLMENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>OrderResponse.fulfillment</b>".
*/
public static final Include INCLUDE_FULFILLMENT = new Include("OrderResponse.fulfillment");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Identifiers assigned to this order by the orderer or by the receiver",
formalDefinition="Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="request", order=1, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Order.class })
@Description(
shortDefinition="The order that this is a response to",
formalDefinition="A reference to the order that this is in response to"
)
private ResourceReferenceDt myRequest;
@Child(name="date", type=DateTimeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="When the response was made",
formalDefinition="The date and time at which this order response was made (created/posted)"
)
private DateTimeDt myDate;
@Child(name="who", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Organization.class, ca.uhn.fhir.model.dstu.resource.Device.class })
@Description(
shortDefinition="Who made the response",
formalDefinition="The person, organization, or device credited with making the response"
)
private ResourceReferenceDt myWho;
@Child(name="authority", order=4, min=0, max=1, type={
CodeableConceptDt.class, IResource.class })
@Description(
shortDefinition="If required by policy",
formalDefinition="A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection"
)
private IDatatype myAuthority;
@Child(name="code", type=CodeDt.class, order=5, min=1, max=1)
@Description(
shortDefinition="pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete",
formalDefinition="What this response says about the status of the original order"
)
private BoundCodeDt<OrderOutcomeStatusEnum> myCode;
@Child(name="description", type=StringDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Additional description of the response",
formalDefinition="Additional description about the response - e.g. a text description provided by a human user when making decisions about the order"
)
private StringDt myDescription;
@Child(name="fulfillment", order=7, min=0, max=Child.MAX_UNLIMITED, type={
IResource.class })
@Description(
shortDefinition="Details of the outcome of performing the order",
formalDefinition="Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order"
)
private java.util.List<ResourceReferenceDt> myFulfillment;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myRequest, myDate, myWho, myAuthority, myCode, myDescription, myFulfillment);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myRequest, myDate, myWho, myAuthority, myCode, myDescription, myFulfillment);
}
/**
* Gets the value(s) for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*/
public OrderResponse setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public OrderResponse addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Identifiers assigned to this order by the orderer or by the receiver)
*
* <p>
* <b>Definition:</b>
* Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public OrderResponse addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>request</b> (The order that this is a response to).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A reference to the order that this is in response to
* </p>
*/
public ResourceReferenceDt getRequest() {
if (myRequest == null) {
myRequest = new ResourceReferenceDt();
}
return myRequest;
}
/**
* Sets the value(s) for <b>request</b> (The order that this is a response to)
*
* <p>
* <b>Definition:</b>
* A reference to the order that this is in response to
* </p>
*/
public OrderResponse setRequest(ResourceReferenceDt theValue) {
myRequest = theValue;
return this;
}
/**
* Gets the value(s) for <b>date</b> (When the response was made).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The date and time at which this order response was made (created/posted)
* </p>
*/
public DateTimeDt getDate() {
if (myDate == null) {
myDate = new DateTimeDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (When the response was made)
*
* <p>
* <b>Definition:</b>
* The date and time at which this order response was made (created/posted)
* </p>
*/
public OrderResponse setDate(DateTimeDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (When the response was made)
*
* <p>
* <b>Definition:</b>
* The date and time at which this order response was made (created/posted)
* </p>
*/
public OrderResponse setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (When the response was made)
*
* <p>
* <b>Definition:</b>
* The date and time at which this order response was made (created/posted)
* </p>
*/
public OrderResponse setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>who</b> (Who made the response).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The person, organization, or device credited with making the response
* </p>
*/
public ResourceReferenceDt getWho() {
if (myWho == null) {
myWho = new ResourceReferenceDt();
}
return myWho;
}
/**
* Sets the value(s) for <b>who</b> (Who made the response)
*
* <p>
* <b>Definition:</b>
* The person, organization, or device credited with making the response
* </p>
*/
public OrderResponse setWho(ResourceReferenceDt theValue) {
myWho = theValue;
return this;
}
/**
* Gets the value(s) for <b>authority[x]</b> (If required by policy).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection
* </p>
*/
public IDatatype getAuthority() {
return myAuthority;
}
/**
* Sets the value(s) for <b>authority[x]</b> (If required by policy)
*
* <p>
* <b>Definition:</b>
* A reference to an authority policy that is the reason for the response. Usually this is used when the order is rejected, to provide a reason for rejection
* </p>
*/
public OrderResponse setAuthority(IDatatype theValue) {
myAuthority = theValue;
return this;
}
/**
* Gets the value(s) for <b>code</b> (pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* What this response says about the status of the original order
* </p>
*/
public BoundCodeDt<OrderOutcomeStatusEnum> getCode() {
if (myCode == null) {
myCode = new BoundCodeDt<OrderOutcomeStatusEnum>(OrderOutcomeStatusEnum.VALUESET_BINDER);
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete)
*
* <p>
* <b>Definition:</b>
* What this response says about the status of the original order
* </p>
*/
public OrderResponse setCode(BoundCodeDt<OrderOutcomeStatusEnum> theValue) {
myCode = theValue;
return this;
}
/**
* Sets the value(s) for <b>code</b> (pending | review | rejected | error | accepted | cancelled | replaced | aborted | complete)
*
* <p>
* <b>Definition:</b>
* What this response says about the status of the original order
* </p>
*/
public OrderResponse setCode(OrderOutcomeStatusEnum theValue) {
getCode().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>description</b> (Additional description of the response).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Additional description about the response - e.g. a text description provided by a human user when making decisions about the order
* </p>
*/
public StringDt getDescription() {
if (myDescription == null) {
myDescription = new StringDt();
}
return myDescription;
}
/**
* Sets the value(s) for <b>description</b> (Additional description of the response)
*
* <p>
* <b>Definition:</b>
* Additional description about the response - e.g. a text description provided by a human user when making decisions about the order
* </p>
*/
public OrderResponse setDescription(StringDt theValue) {
myDescription = theValue;
return this;
}
/**
* Sets the value for <b>description</b> (Additional description of the response)
*
* <p>
* <b>Definition:</b>
* Additional description about the response - e.g. a text description provided by a human user when making decisions about the order
* </p>
*/
public OrderResponse setDescription( String theString) {
myDescription = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>fulfillment</b> (Details of the outcome of performing the order).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order
* </p>
*/
public java.util.List<ResourceReferenceDt> getFulfillment() {
if (myFulfillment == null) {
myFulfillment = new java.util.ArrayList<ResourceReferenceDt>();
}
return myFulfillment;
}
/**
* Sets the value(s) for <b>fulfillment</b> (Details of the outcome of performing the order)
*
* <p>
* <b>Definition:</b>
* Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order
* </p>
*/
public OrderResponse setFulfillment(java.util.List<ResourceReferenceDt> theValue) {
myFulfillment = theValue;
return this;
}
/**
* Adds and returns a new value for <b>fulfillment</b> (Details of the outcome of performing the order)
*
* <p>
* <b>Definition:</b>
* Links to resources that provide details of the outcome of performing the order. E.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order
* </p>
*/
public ResourceReferenceDt addFulfillment() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getFulfillment().add(newType);
return newType;
}
}

View File

@ -1,451 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Other</b> Resource
* (Resource for non-supported content)
*
* <p>
* <b>Definition:</b>
* Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest
* </p>
*
* <p>
* <b>Requirements:</b>
* Need some way to safely (without breaking interoperability) allow implementers to exchange content not supported by the initial set of declared resources.
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Other">http://hl7.org/fhir/profiles/Other</a>
* </p>
*
*/
@ResourceDef(name="Other", profile="http://hl7.org/fhir/profiles/Other", id="other")
public class Other extends BaseResource implements IResource {
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Other.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="Other.subject", description="", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Other.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Other.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("Other.subject");
/**
* Search parameter constant for <b>created</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Other.created</b><br/>
* </p>
*/
@SearchParamDefinition(name="created", path="Other.created", description="", type="date" )
public static final String SP_CREATED = "created";
/**
* <b>Fluent Client</b> search parameter constant for <b>created</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Other.created</b><br/>
* </p>
*/
public static final DateClientParam CREATED = new DateClientParam(SP_CREATED);
/**
* Search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Other.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="code", path="Other.code", description="", type="token" )
public static final String SP_CODE = "code";
/**
* <b>Fluent Client</b> search parameter constant for <b>code</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Other.code</b><br/>
* </p>
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Business identifier",
formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR"
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="code", type=CodeableConceptDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Kind of Resource",
formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources."
)
private CodeableConceptDt myCode;
@Child(name="subject", order=2, min=0, max=1, type={
IResource.class })
@Description(
shortDefinition="Identifies the",
formalDefinition="Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resoruce."
)
private ResourceReferenceDt mySubject;
@Child(name="author", order=3, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class })
@Description(
shortDefinition="Who created",
formalDefinition="Indicates who was responsible for creating the resource instance"
)
private ResourceReferenceDt myAuthor;
@Child(name="created", type=DateDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="When created",
formalDefinition="Identifies when the resource was first created"
)
private DateDt myCreated;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myCode, mySubject, myAuthor, myCreated);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCode, mySubject, myAuthor, myCreated);
}
/**
* Gets the value(s) for <b>identifier</b> (Business identifier).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*/
public Other setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (Business identifier),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Other addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (Business identifier)
*
* <p>
* <b>Definition:</b>
* Identifier assigned to the resource for business purposes, outside the context of FHIR
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Other addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>code</b> (Kind of Resource).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the 'type' of resource - equivalent to the resource name for other resources.
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Kind of Resource)
*
* <p>
* <b>Definition:</b>
* Identifies the 'type' of resource - equivalent to the resource name for other resources.
* </p>
*/
public Other setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>subject</b> (Identifies the).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resoruce.
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Identifies the)
*
* <p>
* <b>Definition:</b>
* Identifies the patient, practitioner, device or any other resource that is the \"focus\" of this resoruce.
* </p>
*/
public Other setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>author</b> (Who created).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates who was responsible for creating the resource instance
* </p>
*/
public ResourceReferenceDt getAuthor() {
if (myAuthor == null) {
myAuthor = new ResourceReferenceDt();
}
return myAuthor;
}
/**
* Sets the value(s) for <b>author</b> (Who created)
*
* <p>
* <b>Definition:</b>
* Indicates who was responsible for creating the resource instance
* </p>
*/
public Other setAuthor(ResourceReferenceDt theValue) {
myAuthor = theValue;
return this;
}
/**
* Gets the value(s) for <b>created</b> (When created).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies when the resource was first created
* </p>
*/
public DateDt getCreated() {
if (myCreated == null) {
myCreated = new DateDt();
}
return myCreated;
}
/**
* Sets the value(s) for <b>created</b> (When created)
*
* <p>
* <b>Definition:</b>
* Identifies when the resource was first created
* </p>
*/
public Other setCreated(DateDt theValue) {
myCreated = theValue;
return this;
}
/**
* Sets the value for <b>created</b> (When created)
*
* <p>
* <b>Definition:</b>
* Identifies when the resource was first created
* </p>
*/
public Other setCreatedWithDayPrecision( Date theDate) {
myCreated = new DateDt(theDate);
return this;
}
/**
* Sets the value for <b>created</b> (When created)
*
* <p>
* <b>Definition:</b>
* Identifies when the resource was first created
* </p>
*/
public Other setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
myCreated = new DateDt(theDate, thePrecision);
return this;
}
}

View File

@ -1,863 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.QueryOutcomeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Query</b> Resource
* (A description of a query with a set of parameters)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Query">http://hl7.org/fhir/profiles/Query</a>
* </p>
*
*/
@ResourceDef(name="Query", profile="http://hl7.org/fhir/profiles/Query", id="query")
public class Query extends BaseResource implements IResource {
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Query.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Query.identifier", description="", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Query.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>response</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Query.response.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="response", path="Query.response.identifier", description="", type="token" )
public static final String SP_RESPONSE = "response";
/**
* <b>Fluent Client</b> search parameter constant for <b>response</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Query.response.identifier</b><br/>
* </p>
*/
public static final TokenClientParam RESPONSE = new TokenClientParam(SP_RESPONSE);
@Child(name="identifier", type=UriDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Links query and its response(s)",
formalDefinition=""
)
private UriDt myIdentifier;
@Child(name="parameter", type=ExtensionDt.class, order=1, min=1, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Set of query parameters with values",
formalDefinition=""
)
private java.util.List<ExtensionDt> myParameter;
@Child(name="response", order=2, min=0, max=1)
@Description(
shortDefinition="If this is a response to a query",
formalDefinition=""
)
private Response myResponse;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myParameter, myResponse);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myParameter, myResponse);
}
/**
* Gets the value(s) for <b>identifier</b> (Links query and its response(s)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public UriDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new UriDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Links query and its response(s))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Query setIdentifier(UriDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (Links query and its response(s))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Query setIdentifier( String theUri) {
myIdentifier = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>parameter</b> (Set of query parameters with values).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getParameter() {
if (myParameter == null) {
myParameter = new java.util.ArrayList<ExtensionDt>();
}
return myParameter;
}
/**
* Sets the value(s) for <b>parameter</b> (Set of query parameters with values)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Query setParameter(java.util.List<ExtensionDt> theValue) {
myParameter = theValue;
return this;
}
/**
* Adds and returns a new value for <b>parameter</b> (Set of query parameters with values)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addParameter() {
ExtensionDt newType = new ExtensionDt();
getParameter().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>parameter</b> (Set of query parameters with values),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getParameterFirstRep() {
if (getParameter().isEmpty()) {
return addParameter();
}
return getParameter().get(0);
}
/**
* Gets the value(s) for <b>response</b> (If this is a response to a query).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response getResponse() {
if (myResponse == null) {
myResponse = new Response();
}
return myResponse;
}
/**
* Sets the value(s) for <b>response</b> (If this is a response to a query)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Query setResponse(Response theValue) {
myResponse = theValue;
return this;
}
/**
* Block class for child element: <b>Query.response</b> (If this is a response to a query)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
@Block()
public static class Response extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=UriDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Links response to source query",
formalDefinition=""
)
private UriDt myIdentifier;
@Child(name="outcome", type=CodeDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="ok | limited | refused | error",
formalDefinition="Outcome of processing the query"
)
private BoundCodeDt<QueryOutcomeEnum> myOutcome;
@Child(name="total", type=IntegerDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Total number of matching records",
formalDefinition=""
)
private IntegerDt myTotal;
@Child(name="parameter", type=ExtensionDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Parameters server used",
formalDefinition=""
)
private java.util.List<ExtensionDt> myParameter;
@Child(name="first", type=ExtensionDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="To get first page (if paged)",
formalDefinition=""
)
private java.util.List<ExtensionDt> myFirst;
@Child(name="previous", type=ExtensionDt.class, order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="To get previous page (if paged)",
formalDefinition=""
)
private java.util.List<ExtensionDt> myPrevious;
@Child(name="next", type=ExtensionDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="To get next page (if paged)",
formalDefinition=""
)
private java.util.List<ExtensionDt> myNext;
@Child(name="last", type=ExtensionDt.class, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="To get last page (if paged)",
formalDefinition=""
)
private java.util.List<ExtensionDt> myLast;
@Child(name="reference", order=8, min=0, max=Child.MAX_UNLIMITED, type={
IResource.class })
@Description(
shortDefinition="Resources that are the results of the search",
formalDefinition=""
)
private java.util.List<ResourceReferenceDt> myReference;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myOutcome, myTotal, myParameter, myFirst, myPrevious, myNext, myLast, myReference);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myOutcome, myTotal, myParameter, myFirst, myPrevious, myNext, myLast, myReference);
}
/**
* Gets the value(s) for <b>identifier</b> (Links response to source query).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public UriDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new UriDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Links response to source query)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setIdentifier(UriDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (Links response to source query)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setIdentifier( String theUri) {
myIdentifier = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>outcome</b> (ok | limited | refused | error).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Outcome of processing the query
* </p>
*/
public BoundCodeDt<QueryOutcomeEnum> getOutcome() {
if (myOutcome == null) {
myOutcome = new BoundCodeDt<QueryOutcomeEnum>(QueryOutcomeEnum.VALUESET_BINDER);
}
return myOutcome;
}
/**
* Sets the value(s) for <b>outcome</b> (ok | limited | refused | error)
*
* <p>
* <b>Definition:</b>
* Outcome of processing the query
* </p>
*/
public Response setOutcome(BoundCodeDt<QueryOutcomeEnum> theValue) {
myOutcome = theValue;
return this;
}
/**
* Sets the value(s) for <b>outcome</b> (ok | limited | refused | error)
*
* <p>
* <b>Definition:</b>
* Outcome of processing the query
* </p>
*/
public Response setOutcome(QueryOutcomeEnum theValue) {
getOutcome().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>total</b> (Total number of matching records).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IntegerDt getTotal() {
if (myTotal == null) {
myTotal = new IntegerDt();
}
return myTotal;
}
/**
* Sets the value(s) for <b>total</b> (Total number of matching records)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setTotal(IntegerDt theValue) {
myTotal = theValue;
return this;
}
/**
* Sets the value for <b>total</b> (Total number of matching records)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setTotal( int theInteger) {
myTotal = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>parameter</b> (Parameters server used).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getParameter() {
if (myParameter == null) {
myParameter = new java.util.ArrayList<ExtensionDt>();
}
return myParameter;
}
/**
* Sets the value(s) for <b>parameter</b> (Parameters server used)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setParameter(java.util.List<ExtensionDt> theValue) {
myParameter = theValue;
return this;
}
/**
* Adds and returns a new value for <b>parameter</b> (Parameters server used)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addParameter() {
ExtensionDt newType = new ExtensionDt();
getParameter().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>parameter</b> (Parameters server used),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getParameterFirstRep() {
if (getParameter().isEmpty()) {
return addParameter();
}
return getParameter().get(0);
}
/**
* Gets the value(s) for <b>first</b> (To get first page (if paged)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getFirst() {
if (myFirst == null) {
myFirst = new java.util.ArrayList<ExtensionDt>();
}
return myFirst;
}
/**
* Sets the value(s) for <b>first</b> (To get first page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setFirst(java.util.List<ExtensionDt> theValue) {
myFirst = theValue;
return this;
}
/**
* Adds and returns a new value for <b>first</b> (To get first page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addFirst() {
ExtensionDt newType = new ExtensionDt();
getFirst().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>first</b> (To get first page (if paged)),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getFirstFirstRep() {
if (getFirst().isEmpty()) {
return addFirst();
}
return getFirst().get(0);
}
/**
* Gets the value(s) for <b>previous</b> (To get previous page (if paged)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getPrevious() {
if (myPrevious == null) {
myPrevious = new java.util.ArrayList<ExtensionDt>();
}
return myPrevious;
}
/**
* Sets the value(s) for <b>previous</b> (To get previous page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setPrevious(java.util.List<ExtensionDt> theValue) {
myPrevious = theValue;
return this;
}
/**
* Adds and returns a new value for <b>previous</b> (To get previous page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addPrevious() {
ExtensionDt newType = new ExtensionDt();
getPrevious().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>previous</b> (To get previous page (if paged)),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getPreviousFirstRep() {
if (getPrevious().isEmpty()) {
return addPrevious();
}
return getPrevious().get(0);
}
/**
* Gets the value(s) for <b>next</b> (To get next page (if paged)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getNext() {
if (myNext == null) {
myNext = new java.util.ArrayList<ExtensionDt>();
}
return myNext;
}
/**
* Sets the value(s) for <b>next</b> (To get next page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setNext(java.util.List<ExtensionDt> theValue) {
myNext = theValue;
return this;
}
/**
* Adds and returns a new value for <b>next</b> (To get next page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addNext() {
ExtensionDt newType = new ExtensionDt();
getNext().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>next</b> (To get next page (if paged)),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getNextFirstRep() {
if (getNext().isEmpty()) {
return addNext();
}
return getNext().get(0);
}
/**
* Gets the value(s) for <b>last</b> (To get last page (if paged)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ExtensionDt> getLast() {
if (myLast == null) {
myLast = new java.util.ArrayList<ExtensionDt>();
}
return myLast;
}
/**
* Sets the value(s) for <b>last</b> (To get last page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setLast(java.util.List<ExtensionDt> theValue) {
myLast = theValue;
return this;
}
/**
* Adds and returns a new value for <b>last</b> (To get last page (if paged))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt addLast() {
ExtensionDt newType = new ExtensionDt();
getLast().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>last</b> (To get last page (if paged)),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ExtensionDt getLastFirstRep() {
if (getLast().isEmpty()) {
return addLast();
}
return getLast().get(0);
}
/**
* Gets the value(s) for <b>reference</b> (Resources that are the results of the search).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ResourceReferenceDt> getReference() {
if (myReference == null) {
myReference = new java.util.ArrayList<ResourceReferenceDt>();
}
return myReference;
}
/**
* Sets the value(s) for <b>reference</b> (Resources that are the results of the search)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Response setReference(java.util.List<ResourceReferenceDt> theValue) {
myReference = theValue;
return this;
}
/**
* Adds and returns a new value for <b>reference</b> (Resources that are the results of the search)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt addReference() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getReference().add(newType);
return newType;
}
}
}

View File

@ -1,747 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>RelatedPerson</b> Resource
* (An person that is related to a patient, but who is not a direct target of care)
*
* <p>
* <b>Definition:</b>
* Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to track persons related to the patient or the healthcare process.
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/RelatedPerson">http://hl7.org/fhir/profiles/RelatedPerson</a>
* </p>
*
*/
@ResourceDef(name="RelatedPerson", profile="http://hl7.org/fhir/profiles/RelatedPerson", id="relatedperson")
public class RelatedPerson extends BaseResource implements IResource {
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b>A patient Identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>RelatedPerson.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b>A patient Identifier</b><br/>
* Type: <b>token</b><br/>
* Path: <b>RelatedPerson.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>name</b>
* <p>
* Description: <b>A portion of name in any name part</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part", type="string" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b>A portion of name in any name part</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.name</b><br/>
* </p>
*/
public static final StringClientParam NAME = new StringClientParam(SP_NAME);
/**
* Search parameter constant for <b>phonetic</b>
* <p>
* Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br/>
* Type: <b>string</b><br/>
* Path: <b></b><br/>
* </p>
*/
@SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm", type="string" )
public static final String SP_PHONETIC = "phonetic";
/**
* <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
* <p>
* Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br/>
* Type: <b>string</b><br/>
* Path: <b></b><br/>
* </p>
*/
public static final StringClientParam PHONETIC = new StringClientParam(SP_PHONETIC);
/**
* Search parameter constant for <b>telecom</b>
* <p>
* Description: <b>The value in any kind of contact</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.telecom</b><br/>
* </p>
*/
@SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact", type="string" )
public static final String SP_TELECOM = "telecom";
/**
* <b>Fluent Client</b> search parameter constant for <b>telecom</b>
* <p>
* Description: <b>The value in any kind of contact</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.telecom</b><br/>
* </p>
*/
public static final StringClientParam TELECOM = new StringClientParam(SP_TELECOM);
/**
* Search parameter constant for <b>address</b>
* <p>
* Description: <b>An address in any kind of address/part</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.address</b><br/>
* </p>
*/
@SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part", type="string" )
public static final String SP_ADDRESS = "address";
/**
* <b>Fluent Client</b> search parameter constant for <b>address</b>
* <p>
* Description: <b>An address in any kind of address/part</b><br/>
* Type: <b>string</b><br/>
* Path: <b>RelatedPerson.address</b><br/>
* </p>
*/
public static final StringClientParam ADDRESS = new StringClientParam(SP_ADDRESS);
/**
* Search parameter constant for <b>gender</b>
* <p>
* Description: <b>Gender of the person</b><br/>
* Type: <b>token</b><br/>
* Path: <b>RelatedPerson.gender</b><br/>
* </p>
*/
@SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person", type="token" )
public static final String SP_GENDER = "gender";
/**
* <b>Fluent Client</b> search parameter constant for <b>gender</b>
* <p>
* Description: <b>Gender of the person</b><br/>
* Type: <b>token</b><br/>
* Path: <b>RelatedPerson.gender</b><br/>
* </p>
*/
public static final TokenClientParam GENDER = new TokenClientParam(SP_GENDER);
/**
* Search parameter constant for <b>patient</b>
* <p>
* Description: <b>The patient this person is related to</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>RelatedPerson.patient</b><br/>
* </p>
*/
@SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" )
public static final String SP_PATIENT = "patient";
/**
* <b>Fluent Client</b> search parameter constant for <b>patient</b>
* <p>
* Description: <b>The patient this person is related to</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>RelatedPerson.patient</b><br/>
* </p>
*/
public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>RelatedPerson.patient</b>".
*/
public static final Include INCLUDE_PATIENT = new Include("RelatedPerson.patient");
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="A Human identifier for this person",
formalDefinition="Identifier for a person within a particular scope."
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="patient", order=1, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="The patient this person is related to",
formalDefinition="The patient this person is related to"
)
private ResourceReferenceDt myPatient;
@Child(name="relationship", type=CodeableConceptDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="The nature of the relationship",
formalDefinition="The nature of the relationship between a patient and the related person"
)
private BoundCodeableConceptDt<PatientRelationshipTypeEnum> myRelationship;
@Child(name="name", type=HumanNameDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="A name associated with the person",
formalDefinition="A name associated with the person"
)
private HumanNameDt myName;
@Child(name="telecom", type=ContactDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="A contact detail for the person",
formalDefinition="A contact detail for the person, e.g. a telephone number or an email address."
)
private java.util.List<ContactDt> myTelecom;
@Child(name="gender", type=CodeableConceptDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Gender for administrative purposes",
formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes."
)
private BoundCodeableConceptDt<AdministrativeGenderCodesEnum> myGender;
@Child(name="address", type=AddressDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Address where the related person can be contacted or visited",
formalDefinition="Address where the related person can be contacted or visited"
)
private AddressDt myAddress;
@Child(name="photo", type=AttachmentDt.class, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Image of the person",
formalDefinition="Image of the person"
)
private java.util.List<AttachmentDt> myPhoto;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myAddress, myPhoto);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myRelationship, myName, myTelecom, myGender, myAddress, myPhoto);
}
/**
* Gets the value(s) for <b>identifier</b> (A Human identifier for this person).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*/
public RelatedPerson setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (A Human identifier for this person),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (A Human identifier for this person)
*
* <p>
* <b>Definition:</b>
* Identifier for a person within a particular scope.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>patient</b> (The patient this person is related to).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The patient this person is related to
* </p>
*/
public ResourceReferenceDt getPatient() {
if (myPatient == null) {
myPatient = new ResourceReferenceDt();
}
return myPatient;
}
/**
* Sets the value(s) for <b>patient</b> (The patient this person is related to)
*
* <p>
* <b>Definition:</b>
* The patient this person is related to
* </p>
*/
public RelatedPerson setPatient(ResourceReferenceDt theValue) {
myPatient = theValue;
return this;
}
/**
* Gets the value(s) for <b>relationship</b> (The nature of the relationship).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The nature of the relationship between a patient and the related person
* </p>
*/
public BoundCodeableConceptDt<PatientRelationshipTypeEnum> getRelationship() {
if (myRelationship == null) {
myRelationship = new BoundCodeableConceptDt<PatientRelationshipTypeEnum>(PatientRelationshipTypeEnum.VALUESET_BINDER);
}
return myRelationship;
}
/**
* Sets the value(s) for <b>relationship</b> (The nature of the relationship)
*
* <p>
* <b>Definition:</b>
* The nature of the relationship between a patient and the related person
* </p>
*/
public RelatedPerson setRelationship(BoundCodeableConceptDt<PatientRelationshipTypeEnum> theValue) {
myRelationship = theValue;
return this;
}
/**
* Sets the value(s) for <b>relationship</b> (The nature of the relationship)
*
* <p>
* <b>Definition:</b>
* The nature of the relationship between a patient and the related person
* </p>
*/
public RelatedPerson setRelationship(PatientRelationshipTypeEnum theValue) {
getRelationship().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>name</b> (A name associated with the person).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A name associated with the person
* </p>
*/
public HumanNameDt getName() {
if (myName == null) {
myName = new HumanNameDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (A name associated with the person)
*
* <p>
* <b>Definition:</b>
* A name associated with the person
* </p>
*/
public RelatedPerson setName(HumanNameDt theValue) {
myName = theValue;
return this;
}
/**
* Gets the value(s) for <b>telecom</b> (A contact detail for the person).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*/
public java.util.List<ContactDt> getTelecom() {
if (myTelecom == null) {
myTelecom = new java.util.ArrayList<ContactDt>();
}
return myTelecom;
}
/**
* Sets the value(s) for <b>telecom</b> (A contact detail for the person)
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*/
public RelatedPerson setTelecom(java.util.List<ContactDt> theValue) {
myTelecom = theValue;
return this;
}
/**
* Adds and returns a new value for <b>telecom</b> (A contact detail for the person)
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*/
public ContactDt addTelecom() {
ContactDt newType = new ContactDt();
getTelecom().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>telecom</b> (A contact detail for the person),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*/
public ContactDt getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
return addTelecom();
}
return getTelecom().get(0);
}
/**
* Adds a new value for <b>telecom</b> (A contact detail for the person)
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addTelecom( ContactUseEnum theContactUse, String theValue) {
if (myTelecom == null) {
myTelecom = new java.util.ArrayList<ContactDt>();
}
myTelecom.add(new ContactDt(theContactUse, theValue));
return this;
}
/**
* Adds a new value for <b>telecom</b> (A contact detail for the person)
*
* <p>
* <b>Definition:</b>
* A contact detail for the person, e.g. a telephone number or an email address.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public RelatedPerson addTelecom( String theValue) {
if (myTelecom == null) {
myTelecom = new java.util.ArrayList<ContactDt>();
}
myTelecom.add(new ContactDt(theValue));
return this;
}
/**
* Gets the value(s) for <b>gender</b> (Gender for administrative purposes).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
* </p>
*/
public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGender() {
if (myGender == null) {
myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER);
}
return myGender;
}
/**
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
*
* <p>
* <b>Definition:</b>
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
* </p>
*/
public RelatedPerson setGender(BoundCodeableConceptDt<AdministrativeGenderCodesEnum> theValue) {
myGender = theValue;
return this;
}
/**
* Sets the value(s) for <b>gender</b> (Gender for administrative purposes)
*
* <p>
* <b>Definition:</b>
* Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
* </p>
*/
public RelatedPerson setGender(AdministrativeGenderCodesEnum theValue) {
getGender().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>address</b> (Address where the related person can be contacted or visited).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Address where the related person can be contacted or visited
* </p>
*/
public AddressDt getAddress() {
if (myAddress == null) {
myAddress = new AddressDt();
}
return myAddress;
}
/**
* Sets the value(s) for <b>address</b> (Address where the related person can be contacted or visited)
*
* <p>
* <b>Definition:</b>
* Address where the related person can be contacted or visited
* </p>
*/
public RelatedPerson setAddress(AddressDt theValue) {
myAddress = theValue;
return this;
}
/**
* Gets the value(s) for <b>photo</b> (Image of the person).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Image of the person
* </p>
*/
public java.util.List<AttachmentDt> getPhoto() {
if (myPhoto == null) {
myPhoto = new java.util.ArrayList<AttachmentDt>();
}
return myPhoto;
}
/**
* Sets the value(s) for <b>photo</b> (Image of the person)
*
* <p>
* <b>Definition:</b>
* Image of the person
* </p>
*/
public RelatedPerson setPhoto(java.util.List<AttachmentDt> theValue) {
myPhoto = theValue;
return this;
}
/**
* Adds and returns a new value for <b>photo</b> (Image of the person)
*
* <p>
* <b>Definition:</b>
* Image of the person
* </p>
*/
public AttachmentDt addPhoto() {
AttachmentDt newType = new AttachmentDt();
getPhoto().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>photo</b> (Image of the person),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Image of the person
* </p>
*/
public AttachmentDt getPhotoFirstRep() {
if (getPhoto().isEmpty()) {
return addPhoto();
}
return getPhoto().get(0);
}
}

View File

@ -1,539 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Remittance</b> Resource
* (A remittance)
*
* <p>
* <b>Definition:</b>
* A remittance
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Remittance">http://hl7.org/fhir/profiles/Remittance</a>
* </p>
*
*/
@ResourceDef(name="Remittance", profile="http://hl7.org/fhir/profiles/Remittance", id="remittance")
public class Remittance extends BaseResource implements IResource {
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Remittance.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Remittance.identifier", description="", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Remittance.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>service</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Remittance.service.code</b><br/>
* </p>
*/
@SearchParamDefinition(name="service", path="Remittance.service.code", description="", type="token" )
public static final String SP_SERVICE = "service";
/**
* <b>Fluent Client</b> search parameter constant for <b>service</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Remittance.service.code</b><br/>
* </p>
*/
public static final TokenClientParam SERVICE = new TokenClientParam(SP_SERVICE);
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Remittance id",
formalDefinition="The remittance identifier"
)
private IdentifierDt myIdentifier;
@Child(name="service", order=1, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="A service paid as part of remittance",
formalDefinition="A service paid as part of remittance"
)
private java.util.List<Service> myService;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myService);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myService);
}
/**
* Gets the value(s) for <b>identifier</b> (Remittance id).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The remittance identifier
* </p>
*/
public IdentifierDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new IdentifierDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Remittance id)
*
* <p>
* <b>Definition:</b>
* The remittance identifier
* </p>
*/
public Remittance setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (Remittance id)
*
* <p>
* <b>Definition:</b>
* The remittance identifier
* </p>
*/
public Remittance setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Remittance id)
*
* <p>
* <b>Definition:</b>
* The remittance identifier
* </p>
*/
public Remittance setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>service</b> (A service paid as part of remittance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A service paid as part of remittance
* </p>
*/
public java.util.List<Service> getService() {
if (myService == null) {
myService = new java.util.ArrayList<Service>();
}
return myService;
}
/**
* Sets the value(s) for <b>service</b> (A service paid as part of remittance)
*
* <p>
* <b>Definition:</b>
* A service paid as part of remittance
* </p>
*/
public Remittance setService(java.util.List<Service> theValue) {
myService = theValue;
return this;
}
/**
* Adds and returns a new value for <b>service</b> (A service paid as part of remittance)
*
* <p>
* <b>Definition:</b>
* A service paid as part of remittance
* </p>
*/
public Service addService() {
Service newType = new Service();
getService().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>service</b> (A service paid as part of remittance),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A service paid as part of remittance
* </p>
*/
public Service getServiceFirstRep() {
if (getService().isEmpty()) {
return addService();
}
return getService().get(0);
}
/**
* Block class for child element: <b>Remittance.service</b> (A service paid as part of remittance)
*
* <p>
* <b>Definition:</b>
* A service paid as part of remittance
* </p>
*/
@Block()
public static class Service extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="instance", type=IntegerDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Service instance number",
formalDefinition="The service instance number for the original transaction"
)
private IntegerDt myInstance;
@Child(name="code", type=CodeableConceptDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Professional service code",
formalDefinition="The code for the professional service"
)
private CodeableConceptDt myCode;
@Child(name="rate", type=DecimalDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Benefit Rate %",
formalDefinition="The percent of the service fee which would be elegible for coverage"
)
private DecimalDt myRate;
@Child(name="benefit", type=DecimalDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Benefit amount",
formalDefinition="The amount payable for a submitted service (includes both professional and lab fees.)"
)
private DecimalDt myBenefit;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myInstance, myCode, myRate, myBenefit);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myInstance, myCode, myRate, myBenefit);
}
/**
* Gets the value(s) for <b>instance</b> (Service instance number).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The service instance number for the original transaction
* </p>
*/
public IntegerDt getInstance() {
if (myInstance == null) {
myInstance = new IntegerDt();
}
return myInstance;
}
/**
* Sets the value(s) for <b>instance</b> (Service instance number)
*
* <p>
* <b>Definition:</b>
* The service instance number for the original transaction
* </p>
*/
public Service setInstance(IntegerDt theValue) {
myInstance = theValue;
return this;
}
/**
* Sets the value for <b>instance</b> (Service instance number)
*
* <p>
* <b>Definition:</b>
* The service instance number for the original transaction
* </p>
*/
public Service setInstance( int theInteger) {
myInstance = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>code</b> (Professional service code).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The code for the professional service
* </p>
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Professional service code)
*
* <p>
* <b>Definition:</b>
* The code for the professional service
* </p>
*/
public Service setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for <b>rate</b> (Benefit Rate %).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The percent of the service fee which would be elegible for coverage
* </p>
*/
public DecimalDt getRate() {
if (myRate == null) {
myRate = new DecimalDt();
}
return myRate;
}
/**
* Sets the value(s) for <b>rate</b> (Benefit Rate %)
*
* <p>
* <b>Definition:</b>
* The percent of the service fee which would be elegible for coverage
* </p>
*/
public Service setRate(DecimalDt theValue) {
myRate = theValue;
return this;
}
/**
* Sets the value for <b>rate</b> (Benefit Rate %)
*
* <p>
* <b>Definition:</b>
* The percent of the service fee which would be elegible for coverage
* </p>
*/
public Service setRate( long theValue) {
myRate = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>rate</b> (Benefit Rate %)
*
* <p>
* <b>Definition:</b>
* The percent of the service fee which would be elegible for coverage
* </p>
*/
public Service setRate( double theValue) {
myRate = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>rate</b> (Benefit Rate %)
*
* <p>
* <b>Definition:</b>
* The percent of the service fee which would be elegible for coverage
* </p>
*/
public Service setRate( java.math.BigDecimal theValue) {
myRate = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>benefit</b> (Benefit amount).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The amount payable for a submitted service (includes both professional and lab fees.)
* </p>
*/
public DecimalDt getBenefit() {
if (myBenefit == null) {
myBenefit = new DecimalDt();
}
return myBenefit;
}
/**
* Sets the value(s) for <b>benefit</b> (Benefit amount)
*
* <p>
* <b>Definition:</b>
* The amount payable for a submitted service (includes both professional and lab fees.)
* </p>
*/
public Service setBenefit(DecimalDt theValue) {
myBenefit = theValue;
return this;
}
/**
* Sets the value for <b>benefit</b> (Benefit amount)
*
* <p>
* <b>Definition:</b>
* The amount payable for a submitted service (includes both professional and lab fees.)
* </p>
*/
public Service setBenefit( long theValue) {
myBenefit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>benefit</b> (Benefit amount)
*
* <p>
* <b>Definition:</b>
* The amount payable for a submitted service (includes both professional and lab fees.)
* </p>
*/
public Service setBenefit( double theValue) {
myBenefit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>benefit</b> (Benefit amount)
*
* <p>
* <b>Definition:</b>
* The amount payable for a submitted service (includes both professional and lab fees.)
* </p>
*/
public Service setBenefit( java.math.BigDecimal theValue) {
myBenefit = new DecimalDt(theValue);
return this;
}
}
}

View File

@ -1,662 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
/**
* HAPI/FHIR <b>SequencingAnalysis</b> Resource
* (Sequencing Analysis)
*
* <p>
* <b>Definition:</b>
* Computational analysis on a patient's genetic raw file
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/SequencingAnalysis">http://hl7.org/fhir/profiles/SequencingAnalysis</a>
* </p>
*
*/
@ResourceDef(name="SequencingAnalysis", profile="http://hl7.org/fhir/profiles/SequencingAnalysis", id="sequencinganalysis")
public class SequencingAnalysis extends BaseResource implements IResource {
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>Subject of the analysis</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>SequencingAnalysis.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="SequencingAnalysis.subject", description="Subject of the analysis", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>Subject of the analysis</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>SequencingAnalysis.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>SequencingAnalysis.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("SequencingAnalysis.subject");
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b>Date when result of the analysis is updated</b><br/>
* Type: <b>date</b><br/>
* Path: <b>SequencingAnalysis.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="SequencingAnalysis.date", description="Date when result of the analysis is updated", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b>Date when result of the analysis is updated</b><br/>
* Type: <b>date</b><br/>
* Path: <b>SequencingAnalysis.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>genome</b>
* <p>
* Description: <b>Name of the reference genome used in the analysis</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingAnalysis.genome.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="genome", path="SequencingAnalysis.genome.name", description="Name of the reference genome used in the analysis", type="string" )
public static final String SP_GENOME = "genome";
/**
* <b>Fluent Client</b> search parameter constant for <b>genome</b>
* <p>
* Description: <b>Name of the reference genome used in the analysis</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingAnalysis.genome.name</b><br/>
* </p>
*/
public static final StringClientParam GENOME = new StringClientParam(SP_GENOME);
@Child(name="subject", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Subject",
formalDefinition="Subject of the analysis"
)
private ResourceReferenceDt mySubject;
@Child(name="date", type=DateDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Date",
formalDefinition="Date when result of the analysis is updated"
)
private DateDt myDate;
@Child(name="name", type=StringDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Name",
formalDefinition="Name of the analysis"
)
private StringDt myName;
@Child(name="genome", order=3, min=1, max=1)
@Description(
shortDefinition="Reference genome",
formalDefinition="Reference genome used in the analysis"
)
private Genome myGenome;
@Child(name="file", type=AttachmentDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="File",
formalDefinition="Files uploaded as result of the analysis"
)
private java.util.List<AttachmentDt> myFile;
@Child(name="inputLab", order=5, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.SequencingLab.class })
@Description(
shortDefinition="Input lab",
formalDefinition="SequencingLab taken into account of the analysis"
)
private java.util.List<ResourceReferenceDt> myInputLab;
@Child(name="inputAnalysis", order=6, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.SequencingAnalysis.class })
@Description(
shortDefinition="Input analysis",
formalDefinition="SequencingAnalysis taken into account of the analysis"
)
private java.util.List<ResourceReferenceDt> myInputAnalysis;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySubject, myDate, myName, myGenome, myFile, myInputLab, myInputAnalysis);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySubject, myDate, myName, myGenome, myFile, myInputLab, myInputAnalysis);
}
/**
* Gets the value(s) for <b>subject</b> (Subject).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Subject of the analysis
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Subject)
*
* <p>
* <b>Definition:</b>
* Subject of the analysis
* </p>
*/
public SequencingAnalysis setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>date</b> (Date).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Date when result of the analysis is updated
* </p>
*/
public DateDt getDate() {
if (myDate == null) {
myDate = new DateDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when result of the analysis is updated
* </p>
*/
public SequencingAnalysis setDate(DateDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when result of the analysis is updated
* </p>
*/
public SequencingAnalysis setDateWithDayPrecision( Date theDate) {
myDate = new DateDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when result of the analysis is updated
* </p>
*/
public SequencingAnalysis setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>name</b> (Name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Name of the analysis
* </p>
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the analysis
* </p>
*/
public SequencingAnalysis setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the analysis
* </p>
*/
public SequencingAnalysis setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>genome</b> (Reference genome).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Reference genome used in the analysis
* </p>
*/
public Genome getGenome() {
if (myGenome == null) {
myGenome = new Genome();
}
return myGenome;
}
/**
* Sets the value(s) for <b>genome</b> (Reference genome)
*
* <p>
* <b>Definition:</b>
* Reference genome used in the analysis
* </p>
*/
public SequencingAnalysis setGenome(Genome theValue) {
myGenome = theValue;
return this;
}
/**
* Gets the value(s) for <b>file</b> (File).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Files uploaded as result of the analysis
* </p>
*/
public java.util.List<AttachmentDt> getFile() {
if (myFile == null) {
myFile = new java.util.ArrayList<AttachmentDt>();
}
return myFile;
}
/**
* Sets the value(s) for <b>file</b> (File)
*
* <p>
* <b>Definition:</b>
* Files uploaded as result of the analysis
* </p>
*/
public SequencingAnalysis setFile(java.util.List<AttachmentDt> theValue) {
myFile = theValue;
return this;
}
/**
* Adds and returns a new value for <b>file</b> (File)
*
* <p>
* <b>Definition:</b>
* Files uploaded as result of the analysis
* </p>
*/
public AttachmentDt addFile() {
AttachmentDt newType = new AttachmentDt();
getFile().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>file</b> (File),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Files uploaded as result of the analysis
* </p>
*/
public AttachmentDt getFileFirstRep() {
if (getFile().isEmpty()) {
return addFile();
}
return getFile().get(0);
}
/**
* Gets the value(s) for <b>inputLab </b> (Input lab).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* SequencingLab taken into account of the analysis
* </p>
*/
public java.util.List<ResourceReferenceDt> getInputLab() {
if (myInputLab == null) {
myInputLab = new java.util.ArrayList<ResourceReferenceDt>();
}
return myInputLab;
}
/**
* Sets the value(s) for <b>inputLab </b> (Input lab)
*
* <p>
* <b>Definition:</b>
* SequencingLab taken into account of the analysis
* </p>
*/
public SequencingAnalysis setInputLab(java.util.List<ResourceReferenceDt> theValue) {
myInputLab = theValue;
return this;
}
/**
* Adds and returns a new value for <b>inputLab </b> (Input lab)
*
* <p>
* <b>Definition:</b>
* SequencingLab taken into account of the analysis
* </p>
*/
public ResourceReferenceDt addInputLab() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getInputLab().add(newType);
return newType;
}
/**
* Gets the value(s) for <b>inputAnalysis </b> (Input analysis).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* SequencingAnalysis taken into account of the analysis
* </p>
*/
public java.util.List<ResourceReferenceDt> getInputAnalysis() {
if (myInputAnalysis == null) {
myInputAnalysis = new java.util.ArrayList<ResourceReferenceDt>();
}
return myInputAnalysis;
}
/**
* Sets the value(s) for <b>inputAnalysis </b> (Input analysis)
*
* <p>
* <b>Definition:</b>
* SequencingAnalysis taken into account of the analysis
* </p>
*/
public SequencingAnalysis setInputAnalysis(java.util.List<ResourceReferenceDt> theValue) {
myInputAnalysis = theValue;
return this;
}
/**
* Adds and returns a new value for <b>inputAnalysis </b> (Input analysis)
*
* <p>
* <b>Definition:</b>
* SequencingAnalysis taken into account of the analysis
* </p>
*/
public ResourceReferenceDt addInputAnalysis() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getInputAnalysis().add(newType);
return newType;
}
/**
* Block class for child element: <b>SequencingAnalysis.genome</b> (Reference genome)
*
* <p>
* <b>Definition:</b>
* Reference genome used in the analysis
* </p>
*/
@Block()
public static class Genome extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=CodeDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Name",
formalDefinition="Name of the reference genome"
)
private CodeDt myName;
@Child(name="build", type=StringDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Build",
formalDefinition="Build number of the refernece genome"
)
private StringDt myBuild;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myBuild);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myBuild);
}
/**
* Gets the value(s) for <b>name</b> (Name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Name of the reference genome
* </p>
*/
public CodeDt getName() {
if (myName == null) {
myName = new CodeDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the reference genome
* </p>
*/
public Genome setName(CodeDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the reference genome
* </p>
*/
public Genome setName( String theCode) {
myName = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>build</b> (Build).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Build number of the refernece genome
* </p>
*/
public StringDt getBuild() {
if (myBuild == null) {
myBuild = new StringDt();
}
return myBuild;
}
/**
* Sets the value(s) for <b>build</b> (Build)
*
* <p>
* <b>Definition:</b>
* Build number of the refernece genome
* </p>
*/
public Genome setBuild(StringDt theValue) {
myBuild = theValue;
return this;
}
/**
* Sets the value for <b>build</b> (Build)
*
* <p>
* <b>Definition:</b>
* Build number of the refernece genome
* </p>
*/
public Genome setBuild( String theString) {
myBuild = new StringDt(theString);
return this;
}
}
}

View File

@ -1,979 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
/**
* HAPI/FHIR <b>SequencingLab</b> Resource
* (Sequencing Lab)
*
* <p>
* <b>Definition:</b>
* A lab for sequencing
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/SequencingLab">http://hl7.org/fhir/profiles/SequencingLab</a>
* </p>
*
*/
@ResourceDef(name="SequencingLab", profile="http://hl7.org/fhir/profiles/SequencingLab", id="sequencinglab")
public class SequencingLab extends BaseResource implements IResource {
/**
* Search parameter constant for <b>subject</b>
* <p>
* Description: <b>Subject of the lab</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>SequencingLab.subject</b><br/>
* </p>
*/
@SearchParamDefinition(name="subject", path="SequencingLab.subject", description="Subject of the lab", type="reference" )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>Subject of the lab</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>SequencingLab.subject</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>SequencingLab.subject</b>".
*/
public static final Include INCLUDE_SUBJECT = new Include("SequencingLab.subject");
/**
* Search parameter constant for <b>specimen</b>
* <p>
* Description: <b>Type of the specimen used for the lab</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.specimen.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="specimen", path="SequencingLab.specimen.type", description="Type of the specimen used for the lab", type="string" )
public static final String SP_SPECIMEN = "specimen";
/**
* <b>Fluent Client</b> search parameter constant for <b>specimen</b>
* <p>
* Description: <b>Type of the specimen used for the lab</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.specimen.type</b><br/>
* </p>
*/
public static final StringClientParam SPECIMEN = new StringClientParam(SP_SPECIMEN);
/**
* Search parameter constant for <b>date</b>
* <p>
* Description: <b>Date when result of the lab is uploaded</b><br/>
* Type: <b>date</b><br/>
* Path: <b>SequencingLab.date</b><br/>
* </p>
*/
@SearchParamDefinition(name="date", path="SequencingLab.date", description="Date when result of the lab is uploaded", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b>Date when result of the lab is uploaded</b><br/>
* Type: <b>date</b><br/>
* Path: <b>SequencingLab.date</b><br/>
* </p>
*/
public static final DateClientParam DATE = new DateClientParam(SP_DATE);
/**
* Search parameter constant for <b>organization</b>
* <p>
* Description: <b>Organization that does the lab</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.organization</b><br/>
* </p>
*/
@SearchParamDefinition(name="organization", path="SequencingLab.organization", description="Organization that does the lab", type="string" )
public static final String SP_ORGANIZATION = "organization";
/**
* <b>Fluent Client</b> search parameter constant for <b>organization</b>
* <p>
* Description: <b>Organization that does the lab</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.organization</b><br/>
* </p>
*/
public static final StringClientParam ORGANIZATION = new StringClientParam(SP_ORGANIZATION);
/**
* Search parameter constant for <b>system-class</b>
* <p>
* Description: <b>Class of the sequencing system</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.system.class</b><br/>
* </p>
*/
@SearchParamDefinition(name="system-class", path="SequencingLab.system.class", description="Class of the sequencing system", type="string" )
public static final String SP_SYSTEM_CLASS = "system-class";
/**
* <b>Fluent Client</b> search parameter constant for <b>system-class</b>
* <p>
* Description: <b>Class of the sequencing system</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.system.class</b><br/>
* </p>
*/
public static final StringClientParam SYSTEM_CLASS = new StringClientParam(SP_SYSTEM_CLASS);
/**
* Search parameter constant for <b>system-name</b>
* <p>
* Description: <b>Name of the sequencing system</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.system.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="system-name", path="SequencingLab.system.name", description="Name of the sequencing system", type="string" )
public static final String SP_SYSTEM_NAME = "system-name";
/**
* <b>Fluent Client</b> search parameter constant for <b>system-name</b>
* <p>
* Description: <b>Name of the sequencing system</b><br/>
* Type: <b>string</b><br/>
* Path: <b>SequencingLab.system.name</b><br/>
* </p>
*/
public static final StringClientParam SYSTEM_NAME = new StringClientParam(SP_SYSTEM_NAME);
@Child(name="subject", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Subject",
formalDefinition="Subject of the sequencing lab"
)
private ResourceReferenceDt mySubject;
@Child(name="organization", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Organization",
formalDefinition="Organization that does the sequencing"
)
private StringDt myOrganization;
@Child(name="name", type=StringDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Name",
formalDefinition="Name of the lab"
)
private StringDt myName;
@Child(name="date", type=DateDt.class, order=3, min=1, max=1)
@Description(
shortDefinition="Date",
formalDefinition="Date when the result of the lab is uploaded"
)
private DateDt myDate;
@Child(name="type", type=CodeDt.class, order=4, min=1, max=1)
@Description(
shortDefinition="Type",
formalDefinition="Type of the sequencing lab"
)
private CodeDt myType;
@Child(name="system", order=5, min=0, max=1)
@Description(
shortDefinition="Sequencing System",
formalDefinition="System of machine used for sequencing"
)
private System mySystem;
@Child(name="specimen", order=6, min=1, max=1)
@Description(
shortDefinition="Specimen of the lab",
formalDefinition="Specimen of the lab"
)
private Specimen mySpecimen;
@Child(name="file", type=AttachmentDt.class, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="File",
formalDefinition="Files uploaded as results of the lab"
)
private java.util.List<AttachmentDt> myFile;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySubject, myOrganization, myName, myDate, myType, mySystem, mySpecimen, myFile);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySubject, myOrganization, myName, myDate, myType, mySystem, mySpecimen, myFile);
}
/**
* Gets the value(s) for <b>subject</b> (Subject).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Subject of the sequencing lab
* </p>
*/
public ResourceReferenceDt getSubject() {
if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
}
/**
* Sets the value(s) for <b>subject</b> (Subject)
*
* <p>
* <b>Definition:</b>
* Subject of the sequencing lab
* </p>
*/
public SequencingLab setSubject(ResourceReferenceDt theValue) {
mySubject = theValue;
return this;
}
/**
* Gets the value(s) for <b>organization</b> (Organization).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Organization that does the sequencing
* </p>
*/
public StringDt getOrganization() {
if (myOrganization == null) {
myOrganization = new StringDt();
}
return myOrganization;
}
/**
* Sets the value(s) for <b>organization</b> (Organization)
*
* <p>
* <b>Definition:</b>
* Organization that does the sequencing
* </p>
*/
public SequencingLab setOrganization(StringDt theValue) {
myOrganization = theValue;
return this;
}
/**
* Sets the value for <b>organization</b> (Organization)
*
* <p>
* <b>Definition:</b>
* Organization that does the sequencing
* </p>
*/
public SequencingLab setOrganization( String theString) {
myOrganization = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>name</b> (Name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Name of the lab
* </p>
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the lab
* </p>
*/
public SequencingLab setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Name)
*
* <p>
* <b>Definition:</b>
* Name of the lab
* </p>
*/
public SequencingLab setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>date</b> (Date).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Date when the result of the lab is uploaded
* </p>
*/
public DateDt getDate() {
if (myDate == null) {
myDate = new DateDt();
}
return myDate;
}
/**
* Sets the value(s) for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when the result of the lab is uploaded
* </p>
*/
public SequencingLab setDate(DateDt theValue) {
myDate = theValue;
return this;
}
/**
* Sets the value for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when the result of the lab is uploaded
* </p>
*/
public SequencingLab setDateWithDayPrecision( Date theDate) {
myDate = new DateDt(theDate);
return this;
}
/**
* Sets the value for <b>date</b> (Date)
*
* <p>
* <b>Definition:</b>
* Date when the result of the lab is uploaded
* </p>
*/
public SequencingLab setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myDate = new DateDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>type</b> (Type).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Type of the sequencing lab
* </p>
*/
public CodeDt getType() {
if (myType == null) {
myType = new CodeDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (Type)
*
* <p>
* <b>Definition:</b>
* Type of the sequencing lab
* </p>
*/
public SequencingLab setType(CodeDt theValue) {
myType = theValue;
return this;
}
/**
* Sets the value for <b>type</b> (Type)
*
* <p>
* <b>Definition:</b>
* Type of the sequencing lab
* </p>
*/
public SequencingLab setType( String theCode) {
myType = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>system</b> (Sequencing System).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* System of machine used for sequencing
* </p>
*/
public System getSystem() {
if (mySystem == null) {
mySystem = new System();
}
return mySystem;
}
/**
* Sets the value(s) for <b>system</b> (Sequencing System)
*
* <p>
* <b>Definition:</b>
* System of machine used for sequencing
* </p>
*/
public SequencingLab setSystem(System theValue) {
mySystem = theValue;
return this;
}
/**
* Gets the value(s) for <b>specimen</b> (Specimen of the lab).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Specimen of the lab
* </p>
*/
public Specimen getSpecimen() {
if (mySpecimen == null) {
mySpecimen = new Specimen();
}
return mySpecimen;
}
/**
* Sets the value(s) for <b>specimen</b> (Specimen of the lab)
*
* <p>
* <b>Definition:</b>
* Specimen of the lab
* </p>
*/
public SequencingLab setSpecimen(Specimen theValue) {
mySpecimen = theValue;
return this;
}
/**
* Gets the value(s) for <b>file</b> (File).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Files uploaded as results of the lab
* </p>
*/
public java.util.List<AttachmentDt> getFile() {
if (myFile == null) {
myFile = new java.util.ArrayList<AttachmentDt>();
}
return myFile;
}
/**
* Sets the value(s) for <b>file</b> (File)
*
* <p>
* <b>Definition:</b>
* Files uploaded as results of the lab
* </p>
*/
public SequencingLab setFile(java.util.List<AttachmentDt> theValue) {
myFile = theValue;
return this;
}
/**
* Adds and returns a new value for <b>file</b> (File)
*
* <p>
* <b>Definition:</b>
* Files uploaded as results of the lab
* </p>
*/
public AttachmentDt addFile() {
AttachmentDt newType = new AttachmentDt();
getFile().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>file</b> (File),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Files uploaded as results of the lab
* </p>
*/
public AttachmentDt getFileFirstRep() {
if (getFile().isEmpty()) {
return addFile();
}
return getFile().get(0);
}
/**
* Block class for child element: <b>SequencingLab.system</b> (Sequencing System)
*
* <p>
* <b>Definition:</b>
* System of machine used for sequencing
* </p>
*/
@Block()
public static class System extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="class", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Class of sequencing system",
formalDefinition="Class of sequencing system"
)
private CodeDt myClassElement;
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Version of sequencing system",
formalDefinition="Version of sequencing system"
)
private StringDt myVersion;
@Child(name="name", type=CodeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Name of sequencing system",
formalDefinition="Name of sequencing system"
)
private CodeDt myName;
@Child(name="identity", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Id of sequencing system",
formalDefinition="Id of sequencing system"
)
private StringDt myIdentity;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myClassElement, myVersion, myName, myIdentity);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myClassElement, myVersion, myName, myIdentity);
}
/**
* Gets the value(s) for <b>class</b> (Class of sequencing system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Class of sequencing system
* </p>
*/
public CodeDt getClassElement() {
if (myClassElement == null) {
myClassElement = new CodeDt();
}
return myClassElement;
}
/**
* Sets the value(s) for <b>class</b> (Class of sequencing system)
*
* <p>
* <b>Definition:</b>
* Class of sequencing system
* </p>
*/
public System setClassElement(CodeDt theValue) {
myClassElement = theValue;
return this;
}
/**
* Sets the value for <b>class</b> (Class of sequencing system)
*
* <p>
* <b>Definition:</b>
* Class of sequencing system
* </p>
*/
public System setClassElement( String theCode) {
myClassElement = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>version</b> (Version of sequencing system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Version of sequencing system
* </p>
*/
public StringDt getVersion() {
if (myVersion == null) {
myVersion = new StringDt();
}
return myVersion;
}
/**
* Sets the value(s) for <b>version</b> (Version of sequencing system)
*
* <p>
* <b>Definition:</b>
* Version of sequencing system
* </p>
*/
public System setVersion(StringDt theValue) {
myVersion = theValue;
return this;
}
/**
* Sets the value for <b>version</b> (Version of sequencing system)
*
* <p>
* <b>Definition:</b>
* Version of sequencing system
* </p>
*/
public System setVersion( String theString) {
myVersion = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>name</b> (Name of sequencing system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Name of sequencing system
* </p>
*/
public CodeDt getName() {
if (myName == null) {
myName = new CodeDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (Name of sequencing system)
*
* <p>
* <b>Definition:</b>
* Name of sequencing system
* </p>
*/
public System setName(CodeDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for <b>name</b> (Name of sequencing system)
*
* <p>
* <b>Definition:</b>
* Name of sequencing system
* </p>
*/
public System setName( String theCode) {
myName = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>identity</b> (Id of sequencing system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Id of sequencing system
* </p>
*/
public StringDt getIdentity() {
if (myIdentity == null) {
myIdentity = new StringDt();
}
return myIdentity;
}
/**
* Sets the value(s) for <b>identity</b> (Id of sequencing system)
*
* <p>
* <b>Definition:</b>
* Id of sequencing system
* </p>
*/
public System setIdentity(StringDt theValue) {
myIdentity = theValue;
return this;
}
/**
* Sets the value for <b>identity</b> (Id of sequencing system)
*
* <p>
* <b>Definition:</b>
* Id of sequencing system
* </p>
*/
public System setIdentity( String theString) {
myIdentity = new StringDt(theString);
return this;
}
}
/**
* Block class for child element: <b>SequencingLab.specimen</b> (Specimen of the lab)
*
* <p>
* <b>Definition:</b>
* Specimen of the lab
* </p>
*/
@Block()
public static class Specimen extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Class of the specimen",
formalDefinition="Whether the specimen is from germline or somatic cells of the patient"
)
private CodeDt myType;
@Child(name="source", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Source of specimen",
formalDefinition="Source of the specimen"
)
private CodeableConceptDt mySource;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, mySource);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, mySource);
}
/**
* Gets the value(s) for <b>type</b> (Class of the specimen).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Whether the specimen is from germline or somatic cells of the patient
* </p>
*/
public CodeDt getType() {
if (myType == null) {
myType = new CodeDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (Class of the specimen)
*
* <p>
* <b>Definition:</b>
* Whether the specimen is from germline or somatic cells of the patient
* </p>
*/
public Specimen setType(CodeDt theValue) {
myType = theValue;
return this;
}
/**
* Sets the value for <b>type</b> (Class of the specimen)
*
* <p>
* <b>Definition:</b>
* Whether the specimen is from germline or somatic cells of the patient
* </p>
*/
public Specimen setType( String theCode) {
myType = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>source</b> (Source of specimen).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Source of the specimen
* </p>
*/
public CodeableConceptDt getSource() {
if (mySource == null) {
mySource = new CodeableConceptDt();
}
return mySource;
}
/**
* Sets the value(s) for <b>source</b> (Source of specimen)
*
* <p>
* <b>Definition:</b>
* Source of the specimen
* </p>
*/
public Specimen setSource(CodeableConceptDt theValue) {
mySource = theValue;
return this;
}
}
}

View File

@ -1,705 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Slot</b> Resource
* ((informative) A slot of time that may be available for booking appointments)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Slot">http://hl7.org/fhir/profiles/Slot</a>
* </p>
*
*/
@ResourceDef(name="Slot", profile="http://hl7.org/fhir/profiles/Slot", id="slot")
public class Slot extends BaseResource implements IResource {
/**
* Search parameter constant for <b>slottype</b>
* <p>
* Description: <b>The type of appointments that can be booked into the slot</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Slot.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="slottype", path="Slot.type", description="The type of appointments that can be booked into the slot", type="token" )
public static final String SP_SLOTTYPE = "slottype";
/**
* <b>Fluent Client</b> search parameter constant for <b>slottype</b>
* <p>
* Description: <b>The type of appointments that can be booked into the slot</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Slot.type</b><br/>
* </p>
*/
public static final TokenClientParam SLOTTYPE = new TokenClientParam(SP_SLOTTYPE);
/**
* Search parameter constant for <b>availability</b>
* <p>
* Description: <b>The Availability Resource that we are seeking a slot within</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Slot.availability</b><br/>
* </p>
*/
@SearchParamDefinition(name="availability", path="Slot.availability", description="The Availability Resource that we are seeking a slot within", type="reference" )
public static final String SP_AVAILABILITY = "availability";
/**
* <b>Fluent Client</b> search parameter constant for <b>availability</b>
* <p>
* Description: <b>The Availability Resource that we are seeking a slot within</b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Slot.availability</b><br/>
* </p>
*/
public static final ReferenceClientParam AVAILABILITY = new ReferenceClientParam(SP_AVAILABILITY);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Slot.availability</b>".
*/
public static final Include INCLUDE_AVAILABILITY = new Include("Slot.availability");
/**
* Search parameter constant for <b>start</b>
* <p>
* Description: <b>Appointment date/time.</b><br/>
* Type: <b>date</b><br/>
* Path: <b>Slot.start</b><br/>
* </p>
*/
@SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.", type="date" )
public static final String SP_START = "start";
/**
* <b>Fluent Client</b> search parameter constant for <b>start</b>
* <p>
* Description: <b>Appointment date/time.</b><br/>
* Type: <b>date</b><br/>
* Path: <b>Slot.start</b><br/>
* </p>
*/
public static final DateClientParam START = new DateClientParam(SP_START);
/**
* Search parameter constant for <b>fbtype</b>
* <p>
* Description: <b>The free/busy status of the appointment</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Slot.freeBusyType</b><br/>
* </p>
*/
@SearchParamDefinition(name="fbtype", path="Slot.freeBusyType", description="The free/busy status of the appointment", type="token" )
public static final String SP_FBTYPE = "fbtype";
/**
* <b>Fluent Client</b> search parameter constant for <b>fbtype</b>
* <p>
* Description: <b>The free/busy status of the appointment</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Slot.freeBusyType</b><br/>
* </p>
*/
public static final TokenClientParam FBTYPE = new TokenClientParam(SP_FBTYPE);
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="External Ids for this item",
formalDefinition=""
)
private java.util.List<IdentifierDt> myIdentifier;
@Child(name="type", type=CodeableConceptDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource",
formalDefinition=""
)
private CodeableConceptDt myType;
@Child(name="availability", order=2, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Availability.class })
@Description(
shortDefinition="The availability resource that this slot defines an interval of status information",
formalDefinition=""
)
private ResourceReferenceDt myAvailability;
@Child(name="freeBusyType", type=CodeDt.class, order=3, min=1, max=1)
@Description(
shortDefinition="BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE",
formalDefinition=""
)
private CodeDt myFreeBusyType;
@Child(name="start", type=InstantDt.class, order=4, min=1, max=1)
@Description(
shortDefinition="Date/Time that the slot is to begin",
formalDefinition=""
)
private InstantDt myStart;
@Child(name="end", type=InstantDt.class, order=5, min=1, max=1)
@Description(
shortDefinition="Date/Time that the slot is to conclude",
formalDefinition=""
)
private InstantDt myEnd;
@Child(name="comment", type=StringDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot",
formalDefinition=""
)
private StringDt myComment;
@Child(name="author", order=7, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class, ca.uhn.fhir.model.dstu.resource.Patient.class, ca.uhn.fhir.model.dstu.resource.RelatedPerson.class })
@Description(
shortDefinition="Who authored the slot",
formalDefinition=""
)
private ResourceReferenceDt myAuthor;
@Child(name="authorDate", type=DateTimeDt.class, order=8, min=0, max=1)
@Description(
shortDefinition="When this slot was created, or last revised",
formalDefinition=""
)
private DateTimeDt myAuthorDate;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myAvailability, myFreeBusyType, myStart, myEnd, myComment, myAuthor, myAuthorDate);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myType, myAvailability, myFreeBusyType, myStart, myEnd, myComment, myAuthor, myAuthorDate);
}
/**
* Gets the value(s) for <b>identifier</b> (External Ids for this item).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<IdentifierDt> getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setIdentifier(java.util.List<IdentifierDt> theValue) {
myIdentifier = theValue;
return this;
}
/**
* Adds and returns a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt addIdentifier() {
IdentifierDt newType = new IdentifierDt();
getIdentifier().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>identifier</b> (External Ids for this item),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IdentifierDt getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
return addIdentifier();
}
return getIdentifier().get(0);
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Slot addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
/**
* Adds a new value for <b>identifier</b> (External Ids for this item)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Slot addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList<IdentifierDt>();
}
myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
/**
* Gets the value(s) for <b>type</b> (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public CodeableConceptDt getType() {
if (myType == null) {
myType = new CodeableConceptDt();
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setType(CodeableConceptDt theValue) {
myType = theValue;
return this;
}
/**
* Gets the value(s) for <b>availability</b> (The availability resource that this slot defines an interval of status information).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getAvailability() {
if (myAvailability == null) {
myAvailability = new ResourceReferenceDt();
}
return myAvailability;
}
/**
* Sets the value(s) for <b>availability</b> (The availability resource that this slot defines an interval of status information)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setAvailability(ResourceReferenceDt theValue) {
myAvailability = theValue;
return this;
}
/**
* Gets the value(s) for <b>freeBusyType</b> (BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public CodeDt getFreeBusyType() {
if (myFreeBusyType == null) {
myFreeBusyType = new CodeDt();
}
return myFreeBusyType;
}
/**
* Sets the value(s) for <b>freeBusyType</b> (BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setFreeBusyType(CodeDt theValue) {
myFreeBusyType = theValue;
return this;
}
/**
* Sets the value for <b>freeBusyType</b> (BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setFreeBusyType( String theCode) {
myFreeBusyType = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>start</b> (Date/Time that the slot is to begin).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public InstantDt getStart() {
if (myStart == null) {
myStart = new InstantDt();
}
return myStart;
}
/**
* Sets the value(s) for <b>start</b> (Date/Time that the slot is to begin)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setStart(InstantDt theValue) {
myStart = theValue;
return this;
}
/**
* Sets the value for <b>start</b> (Date/Time that the slot is to begin)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
myStart = new InstantDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>start</b> (Date/Time that the slot is to begin)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setStartWithMillisPrecision( Date theDate) {
myStart = new InstantDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>end</b> (Date/Time that the slot is to conclude).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public InstantDt getEnd() {
if (myEnd == null) {
myEnd = new InstantDt();
}
return myEnd;
}
/**
* Sets the value(s) for <b>end</b> (Date/Time that the slot is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setEnd(InstantDt theValue) {
myEnd = theValue;
return this;
}
/**
* Sets the value for <b>end</b> (Date/Time that the slot is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
myEnd = new InstantDt(theDate, thePrecision);
return this;
}
/**
* Sets the value for <b>end</b> (Date/Time that the slot is to conclude)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setEndWithMillisPrecision( Date theDate) {
myEnd = new InstantDt(theDate);
return this;
}
/**
* Gets the value(s) for <b>comment</b> (Comments on the slot to describe any extended information. Such as custom constraints on the slot).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public StringDt getComment() {
if (myComment == null) {
myComment = new StringDt();
}
return myComment;
}
/**
* Sets the value(s) for <b>comment</b> (Comments on the slot to describe any extended information. Such as custom constraints on the slot)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setComment(StringDt theValue) {
myComment = theValue;
return this;
}
/**
* Sets the value for <b>comment</b> (Comments on the slot to describe any extended information. Such as custom constraints on the slot)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setComment( String theString) {
myComment = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>author</b> (Who authored the slot).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt getAuthor() {
if (myAuthor == null) {
myAuthor = new ResourceReferenceDt();
}
return myAuthor;
}
/**
* Sets the value(s) for <b>author</b> (Who authored the slot)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setAuthor(ResourceReferenceDt theValue) {
myAuthor = theValue;
return this;
}
/**
* Gets the value(s) for <b>authorDate</b> (When this slot was created, or last revised).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public DateTimeDt getAuthorDate() {
if (myAuthorDate == null) {
myAuthorDate = new DateTimeDt();
}
return myAuthorDate;
}
/**
* Sets the value(s) for <b>authorDate</b> (When this slot was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setAuthorDate(DateTimeDt theValue) {
myAuthorDate = theValue;
return this;
}
/**
* Sets the value for <b>authorDate</b> (When this slot was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setAuthorDateWithSecondsPrecision( Date theDate) {
myAuthorDate = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>authorDate</b> (When this slot was created, or last revised)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public Slot setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
myAuthorDate = new DateTimeDt(theDate, thePrecision);
return this;
}
}

View File

@ -1,800 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu.valueset.SubstanceTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateClientParam;
import ca.uhn.fhir.rest.gclient.NumberClientParam;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>Substance</b> Resource
* (A homogeneous material with a definite composition)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/Substance">http://hl7.org/fhir/profiles/Substance</a>
* </p>
*
*/
@ResourceDef(name="Substance", profile="http://hl7.org/fhir/profiles/Substance", id="substance")
public class Substance extends BaseResource implements IResource {
/**
* Search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of the substance</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Substance.type</b><br/>
* </p>
*/
@SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b>The type of the substance</b><br/>
* Type: <b>token</b><br/>
* Path: <b>Substance.type</b><br/>
* </p>
*/
public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
/**
* Search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Substance.instance.identifier</b><br/>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Substance.instance.identifier", description="", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>Substance.instance.identifier</b><br/>
* </p>
*/
public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter constant for <b>expiry</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Substance.instance.expiry</b><br/>
* </p>
*/
@SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="", type="date" )
public static final String SP_EXPIRY = "expiry";
/**
* <b>Fluent Client</b> search parameter constant for <b>expiry</b>
* <p>
* Description: <b></b><br/>
* Type: <b>date</b><br/>
* Path: <b>Substance.instance.expiry</b><br/>
* </p>
*/
public static final DateClientParam EXPIRY = new DateClientParam(SP_EXPIRY);
/**
* Search parameter constant for <b>quantity</b>
* <p>
* Description: <b></b><br/>
* Type: <b>number</b><br/>
* Path: <b>Substance.instance.quantity</b><br/>
* </p>
*/
@SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="", type="number" )
public static final String SP_QUANTITY = "quantity";
/**
* <b>Fluent Client</b> search parameter constant for <b>quantity</b>
* <p>
* Description: <b></b><br/>
* Type: <b>number</b><br/>
* Path: <b>Substance.instance.quantity</b><br/>
* </p>
*/
public static final NumberClientParam QUANTITY = new NumberClientParam(SP_QUANTITY);
/**
* Search parameter constant for <b>substance</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Substance.ingredient.substance</b><br/>
* </p>
*/
@SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="", type="reference" )
public static final String SP_SUBSTANCE = "substance";
/**
* <b>Fluent Client</b> search parameter constant for <b>substance</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>Substance.ingredient.substance</b><br/>
* </p>
*/
public static final ReferenceClientParam SUBSTANCE = new ReferenceClientParam(SP_SUBSTANCE);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Substance.ingredient.substance</b>".
*/
public static final Include INCLUDE_INGREDIENT_SUBSTANCE = new Include("Substance.ingredient.substance");
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="What kind of substance this is",
formalDefinition="A code (or set of codes) that identify this substance"
)
private BoundCodeableConceptDt<SubstanceTypeEnum> myType;
@Child(name="description", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Textual description of the substance, comments",
formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes"
)
private StringDt myDescription;
@Child(name="instance", order=2, min=0, max=1)
@Description(
shortDefinition="If this describes a specific package/container of the substance",
formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance"
)
private Instance myInstance;
@Child(name="ingredient", order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Composition information about the substance",
formalDefinition="A substance can be composed of other substances"
)
private java.util.List<Ingredient> myIngredient;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myDescription, myInstance, myIngredient);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myDescription, myInstance, myIngredient);
}
/**
* Gets the value(s) for <b>type</b> (What kind of substance this is).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A code (or set of codes) that identify this substance
* </p>
*/
public BoundCodeableConceptDt<SubstanceTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeableConceptDt<SubstanceTypeEnum>(SubstanceTypeEnum.VALUESET_BINDER);
}
return myType;
}
/**
* Sets the value(s) for <b>type</b> (What kind of substance this is)
*
* <p>
* <b>Definition:</b>
* A code (or set of codes) that identify this substance
* </p>
*/
public Substance setType(BoundCodeableConceptDt<SubstanceTypeEnum> theValue) {
myType = theValue;
return this;
}
/**
* Sets the value(s) for <b>type</b> (What kind of substance this is)
*
* <p>
* <b>Definition:</b>
* A code (or set of codes) that identify this substance
* </p>
*/
public Substance setType(SubstanceTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>description</b> (Textual description of the substance, comments).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A description of the substance - its appearance, handling requirements, and other usage notes
* </p>
*/
public StringDt getDescription() {
if (myDescription == null) {
myDescription = new StringDt();
}
return myDescription;
}
/**
* Sets the value(s) for <b>description</b> (Textual description of the substance, comments)
*
* <p>
* <b>Definition:</b>
* A description of the substance - its appearance, handling requirements, and other usage notes
* </p>
*/
public Substance setDescription(StringDt theValue) {
myDescription = theValue;
return this;
}
/**
* Sets the value for <b>description</b> (Textual description of the substance, comments)
*
* <p>
* <b>Definition:</b>
* A description of the substance - its appearance, handling requirements, and other usage notes
* </p>
*/
public Substance setDescription( String theString) {
myDescription = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>instance</b> (If this describes a specific package/container of the substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance
* </p>
*/
public Instance getInstance() {
if (myInstance == null) {
myInstance = new Instance();
}
return myInstance;
}
/**
* Sets the value(s) for <b>instance</b> (If this describes a specific package/container of the substance)
*
* <p>
* <b>Definition:</b>
* Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance
* </p>
*/
public Substance setInstance(Instance theValue) {
myInstance = theValue;
return this;
}
/**
* Gets the value(s) for <b>ingredient</b> (Composition information about the substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A substance can be composed of other substances
* </p>
*/
public java.util.List<Ingredient> getIngredient() {
if (myIngredient == null) {
myIngredient = new java.util.ArrayList<Ingredient>();
}
return myIngredient;
}
/**
* Sets the value(s) for <b>ingredient</b> (Composition information about the substance)
*
* <p>
* <b>Definition:</b>
* A substance can be composed of other substances
* </p>
*/
public Substance setIngredient(java.util.List<Ingredient> theValue) {
myIngredient = theValue;
return this;
}
/**
* Adds and returns a new value for <b>ingredient</b> (Composition information about the substance)
*
* <p>
* <b>Definition:</b>
* A substance can be composed of other substances
* </p>
*/
public Ingredient addIngredient() {
Ingredient newType = new Ingredient();
getIngredient().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>ingredient</b> (Composition information about the substance),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A substance can be composed of other substances
* </p>
*/
public Ingredient getIngredientFirstRep() {
if (getIngredient().isEmpty()) {
return addIngredient();
}
return getIngredient().get(0);
}
/**
* Block class for child element: <b>Substance.instance</b> (If this describes a specific package/container of the substance)
*
* <p>
* <b>Definition:</b>
* Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance
* </p>
*/
@Block()
public static class Instance extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Identifier of the package/container",
formalDefinition="Identifier associated with the package/container (usually a label affixed directly)"
)
private IdentifierDt myIdentifier;
@Child(name="expiry", type=DateTimeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="When no longer valid to use",
formalDefinition="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry."
)
private DateTimeDt myExpiry;
@Child(name="quantity", type=QuantityDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Amount of substance in the package",
formalDefinition="The amount of the substance"
)
private QuantityDt myQuantity;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myExpiry, myQuantity);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myExpiry, myQuantity);
}
/**
* Gets the value(s) for <b>identifier</b> (Identifier of the package/container).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public IdentifierDt getIdentifier() {
if (myIdentifier == null) {
myIdentifier = new IdentifierDt();
}
return myIdentifier;
}
/**
* Sets the value(s) for <b>identifier</b> (Identifier of the package/container)
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public Instance setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
/**
* Sets the value for <b>identifier</b> (Identifier of the package/container)
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public Instance setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
/**
* Sets the value for <b>identifier</b> (Identifier of the package/container)
*
* <p>
* <b>Definition:</b>
* Identifier associated with the package/container (usually a label affixed directly)
* </p>
*/
public Instance setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
/**
* Gets the value(s) for <b>expiry</b> (When no longer valid to use).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
* </p>
*/
public DateTimeDt getExpiry() {
if (myExpiry == null) {
myExpiry = new DateTimeDt();
}
return myExpiry;
}
/**
* Sets the value(s) for <b>expiry</b> (When no longer valid to use)
*
* <p>
* <b>Definition:</b>
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
* </p>
*/
public Instance setExpiry(DateTimeDt theValue) {
myExpiry = theValue;
return this;
}
/**
* Sets the value for <b>expiry</b> (When no longer valid to use)
*
* <p>
* <b>Definition:</b>
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
* </p>
*/
public Instance setExpiryWithSecondsPrecision( Date theDate) {
myExpiry = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>expiry</b> (When no longer valid to use)
*
* <p>
* <b>Definition:</b>
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
* </p>
*/
public Instance setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) {
myExpiry = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>quantity</b> (Amount of substance in the package).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public QuantityDt getQuantity() {
if (myQuantity == null) {
myQuantity = new QuantityDt();
}
return myQuantity;
}
/**
* Sets the value(s) for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity(QuantityDt theValue) {
myQuantity = theValue;
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( double theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>quantity</b> (Amount of substance in the package)
*
* <p>
* <b>Definition:</b>
* The amount of the substance
* </p>
*/
public Instance setQuantity( long theValue) {
myQuantity = new QuantityDt(theValue);
return this;
}
}
/**
* Block class for child element: <b>Substance.ingredient</b> (Composition information about the substance)
*
* <p>
* <b>Definition:</b>
* A substance can be composed of other substances
* </p>
*/
@Block()
public static class Ingredient extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="quantity", type=RatioDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Optional amount (concentration)",
formalDefinition="The amount of the ingredient in the substance - a concentration ratio"
)
private RatioDt myQuantity;
@Child(name="substance", order=1, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class })
@Description(
shortDefinition="A component of the substance",
formalDefinition="Another substance that is a component of this substance"
)
private ResourceReferenceDt mySubstance;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myQuantity, mySubstance);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myQuantity, mySubstance);
}
/**
* Gets the value(s) for <b>quantity</b> (Optional amount (concentration)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The amount of the ingredient in the substance - a concentration ratio
* </p>
*/
public RatioDt getQuantity() {
if (myQuantity == null) {
myQuantity = new RatioDt();
}
return myQuantity;
}
/**
* Sets the value(s) for <b>quantity</b> (Optional amount (concentration))
*
* <p>
* <b>Definition:</b>
* The amount of the ingredient in the substance - a concentration ratio
* </p>
*/
public Ingredient setQuantity(RatioDt theValue) {
myQuantity = theValue;
return this;
}
/**
* Gets the value(s) for <b>substance</b> (A component of the substance).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Another substance that is a component of this substance
* </p>
*/
public ResourceReferenceDt getSubstance() {
if (mySubstance == null) {
mySubstance = new ResourceReferenceDt();
}
return mySubstance;
}
/**
* Sets the value(s) for <b>substance</b> (A component of the substance)
*
* <p>
* <b>Definition:</b>
* Another substance that is a component of this substance
* </p>
*/
public Ingredient setSubstance(ResourceReferenceDt theValue) {
mySubstance = theValue;
return this;
}
}
}

View File

@ -1,659 +0,0 @@
package ca.uhn.fhir.model.dstu.resource;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
import ca.uhn.fhir.rest.gclient.StringClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
/**
* HAPI/FHIR <b>User</b> Resource
* (A user authorized to use the system)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/User">http://hl7.org/fhir/profiles/User</a>
* </p>
*
*/
@ResourceDef(name="User", profile="http://hl7.org/fhir/profiles/User", id="user")
public class User extends BaseResource implements IResource {
/**
* Search parameter constant for <b>name</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>User.name</b><br/>
* </p>
*/
@SearchParamDefinition(name="name", path="User.name", description="", type="string" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>User.name</b><br/>
* </p>
*/
public static final StringClientParam NAME = new StringClientParam(SP_NAME);
/**
* Search parameter constant for <b>provider</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>User.provider</b><br/>
* </p>
*/
@SearchParamDefinition(name="provider", path="User.provider", description="", type="token" )
public static final String SP_PROVIDER = "provider";
/**
* <b>Fluent Client</b> search parameter constant for <b>provider</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>User.provider</b><br/>
* </p>
*/
public static final TokenClientParam PROVIDER = new TokenClientParam(SP_PROVIDER);
/**
* Search parameter constant for <b>login</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>User.login</b><br/>
* </p>
*/
@SearchParamDefinition(name="login", path="User.login", description="", type="string" )
public static final String SP_LOGIN = "login";
/**
* <b>Fluent Client</b> search parameter constant for <b>login</b>
* <p>
* Description: <b></b><br/>
* Type: <b>string</b><br/>
* Path: <b>User.login</b><br/>
* </p>
*/
public static final StringClientParam LOGIN = new StringClientParam(SP_LOGIN);
/**
* Search parameter constant for <b>level</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>User.level</b><br/>
* </p>
*/
@SearchParamDefinition(name="level", path="User.level", description="", type="token" )
public static final String SP_LEVEL = "level";
/**
* <b>Fluent Client</b> search parameter constant for <b>level</b>
* <p>
* Description: <b></b><br/>
* Type: <b>token</b><br/>
* Path: <b>User.level</b><br/>
* </p>
*/
public static final TokenClientParam LEVEL = new TokenClientParam(SP_LEVEL);
/**
* Search parameter constant for <b>patient</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>User.patient</b><br/>
* </p>
*/
@SearchParamDefinition(name="patient", path="User.patient", description="", type="reference" )
public static final String SP_PATIENT = "patient";
/**
* <b>Fluent Client</b> search parameter constant for <b>patient</b>
* <p>
* Description: <b></b><br/>
* Type: <b>reference</b><br/>
* Path: <b>User.patient</b><br/>
* </p>
*/
public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>User.patient</b>".
*/
public static final Include INCLUDE_PATIENT = new Include("User.patient");
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="The name of this user",
formalDefinition=""
)
private HumanNameDt myName;
@Child(name="provider", type=UriDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Which system authenticates the user. Blanks = internally authenticated",
formalDefinition=""
)
private UriDt myProvider;
@Child(name="login", type=StringDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="The login by which this user is known",
formalDefinition=""
)
private StringDt myLogin;
@Child(name="password", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="If internal login, the password hash (SHA 256, Hex, lowercase)",
formalDefinition=""
)
private StringDt myPassword;
@Child(name="level", type=CodeDt.class, order=4, min=1, max=1)
@Description(
shortDefinition="The level access for this user",
formalDefinition=""
)
private CodeDt myLevel;
@Child(name="sessionLength", type=IntegerDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="How long a session lasts for",
formalDefinition=""
)
private IntegerDt mySessionLength;
@Child(name="contact", type=ContactDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Contact details for the user",
formalDefinition=""
)
private java.util.List<ContactDt> myContact;
@Child(name="patient", order=7, min=0, max=Child.MAX_UNLIMITED, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@Description(
shortDefinition="Patient compartments the user has access to (if level is patient/family)",
formalDefinition=""
)
private java.util.List<ResourceReferenceDt> myPatient;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myProvider, myLogin, myPassword, myLevel, mySessionLength, myContact, myPatient);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myProvider, myLogin, myPassword, myLevel, mySessionLength, myContact, myPatient);
}
/**
* Gets the value(s) for <b>name</b> (The name of this user).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public HumanNameDt getName() {
if (myName == null) {
myName = new HumanNameDt();
}
return myName;
}
/**
* Sets the value(s) for <b>name</b> (The name of this user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setName(HumanNameDt theValue) {
myName = theValue;
return this;
}
/**
* Gets the value(s) for <b>provider</b> (Which system authenticates the user. Blanks = internally authenticated).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public UriDt getProvider() {
if (myProvider == null) {
myProvider = new UriDt();
}
return myProvider;
}
/**
* Sets the value(s) for <b>provider</b> (Which system authenticates the user. Blanks = internally authenticated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setProvider(UriDt theValue) {
myProvider = theValue;
return this;
}
/**
* Sets the value for <b>provider</b> (Which system authenticates the user. Blanks = internally authenticated)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setProvider( String theUri) {
myProvider = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>login</b> (The login by which this user is known).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public StringDt getLogin() {
if (myLogin == null) {
myLogin = new StringDt();
}
return myLogin;
}
/**
* Sets the value(s) for <b>login</b> (The login by which this user is known)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setLogin(StringDt theValue) {
myLogin = theValue;
return this;
}
/**
* Sets the value for <b>login</b> (The login by which this user is known)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setLogin( String theString) {
myLogin = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>password</b> (If internal login, the password hash (SHA 256, Hex, lowercase)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public StringDt getPassword() {
if (myPassword == null) {
myPassword = new StringDt();
}
return myPassword;
}
/**
* Sets the value(s) for <b>password</b> (If internal login, the password hash (SHA 256, Hex, lowercase))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setPassword(StringDt theValue) {
myPassword = theValue;
return this;
}
/**
* Sets the value for <b>password</b> (If internal login, the password hash (SHA 256, Hex, lowercase))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setPassword( String theString) {
myPassword = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>level</b> (The level access for this user).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public CodeDt getLevel() {
if (myLevel == null) {
myLevel = new CodeDt();
}
return myLevel;
}
/**
* Sets the value(s) for <b>level</b> (The level access for this user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setLevel(CodeDt theValue) {
myLevel = theValue;
return this;
}
/**
* Sets the value for <b>level</b> (The level access for this user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setLevel( String theCode) {
myLevel = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>sessionLength</b> (How long a session lasts for).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public IntegerDt getSessionLength() {
if (mySessionLength == null) {
mySessionLength = new IntegerDt();
}
return mySessionLength;
}
/**
* Sets the value(s) for <b>sessionLength</b> (How long a session lasts for)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setSessionLength(IntegerDt theValue) {
mySessionLength = theValue;
return this;
}
/**
* Sets the value for <b>sessionLength</b> (How long a session lasts for)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setSessionLength( int theInteger) {
mySessionLength = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>contact</b> (Contact details for the user).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ContactDt> getContact() {
if (myContact == null) {
myContact = new java.util.ArrayList<ContactDt>();
}
return myContact;
}
/**
* Sets the value(s) for <b>contact</b> (Contact details for the user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setContact(java.util.List<ContactDt> theValue) {
myContact = theValue;
return this;
}
/**
* Adds and returns a new value for <b>contact</b> (Contact details for the user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ContactDt addContact() {
ContactDt newType = new ContactDt();
getContact().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>contact</b> (Contact details for the user),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ContactDt getContactFirstRep() {
if (getContact().isEmpty()) {
return addContact();
}
return getContact().get(0);
}
/**
* Adds a new value for <b>contact</b> (Contact details for the user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public User addContact( ContactUseEnum theContactUse, String theValue) {
if (myContact == null) {
myContact = new java.util.ArrayList<ContactDt>();
}
myContact.add(new ContactDt(theContactUse, theValue));
return this;
}
/**
* Adds a new value for <b>contact</b> (Contact details for the user)
*
* <p>
* <b>Definition:</b>
*
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public User addContact( String theValue) {
if (myContact == null) {
myContact = new java.util.ArrayList<ContactDt>();
}
myContact.add(new ContactDt(theValue));
return this;
}
/**
* Gets the value(s) for <b>patient</b> (Patient compartments the user has access to (if level is patient/family)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public java.util.List<ResourceReferenceDt> getPatient() {
if (myPatient == null) {
myPatient = new java.util.ArrayList<ResourceReferenceDt>();
}
return myPatient;
}
/**
* Sets the value(s) for <b>patient</b> (Patient compartments the user has access to (if level is patient/family))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public User setPatient(java.util.List<ResourceReferenceDt> theValue) {
myPatient = theValue;
return this;
}
/**
* Adds and returns a new value for <b>patient</b> (Patient compartments the user has access to (if level is patient/family))
*
* <p>
* <b>Definition:</b>
*
* </p>
*/
public ResourceReferenceDt addPatient() {
ResourceReferenceDt newType = new ResourceReferenceDt();
getPatient().add(newType);
return newType;
}
}

View File

@ -0,0 +1,148 @@
package ca.uhn.fhir.model.primitive;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.parser.DataFormatException;
/**
* Represents a Time datatype, per the FHIR specification. A time is a specification of hours and minutes (and optionally
* milliseconds), with NO date and NO timezone information attached. It is expressed as a string in the form
* <code>HH:mm:ss[.SSSS]</code>
*
* <p>
* This datatype is not valid in FHIR DSTU1
* </p>
* @since FHIR DSTU 2 / HAPI 0.8
*/
@DatatypeDef(name = "time")
public class TimeDt extends BasePrimitive<String> implements IQueryParameterType {
private String myValue;
/**
* Create a new String
*/
public TimeDt() {
super();
}
/**
* Create a new String
*/
@SimpleSetter
public TimeDt(@SimpleSetter.Parameter(name = "theString") String theValue) {
myValue = theValue;
}
@Override
public String getValue() {
return myValue;
}
public String getValueNotNull() {
return StringUtils.defaultString(myValue);
}
@Override
public String getValueAsString() {
return myValue;
}
@Override
public void setValue(String theValue) throws DataFormatException {
myValue = theValue;
}
@Override
public void setValueAsString(String theValue) throws DataFormatException {
myValue = theValue;
}
/**
* Returns the value of this string, or <code>null</code>
*/
@Override
public String toString() {
return myValue;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((myValue == null) ? 0 : myValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
TimeDt other = (TimeDt) obj;
if (myValue == null) {
if (other.myValue != null)
return false;
} else if (!myValue.equals(other.myValue))
return false;
return true;
}
/**
* {@inheritDoc}
*/
@Override
public void setValueAsQueryToken(String theQualifier, String theValue) {
setValue(theValue);
}
/**
* {@inheritDoc}
*/
@Override
public String getValueAsQueryToken() {
return getValue();
}
/**
* Returns <code>true</code> if this datatype has no extensions, and has either a <code>null</code> value or an empty ("") value.
*/
@Override
public boolean isEmpty() {
boolean retVal = super.isBaseEmpty() && StringUtils.isBlank(getValue());
return retVal;
}
@Override
public String getQueryParameterQualifier() {
return null;
}
}

View File

@ -23,7 +23,6 @@ package ca.uhn.fhir.narrative;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import ca.uhn.fhir.model.dstu.resource.Conformance;
import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.RestfulServer;
@ -46,7 +45,7 @@ public class DefaultThymeleafNarrativeGenerator extends BaseThymeleafNarrativeGe
/** /**
* If set to <code>true</code> (default is <code>false</code>) a special custom narrative for the * If set to <code>true</code> (default is <code>false</code>) a special custom narrative for the
* {@link Conformance} resource will be provided, which is designed to be used with * {@link ca.uhn.fhir.model.dstu.resource.Conformance} resource will be provided, which is designed to be used with
* HAPI {@link RestfulServer} instances. This narrative provides a friendly search * HAPI {@link RestfulServer} instances. This narrative provides a friendly search
* page which can assist users of the service. * page which can assist users of the service.
*/ */
@ -56,7 +55,7 @@ public class DefaultThymeleafNarrativeGenerator extends BaseThymeleafNarrativeGe
/** /**
* If set to <code>true</code> (default is <code>false</code>) a special custom narrative for the * If set to <code>true</code> (default is <code>false</code>) a special custom narrative for the
* {@link Conformance} resource will be provided, which is designed to be used with * {@link ca.uhn.fhir.model.dstu.resource.Conformance} resource will be provided, which is designed to be used with
* HAPI {@link RestfulServer} instances. This narrative provides a friendly search * HAPI {@link RestfulServer} instances. This narrative provides a friendly search
* page which can assist users of the service. * page which can assist users of the service.
*/ */

View File

@ -1495,6 +1495,11 @@ class ParserState<T> {
} }
} }
@Override
public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
myDepth++;
}
@Override @Override
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException { public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
myDepth++; myDepth++;

View File

@ -26,8 +26,8 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
//import ca.uhn.fhir.testmodel.Patient; // TODO: qualify this correctly
/** /**
* RESTful method annotation to be used for the FHIR * RESTful method annotation to be used for the FHIR

View File

@ -25,10 +25,9 @@ import java.lang.annotation.RetentionPolicy;
import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.rest.param.CompositeParam; import ca.uhn.fhir.rest.param.CompositeParam;
import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.ReferenceParam;
//import ca.uhn.fhir.testmodel.Patient; // TODO: qualify this correctly
/** /**

View File

@ -25,10 +25,9 @@ import java.lang.annotation.RetentionPolicy;
import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.rest.param.CompositeParam; import ca.uhn.fhir.rest.param.CompositeParam;
import ca.uhn.fhir.rest.param.ReferenceParam; import ca.uhn.fhir.rest.param.ReferenceParam;
//import ca.uhn.fhir.testmodel.Patient; // TODO: qualify this correctly
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
/** /**

View File

@ -20,13 +20,13 @@ package ca.uhn.fhir.rest.api;
* #L% * #L%
*/ */
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
public class MethodOutcome { public class MethodOutcome {
private IdDt myId; private IdDt myId;
private OperationOutcome myOperationOutcome; private BaseOperationOutcome myOperationOutcome;
private IdDt myVersionId; private IdDt myVersionId;
private Boolean myCreated; private Boolean myCreated;
@ -67,12 +67,12 @@ public class MethodOutcome {
* @param theId * @param theId
* The ID of the created/updated resource * The ID of the created/updated resource
* *
* @param theOperationOutcome * @param theBaseOperationOutcome
* The operation outcome to return with the response (or null for none) * The operation outcome to return with the response (or null for none)
*/ */
public MethodOutcome(IdDt theId, OperationOutcome theOperationOutcome) { public MethodOutcome(IdDt theId, BaseOperationOutcome theBaseOperationOutcome) {
myId = theId; myId = theId;
myOperationOutcome = theOperationOutcome; myOperationOutcome = theBaseOperationOutcome;
} }
/** /**
@ -81,16 +81,16 @@ public class MethodOutcome {
* @param theId * @param theId
* The ID of the created/updated resource * The ID of the created/updated resource
* *
* @param theOperationOutcome * @param theBaseOperationOutcome
* The operation outcome to return with the response (or null for none) * The operation outcome to return with the response (or null for none)
* *
* @param theCreated * @param theCreated
* If not null, indicates whether the resource was created (as opposed to being updated). This is generally not needed, since the server can assume based on the method being called * If not null, indicates whether the resource was created (as opposed to being updated). This is generally not needed, since the server can assume based on the method being called
* whether the result was a creation or an update. However, it can be useful if you are implementing an update method that does a create if the ID doesn't already exist. * whether the result was a creation or an update. However, it can be useful if you are implementing an update method that does a create if the ID doesn't already exist.
*/ */
public MethodOutcome(IdDt theId, OperationOutcome theOperationOutcome, Boolean theCreated) { public MethodOutcome(IdDt theId, BaseOperationOutcome theBaseOperationOutcome, Boolean theCreated) {
myId = theId; myId = theId;
myOperationOutcome = theOperationOutcome; myOperationOutcome = theBaseOperationOutcome;
myCreated = theCreated; myCreated = theCreated;
} }
@ -105,10 +105,10 @@ public class MethodOutcome {
/** /**
* @deprecated Use the constructor which accepts a single IdDt parameter, and include the logical ID and version ID in that IdDt instance * @deprecated Use the constructor which accepts a single IdDt parameter, and include the logical ID and version ID in that IdDt instance
*/ */
public MethodOutcome(IdDt theId, IdDt theVersionId, OperationOutcome theOperationOutcome) { public MethodOutcome(IdDt theId, IdDt theVersionId, BaseOperationOutcome theBaseOperationOutcome) {
myId = theId; myId = theId;
myVersionId = theVersionId; myVersionId = theVersionId;
myOperationOutcome = theOperationOutcome; myOperationOutcome = theBaseOperationOutcome;
} }
public IdDt getId() { public IdDt getId() {
@ -116,11 +116,11 @@ public class MethodOutcome {
} }
/** /**
* Returns the {@link OperationOutcome} resource to return to the client or <code>null</code> if none. * Returns the {@link BaseOperationOutcome} resource to return to the client or <code>null</code> if none.
* *
* @return This method <b>will return null</b>, unlike many methods in the API. * @return This method <b>will return null</b>, unlike many methods in the API.
*/ */
public OperationOutcome getOperationOutcome() { public BaseOperationOutcome getOperationOutcome() {
return myOperationOutcome; return myOperationOutcome;
} }
@ -156,10 +156,10 @@ public class MethodOutcome {
} }
/** /**
* Sets the {@link OperationOutcome} resource to return to the client. Set to <code>null</code> (which is the default) if none. * Sets the {@link BaseOperationOutcome} resource to return to the client. Set to <code>null</code> (which is the default) if none.
*/ */
public void setOperationOutcome(OperationOutcome theOperationOutcome) { public void setOperationOutcome(BaseOperationOutcome theBaseOperationOutcome) {
myOperationOutcome = theOperationOutcome; myOperationOutcome = theBaseOperationOutcome;
} }
/** /**

View File

@ -47,7 +47,7 @@ import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException; import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException;
@ -211,7 +211,7 @@ public abstract class BaseClient {
} }
String message = "HTTP " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase(); String message = "HTTP " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase();
OperationOutcome oo=null; BaseOperationOutcome oo=null;
if (Constants.CT_TEXT.equals(mimeType)) { if (Constants.CT_TEXT.equals(mimeType)) {
message = message + ": " + body; message = message + ": " + body;
} else { } else {
@ -219,9 +219,10 @@ public abstract class BaseClient {
if (enc != null) { if (enc != null) {
IParser p = enc.newParser(theContext); IParser p = enc.newParser(theContext);
try { try {
oo = p.parseResource(OperationOutcome.class, body); // TODO: handle if something other than OO comes back
if (oo.getIssueFirstRep().getDetails().isEmpty()==false) { oo = (BaseOperationOutcome) p.parseResource( body);
message = message + ": " + oo.getIssueFirstRep().getDetails().getValue(); if (oo.getIssueFirstRep().getDetailsElement().isEmpty()==false) {
message = message + ": " + oo.getIssueFirstRep().getDetailsElement().getValue();
} }
} catch (Exception e) { } catch (Exception e) {
ourLog.debug("Failed to process OperationOutcome response"); ourLog.debug("Failed to process OperationOutcome response");

View File

@ -44,8 +44,8 @@ import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include; import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.model.primitive.UriDt;
@ -115,14 +115,17 @@ public class GenericClient extends BaseClient implements IGenericClient {
} }
@Override @Override
public Conformance conformance() { public BaseConformance conformance() {
HttpGetClientInvocation invocation = MethodUtil.createConformanceInvocation(); HttpGetClientInvocation invocation = MethodUtil.createConformanceInvocation();
if (isKeepResponses()) { if (isKeepResponses()) {
myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding()); myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
} }
ResourceResponseHandler<Conformance> binding = new ResourceResponseHandler<Conformance>(Conformance.class, null); @SuppressWarnings("unchecked")
Conformance resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse); Class<BaseConformance> conformance = (Class<BaseConformance>) myContext.getResourceDefinition("Conformance").getImplementingClass();
ResourceResponseHandler<? extends BaseConformance> binding = new ResourceResponseHandler<BaseConformance>(conformance, null);
BaseConformance resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse);
return resp; return resp;
} }
@ -608,12 +611,12 @@ public class GenericClient extends BaseClient implements IGenericClient {
} }
private class DeleteInternal extends BaseClientExecutable<IDeleteTyped, OperationOutcome> implements IDelete, IDeleteTyped { private class DeleteInternal extends BaseClientExecutable<IDeleteTyped, BaseOperationOutcome> implements IDelete, IDeleteTyped {
private IdDt myId; private IdDt myId;
@Override @Override
public OperationOutcome execute() { public BaseOperationOutcome execute() {
HttpDeleteClientInvocation invocation = DeleteMethodBinding.createDeleteInvocation(myId); HttpDeleteClientInvocation invocation = DeleteMethodBinding.createDeleteInvocation(myId);
OperationOutcomeResponseHandler binding = new OperationOutcomeResponseHandler(); OperationOutcomeResponseHandler binding = new OperationOutcomeResponseHandler();
Map<String, List<String>> params = new HashMap<String, List<String>>(); Map<String, List<String>> params = new HashMap<String, List<String>>();
@ -763,19 +766,20 @@ public class GenericClient extends BaseClient implements IGenericClient {
} }
private final class OperationOutcomeResponseHandler implements IClientResponseHandler<OperationOutcome> { private final class OperationOutcomeResponseHandler implements IClientResponseHandler<BaseOperationOutcome> {
@Override @Override
public OperationOutcome invokeClient(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException, public BaseOperationOutcome invokeClient(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException,
BaseServerResponseException { BaseServerResponseException {
EncodingEnum respType = EncodingEnum.forContentType(theResponseMimeType); EncodingEnum respType = EncodingEnum.forContentType(theResponseMimeType);
if (respType == null) { if (respType == null) {
return null; return null;
} }
IParser parser = respType.newParser(myContext); IParser parser = respType.newParser(myContext);
OperationOutcome retVal; BaseOperationOutcome retVal;
try { try {
retVal = parser.parseResource(OperationOutcome.class, theResponseReader); // TODO: handle if something else than OO comes back
retVal = (BaseOperationOutcome) parser.parseResource(theResponseReader);
} catch (DataFormatException e) { } catch (DataFormatException e) {
ourLog.warn("Failed to parse OperationOutcome response", e); ourLog.warn("Failed to parse OperationOutcome response", e);
return null; return null;

View File

@ -26,7 +26,7 @@ import java.util.Map;
import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.model.primitive.DateTimeDt; import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.UriDt; import ca.uhn.fhir.model.primitive.UriDt;
@ -41,10 +41,11 @@ import ca.uhn.fhir.rest.gclient.IUntypedQuery;
import ca.uhn.fhir.rest.gclient.IUpdate; import ca.uhn.fhir.rest.gclient.IUpdate;
public interface IGenericClient { public interface IGenericClient {
/** /**
* Retrieves and returns the server conformance statement * Retrieves and returns the server conformance statement
*/ */
Conformance conformance(); BaseConformance conformance();
/** /**
* Fluent method for the "create" operation, which creates a new resource instance on the server * Fluent method for the "create" operation, which creates a new resource instance on the server

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.client.api;
* #L% * #L%
*/ */
import ca.uhn.fhir.model.dstu.resource.Conformance; import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.rest.annotation.Metadata; import ca.uhn.fhir.rest.annotation.Metadata;
/** /**
@ -35,6 +35,6 @@ public interface IBasicClient extends IRestfulClient {
* @see See the <a href="http://hl7.org/implement/standards/fhir/http.html#conformance">FHIR HTTP Conformance</a> definition * @see See the <a href="http://hl7.org/implement/standards/fhir/http.html#conformance">FHIR HTTP Conformance</a> definition
*/ */
@Metadata @Metadata
Conformance getServerConformanceStatement(); BaseConformance getServerConformanceStatement();
} }

View File

@ -20,9 +20,9 @@ package ca.uhn.fhir.rest.gclient;
* #L% * #L%
*/ */
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
public interface IDeleteTyped extends IClientExecutable<IDeleteTyped, OperationOutcome> { public interface IDeleteTyped extends IClientExecutable<IDeleteTyped, BaseOperationOutcome> {
// nothing for now // nothing for now

View File

@ -1,11 +1,11 @@
package ca.uhn.fhir.rest.gclient; package ca.uhn.fhir.rest.gclient;
import static org.apache.commons.lang3.StringUtils.*; import static org.apache.commons.lang3.StringUtils.defaultString;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt; import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
/* /*
* #%L * #%L
@ -67,17 +67,17 @@ public class TokenClientParam implements IParam {
} }
@Override @Override
public ICriterion<TokenClientParam> identifier(IdentifierDt theIdentifier) { public ICriterion<TokenClientParam> identifier(BaseIdentifierDt theIdentifier) {
return new TokenCriterion(getParamName(), theIdentifier.getSystem().getValueAsString(), theIdentifier.getValue().getValue()); return new TokenCriterion(getParamName(), theIdentifier.getSystemElement().getValueAsString(), theIdentifier.getValueElement().getValue());
} }
@Override @Override
public ICriterion<TokenClientParam> identifiers(List<IdentifierDt> theIdentifiers) { public ICriterion<TokenClientParam> identifiers(List<BaseIdentifierDt> theIdentifiers) {
return new TokenCriterion(getParamName(), theIdentifiers); return new TokenCriterion(getParamName(), theIdentifiers);
} }
@Override @Override
public ICriterion<TokenClientParam> identifiers(IdentifierDt... theIdentifiers) { public ICriterion<TokenClientParam> identifiers(BaseIdentifierDt... theIdentifiers) {
return new TokenCriterion(getParamName(), Arrays.asList(theIdentifiers)); return new TokenCriterion(getParamName(), Arrays.asList(theIdentifiers));
} }
}; };
@ -131,7 +131,7 @@ public class TokenClientParam implements IParam {
* The identifier * The identifier
* @return A criterion * @return A criterion
*/ */
ICriterion<TokenClientParam> identifier(IdentifierDt theIdentifier); ICriterion<TokenClientParam> identifier(BaseIdentifierDt theIdentifier);
/** /**
* Creates a search criterion that matches against the given collection of identifiers (system and code if both are present, or whatever is present). * Creates a search criterion that matches against the given collection of identifiers (system and code if both are present, or whatever is present).
@ -141,7 +141,7 @@ public class TokenClientParam implements IParam {
* The identifier * The identifier
* @return A criterion * @return A criterion
*/ */
ICriterion<TokenClientParam> identifiers(List<IdentifierDt> theIdentifiers); ICriterion<TokenClientParam> identifiers(List<BaseIdentifierDt> theIdentifiers);
/** /**
* Creates a search criterion that matches against the given collection of identifiers (system and code if both are present, or whatever is present). * Creates a search criterion that matches against the given collection of identifiers (system and code if both are present, or whatever is present).
@ -151,7 +151,7 @@ public class TokenClientParam implements IParam {
* The identifier * The identifier
* @return A criterion * @return A criterion
*/ */
ICriterion<TokenClientParam> identifiers(IdentifierDt... theIdentifiers); ICriterion<TokenClientParam> identifiers(BaseIdentifierDt... theIdentifiers);
} }

View File

@ -24,7 +24,7 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt; import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
import ca.uhn.fhir.rest.param.ParameterUtil; import ca.uhn.fhir.rest.param.ParameterUtil;
class TokenCriterion implements ICriterion<TokenClientParam>, ICriterionInternal { class TokenCriterion implements ICriterion<TokenClientParam>, ICriterionInternal {
@ -51,17 +51,17 @@ class TokenCriterion implements ICriterion<TokenClientParam>, ICriterionInternal
return value; return value;
} }
public TokenCriterion(String theParamName, List<IdentifierDt> theValue) { public TokenCriterion(String theParamName, List<BaseIdentifierDt> theValue) {
myName=theParamName; myName=theParamName;
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
for (IdentifierDt next : theValue) { for (BaseIdentifierDt next : theValue) {
if (next.getSystem().isEmpty() && next.getValue().isEmpty()) { if (next.getSystemElement().isEmpty() && next.getValueElement().isEmpty()) {
continue; continue;
} }
if (b.length() > 0) { if (b.length() > 0) {
b.append(','); b.append(',');
} }
b.append(toValue(next.getSystem().getValueAsString(), next.getValue().getValue())); b.append(toValue(next.getSystemElement().getValueAsString(), next.getValueElement().getValue()));
} }
myValue = b.toString(); myValue = b.toString();
} }

View File

@ -40,7 +40,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
@ -230,7 +230,8 @@ public abstract class BaseMethodBinding<T> implements IClientResponseHandler<T>
break; break;
case Constants.STATUS_HTTP_422_UNPROCESSABLE_ENTITY: case Constants.STATUS_HTTP_422_UNPROCESSABLE_ENTITY:
IParser parser = createAppropriateParserForParsingResponse(theResponseMimeType, theResponseReader, theStatusCode); IParser parser = createAppropriateParserForParsingResponse(theResponseMimeType, theResponseReader, theStatusCode);
OperationOutcome operationOutcome = parser.parseResource(OperationOutcome.class, theResponseReader); // TODO: handle if something other than OO comes back
BaseOperationOutcome operationOutcome = (BaseOperationOutcome) parser.parseResource(theResponseReader);
ex = new UnprocessableEntityException(operationOutcome); ex = new UnprocessableEntityException(operationOutcome);
break; break;
default: default:
@ -447,8 +448,9 @@ public abstract class BaseMethodBinding<T> implements IClientResponseHandler<T>
if (!IResource.class.isAssignableFrom(theReturnType)) { if (!IResource.class.isAssignableFrom(theReturnType)) {
return false; return false;
} }
boolean retVal = Modifier.isAbstract(theReturnType.getModifiers()) == false; return true;
return retVal; // boolean retVal = Modifier.isAbstract(theReturnType.getModifiers()) == false;
// return retVal;
} }
protected static IBundleProvider toResourceList(Object response) throws InternalErrorException { protected static IBundleProvider toResourceList(Object response) throws InternalErrorException {

View File

@ -38,7 +38,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
import ca.uhn.fhir.model.api.TagList; import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome; import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.MethodOutcome;
@ -146,7 +146,7 @@ abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBinding<Metho
} }
} }
OperationOutcome outcome = response != null ? response.getOperationOutcome() : null; BaseOperationOutcome outcome = response != null ? response.getOperationOutcome() : null;
for (int i = theServer.getInterceptors().size() - 1; i >= 0; i--) { for (int i = theServer.getInterceptors().size() - 1; i >= 0; i--) {
IServerInterceptor next = theServer.getInterceptors().get(i); IServerInterceptor next = theServer.getInterceptors().get(i);
boolean continueProcessing = next.outgoingResponse(theRequest, outcome, theRequest.getServletRequest(), theRequest.getServletResponse()); boolean continueProcessing = next.outgoingResponse(theRequest, outcome, theRequest.getServletRequest(), theRequest.getServletResponse());

View File

@ -23,6 +23,7 @@ package ca.uhn.fhir.rest.method;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -73,7 +74,8 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding<Obje
private String myResourceName; private String myResourceName;
private Class<? extends IResource> myResourceType; private Class<? extends IResource> myResourceType;
public BaseResourceReturningMethodBinding(Class<? extends IResource> theReturnResourceType, Method theMethod, FhirContext theConetxt, Object theProvider) { @SuppressWarnings("unchecked")
public BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, FhirContext theConetxt, Object theProvider) {
super(theMethod, theConetxt, theProvider); super(theMethod, theConetxt, theProvider);
Class<?> methodReturnType = theMethod.getReturnType(); Class<?> methodReturnType = theMethod.getReturnType();
@ -100,12 +102,17 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding<Obje
if (theReturnResourceType != null) { if (theReturnResourceType != null) {
if (IResource.class.isAssignableFrom(theReturnResourceType)) { if (IResource.class.isAssignableFrom(theReturnResourceType)) {
myResourceType = theReturnResourceType;
ResourceDef resourceDefAnnotation = theReturnResourceType.getAnnotation(ResourceDef.class); ResourceDef resourceDefAnnotation = theReturnResourceType.getAnnotation(ResourceDef.class);
if (resourceDefAnnotation == null) { if (resourceDefAnnotation == null) {
throw new ConfigurationException(theReturnResourceType.getCanonicalName() + " has no @" + ResourceDef.class.getSimpleName() + " annotation"); if (Modifier.isAbstract(theReturnResourceType.getModifiers())) {
// If we're returning an abstract type, that's ok
}else {
throw new ConfigurationException(theReturnResourceType.getCanonicalName() + " has no @" + ResourceDef.class.getSimpleName() + " annotation");
}
} else {
myResourceType = (Class<? extends IResource>) theReturnResourceType;
myResourceName = resourceDefAnnotation.name();
} }
myResourceName = resourceDefAnnotation.name();
} }
} }
} }

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