More merging cleanup

This commit is contained in:
jamesagnew 2014-11-08 10:38:25 -05:00
parent d1fb878c55
commit 5c9cf8ddf8
395 changed files with 6 additions and 297725 deletions

View File

@ -1,424 +0,0 @@
<?xml version="1.0"?>
<document xmlns="http://maven.apache.org/changes/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 ./changes.xsd">
<properties>
<author>James Agnew</author>
<title>HAPI FHIR Changelog</title>
</properties>
<body>
<release version="0.7" date="2014-Oct-23">
<action type="add" issue="30">
<![CDATA[<b>API CHANGE:</b>]]> The TagList class previously implemented ArrayList semantics,
but this has been replaced with LinkedHashMap semantics. This means that the list of
tags will no longer accept duplicate tags, but that tag order will still be
preserved. Thanks to Bill de Beaubien for reporting!
</action>
<action type="fix" issue="33">
Server was incorrectly including contained resources being returned as both contained resources, and as
top-level resources in the returned bundle for search operations.
Thanks to Bill de Beaubien for reporting! This also fixes Issue #20, thanks to
lephty for reporting!
</action>
<action type="add" dev="suranga">
Documentation fixes
</action>
<action type="add" dev="dougmartin">
Add a collection of new methods on the generic client which support the
<![CDATA[
<b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#read(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">read</a></b>,
<b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#vread(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">read</a></b>,
and <b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#search(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">search</a></b>
]]>
operations using an absolute URL. This allows developers to perform these operations using
URLs they obtained from other sources (or external resource references within resources). In
addition, the existing read/vread operations will now access absolute URL references if
they are passed in. Thanks to Doug Martin of the Regenstrief Center for Biomedical Informatics
for contributing this implementation!
</action>
<action type="fix">
Server implementation was not correctly figuring out its own FHIR Base URL when deployed
on Amazon Web Service server. Thanks to Jeffrey Ting and Bill De Beaubien of
Systems Made Simple for their help in figuring out this issue!
</action>
<action type="fix">
XML Parser failed to encode fields with both a resource reference child and
a primitive type child. Thanks to Jeffrey Ting and Bill De Beaubien of
Systems Made Simple for their help in figuring out this issue!
</action>
<action type="fix">
HAPI now runs successfully on Servlet 2.5 containers (such as Tomcat 6). Thanks to
Bernard Gitaadji for reporting and diagnosing the issue!
</action>
<action type="fix">
Summary (in the bundle entry) is now encoded by the XML and JSON parsers if supplied. Thanks to David Hay of
Orion Health for reporting this!
</action>
<action type="fix" issue="24">
Conformance profiles which are automatically generated by the server were missing a few mandatory elements,
which meant that the profile did not correctly validate. Thanks to Bill de Beaubien of Systems Made Simple
for reporting this!
</action>
<action type="fix">
XHTML (in narratives) containing escapable characters (e.g. &lt; or &quot;) will now always have those characters
escaped properly in encoded messages.
</action>
<action type="fix">
Resources containing entities which are not valid in basic XML (e.g. &amp;sect;) will have those
entities converted to their equivalent unicode characters when resources are encoded, since FHIR does
not allow extended entities in resource instances.
</action>
<action type="add">
Add a new client interceptor which adds HTTP Authorization Bearer Tokens (for use with OAUTH2 servers)
to client requests.
</action>
<action type="fix">
Add phloc-commons dependency explicitly, which resolves an issue building HAPI from source on
some platforms. Thanks to Odysseas Pentakalos for the patch!
</action>
<action type="add">
HAPI now logs a single line indicating the StAX implementation being used upon the
first time an XML parser is created.
</action>
<action type="fix">
Update methods on the server did not return a "content-location" header, but
only a "location" header. Both are required according to the FHIR specification.
Thanks to Bill de Beaubien of Systems Made Simple for reporting this!
</action>
<action type="fix" issue="26" dev="akley">
Parser failed to correctly read contained Binary resources. Thanks to Alexander Kley for
the patch!
</action>
<action type="fix" issue="29" dev="akley">
Calling encode multiple times on a resource with contained resources caused the contained
resources to be re-added (and the actual message to grow) with each encode pass. Thanks to
Alexander Kley for the test case!
</action>
<action type="fix">
JSON-encoded contained resources with the incorrect "_id" element (which should be "id", but some
incorrect examples exist on the FHIR specification) now parse correctly. In other words, HAPI
previously only accepted the correct "id" element, but now it also accepts the incorrect
"_id" element just to be more lenient.
</action>
<action type="fix">
Several unit tests failed on Windows (or any platform with non UTF-8 default encoding). This may
have also caused resource validation to fail occasionally on these platforms as well.
Thanks to Bill de Beaubien for reporting!
</action>
<action type="fix">
toString() method on TokenParam was incorrectly showing the system as the value.
Thanks to Bill de Beaubien for reporting!
</action>
<action type="update">
Documentation on contained resources contained a typo and did not actually produce contained resources. Thanks
to David Hay of Orion Health for reporting!
</action>
<action type="add" issue="31" dev="preston">
Add a
<![CDATA[<a href="https://www.vagrantup.com/">Vagrant</a>]]>
based environment (basically a fully built, self contained development environment) for
trying out the HAPI server modules. Thanks to Preston Lee for the pull request, and for
offering to maintain this!
</action>
<action type="add" issue="32" dev="jathman">
Change validation API so that it uses a return type instead of exceptions to communicate
validation failures. Thanks to Joe Athman for the pull request!
</action>
<action type="add" issue="35" dev="petromykhailysyn">
Add a client interceptor which adds an HTTP cookie to each client request. Thanks to
Petro Mykhailysyn for the pull request!
</action>
</release>
<release version="0.6" date="2014-Sep-08" description="This release brings a number of new features and bug fixes!">
<!--
<action type="add">
Allow generic client ... OAUTH
</action>
-->
<action type="add">
Add server interceptor framework, and new interceptor for logging incoming
requests.
</action>
<action type="add">
Add server validation framework for validating resources against the FHIR schemas and schematrons
</action>
<action type="fix">
Tester UI created double _format and _pretty param entries in searches. Thanks to Gered King of University
Health Network for reporting!
</action>
<action type="fix" issue="4">
Create method was incorrectly returning an HTTP 204 on sucessful completion, but
should be returning an HTTP 200 per the FHIR specification. Thanks to wanghaisheng
for reporting!
</action>
<action type="fix">
FHIR Tester UI now correctly sends UTF-8 charset in responses so that message payloads containing
non US-ASCII characters will correctly display in the browser
</action>
<action type="fix">
JSON parser was incorrectly encoding extensions on composite elements outside the element itself
(as is done correctly for non-composite elements) instead of inside of them. Thanks to David Hay of
Orion for reporting this!
</action>
<action type="add">
Contained/included resource instances received by a client are now automatically
added to any ResourceReferenceDt instancea in other resources which reference them.
</action>
<action type="add">
Add documentation on how to use eBay CORS Filter to support Cross Origin Resource
Sharing (CORS) to server. CORS support that was built in to the server itself has
been removed, as it did not work correctly (and was reinventing a wheel that others
have done a great job inventing). Thanks to Peter Bernhardt of Relay Health for all the assistance
in testing this!
</action>
<action type="fix">
IResource interface did not expose the getLanguage/setLanguage methods from BaseResource,
so the resource language was difficult to access.
</action>
<action type="fix">
JSON Parser now gives a more friendly error message if it tries to parse JSON with invalid use
of single quotes
</action>
<action type="add">
Transaction server method is now allowed to return an OperationOutcome in addition to the
incoming resources. The public test server now does this in order to return status information
about the transaction processing.
</action>
<action type="add">
Update method in the server can now flag (via a field on the MethodOutcome object being returned)
that the result was actually a creation, and Create method can indicate that it was actually an
update. This has no effect other than to switch between the HTTP 200 and HTTP 201 status codes on the
response, but this may be useful in some circumstances.
</action>
<action type="fix">
Annotation client search methods with a specific resource type (e.g. List&lt;Patient&gt; search())
won't return any resources that aren't of the correct type that are received in a response
bundle (generally these are referenced resources, so they are populated in the reference fields instead).
Thanks to Tahura Chaudhry of University Health Network for the unit test!
</action>
<action type="add">
Added narrative generator template for OperationOutcome resource
</action>
<action type="fix">
Date/time types did not correctly parse values in the format "yyyymmdd" (although the FHIR-defined format
is "yyyy-mm-dd" anyhow, and this is correctly handled). Thanks to Jeffrey Ting of Systems Made Simple
for reporting!
</action>
<action type="fix">
Server search method for an unnamed query gets called if the client requests a named query
with the same parameter list. Thanks to Neal Acharya of University Health Network for reporting!
</action>
<action type="fix">
Category header (for tags) is correctly read in client for "read" operation
</action>
<action type="add">
Transaction method in server can now have parameter type Bundle instead of
List&lt;IResource&gt;
</action>
<action type="add">
HAPI parsers now use field access to get/set values instead of method accessors and mutators.
This should give a small performance boost.
</action>
<action type="fix">
JSON parser encodes resource references incorrectly, using the name "resource" instead
of the name "reference" for the actual reference. Thanks to
Ricky Nguyen for reporting and tracking down the issue!
</action>
<action type="fix">
Rename NotImpementedException to NotImplementedException (to correct typo)
</action>
<action type="fix">
Server setUseBrowserFriendlyContentType setting also respected for errors (e.g. OperationOutcome with 4xx/5xx status)
</action>
<action type="fix">
Fix performance issue in date/time datatypes where pattern matchers were not static
</action>
<action type="fix">
Server now gives a more helpful error message if a @Read method has a search parameter (which is invalid, but
previously lead to a very unhelpful error message). Thanks to Tahura Chaudhry of UHN for reporting!
</action>
<action type="fix">
Resource of type "List" failed to parse from a bundle correctly. Thanks to David Hay of Orion Health
for reporting!
</action>
<action type="fix">
QuantityParam correctly encodes approximate (~) prefix to values
</action>
<action type="fix" issue="14">
If a server defines a method with parameter "_id", incoming search requests for that method may
get delegated to the wrong method. Thanks to Neal Acharya for reporting!
</action>
<action type="add">
SecurityEvent.Object structural element has been renamed to
SecurityEvent.ObjectElement to avoid conflicting names with the
java Object class. Thanks to Laurie Macdougall-Sookraj of UHN for
reporting!
</action>
<action type="fix">
Text/narrative blocks that were created with a non-empty
namespace prefix (e.g. &lt;xhtml:div xmlns:xhtml="..."&gt;...&lt;/xhtml:div&gt;)
failed to encode correctly (prefix was missing in encoded resource)
</action>
<action type="fix">
Resource references previously encoded their children (display and reference)
in the wrong order so references with both would fail schema validation.
</action>
<action type="add">
SecurityEvent resource's enums now use friendly enum names instead of the unfriendly
numeric code values. Thanks to Laurie MacDougall-Sookraj of UHN for the
suggestion!
</action>
</release>
<release version="0.5" date="2014-Jul-30">
<action type="add">
HAPI has a number of RESTful method parameter types that have similar but not identical
purposes and confusing names. A cleanup has been undertaken to clean this up.
This means that a number of existing classes
have been deprocated in favour of new naming schemes.
<![CDATA[<br/><br/>]]>
All annotation-based clients and all server search method parameters are now named
(type)Param, for example: StringParam, TokenParam, etc.
<![CDATA[<br/><br/>]]>
All generic/fluent client method parameters are now named
(type)ClientParam, for example: StringClientParam, TokenClientParam, etc.
<![CDATA[<br/><br/>]]>
All renamed classes have been retained and deprocated, so this change should not cause any issues
for existing applications but those applications should be refactored to use the
new parameters when possible.
</action>
<action type="add">
Allow server methods to return wildcard generic types (e.g. List&lt;? extends IResource&gt;)
</action>
<action type="add">
Search parameters are not properly escaped and unescaped. E.g. for a token parameter such as
"&amp;identifier=system|codepart1\|codepart2"
</action>
<action type="add">
Add support for OPTIONS verb (which returns the server conformance statement)
</action>
<action type="add">
Add support for CORS headers in server
</action>
<action type="add">
Bump SLF4j dependency to latest version (1.7.7)
</action>
<action type="add">
Add interceptor framework for clients (annotation based and generic), and add interceptors
for configurable logging, capturing requests and responses, and HTTP basic auth.
</action>
<action type="fix">
Transaction client invocations with XML encoding were using the wrong content type ("application/xml+fhir" instead
of the correct "application/atom+xml"). Thanks to David Hay of Orion Health for surfacing this one!
</action>
<action type="add">
Bundle entries now support a link type of "search". Thanks to David Hay for the suggestion!
</action>
<action type="add" issue="1">
If a client receives a non 2xx response (e.g. HTTP 500) and the response body is a text/plain message or
an OperationOutcome resource, include the message in the exception message so that it will be
more conveniently displayed in logs and other places. Thanks to Neal Acharya for the suggestion!
</action>
<action type="add" issue="2">
Read invocations in the client now process the "Content-Location" header and use it to
populate the ID of the returned resource. Thanks to Neal Acharya for the suggestion!
</action>
<action type="fix" issue="3">
Fix issue where vread invocations on server incorrectly get routed to instance history method if one is
defined. Thanks to Neal Acharya from UHN for surfacing this one!
</action>
<action type="add">
Binary reads on a server not include the Content-Disposition header, to prevent HTML in binary
blobs from being used for nefarious purposes. See
<![CDATA[<a href="http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_id=677&tracker_item_id=3298">FHIR Tracker Bug 3298</a>]]>
for more information.
</action>
<action type="add">
Support has been added for using an HTTP proxy for outgoing requests.
</action>
<action type="fix">
Fix: Primitive extensions declared against custom resource types
are encoded even if they have no value. Thanks to David Hay of Orion for
reporting this!
</action>
<action type="fix">
Fix: RESTful server deployed to a location where the URL to access it contained a
space (e.g. a WAR file with a space in the name) failed to work correctly.
Thanks to David Hay of Orion for reporting this!
</action>
</release>
<release version="0.4" date="2014-Jul-13">
<action type="add">
<![CDATA[<b>BREAKING CHANGE:</b>]]>: IdDt has been modified so that it
contains a partial or complete resource identity. Previously it contained
only the simple alphanumeric id of the resource (the part at the end of the "read" URL for
that resource) but it can now contain a complete URL or even a partial URL (e.g. "Patient/123")
and can optionally contain a version (e.g. "Patient/123/_history/456"). New methods have
been added to this datatype which provide just the numeric portion. See the JavaDoc
for more information.
</action>
<action type="add">
<![CDATA[<b>API CHANGE:</b>]]>: Most elements in the HAPI FHIR model contain
a getId() and setId() method. This method is confusing because it is only actually used
for IDREF elements (which are rare) but its name makes it easy to confuse with more
important identifiers. For this reason, these methods have been deprocated and replaced with
get/setElementSpecificId() methods. The old methods will be removed at some point. Resource
types are unchanged and retain their get/setId methods.
</action>
<action type="add">
Allow use of QuantityDt as a service parameter to support the "quantity" type. Previously
QuantityDt did not implement IQueryParameterType so it was not valid, and there was no way to
support quantity search parameters on the server (e.g. Observation.value-quantity)
</action>
<action type="add">
Introduce StringParameter type which can be used as a RESTful operation search parameter
type. StringParameter allows ":exact" matches to be specified in clients, and handled in servers.
</action>
<action type="add">
Parsers (XML/JSON) now support deleted entries in bundles
</action>
<action type="add">
Transaction method now supported in servers
</action>
<action type="add">
Support for Binary resources added (in servers, clients, parsers, etc.)
</action>
<action type="fix">
Support for Query resources fixed (in parser)
</action>
<action type="fix">
Nested contained resources (e.g. encoding a resource with a contained resource that itself contains a resource)
now parse and encode correctly, meaning that all contained resources are placed in the "contained" element
of the root resource, and the parser looks in the root resource for all container levels when stitching
contained resources back together.
</action>
<action type="fix">
Server methods with @Include parameter would sometimes fail when no _include was actually
specified in query strings.
</action>
<action type="fix">
Client requests for IdentifierDt types (such as Patient.identifier) did not create the correct
query string if the system is null.
</action>
<action type="add">
Add support for paging responses from RESTful servers.
</action>
<action type="fix">
Don't fail on narrative blocks in JSON resources with only an XML declaration but no content (these are
produced by the Health Intersections server)
</action>
<action type="fix">
Server now automatically compresses responses if the client indicates support
</action>
<action type="fix">
Server failed to support optional parameters when type is String and :exact qualifier is used
</action>
<action type="fix">
Read method in client correctly populated resource ID in returned object
</action>
<action type="add">
Support added for deleted-entry by/name, by/email, and comment from Tombstones spec
</action>
</release>
<release version="0.3" date="2014-May-12" description="This release corrects lots of bugs and introduces the fluent client mode">
</release>
</body>
</document>

View File

@ -1,367 +0,0 @@
<?xml version="1.0"?>
<document xmlns="http://maven.apache.org/changes/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 ./changes.xsd">
<properties>
<author>James Agnew</author>
<title>HAPI FHIR Changelog</title>
</properties>
<body>
<release version="0.7" date="TBD">
<action type="add" dev="suranga">
Documentation fixes
</action>
<action type="add" dev="dougmartin">
Add a collection of new methods on the generic client which support the
<![CDATA[
<b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#read(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">read</a></b>,
<b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#vread(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">read</a></b>,
and <b><a href="./apidocs/ca/uhn/fhir/rest/client/IGenericClient.html#search(java.lang.Class,%20ca.uhn.fhir.model.primitive.UriDt)">search</a></b>
]]>
operations using an absolute URL. This allows developers to perform these operations using
URLs they obtained from other sources (or external resource references within resources). In
addition, the existing read/vread operations will now access absolute URL references if
they are passed in. Thanks to Doug Martin of the Regenstrief Center for Biomedical Informatics
for contributing this implementation!
</action>
<action type="fix">
Server implementation was not correctly figuring out its own FHIR Base URL when deployed
on Amazon Web Service server. Thanks to Jeffrey Ting and Bill De Beaubien of
Systems Made Simple for their help in figuring out this issue!
</action>
<action type="fix">
XML Parser failed to encode fields with both a resource reference child and
a primitive type child. Thanks to Jeffrey Ting and Bill De Beaubien of
Systems Made Simple for their help in figuring out this issue!
</action>
<action type="fix">
HAPI now runs successfully on Servlet 2.5 containers (such as Tomcat 6). Thanks to
Bernard Gitaadji for reporting and diagnosing the issue!
</action>
<action type="fix">
Summary (in the bundle entry) is now encoded by the XML and JSON parsers if supplied. Thanks to David Hay of
Orion Health for reporting this!
</action>
<action type="fix" issue="24">
Conformance profiles which are automatically generated by the server were missing a few mandatory elements,
which meant that the profile did not correctly validate. Thanks to Bill de Beaubien of Systems Made Simple
for reporting this!
</action>
<action type="fix">
XHTML (in narratives) containing escapable characters (e.g. &lt; or &quot;) will now always have those characters
escaped properly in encoded messages.
</action>
<action type="fix">
Resources containing entities which are not valid in basic XML (e.g. &amp;sect;) will have those
entities converted to their equivalent unicode characters when resources are encoded, since FHIR does
not allow extended entities in resource instances.
</action>
<<<<<<< HEAD
<action type="add">
Add a new client interceptor which adds HTTP Authorization Bearer Tokens (for use with OAUTH2 servers)
to client requests.
</action>
=======
<action type="fix">
Add phloc-commons dependency explicitly, which resolves an issue building HAPI from source on
some platforms. Thanks to Odysseas Pentakalos for the patch!
</action>
<action type="add">
HAPI now logs a single line indicating the StAX implementation being used upon the
first time an XML parser is created.
</action>
>>>>>>> 4622af7a822ad80c864516369e1e941660a19194
</release>
<release version="0.6" date="2014-Sep-08" description="This release brings a number of new features and bug fixes!">
<!--
<action type="add">
Allow generic client ... OAUTH
</action>
-->
<action type="add">
Add server interceptor framework, and new interceptor for logging incoming
requests.
</action>
<action type="add">
Add server validation framework for validating resources against the FHIR schemas and schematrons
</action>
<action type="fix">
Tester UI created double _format and _pretty param entries in searches. Thanks to Gered King of University
Health Network for reporting!
</action>
<action type="fix" issue="4">
Create method was incorrectly returning an HTTP 204 on sucessful completion, but
should be returning an HTTP 200 per the FHIR specification. Thanks to wanghaisheng
for reporting!
</action>
<action type="fix">
FHIR Tester UI now correctly sends UTF-8 charset in responses so that message payloads containing
non US-ASCII characters will correctly display in the browser
</action>
<action type="fix">
JSON parser was incorrectly encoding extensions on composite elements outside the element itself
(as is done correctly for non-composite elements) instead of inside of them. Thanks to David Hay of
Orion for reporting this!
</action>
<action type="add">
Contained/included resource instances received by a client are now automatically
added to any ResourceReferenceDt instancea in other resources which reference them.
</action>
<action type="add">
Add documentation on how to use eBay CORS Filter to support Cross Origin Resource
Sharing (CORS) to server. CORS support that was built in to the server itself has
been removed, as it did not work correctly (and was reinventing a wheel that others
have done a great job inventing). Thanks to Peter Bernhardt of Relay Health for all the assistance
in testing this!
</action>
<action type="fix">
IResource interface did not expose the getLanguage/setLanguage methods from BaseResource,
so the resource language was difficult to access.
</action>
<action type="fix">
JSON Parser now gives a more friendly error message if it tries to parse JSON with invalid use
of single quotes
</action>
<action type="add">
Transaction server method is now allowed to return an OperationOutcome in addition to the
incoming resources. The public test server now does this in order to return status information
about the transaction processing.
</action>
<action type="add">
Update method in the server can now flag (via a field on the MethodOutcome object being returned)
that the result was actually a creation, and Create method can indicate that it was actually an
update. This has no effect other than to switch between the HTTP 200 and HTTP 201 status codes on the
response, but this may be useful in some circumstances.
</action>
<action type="fix">
Annotation client search methods with a specific resource type (e.g. List&lt;Patient&gt; search())
won't return any resources that aren't of the correct type that are received in a response
bundle (generally these are referenced resources, so they are populated in the reference fields instead).
Thanks to Tahura Chaudhry of University Health Network for the unit test!
</action>
<action type="add">
Added narrative generator template for OperationOutcome resource
</action>
<action type="fix">
Date/time types did not correctly parse values in the format "yyyymmdd" (although the FHIR-defined format
is "yyyy-mm-dd" anyhow, and this is correctly handled). Thanks to Jeffrey Ting of Systems Made Simple
for reporting!
</action>
<action type="fix">
Server search method for an unnamed query gets called if the client requests a named query
with the same parameter list. Thanks to Neal Acharya of University Health Network for reporting!
</action>
<action type="fix">
Category header (for tags) is correctly read in client for "read" operation
</action>
<action type="add">
Transaction method in server can now have parameter type Bundle instead of
List&lt;IResource&gt;
</action>
<action type="add">
HAPI parsers now use field access to get/set values instead of method accessors and mutators.
This should give a small performance boost.
</action>
<action type="fix">
JSON parser encodes resource references incorrectly, using the name "resource" instead
of the name "reference" for the actual reference. Thanks to
Ricky Nguyen for reporting and tracking down the issue!
</action>
<action type="fix">
Rename NotImpementedException to NotImplementedException (to correct typo)
</action>
<action type="fix">
Server setUseBrowserFriendlyContentType setting also respected for errors (e.g. OperationOutcome with 4xx/5xx status)
</action>
<action type="fix">
Fix performance issue in date/time datatypes where pattern matchers were not static
</action>
<action type="fix">
Server now gives a more helpful error message if a @Read method has a search parameter (which is invalid, but
previously lead to a very unhelpful error message). Thanks to Tahura Chaudhry of UHN for reporting!
</action>
<action type="fix">
Resource of type "List" failed to parse from a bundle correctly. Thanks to David Hay of Orion Health
for reporting!
</action>
<action type="fix">
QuantityParam correctly encodes approximate (~) prefix to values
</action>
<action type="fix" issue="14">
If a server defines a method with parameter "_id", incoming search requests for that method may
get delegated to the wrong method. Thanks to Neal Acharya for reporting!
</action>
<action type="add">
SecurityEvent.Object structural element has been renamed to
SecurityEvent.ObjectElement to avoid conflicting names with the
java Object class. Thanks to Laurie Macdougall-Sookraj of UHN for
reporting!
</action>
<action type="fix">
Text/narrative blocks that were created with a non-empty
namespace prefix (e.g. &lt;xhtml:div xmlns:xhtml="..."&gt;...&lt;/xhtml:div&gt;)
failed to encode correctly (prefix was missing in encoded resource)
</action>
<action type="fix">
Resource references previously encoded their children (display and reference)
in the wrong order so references with both would fail schema validation.
</action>
<action type="add">
SecurityEvent resource's enums now use friendly enum names instead of the unfriendly
numeric code values. Thanks to Laurie MacDougall-Sookraj of UHN for the
suggestion!
</action>
</release>
<release version="0.5" date="2014-Jul-30">
<action type="add">
HAPI has a number of RESTful method parameter types that have similar but not identical
purposes and confusing names. A cleanup has been undertaken to clean this up.
This means that a number of existing classes
have been deprocated in favour of new naming schemes.
<![CDATA[<br/><br/>]]>
All annotation-based clients and all server search method parameters are now named
(type)Param, for example: StringParam, TokenParam, etc.
<![CDATA[<br/><br/>]]>
All generic/fluent client method parameters are now named
(type)ClientParam, for example: StringClientParam, TokenClientParam, etc.
<![CDATA[<br/><br/>]]>
All renamed classes have been retained and deprocated, so this change should not cause any issues
for existing applications but those applications should be refactored to use the
new parameters when possible.
</action>
<action type="add">
Allow server methods to return wildcard generic types (e.g. List&lt;? extends IResource&gt;)
</action>
<action type="add">
Search parameters are not properly escaped and unescaped. E.g. for a token parameter such as
"&amp;identifier=system|codepart1\|codepart2"
</action>
<action type="add">
Add support for OPTIONS verb (which returns the server conformance statement)
</action>
<action type="add">
Add support for CORS headers in server
</action>
<action type="add">
Bump SLF4j dependency to latest version (1.7.7)
</action>
<action type="add">
Add interceptor framework for clients (annotation based and generic), and add interceptors
for configurable logging, capturing requests and responses, and HTTP basic auth.
</action>
<action type="fix">
Transaction client invocations with XML encoding were using the wrong content type ("application/xml+fhir" instead
of the correct "application/atom+xml"). Thanks to David Hay of Orion Health for surfacing this one!
</action>
<action type="add">
Bundle entries now support a link type of "search". Thanks to David Hay for the suggestion!
</action>
<action type="add" issue="1">
If a client receives a non 2xx response (e.g. HTTP 500) and the response body is a text/plain message or
an OperationOutcome resource, include the message in the exception message so that it will be
more conveniently displayed in logs and other places. Thanks to Neal Acharya for the suggestion!
</action>
<action type="add" issue="2">
Read invocations in the client now process the "Content-Location" header and use it to
populate the ID of the returned resource. Thanks to Neal Acharya for the suggestion!
</action>
<action type="fix" issue="3">
Fix issue where vread invocations on server incorrectly get routed to instance history method if one is
defined. Thanks to Neal Acharya from UHN for surfacing this one!
</action>
<action type="add">
Binary reads on a server not include the Content-Disposition header, to prevent HTML in binary
blobs from being used for nefarious purposes. See
<![CDATA[<a href="http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_id=677&tracker_item_id=3298">FHIR Tracker Bug 3298</a>]]>
for more information.
</action>
<action type="add">
Support has been added for using an HTTP proxy for outgoing requests.
</action>
<action type="fix">
Fix: Primitive extensions declared against custom resource types
are encoded even if they have no value. Thanks to David Hay of Orion for
reporting this!
</action>
<action type="fix">
Fix: RESTful server deployed to a location where the URL to access it contained a
space (e.g. a WAR file with a space in the name) failed to work correctly.
Thanks to David Hay of Orion for reporting this!
</action>
</release>
<release version="0.4" date="2014-Jul-13">
<action type="add">
<![CDATA[<b>BREAKING CHANGE:</b>]]>: IdDt has been modified so that it
contains a partial or complete resource identity. Previously it contained
only the simple alphanumeric id of the resource (the part at the end of the "read" URL for
that resource) but it can now contain a complete URL or even a partial URL (e.g. "Patient/123")
and can optionally contain a version (e.g. "Patient/123/_history/456"). New methods have
been added to this datatype which provide just the numeric portion. See the JavaDoc
for more information.
</action>
<action type="add">
<![CDATA[<b>API CHANGE:</b>]]>: Most elements in the HAPI FHIR model contain
a getId() and setId() method. This method is confusing because it is only actually used
for IDREF elements (which are rare) but its name makes it easy to confuse with more
important identifiers. For this reason, these methods have been deprocated and replaced with
get/setElementSpecificId() methods. The old methods will be removed at some point. Resource
types are unchanged and retain their get/setId methods.
</action>
<action type="add">
Allow use of QuantityDt as a service parameter to support the "quantity" type. Previously
QuantityDt did not implement IQueryParameterType so it was not valid, and there was no way to
support quantity search parameters on the server (e.g. Observation.value-quantity)
</action>
<action type="add">
Introduce StringParameter type which can be used as a RESTful operation search parameter
type. StringParameter allows ":exact" matches to be specified in clients, and handled in servers.
</action>
<action type="add">
Parsers (XML/JSON) now support deleted entries in bundles
</action>
<action type="add">
Transaction method now supported in servers
</action>
<action type="add">
Support for Binary resources added (in servers, clients, parsers, etc.)
</action>
<action type="fix">
Support for Query resources fixed (in parser)
</action>
<action type="fix">
Nested contained resources (e.g. encoding a resource with a contained resource that itself contains a resource)
now parse and encode correctly, meaning that all contained resources are placed in the "contained" element
of the root resource, and the parser looks in the root resource for all container levels when stitching
contained resources back together.
</action>
<action type="fix">
Server methods with @Include parameter would sometimes fail when no _include was actually
specified in query strings.
</action>
<action type="fix">
Client requests for IdentifierDt types (such as Patient.identifier) did not create the correct
query string if the system is null.
</action>
<action type="add">
Add support for paging responses from RESTful servers.
</action>
<action type="fix">
Don't fail on narrative blocks in JSON resources with only an XML declaration but no content (these are
produced by the Health Intersections server)
</action>
<action type="fix">
Server now automatically compresses responses if the client indicates support
</action>
<action type="fix">
Server failed to support optional parameters when type is String and :exact qualifier is used
</action>
<action type="fix">
Read method in client correctly populated resource ID in returned object
</action>
<action type="add">
Support added for deleted-entry by/name, by/email, and comment from Tombstones spec
</action>
</release>
<release version="0.3" date="2014-May-12" description="This release corrects lots of bugs and introduces the fluent client mode">
</release>
</body>
</document>

View File

@ -1,263 +0,0 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://maven.apache.org/changes/1.0.0" targetNamespace="http://maven.apache.org/changes/1.0.0">
<xs:element name="document" type="ChangesDocument">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Record every release with their subsequent changes.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ChangesDocument">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Record every release with their subsequent changes.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element minOccurs="0" name="properties" type="Properties">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Contains the properties of this document.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="body" type="Body">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Contains the releases of this project with the actions taken
for each of the releases.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="Body">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="release" type="Release" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">The list of releases for this project.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Release">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">A single release of this project.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="action" type="Action" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">The list of actions taken for this release.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The version number associated with this release.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="date" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
&lt;p&gt;The date of this release.&lt;/p&gt;
&lt;p&gt;This field can be any String, such as &quot;in SVN&quot; when the version isn&apos;t yet released. &lt;/p&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A short description of this release.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Action" mixed="true">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A single action done on the project, during this release.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="fixes" type="FixedIssue" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">A list of fix issues.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="dueto" type="DueTo" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">A list of contibutors for this issue.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="dev" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
&lt;p&gt;Name of developer who committed the change.&lt;/p&gt;
&lt;p&gt;This &lt;b&gt;MUST&lt;/b&gt; be the name of the developer as described in the developers section of the pom.xml file.&lt;/p&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="due-to" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Name of the person to be credited for this change. This can be used when a patch is submitted by a non-committer.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="due-to-email" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Email of the person to be credited for this change.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="issue" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
&lt;p&gt;Id of the issue related to this change. This is the id in your issue tracking system.&lt;/p&gt;
&lt;p&gt;The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplate parameter.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&quot;changes-report.html&quot;&gt;changes-report mojo&lt;/a&gt; for more details.&lt;/p&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Supported action types are the following:
&lt;ul&gt;
&lt;li&gt;add : added functionnality to the project.&lt;/li&gt;
&lt;li&gt;fix : bug fix for the project.&lt;/li&gt;
&lt;li&gt;update : updated some part of the project.&lt;/li&gt;
&lt;li&gt;remove : removed some functionnality from the project.&lt;/li&gt;
&lt;/ul&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="system" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
&lt;p&gt;Id of issue tracking system. If empty &apos;default&apos; value will be use.&lt;/p&gt;
&lt;p&gt;The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplatePerSystem parameter.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&quot;changes-report.html&quot;&gt;changes-report mojo&lt;/a&gt; for more details.&lt;/p&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="date" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">fix date</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="FixedIssue">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A fixed issue.
</xs:documentation>
</xs:annotation>
<xs:attribute name="issue" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
&lt;p&gt;Id of the issue related to this change. This is the id in your issue tracking system.&lt;/p&gt;
&lt;p&gt;The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplate parameter.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&quot;changes-report.html&quot;&gt;changes-report mojo&lt;/a&gt; for more details.&lt;/p&gt;
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="DueTo">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Name and Email of the person to be credited for this change. This can be used when a patch is submitted by a non-committer.
</xs:documentation>
</xs:annotation>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">Name of the person to be credited for this change.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="email" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">Email of the person to be credited for this change.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Properties">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element minOccurs="0" name="title" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">Page Title.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="author" type="Author">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">Page Author</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="Author" mixed="true">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A description of the author page.
</xs:documentation>
</xs:annotation>
<xs:all/>
<xs:attribute name="email" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The page author email.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>

View File

@ -1,521 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>AddressDt</b> Datatype
* (A postal address)
*
* <p>
* <b>Definition:</b>
* There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to be able to record postal addresses, along with notes about their use
* </p>
*/
@DatatypeDef(name="AddressDt")
public class AddressDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public AddressDt() {
// nothing
}
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="home | work | temp | old - purpose of this address",
formalDefinition="The purpose of this address"
)
private BoundCodeDt<AddressUseEnum> myUse;
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Text representation of the address",
formalDefinition="A full text representation of the address"
)
private StringDt myText;
@Child(name="line", type=StringDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Street name, number, direction & P.O. Box etc",
formalDefinition="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information"
)
private java.util.List<StringDt> myLine;
@Child(name="city", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Name of city, town etc.",
formalDefinition="The name of the city, town, village or other community or delivery center."
)
private StringDt myCity;
@Child(name="state", type=StringDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Sub-unit of country (abreviations ok)",
formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)."
)
private StringDt myState;
@Child(name="zip", type=StringDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Postal code for area",
formalDefinition="A postal code designating a region defined by the postal service."
)
private StringDt myZip;
@Child(name="country", type=StringDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Country (can be ISO 3166 3 letter code)",
formalDefinition="Country - a nation as commonly understood or generally accepted"
)
private StringDt myCountry;
@Child(name="period", type=PeriodDt.class, order=7, min=0, max=1)
@Description(
shortDefinition="Time period when address was/is in use",
formalDefinition="Time period when address was/is in use"
)
private PeriodDt myPeriod;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myLine, myCity, myState, myZip, myCountry, myPeriod);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myLine, myCity, myState, myZip, myCountry, myPeriod);
}
/**
* Gets the value(s) for <b>use</b> (home | work | temp | old - purpose of this address).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The purpose of this address
* </p>
*/
public BoundCodeDt<AddressUseEnum> getUse() {
if (myUse == null) {
myUse = new BoundCodeDt<AddressUseEnum>(AddressUseEnum.VALUESET_BINDER);
}
return myUse;
}
/**
* Sets the value(s) for <b>use</b> (home | work | temp | old - purpose of this address)
*
* <p>
* <b>Definition:</b>
* The purpose of this address
* </p>
*/
public AddressDt setUse(BoundCodeDt<AddressUseEnum> theValue) {
myUse = theValue;
return this;
}
/**
* Sets the value(s) for <b>use</b> (home | work | temp | old - purpose of this address)
*
* <p>
* <b>Definition:</b>
* The purpose of this address
* </p>
*/
public AddressDt setUse(AddressUseEnum theValue) {
getUse().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>text</b> (Text representation of the address).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A full text representation of the address
* </p>
*/
public StringDt getText() {
if (myText == null) {
myText = new StringDt();
}
return myText;
}
/**
* Sets the value(s) for <b>text</b> (Text representation of the address)
*
* <p>
* <b>Definition:</b>
* A full text representation of the address
* </p>
*/
public AddressDt setText(StringDt theValue) {
myText = theValue;
return this;
}
/**
* Sets the value for <b>text</b> (Text representation of the address)
*
* <p>
* <b>Definition:</b>
* A full text representation of the address
* </p>
*/
public AddressDt setText( String theString) {
myText = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
* </p>
*/
public java.util.List<StringDt> getLine() {
if (myLine == null) {
myLine = new java.util.ArrayList<StringDt>();
}
return myLine;
}
/**
* Sets the value(s) for <b>line</b> (Street name, number, direction & P.O. Box etc)
*
* <p>
* <b>Definition:</b>
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
* </p>
*/
public AddressDt setLine(java.util.List<StringDt> theValue) {
myLine = theValue;
return this;
}
/**
* Adds and returns a new value for <b>line</b> (Street name, number, direction & P.O. Box etc)
*
* <p>
* <b>Definition:</b>
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
* </p>
*/
public StringDt addLine() {
StringDt newType = new StringDt();
getLine().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>line</b> (Street name, number, direction & P.O. Box etc),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
* </p>
*/
public StringDt getLineFirstRep() {
if (getLine().isEmpty()) {
return addLine();
}
return getLine().get(0);
}
/**
* Adds a new value for <b>line</b> (Street name, number, direction & P.O. Box etc)
*
* <p>
* <b>Definition:</b>
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public AddressDt addLine( String theString) {
if (myLine == null) {
myLine = new java.util.ArrayList<StringDt>();
}
myLine.add(new StringDt(theString));
return this;
}
/**
* Gets the value(s) for <b>city</b> (Name of city, town etc.).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The name of the city, town, village or other community or delivery center.
* </p>
*/
public StringDt getCity() {
if (myCity == null) {
myCity = new StringDt();
}
return myCity;
}
/**
* Sets the value(s) for <b>city</b> (Name of city, town etc.)
*
* <p>
* <b>Definition:</b>
* The name of the city, town, village or other community or delivery center.
* </p>
*/
public AddressDt setCity(StringDt theValue) {
myCity = theValue;
return this;
}
/**
* Sets the value for <b>city</b> (Name of city, town etc.)
*
* <p>
* <b>Definition:</b>
* The name of the city, town, village or other community or delivery center.
* </p>
*/
public AddressDt setCity( String theString) {
myCity = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>state</b> (Sub-unit of country (abreviations ok)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
* </p>
*/
public StringDt getState() {
if (myState == null) {
myState = new StringDt();
}
return myState;
}
/**
* Sets the value(s) for <b>state</b> (Sub-unit of country (abreviations ok))
*
* <p>
* <b>Definition:</b>
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
* </p>
*/
public AddressDt setState(StringDt theValue) {
myState = theValue;
return this;
}
/**
* Sets the value for <b>state</b> (Sub-unit of country (abreviations ok))
*
* <p>
* <b>Definition:</b>
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
* </p>
*/
public AddressDt setState( String theString) {
myState = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>zip</b> (Postal code for area).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A postal code designating a region defined by the postal service.
* </p>
*/
public StringDt getZip() {
if (myZip == null) {
myZip = new StringDt();
}
return myZip;
}
/**
* Sets the value(s) for <b>zip</b> (Postal code for area)
*
* <p>
* <b>Definition:</b>
* A postal code designating a region defined by the postal service.
* </p>
*/
public AddressDt setZip(StringDt theValue) {
myZip = theValue;
return this;
}
/**
* Sets the value for <b>zip</b> (Postal code for area)
*
* <p>
* <b>Definition:</b>
* A postal code designating a region defined by the postal service.
* </p>
*/
public AddressDt setZip( String theString) {
myZip = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>country</b> (Country (can be ISO 3166 3 letter code)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Country - a nation as commonly understood or generally accepted
* </p>
*/
public StringDt getCountry() {
if (myCountry == null) {
myCountry = new StringDt();
}
return myCountry;
}
/**
* Sets the value(s) for <b>country</b> (Country (can be ISO 3166 3 letter code))
*
* <p>
* <b>Definition:</b>
* Country - a nation as commonly understood or generally accepted
* </p>
*/
public AddressDt setCountry(StringDt theValue) {
myCountry = theValue;
return this;
}
/**
* Sets the value for <b>country</b> (Country (can be ISO 3166 3 letter code))
*
* <p>
* <b>Definition:</b>
* Country - a nation as commonly understood or generally accepted
* </p>
*/
public AddressDt setCountry( String theString) {
myCountry = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>period</b> (Time period when address was/is in use).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Time period when address was/is in use
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Time period when address was/is in use)
*
* <p>
* <b>Definition:</b>
* Time period when address was/is in use
* </p>
*/
public AddressDt setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
}

View File

@ -1,30 +0,0 @@
package ca.uhn.fhir.model.dstu.composite;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
/*
* #%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%
*/
@DatatypeDef(name="AgeDt")
public class AgeDt extends QuantityDt {
// TODO: implement restricions
}

View File

@ -1,450 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
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;
/**
* HAPI/FHIR <b>AttachmentDt</b> Datatype
* (Content in a format defined elsewhere)
*
* <p>
* <b>Definition:</b>
* For referring to data content defined in other formats.
* </p>
*
* <p>
* <b>Requirements:</b>
* Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc.
* </p>
*/
@DatatypeDef(name="AttachmentDt")
public class AttachmentDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public AttachmentDt() {
// nothing
}
@Child(name="contentType", type=CodeDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Mime type of the content, with charset etc.",
formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate"
)
private CodeDt myContentType;
@Child(name="language", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Human language of the content (BCP-47)",
formalDefinition="The human language of the content. The value can be any valid value according to BCP 47"
)
private CodeDt myLanguage;
@Child(name="data", type=Base64BinaryDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Data inline, base64ed",
formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64"
)
private Base64BinaryDt myData;
@Child(name="url", type=UriDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Uri where the data can be found",
formalDefinition="An alternative location where the data can be accessed"
)
private UriDt myUrl;
@Child(name="size", type=IntegerDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Number of bytes of content (if url provided)",
formalDefinition="The number of bytes of data that make up this attachment."
)
private IntegerDt mySize;
@Child(name="hash", type=Base64BinaryDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="Hash of the data (sha-1, base64ed )",
formalDefinition="The calculated hash of the data using SHA-1. Represented using base64"
)
private Base64BinaryDt myHash;
@Child(name="title", type=StringDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Label to display in place of the data",
formalDefinition="A label or set of text to display in place of the data"
)
private StringDt myTitle;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle);
}
/**
* Gets the value(s) for <b>contentType</b> (Mime type of the content, with charset etc.).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate
* </p>
*/
public CodeDt getContentType() {
if (myContentType == null) {
myContentType = new CodeDt();
}
return myContentType;
}
/**
* Sets the value(s) for <b>contentType</b> (Mime type of the content, with charset etc.)
*
* <p>
* <b>Definition:</b>
* Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate
* </p>
*/
public AttachmentDt setContentType(CodeDt theValue) {
myContentType = theValue;
return this;
}
/**
* Sets the value for <b>contentType</b> (Mime type of the content, with charset etc.)
*
* <p>
* <b>Definition:</b>
* Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate
* </p>
*/
public AttachmentDt setContentType( String theCode) {
myContentType = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>language</b> (Human language of the content (BCP-47)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The human language of the content. The value can be any valid value according to BCP 47
* </p>
*/
public CodeDt getLanguage() {
if (myLanguage == null) {
myLanguage = new CodeDt();
}
return myLanguage;
}
/**
* Sets the value(s) for <b>language</b> (Human language of the content (BCP-47))
*
* <p>
* <b>Definition:</b>
* The human language of the content. The value can be any valid value according to BCP 47
* </p>
*/
public AttachmentDt setLanguage(CodeDt theValue) {
myLanguage = theValue;
return this;
}
/**
* Sets the value for <b>language</b> (Human language of the content (BCP-47))
*
* <p>
* <b>Definition:</b>
* The human language of the content. The value can be any valid value according to BCP 47
* </p>
*/
public AttachmentDt setLanguage( String theCode) {
myLanguage = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>data</b> (Data inline, base64ed).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
* </p>
*/
public Base64BinaryDt getData() {
if (myData == null) {
myData = new Base64BinaryDt();
}
return myData;
}
/**
* Sets the value(s) for <b>data</b> (Data inline, base64ed)
*
* <p>
* <b>Definition:</b>
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
* </p>
*/
public AttachmentDt setData(Base64BinaryDt theValue) {
myData = theValue;
return this;
}
/**
* Sets the value for <b>data</b> (Data inline, base64ed)
*
* <p>
* <b>Definition:</b>
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64
* </p>
*/
public AttachmentDt setData( byte[] theBytes) {
myData = new Base64BinaryDt(theBytes);
return this;
}
/**
* Gets the value(s) for <b>url</b> (Uri where the data can be found).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* An alternative location where the data can be accessed
* </p>
*/
public UriDt getUrl() {
if (myUrl == null) {
myUrl = new UriDt();
}
return myUrl;
}
/**
* Sets the value(s) for <b>url</b> (Uri where the data can be found)
*
* <p>
* <b>Definition:</b>
* An alternative location where the data can be accessed
* </p>
*/
public AttachmentDt setUrl(UriDt theValue) {
myUrl = theValue;
return this;
}
/**
* Sets the value for <b>url</b> (Uri where the data can be found)
*
* <p>
* <b>Definition:</b>
* An alternative location where the data can be accessed
* </p>
*/
public AttachmentDt setUrl( String theUri) {
myUrl = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>size</b> (Number of bytes of content (if url provided)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The number of bytes of data that make up this attachment.
* </p>
*/
public IntegerDt getSize() {
if (mySize == null) {
mySize = new IntegerDt();
}
return mySize;
}
/**
* Sets the value(s) for <b>size</b> (Number of bytes of content (if url provided))
*
* <p>
* <b>Definition:</b>
* The number of bytes of data that make up this attachment.
* </p>
*/
public AttachmentDt setSize(IntegerDt theValue) {
mySize = theValue;
return this;
}
/**
* Sets the value for <b>size</b> (Number of bytes of content (if url provided))
*
* <p>
* <b>Definition:</b>
* The number of bytes of data that make up this attachment.
* </p>
*/
public AttachmentDt setSize( int theInteger) {
mySize = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>hash</b> (Hash of the data (sha-1, base64ed )).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The calculated hash of the data using SHA-1. Represented using base64
* </p>
*/
public Base64BinaryDt getHash() {
if (myHash == null) {
myHash = new Base64BinaryDt();
}
return myHash;
}
/**
* Sets the value(s) for <b>hash</b> (Hash of the data (sha-1, base64ed ))
*
* <p>
* <b>Definition:</b>
* The calculated hash of the data using SHA-1. Represented using base64
* </p>
*/
public AttachmentDt setHash(Base64BinaryDt theValue) {
myHash = theValue;
return this;
}
/**
* Sets the value for <b>hash</b> (Hash of the data (sha-1, base64ed ))
*
* <p>
* <b>Definition:</b>
* The calculated hash of the data using SHA-1. Represented using base64
* </p>
*/
public AttachmentDt setHash( byte[] theBytes) {
myHash = new Base64BinaryDt(theBytes);
return this;
}
/**
* Gets the value(s) for <b>title</b> (Label to display in place of the data).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A label or set of text to display in place of the data
* </p>
*/
public StringDt getTitle() {
if (myTitle == null) {
myTitle = new StringDt();
}
return myTitle;
}
/**
* Sets the value(s) for <b>title</b> (Label to display in place of the data)
*
* <p>
* <b>Definition:</b>
* A label or set of text to display in place of the data
* </p>
*/
public AttachmentDt setTitle(StringDt theValue) {
myTitle = theValue;
return this;
}
/**
* Sets the value for <b>title</b> (Label to display in place of the data)
*
* <p>
* <b>Definition:</b>
* A label or set of text to display in place of the data
* </p>
*/
public AttachmentDt setTitle( String theString) {
myTitle = new StringDt(theString);
return this;
}
}

View File

@ -1,214 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>CodeableConceptDt</b> Datatype
* (Concept - reference to a terminology or just text)
*
* <p>
* <b>Definition:</b>
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text
* </p>
*
* <p>
* <b>Requirements:</b>
* This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept
* </p>
*/
@DatatypeDef(name="CodeableConceptDt")
public class CodeableConceptDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public CodeableConceptDt() {
// nothing
}
/**
* Constructor which creates a CodeableConceptDt with one coding repetition, containing
* the given system and code
*/
public CodeableConceptDt(String theSystem, String theCode) {
addCoding().setSystem(theSystem).setCode(theCode);
}
@Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Code defined by a terminology system",
formalDefinition="A reference to a code defined by a terminology system"
)
private java.util.List<CodingDt> myCoding;
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Plain text representation of the concept",
formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user"
)
private StringDt myText;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCoding, myText);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCoding, myText);
}
/**
* Gets the value(s) for <b>coding</b> (Code defined by a terminology system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A reference to a code defined by a terminology system
* </p>
*/
public java.util.List<CodingDt> getCoding() {
if (myCoding == null) {
myCoding = new java.util.ArrayList<CodingDt>();
}
return myCoding;
}
/**
* Sets the value(s) for <b>coding</b> (Code defined by a terminology system)
*
* <p>
* <b>Definition:</b>
* A reference to a code defined by a terminology system
* </p>
*/
public CodeableConceptDt setCoding(java.util.List<CodingDt> theValue) {
myCoding = theValue;
return this;
}
/**
* Adds and returns a new value for <b>coding</b> (Code defined by a terminology system)
*
* <p>
* <b>Definition:</b>
* A reference to a code defined by a terminology system
* </p>
*/
public CodingDt addCoding() {
CodingDt newType = new CodingDt();
getCoding().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>coding</b> (Code defined by a terminology system),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* A reference to a code defined by a terminology system
* </p>
*/
public CodingDt getCodingFirstRep() {
if (getCoding().isEmpty()) {
return addCoding();
}
return getCoding().get(0);
}
/**
* Gets the value(s) for <b>text</b> (Plain text representation of the concept).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user
* </p>
*/
public StringDt getText() {
if (myText == null) {
myText = new StringDt();
}
return myText;
}
/**
* Sets the value(s) for <b>text</b> (Plain text representation of the concept)
*
* <p>
* <b>Definition:</b>
* A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user
* </p>
*/
public CodeableConceptDt setText(StringDt theValue) {
myText = theValue;
return this;
}
/**
* Sets the value for <b>text</b> (Plain text representation of the concept)
*
* <p>
* <b>Definition:</b>
* A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user
* </p>
*/
public CodeableConceptDt setText( String theString) {
myText = new StringDt(theString);
return this;
}
}

View File

@ -1,393 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.base.composite.BaseCodingDt;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
/**
* HAPI/FHIR <b>CodingDt</b> Datatype
* (A reference to a code defined by a terminology system)
*
* <p>
* <b>Definition:</b>
* A reference to a code defined by a terminology system
* </p>
*
* <p>
* <b>Requirements:</b>
* References to codes are very common in healthcare models
* </p>
*/
@DatatypeDef(name="CodingDt")
public class CodingDt
extends BaseCodingDt implements ICompositeDatatype
{
/**
* Constructor
*/
public CodingDt() {
// nothing
}
/**
* Creates a new Coding with the given system and code
*/
public CodingDt(String theSystem, String theCode) {
setSystem(theSystem);
setCode(theCode);
}
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Identity of the terminology system",
formalDefinition="The identification of the code system that defines the meaning of the symbol in the code."
)
private UriDt mySystem;
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Version of the system - if relevant",
formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged"
)
private StringDt myVersion;
@Child(name="code", type=CodeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Symbol in syntax defined by the system",
formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)"
)
private CodeDt myCode;
@Child(name="display", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Representation defined by the system",
formalDefinition="A representation of the meaning of the code in the system, following the rules of the system."
)
private StringDt myDisplay;
@Child(name="primary", type=BooleanDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="If this code was chosen directly by the user",
formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)"
)
private BooleanDt myPrimary;
@Child(name="valueSet", order=5, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.ValueSet.class })
@Description(
shortDefinition="Set this coding was chosen from",
formalDefinition="The set of possible coded values this coding was chosen from or constrained by"
)
private ResourceReferenceDt myValueSet;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet);
}
/**
* Gets the value(s) for <b>system</b> (Identity of the terminology system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The identification of the code system that defines the meaning of the symbol in the code.
* </p>
*/
public UriDt getSystem() {
if (mySystem == null) {
mySystem = new UriDt();
}
return mySystem;
}
/**
* Sets the value(s) for <b>system</b> (Identity of the terminology system)
*
* <p>
* <b>Definition:</b>
* The identification of the code system that defines the meaning of the symbol in the code.
* </p>
*/
public CodingDt setSystem(UriDt theValue) {
mySystem = theValue;
return this;
}
/**
* Sets the value for <b>system</b> (Identity of the terminology system)
*
* <p>
* <b>Definition:</b>
* The identification of the code system that defines the meaning of the symbol in the code.
* </p>
*/
public CodingDt setSystem( String theUri) {
mySystem = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>version</b> (Version of the system - if relevant).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
* </p>
*/
public StringDt getVersion() {
if (myVersion == null) {
myVersion = new StringDt();
}
return myVersion;
}
/**
* Sets the value(s) for <b>version</b> (Version of the system - if relevant)
*
* <p>
* <b>Definition:</b>
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
* </p>
*/
public CodingDt setVersion(StringDt theValue) {
myVersion = theValue;
return this;
}
/**
* Sets the value for <b>version</b> (Version of the system - if relevant)
*
* <p>
* <b>Definition:</b>
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
* </p>
*/
public CodingDt setVersion( String theString) {
myVersion = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>code</b> (Symbol in syntax defined by the system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
* </p>
*/
public CodeDt getCode() {
if (myCode == null) {
myCode = new CodeDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Symbol in syntax defined by the system)
*
* <p>
* <b>Definition:</b>
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
* </p>
*/
public CodingDt setCode(CodeDt theValue) {
myCode = theValue;
return this;
}
/**
* Sets the value for <b>code</b> (Symbol in syntax defined by the system)
*
* <p>
* <b>Definition:</b>
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
* </p>
*/
public CodingDt setCode( String theCode) {
myCode = new CodeDt(theCode);
return this;
}
/**
* Gets the value(s) for <b>display</b> (Representation defined by the system).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A representation of the meaning of the code in the system, following the rules of the system.
* </p>
*/
public StringDt getDisplay() {
if (myDisplay == null) {
myDisplay = new StringDt();
}
return myDisplay;
}
/**
* Sets the value(s) for <b>display</b> (Representation defined by the system)
*
* <p>
* <b>Definition:</b>
* A representation of the meaning of the code in the system, following the rules of the system.
* </p>
*/
public CodingDt setDisplay(StringDt theValue) {
myDisplay = theValue;
return this;
}
/**
* Sets the value for <b>display</b> (Representation defined by the system)
*
* <p>
* <b>Definition:</b>
* A representation of the meaning of the code in the system, following the rules of the system.
* </p>
*/
public CodingDt setDisplay( String theString) {
myDisplay = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>primary</b> (If this code was chosen directly by the user).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
* </p>
*/
public BooleanDt getPrimary() {
if (myPrimary == null) {
myPrimary = new BooleanDt();
}
return myPrimary;
}
/**
* Sets the value(s) for <b>primary</b> (If this code was chosen directly by the user)
*
* <p>
* <b>Definition:</b>
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
* </p>
*/
public CodingDt setPrimary(BooleanDt theValue) {
myPrimary = theValue;
return this;
}
/**
* Sets the value for <b>primary</b> (If this code was chosen directly by the user)
*
* <p>
* <b>Definition:</b>
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
* </p>
*/
public CodingDt setPrimary( boolean theBoolean) {
myPrimary = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for <b>valueSet</b> (Set this coding was chosen from).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The set of possible coded values this coding was chosen from or constrained by
* </p>
*/
public ResourceReferenceDt getValueSet() {
if (myValueSet == null) {
myValueSet = new ResourceReferenceDt();
}
return myValueSet;
}
/**
* Sets the value(s) for <b>valueSet</b> (Set this coding was chosen from)
*
* <p>
* <b>Definition:</b>
* The set of possible coded values this coding was chosen from or constrained by
* </p>
*/
public CodingDt setValueSet(ResourceReferenceDt theValue) {
myValueSet = theValue;
return this;
}
}

View File

@ -1,301 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>ContactDt</b> Datatype
* (Technology mediated contact details (phone, fax, email, etc))
*
* <p>
* <b>Definition:</b>
* All kinds of technology mediated contact details for a person or organization, including telephone, email, etc.
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc.
* </p>
*/
@DatatypeDef(name="ContactDt")
public class ContactDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public ContactDt() {
// nothing
}
/**
* Constructor
*/
@SimpleSetter
public ContactDt(@SimpleSetter.Parameter(name="theValue") String theValue) {
setValue(theValue);
}
/**
* Constructor
*/
@SimpleSetter
public ContactDt(@SimpleSetter.Parameter(name="theContactUse") ContactUseEnum theContactUse, @SimpleSetter.Parameter(name="theValue") String theValue) {
setUse(theContactUse);
setValue(theValue);
}
@Child(name="system", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="phone | fax | email | url",
formalDefinition="Telecommunications form for contact - what communications system is required to make use of the contact"
)
private BoundCodeDt<ContactSystemEnum> mySystem;
@Child(name="value", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="The actual contact details",
formalDefinition="The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."
)
private StringDt myValue;
@Child(name="use", type=CodeDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="home | work | temp | old | mobile - purpose of this address",
formalDefinition="Identifies the purpose for the address"
)
private BoundCodeDt<ContactUseEnum> myUse;
@Child(name="period", type=PeriodDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Time period when the contact was/is in use",
formalDefinition="Time period when the contact was/is in use"
)
private PeriodDt myPeriod;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myValue, myUse, myPeriod);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myValue, myUse, myPeriod);
}
/**
* Gets the value(s) for <b>system</b> (phone | fax | email | url).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Telecommunications form for contact - what communications system is required to make use of the contact
* </p>
*/
public BoundCodeDt<ContactSystemEnum> getSystem() {
if (mySystem == null) {
mySystem = new BoundCodeDt<ContactSystemEnum>(ContactSystemEnum.VALUESET_BINDER);
}
return mySystem;
}
/**
* Sets the value(s) for <b>system</b> (phone | fax | email | url)
*
* <p>
* <b>Definition:</b>
* Telecommunications form for contact - what communications system is required to make use of the contact
* </p>
*/
public ContactDt setSystem(BoundCodeDt<ContactSystemEnum> theValue) {
mySystem = theValue;
return this;
}
/**
* Sets the value(s) for <b>system</b> (phone | fax | email | url)
*
* <p>
* <b>Definition:</b>
* Telecommunications form for contact - what communications system is required to make use of the contact
* </p>
*/
public ContactDt setSystem(ContactSystemEnum theValue) {
getSystem().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>value</b> (The actual contact details).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
* </p>
*/
public StringDt getValue() {
if (myValue == null) {
myValue = new StringDt();
}
return myValue;
}
/**
* Sets the value(s) for <b>value</b> (The actual contact details)
*
* <p>
* <b>Definition:</b>
* The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
* </p>
*/
public ContactDt setValue(StringDt theValue) {
myValue = theValue;
return this;
}
/**
* Sets the value for <b>value</b> (The actual contact details)
*
* <p>
* <b>Definition:</b>
* The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
* </p>
*/
public ContactDt setValue( String theString) {
myValue = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>use</b> (home | work | temp | old | mobile - purpose of this address).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for the address
* </p>
*/
public BoundCodeDt<ContactUseEnum> getUse() {
if (myUse == null) {
myUse = new BoundCodeDt<ContactUseEnum>(ContactUseEnum.VALUESET_BINDER);
}
return myUse;
}
/**
* Sets the value(s) for <b>use</b> (home | work | temp | old | mobile - purpose of this address)
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for the address
* </p>
*/
public ContactDt setUse(BoundCodeDt<ContactUseEnum> theValue) {
myUse = theValue;
return this;
}
/**
* Sets the value(s) for <b>use</b> (home | work | temp | old | mobile - purpose of this address)
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for the address
* </p>
*/
public ContactDt setUse(ContactUseEnum theValue) {
getUse().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>period</b> (Time period when the contact was/is in use).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Time period when the contact was/is in use
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Time period when the contact was/is in use)
*
* <p>
* <b>Definition:</b>
* Time period when the contact was/is in use
* </p>
*/
public ContactDt setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
}

View File

@ -1,33 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
@DatatypeDef(name = "Duration")
public class DurationDt extends QuantityDt {
// TODO: implement restricions
// There SHALL be a code if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM.
// (f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')
}

View File

@ -1,572 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.base.composite.BaseHumanNameDt;
import ca.uhn.fhir.model.dstu.valueset.NameUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>HumanNameDt</b> Datatype
* (Name of a human - parts and usage)
*
* <p>
* <b>Definition:</b>
* A human's name with the ability to identify parts and usage
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to be able to record names, along with notes about their use
* </p>
*/
@DatatypeDef(name="HumanNameDt")
public class HumanNameDt
extends BaseHumanNameDt implements ICompositeDatatype
{
/**
* Constructor
*/
public HumanNameDt() {
// nothing
}
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="usual | official | temp | nickname | anonymous | old | maiden",
formalDefinition="Identifies the purpose for this name"
)
private BoundCodeDt<NameUseEnum> myUse;
@Child(name="text", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Text representation of the full name",
formalDefinition="A full text representation of the name"
)
private StringDt myText;
@Child(name="family", type=StringDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Family name (often called 'Surname')",
formalDefinition="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."
)
private java.util.List<StringDt> myFamily;
@Child(name="given", type=StringDt.class, order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Given names (not always 'first'). Includes middle names",
formalDefinition="Given name"
)
private java.util.List<StringDt> myGiven;
@Child(name="prefix", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Parts that come before the name",
formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name"
)
private java.util.List<StringDt> myPrefix;
@Child(name="suffix", type=StringDt.class, order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="Parts that come after the name",
formalDefinition="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name"
)
private java.util.List<StringDt> mySuffix;
@Child(name="period", type=PeriodDt.class, order=6, min=0, max=1)
@Description(
shortDefinition="Time period when name was/is in use",
formalDefinition="Indicates the period of time when this name was valid for the named person."
)
private PeriodDt myPeriod;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myText, myFamily, myGiven, myPrefix, mySuffix, myPeriod);
}
/**
* Gets the value(s) for <b>use</b> (usual | official | temp | nickname | anonymous | old | maiden).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for this name
* </p>
*/
public BoundCodeDt<NameUseEnum> getUse() {
if (myUse == null) {
myUse = new BoundCodeDt<NameUseEnum>(NameUseEnum.VALUESET_BINDER);
}
return myUse;
}
/**
* Sets the value(s) for <b>use</b> (usual | official | temp | nickname | anonymous | old | maiden)
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for this name
* </p>
*/
public HumanNameDt setUse(BoundCodeDt<NameUseEnum> theValue) {
myUse = theValue;
return this;
}
/**
* Sets the value(s) for <b>use</b> (usual | official | temp | nickname | anonymous | old | maiden)
*
* <p>
* <b>Definition:</b>
* Identifies the purpose for this name
* </p>
*/
public HumanNameDt setUse(NameUseEnum theValue) {
getUse().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>text</b> (Text representation of the full name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A full text representation of the name
* </p>
*/
public StringDt getText() {
if (myText == null) {
myText = new StringDt();
}
return myText;
}
/**
* Sets the value(s) for <b>text</b> (Text representation of the full name)
*
* <p>
* <b>Definition:</b>
* A full text representation of the name
* </p>
*/
public HumanNameDt setText(StringDt theValue) {
myText = theValue;
return this;
}
/**
* Sets the value for <b>text</b> (Text representation of the full name)
*
* <p>
* <b>Definition:</b>
* A full text representation of the name
* </p>
*/
public HumanNameDt setText( String theString) {
myText = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>family</b> (Family name (often called 'Surname')).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public java.util.List<StringDt> getFamily() {
if (myFamily == null) {
myFamily = new java.util.ArrayList<StringDt>();
}
return myFamily;
}
/**
* Sets the value(s) for <b>family</b> (Family name (often called 'Surname'))
*
* <p>
* <b>Definition:</b>
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public HumanNameDt setFamily(java.util.List<StringDt> theValue) {
myFamily = theValue;
return this;
}
/**
* Adds and returns a new value for <b>family</b> (Family name (often called 'Surname'))
*
* <p>
* <b>Definition:</b>
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public StringDt addFamily() {
StringDt newType = new StringDt();
getFamily().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>family</b> (Family name (often called 'Surname')),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public StringDt getFamilyFirstRep() {
if (getFamily().isEmpty()) {
return addFamily();
}
return getFamily().get(0);
}
/**
* Adds a new value for <b>family</b> (Family name (often called 'Surname'))
*
* <p>
* <b>Definition:</b>
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public HumanNameDt addFamily( String theString) {
if (myFamily == null) {
myFamily = new java.util.ArrayList<StringDt>();
}
myFamily.add(new StringDt(theString));
return this;
}
/**
* Gets the value(s) for <b>given</b> (Given names (not always 'first'). Includes middle names).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Given name
* </p>
*/
public java.util.List<StringDt> getGiven() {
if (myGiven == null) {
myGiven = new java.util.ArrayList<StringDt>();
}
return myGiven;
}
/**
* Sets the value(s) for <b>given</b> (Given names (not always 'first'). Includes middle names)
*
* <p>
* <b>Definition:</b>
* Given name
* </p>
*/
public HumanNameDt setGiven(java.util.List<StringDt> theValue) {
myGiven = theValue;
return this;
}
/**
* Adds and returns a new value for <b>given</b> (Given names (not always 'first'). Includes middle names)
*
* <p>
* <b>Definition:</b>
* Given name
* </p>
*/
public StringDt addGiven() {
StringDt newType = new StringDt();
getGiven().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>given</b> (Given names (not always 'first'). Includes middle names),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Given name
* </p>
*/
public StringDt getGivenFirstRep() {
if (getGiven().isEmpty()) {
return addGiven();
}
return getGiven().get(0);
}
/**
* Adds a new value for <b>given</b> (Given names (not always 'first'). Includes middle names)
*
* <p>
* <b>Definition:</b>
* Given name
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public HumanNameDt addGiven( String theString) {
if (myGiven == null) {
myGiven = new java.util.ArrayList<StringDt>();
}
myGiven.add(new StringDt(theString));
return this;
}
/**
* Gets the value(s) for <b>prefix</b> (Parts that come before the name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public java.util.List<StringDt> getPrefix() {
if (myPrefix == null) {
myPrefix = new java.util.ArrayList<StringDt>();
}
return myPrefix;
}
/**
* Sets the value(s) for <b>prefix</b> (Parts that come before the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public HumanNameDt setPrefix(java.util.List<StringDt> theValue) {
myPrefix = theValue;
return this;
}
/**
* Adds and returns a new value for <b>prefix</b> (Parts that come before the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public StringDt addPrefix() {
StringDt newType = new StringDt();
getPrefix().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>prefix</b> (Parts that come before the name),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public StringDt getPrefixFirstRep() {
if (getPrefix().isEmpty()) {
return addPrefix();
}
return getPrefix().get(0);
}
/**
* Adds a new value for <b>prefix</b> (Parts that come before the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public HumanNameDt addPrefix( String theString) {
if (myPrefix == null) {
myPrefix = new java.util.ArrayList<StringDt>();
}
myPrefix.add(new StringDt(theString));
return this;
}
/**
* Gets the value(s) for <b>suffix</b> (Parts that come after the name).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public java.util.List<StringDt> getSuffix() {
if (mySuffix == null) {
mySuffix = new java.util.ArrayList<StringDt>();
}
return mySuffix;
}
/**
* Sets the value(s) for <b>suffix</b> (Parts that come after the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public HumanNameDt setSuffix(java.util.List<StringDt> theValue) {
mySuffix = theValue;
return this;
}
/**
* Adds and returns a new value for <b>suffix</b> (Parts that come after the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public StringDt addSuffix() {
StringDt newType = new StringDt();
getSuffix().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>suffix</b> (Parts that come after the name),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public StringDt getSuffixFirstRep() {
if (getSuffix().isEmpty()) {
return addSuffix();
}
return getSuffix().get(0);
}
/**
* Adds a new value for <b>suffix</b> (Parts that come after the name)
*
* <p>
* <b>Definition:</b>
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
public HumanNameDt addSuffix( String theString) {
if (mySuffix == null) {
mySuffix = new java.util.ArrayList<StringDt>();
}
mySuffix.add(new StringDt(theString));
return this;
}
/**
* Gets the value(s) for <b>period</b> (Time period when name was/is in use).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates the period of time when this name was valid for the named person.
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Time period when name was/is in use)
*
* <p>
* <b>Definition:</b>
* Indicates the period of time when this name was valid for the named person.
* </p>
*/
public HumanNameDt setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
}

View File

@ -1,399 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
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.model.primitive.UriDt;
/**
* HAPI/FHIR <b>IdentifierDt</b> Datatype
* (An identifier intended for computation)
*
* <p>
* <b>Definition:</b>
* A technical identifier - identifies some entity uniquely and unambiguously
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to be able to identify things with confidence and be sure that the identification is not subject to misinterpretation
* </p>
*/
@DatatypeDef(name="IdentifierDt")
public class IdentifierDt
extends BaseIdentifierDt implements ICompositeDatatype
{
/**
* Constructor
*/
public IdentifierDt() {
// nothing
}
/**
* Creates a new identifier with the given system and value
*/
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) {
setSystem(theSystem);
setValue(theValue);
}
/**
* Creates a new identifier with the given system and value
*/
@SimpleSetter
public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) {
setUse(theUse);
setSystem(theSystem);
setValue(theValue);
setLabel(theLabel);
}
@Override
public String toString() {
return "IdentifierDt[" + getValueAsQueryToken() + "]";
}
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="usual | official | temp | secondary (If known)",
formalDefinition="The purpose of this identifier"
)
private BoundCodeDt<IdentifierUseEnum> myUse;
@Child(name="label", type=StringDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Description of identifier",
formalDefinition="A text string for the identifier that can be displayed to a human so they can recognize the identifier"
)
private StringDt myLabel;
@Child(name="system", type=UriDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="The namespace for the identifier",
formalDefinition="Establishes the namespace in which set of possible id values is unique."
)
private UriDt mySystem;
@Child(name="value", type=StringDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="The value that is unique",
formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system."
)
private StringDt myValue;
@Child(name="period", type=PeriodDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Time period when id is/was valid for use",
formalDefinition="Time period during which identifier is/was valid for use"
)
private PeriodDt myPeriod;
@Child(name="assigner", order=5, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@Description(
shortDefinition="Organization that issued id (may be just text)",
formalDefinition="Organization that issued/manages the identifier"
)
private ResourceReferenceDt myAssigner;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
}
/**
* Gets the value(s) for <b>use</b> (usual | official | temp | secondary (If known)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The purpose of this identifier
* </p>
*/
public BoundCodeDt<IdentifierUseEnum> getUse() {
if (myUse == null) {
myUse = new BoundCodeDt<IdentifierUseEnum>(IdentifierUseEnum.VALUESET_BINDER);
}
return myUse;
}
/**
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known))
*
* <p>
* <b>Definition:</b>
* The purpose of this identifier
* </p>
*/
public IdentifierDt setUse(BoundCodeDt<IdentifierUseEnum> theValue) {
myUse = theValue;
return this;
}
/**
* Sets the value(s) for <b>use</b> (usual | official | temp | secondary (If known))
*
* <p>
* <b>Definition:</b>
* The purpose of this identifier
* </p>
*/
public IdentifierDt setUse(IdentifierUseEnum theValue) {
getUse().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>label</b> (Description of identifier).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
* </p>
*/
public StringDt getLabel() {
if (myLabel == null) {
myLabel = new StringDt();
}
return myLabel;
}
/**
* Sets the value(s) for <b>label</b> (Description of identifier)
*
* <p>
* <b>Definition:</b>
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
* </p>
*/
public IdentifierDt setLabel(StringDt theValue) {
myLabel = theValue;
return this;
}
/**
* Sets the value for <b>label</b> (Description of identifier)
*
* <p>
* <b>Definition:</b>
* A text string for the identifier that can be displayed to a human so they can recognize the identifier
* </p>
*/
public IdentifierDt setLabel( String theString) {
myLabel = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>system</b> (The namespace for the identifier).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Establishes the namespace in which set of possible id values is unique.
* </p>
*/
public UriDt getSystem() {
if (mySystem == null) {
mySystem = new UriDt();
}
return mySystem;
}
/**
* Sets the value(s) for <b>system</b> (The namespace for the identifier)
*
* <p>
* <b>Definition:</b>
* Establishes the namespace in which set of possible id values is unique.
* </p>
*/
public IdentifierDt setSystem(UriDt theValue) {
mySystem = theValue;
return this;
}
/**
* Sets the value for <b>system</b> (The namespace for the identifier)
*
* <p>
* <b>Definition:</b>
* Establishes the namespace in which set of possible id values is unique.
* </p>
*/
public IdentifierDt setSystem( String theUri) {
mySystem = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>value</b> (The value that is unique).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
* </p>
*/
public StringDt getValue() {
if (myValue == null) {
myValue = new StringDt();
}
return myValue;
}
/**
* Sets the value(s) for <b>value</b> (The value that is unique)
*
* <p>
* <b>Definition:</b>
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
* </p>
*/
public IdentifierDt setValue(StringDt theValue) {
myValue = theValue;
return this;
}
/**
* Sets the value for <b>value</b> (The value that is unique)
*
* <p>
* <b>Definition:</b>
* The portion of the identifier typically displayed to the user and which is unique within the context of the system.
* </p>
*/
public IdentifierDt setValue( String theString) {
myValue = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>period</b> (Time period when id is/was valid for use).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Time period during which identifier is/was valid for use
* </p>
*/
public PeriodDt getPeriod() {
if (myPeriod == null) {
myPeriod = new PeriodDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Time period when id is/was valid for use)
*
* <p>
* <b>Definition:</b>
* Time period during which identifier is/was valid for use
* </p>
*/
public IdentifierDt setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
}
/**
* Gets the value(s) for <b>assigner</b> (Organization that issued id (may be just text)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Organization that issued/manages the identifier
* </p>
*/
public ResourceReferenceDt getAssigner() {
if (myAssigner == null) {
myAssigner = new ResourceReferenceDt();
}
return myAssigner;
}
/**
* Sets the value(s) for <b>assigner</b> (Organization that issued id (may be just text))
*
* <p>
* <b>Definition:</b>
* Organization that issued/manages the identifier
* </p>
*/
public IdentifierDt setAssigner(ResourceReferenceDt theValue) {
myAssigner = theValue;
return this;
}
}

View File

@ -1,219 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.primitive.DateTimeDt;
/**
* HAPI/FHIR <b>PeriodDt</b> Datatype
* (Time range defined by start and end date/time)
*
* <p>
* <b>Definition:</b>
* A time period defined by a start and end date and optionally time.
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*/
@DatatypeDef(name="PeriodDt")
public class PeriodDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public PeriodDt() {
// nothing
}
@Child(name="start", type=DateTimeDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Starting time with inclusive boundary",
formalDefinition="The start of the period. The boundary is inclusive."
)
private DateTimeDt myStart;
@Child(name="end", type=DateTimeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="End time with inclusive boundary, if not ongoing",
formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing"
)
private DateTimeDt myEnd;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStart, myEnd);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStart, myEnd);
}
/**
* Gets the value(s) for <b>start</b> (Starting time with inclusive boundary).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The start of the period. The boundary is inclusive.
* </p>
*/
public DateTimeDt getStart() {
if (myStart == null) {
myStart = new DateTimeDt();
}
return myStart;
}
/**
* Sets the value(s) for <b>start</b> (Starting time with inclusive boundary)
*
* <p>
* <b>Definition:</b>
* The start of the period. The boundary is inclusive.
* </p>
*/
public PeriodDt setStart(DateTimeDt theValue) {
myStart = theValue;
return this;
}
/**
* Sets the value for <b>start</b> (Starting time with inclusive boundary)
*
* <p>
* <b>Definition:</b>
* The start of the period. The boundary is inclusive.
* </p>
*/
public PeriodDt setStartWithSecondsPrecision( Date theDate) {
myStart = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>start</b> (Starting time with inclusive boundary)
*
* <p>
* <b>Definition:</b>
* The start of the period. The boundary is inclusive.
* </p>
*/
public PeriodDt setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
myStart = new DateTimeDt(theDate, thePrecision);
return this;
}
/**
* Gets the value(s) for <b>end</b> (End time with inclusive boundary, if not ongoing).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The end of the period. If the end of the period is missing, it means that the period is ongoing
* </p>
*/
public DateTimeDt getEnd() {
if (myEnd == null) {
myEnd = new DateTimeDt();
}
return myEnd;
}
/**
* Sets the value(s) for <b>end</b> (End time with inclusive boundary, if not ongoing)
*
* <p>
* <b>Definition:</b>
* The end of the period. If the end of the period is missing, it means that the period is ongoing
* </p>
*/
public PeriodDt setEnd(DateTimeDt theValue) {
myEnd = theValue;
return this;
}
/**
* Sets the value for <b>end</b> (End time with inclusive boundary, if not ongoing)
*
* <p>
* <b>Definition:</b>
* The end of the period. If the end of the period is missing, it means that the period is ongoing
* </p>
*/
public PeriodDt setEndWithSecondsPrecision( Date theDate) {
myEnd = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>end</b> (End time with inclusive boundary, if not ongoing)
*
* <p>
* <b>Definition:</b>
* The end of the period. If the end of the period is missing, it means that the period is ongoing
* </p>
*/
public PeriodDt setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
myEnd = new DateTimeDt(theDate, thePrecision);
return this;
}
}

View File

@ -1,436 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.model.base.composite.BaseQuantityDt;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
/**
* HAPI/FHIR <b>QuantityDt</b> Datatype
* (A measured or measurable amount)
*
* <p>
* <b>Definition:</b>
* A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD
* </p>
*/
@DatatypeDef(name="QuantityDt")
public class QuantityDt
extends BaseQuantityDt implements ICompositeDatatype
{
/**
* Constructor
*/
public QuantityDt() {
// nothing
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
setValue(theValue);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
setValue(theValue);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue,
@SimpleSetter.Parameter(name = "theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setUnits(theUnits);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue,
@SimpleSetter.Parameter(name = "theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setUnits(theUnits);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setSystem(theSystem);
setUnits(theUnits);
}
/**
* Constructor
*/
@SimpleSetter
public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
setValue(theValue);
setComparator(theComparator);
setSystem(theSystem);
setUnits(theUnits);
}
@Child(name="value", type=DecimalDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Numerical value (with implicit precision)",
formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value"
)
private DecimalDt myValue;
@Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="< | <= | >= | > - how to understand the value",
formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value"
)
private BoundCodeDt<QuantityCompararatorEnum> myComparator;
@Child(name="units", type=StringDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Unit representation",
formalDefinition="A human-readable form of the units"
)
private StringDt myUnits;
@Child(name="system", type=UriDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="System that defines coded unit form",
formalDefinition="The identification of the system that provides the coded form of the unit"
)
private UriDt mySystem;
@Child(name="code", type=CodeDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Coded form of the unit",
formalDefinition="A computer processable form of the units in some unit representation system"
)
private CodeDt myCode;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
}
/**
* Gets the value(s) for <b>value</b> (Numerical value (with implicit precision)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public DecimalDt getValue() {
if (myValue == null) {
myValue = new DecimalDt();
}
return myValue;
}
/**
* Sets the value(s) for <b>value</b> (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public QuantityDt setValue(DecimalDt theValue) {
myValue = theValue;
return this;
}
/**
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public QuantityDt setValue( long theValue) {
myValue = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public QuantityDt setValue( double theValue) {
myValue = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public QuantityDt setValue( java.math.BigDecimal theValue) {
myValue = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
* </p>
*/
public BoundCodeDt<QuantityCompararatorEnum> getComparator() {
if (myComparator == null) {
myComparator = new BoundCodeDt<QuantityCompararatorEnum>(QuantityCompararatorEnum.VALUESET_BINDER);
}
return myComparator;
}
/**
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
* </p>
*/
public QuantityDt setComparator(BoundCodeDt<QuantityCompararatorEnum> theValue) {
myComparator = theValue;
return this;
}
/**
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
* </p>
*/
public QuantityDt setComparator(QuantityCompararatorEnum theValue) {
getComparator().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>units</b> (Unit representation).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A human-readable form of the units
* </p>
*/
public StringDt getUnits() {
if (myUnits == null) {
myUnits = new StringDt();
}
return myUnits;
}
/**
* Sets the value(s) for <b>units</b> (Unit representation)
*
* <p>
* <b>Definition:</b>
* A human-readable form of the units
* </p>
*/
public QuantityDt setUnits(StringDt theValue) {
myUnits = theValue;
return this;
}
/**
* Sets the value for <b>units</b> (Unit representation)
*
* <p>
* <b>Definition:</b>
* A human-readable form of the units
* </p>
*/
public QuantityDt setUnits( String theString) {
myUnits = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for <b>system</b> (System that defines coded unit form).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The identification of the system that provides the coded form of the unit
* </p>
*/
public UriDt getSystem() {
if (mySystem == null) {
mySystem = new UriDt();
}
return mySystem;
}
/**
* Sets the value(s) for <b>system</b> (System that defines coded unit form)
*
* <p>
* <b>Definition:</b>
* The identification of the system that provides the coded form of the unit
* </p>
*/
public QuantityDt setSystem(UriDt theValue) {
mySystem = theValue;
return this;
}
/**
* Sets the value for <b>system</b> (System that defines coded unit form)
*
* <p>
* <b>Definition:</b>
* The identification of the system that provides the coded form of the unit
* </p>
*/
public QuantityDt setSystem( String theUri) {
mySystem = new UriDt(theUri);
return this;
}
/**
* Gets the value(s) for <b>code</b> (Coded form of the unit).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A computer processable form of the units in some unit representation system
* </p>
*/
public CodeDt getCode() {
if (myCode == null) {
myCode = new CodeDt();
}
return myCode;
}
/**
* Sets the value(s) for <b>code</b> (Coded form of the unit)
*
* <p>
* <b>Definition:</b>
* A computer processable form of the units in some unit representation system
* </p>
*/
public QuantityDt setCode(CodeDt theValue) {
myCode = theValue;
return this;
}
/**
* Sets the value for <b>code</b> (Coded form of the unit)
*
* <p>
* <b>Definition:</b>
* A computer processable form of the units in some unit representation system
* </p>
*/
public QuantityDt setCode( String theCode) {
myCode = new CodeDt(theCode);
return this;
}
}

View File

@ -1,321 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
/**
* HAPI/FHIR <b>RangeDt</b> Datatype
* (Set of values bounded by low and high)
*
* <p>
* <b>Definition:</b>
* A set of ordered Quantities defined by a low and high limit.
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to be able to specify ranges of values
* </p>
*/
@DatatypeDef(name="RangeDt")
public class RangeDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public RangeDt() {
// nothing
}
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Low limit",
formalDefinition="The low limit. The boundary is inclusive."
)
private QuantityDt myLow;
@Child(name="high", type=QuantityDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="High limit",
formalDefinition="The high limit. The boundary is inclusive."
)
private QuantityDt myHigh;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLow, myHigh);
}
/**
* Gets the value(s) for <b>low</b> (Low limit).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public QuantityDt getLow() {
if (myLow == null) {
myLow = new QuantityDt();
}
return myLow;
}
/**
* Sets the value(s) for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow(QuantityDt theValue) {
myLow = theValue;
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( double theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>low</b> (Low limit)
*
* <p>
* <b>Definition:</b>
* The low limit. The boundary is inclusive.
* </p>
*/
public RangeDt setLow( long theValue) {
myLow = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>high</b> (High limit).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public QuantityDt getHigh() {
if (myHigh == null) {
myHigh = new QuantityDt();
}
return myHigh;
}
/**
* Sets the value(s) for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh(QuantityDt theValue) {
myHigh = theValue;
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( double theValue) {
myHigh = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>high</b> (High limit)
*
* <p>
* <b>Definition:</b>
* The high limit. The boundary is inclusive.
* </p>
*/
public RangeDt setHigh( long theValue) {
myHigh = new QuantityDt(theValue);
return this;
}
}

View File

@ -1,321 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
/**
* HAPI/FHIR <b>RatioDt</b> Datatype
* (A ratio of two Quantity values - a numerator and a denominator)
*
* <p>
* <b>Definition:</b>
* A relationship of two Quantity values - expressed as a numerator and a denominator.
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to able to capture ratios for some measurements (titers) and some rates (costs)
* </p>
*/
@DatatypeDef(name="RatioDt")
public class RatioDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public RatioDt() {
// nothing
}
@Child(name="numerator", type=QuantityDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Numerator value",
formalDefinition="The value of the numerator"
)
private QuantityDt myNumerator;
@Child(name="denominator", type=QuantityDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="Denominator value",
formalDefinition="The value of the denominator"
)
private QuantityDt myDenominator;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumerator, myDenominator);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myNumerator, myDenominator);
}
/**
* Gets the value(s) for <b>numerator</b> (Numerator value).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public QuantityDt getNumerator() {
if (myNumerator == null) {
myNumerator = new QuantityDt();
}
return myNumerator;
}
/**
* Sets the value(s) for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator(QuantityDt theValue) {
myNumerator = theValue;
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( double theValue) {
myNumerator = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>numerator</b> (Numerator value)
*
* <p>
* <b>Definition:</b>
* The value of the numerator
* </p>
*/
public RatioDt setNumerator( long theValue) {
myNumerator = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>denominator</b> (Denominator value).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public QuantityDt getDenominator() {
if (myDenominator == null) {
myDenominator = new QuantityDt();
}
return myDenominator;
}
/**
* Sets the value(s) for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator(QuantityDt theValue) {
myDenominator = theValue;
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( double theValue) {
myDenominator = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>denominator</b> (Denominator value)
*
* <p>
* <b>Definition:</b>
* The value of the denominator
* </p>
*/
public RatioDt setDenominator( long theValue) {
myDenominator = new QuantityDt(theValue);
return this;
}
}

View File

@ -1,618 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
/**
* HAPI/FHIR <b>SampledDataDt</b> Datatype
* (A series of measurements taken by a device)
*
* <p>
* <b>Definition:</b>
* A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data
* </p>
*
* <p>
* <b>Requirements:</b>
* There is a need for a concise way to handle the data produced by devices that sample a physical state at a high frequency
* </p>
*/
@DatatypeDef(name="SampledDataDt")
public class SampledDataDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public SampledDataDt() {
// nothing
}
@Child(name="origin", type=QuantityDt.class, order=0, min=1, max=1)
@Description(
shortDefinition="Zero value and units",
formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series"
)
private QuantityDt myOrigin;
@Child(name="period", type=DecimalDt.class, order=1, min=1, max=1)
@Description(
shortDefinition="Number of milliseconds between samples",
formalDefinition="The length of time between sampling times, measured in milliseconds"
)
private DecimalDt myPeriod;
@Child(name="factor", type=DecimalDt.class, order=2, min=0, max=1)
@Description(
shortDefinition="Multiply data by this before adding to origin",
formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin"
)
private DecimalDt myFactor;
@Child(name="lowerLimit", type=DecimalDt.class, order=3, min=0, max=1)
@Description(
shortDefinition="Lower limit of detection",
formalDefinition="The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)"
)
private DecimalDt myLowerLimit;
@Child(name="upperLimit", type=DecimalDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Upper limit of detection",
formalDefinition="The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)"
)
private DecimalDt myUpperLimit;
@Child(name="dimensions", type=IntegerDt.class, order=5, min=1, max=1)
@Description(
shortDefinition="Number of sample points at each time point",
formalDefinition="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once"
)
private IntegerDt myDimensions;
@Child(name="data", type=StringDt.class, order=6, min=1, max=1)
@Description(
shortDefinition="Decimal values with spaces, or \"E\" | \"U\" | \"L\"",
formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value"
)
private StringDt myData;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData);
}
/**
* Gets the value(s) for <b>origin</b> (Zero value and units).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public QuantityDt getOrigin() {
if (myOrigin == null) {
myOrigin = new QuantityDt();
}
return myOrigin;
}
/**
* Sets the value(s) for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin(QuantityDt theValue) {
myOrigin = theValue;
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( double theValue) {
myOrigin = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for <b>origin</b> (Zero value and units)
*
* <p>
* <b>Definition:</b>
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
* </p>
*/
public SampledDataDt setOrigin( long theValue) {
myOrigin = new QuantityDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>period</b> (Number of milliseconds between samples).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The length of time between sampling times, measured in milliseconds
* </p>
*/
public DecimalDt getPeriod() {
if (myPeriod == null) {
myPeriod = new DecimalDt();
}
return myPeriod;
}
/**
* Sets the value(s) for <b>period</b> (Number of milliseconds between samples)
*
* <p>
* <b>Definition:</b>
* The length of time between sampling times, measured in milliseconds
* </p>
*/
public SampledDataDt setPeriod(DecimalDt theValue) {
myPeriod = theValue;
return this;
}
/**
* Sets the value for <b>period</b> (Number of milliseconds between samples)
*
* <p>
* <b>Definition:</b>
* The length of time between sampling times, measured in milliseconds
* </p>
*/
public SampledDataDt setPeriod( long theValue) {
myPeriod = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>period</b> (Number of milliseconds between samples)
*
* <p>
* <b>Definition:</b>
* The length of time between sampling times, measured in milliseconds
* </p>
*/
public SampledDataDt setPeriod( double theValue) {
myPeriod = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>period</b> (Number of milliseconds between samples)
*
* <p>
* <b>Definition:</b>
* The length of time between sampling times, measured in milliseconds
* </p>
*/
public SampledDataDt setPeriod( java.math.BigDecimal theValue) {
myPeriod = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>factor</b> (Multiply data by this before adding to origin).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A correction factor that is applied to the sampled data points before they are added to the origin
* </p>
*/
public DecimalDt getFactor() {
if (myFactor == null) {
myFactor = new DecimalDt();
}
return myFactor;
}
/**
* Sets the value(s) for <b>factor</b> (Multiply data by this before adding to origin)
*
* <p>
* <b>Definition:</b>
* A correction factor that is applied to the sampled data points before they are added to the origin
* </p>
*/
public SampledDataDt setFactor(DecimalDt theValue) {
myFactor = theValue;
return this;
}
/**
* Sets the value for <b>factor</b> (Multiply data by this before adding to origin)
*
* <p>
* <b>Definition:</b>
* A correction factor that is applied to the sampled data points before they are added to the origin
* </p>
*/
public SampledDataDt setFactor( long theValue) {
myFactor = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>factor</b> (Multiply data by this before adding to origin)
*
* <p>
* <b>Definition:</b>
* A correction factor that is applied to the sampled data points before they are added to the origin
* </p>
*/
public SampledDataDt setFactor( double theValue) {
myFactor = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>factor</b> (Multiply data by this before adding to origin)
*
* <p>
* <b>Definition:</b>
* A correction factor that is applied to the sampled data points before they are added to the origin
* </p>
*/
public SampledDataDt setFactor( java.math.BigDecimal theValue) {
myFactor = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>lowerLimit</b> (Lower limit of detection).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
* </p>
*/
public DecimalDt getLowerLimit() {
if (myLowerLimit == null) {
myLowerLimit = new DecimalDt();
}
return myLowerLimit;
}
/**
* Sets the value(s) for <b>lowerLimit</b> (Lower limit of detection)
*
* <p>
* <b>Definition:</b>
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
* </p>
*/
public SampledDataDt setLowerLimit(DecimalDt theValue) {
myLowerLimit = theValue;
return this;
}
/**
* Sets the value for <b>lowerLimit</b> (Lower limit of detection)
*
* <p>
* <b>Definition:</b>
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
* </p>
*/
public SampledDataDt setLowerLimit( long theValue) {
myLowerLimit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>lowerLimit</b> (Lower limit of detection)
*
* <p>
* <b>Definition:</b>
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
* </p>
*/
public SampledDataDt setLowerLimit( double theValue) {
myLowerLimit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>lowerLimit</b> (Lower limit of detection)
*
* <p>
* <b>Definition:</b>
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
* </p>
*/
public SampledDataDt setLowerLimit( java.math.BigDecimal theValue) {
myLowerLimit = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>upperLimit</b> (Upper limit of detection).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
* </p>
*/
public DecimalDt getUpperLimit() {
if (myUpperLimit == null) {
myUpperLimit = new DecimalDt();
}
return myUpperLimit;
}
/**
* Sets the value(s) for <b>upperLimit</b> (Upper limit of detection)
*
* <p>
* <b>Definition:</b>
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
* </p>
*/
public SampledDataDt setUpperLimit(DecimalDt theValue) {
myUpperLimit = theValue;
return this;
}
/**
* Sets the value for <b>upperLimit</b> (Upper limit of detection)
*
* <p>
* <b>Definition:</b>
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
* </p>
*/
public SampledDataDt setUpperLimit( long theValue) {
myUpperLimit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>upperLimit</b> (Upper limit of detection)
*
* <p>
* <b>Definition:</b>
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
* </p>
*/
public SampledDataDt setUpperLimit( double theValue) {
myUpperLimit = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>upperLimit</b> (Upper limit of detection)
*
* <p>
* <b>Definition:</b>
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
* </p>
*/
public SampledDataDt setUpperLimit( java.math.BigDecimal theValue) {
myUpperLimit = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>dimensions</b> (Number of sample points at each time point).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
* </p>
*/
public IntegerDt getDimensions() {
if (myDimensions == null) {
myDimensions = new IntegerDt();
}
return myDimensions;
}
/**
* Sets the value(s) for <b>dimensions</b> (Number of sample points at each time point)
*
* <p>
* <b>Definition:</b>
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
* </p>
*/
public SampledDataDt setDimensions(IntegerDt theValue) {
myDimensions = theValue;
return this;
}
/**
* Sets the value for <b>dimensions</b> (Number of sample points at each time point)
*
* <p>
* <b>Definition:</b>
* The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once
* </p>
*/
public SampledDataDt setDimensions( int theInteger) {
myDimensions = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\").
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
* </p>
*/
public StringDt getData() {
if (myData == null) {
myData = new StringDt();
}
return myData;
}
/**
* Sets the value(s) for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\")
*
* <p>
* <b>Definition:</b>
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
* </p>
*/
public SampledDataDt setData(StringDt theValue) {
myData = theValue;
return this;
}
/**
* Sets the value for <b>data</b> (Decimal values with spaces, or \"E\" | \"U\" | \"L\")
*
* <p>
* <b>Definition:</b>
* A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value
* </p>
*/
public SampledDataDt setData( String theString) {
myData = new StringDt(theString);
return this;
}
}

View File

@ -1,575 +0,0 @@
package ca.uhn.fhir.model.dstu.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%
*/
import java.util.Date;
import java.util.List;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResourceBlock;
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.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum;
import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
/**
* HAPI/FHIR <b>ScheduleDt</b> Datatype
* (A schedule that specifies an event that may occur multiple times)
*
* <p>
* <b>Definition:</b>
* Specifies an event that may occur multiple times. Schedules are used for to reord when things are expected or requested to occur.
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to able to track schedules. There are several different ways to do scheduling: one or more specified times, a simple rules like three times a day, or before/after meals
* </p>
*/
@DatatypeDef(name="ScheduleDt")
public class ScheduleDt
extends BaseIdentifiableElement implements ICompositeDatatype
{
/**
* Constructor
*/
public ScheduleDt() {
// nothing
}
@Child(name="event", type=PeriodDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
shortDefinition="When the event occurs",
formalDefinition="Identifies specific time periods when the event should occur"
)
private java.util.List<PeriodDt> myEvent;
@Child(name="repeat", order=1, min=0, max=1)
@Description(
shortDefinition="Only if there is none or one event",
formalDefinition="Identifies a repeating pattern to the intended time periods."
)
private Repeat myRepeat;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myEvent, myRepeat);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEvent, myRepeat);
}
/**
* Gets the value(s) for <b>event</b> (When the event occurs).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies specific time periods when the event should occur
* </p>
*/
public java.util.List<PeriodDt> getEvent() {
if (myEvent == null) {
myEvent = new java.util.ArrayList<PeriodDt>();
}
return myEvent;
}
/**
* Sets the value(s) for <b>event</b> (When the event occurs)
*
* <p>
* <b>Definition:</b>
* Identifies specific time periods when the event should occur
* </p>
*/
public ScheduleDt setEvent(java.util.List<PeriodDt> theValue) {
myEvent = theValue;
return this;
}
/**
* Adds and returns a new value for <b>event</b> (When the event occurs)
*
* <p>
* <b>Definition:</b>
* Identifies specific time periods when the event should occur
* </p>
*/
public PeriodDt addEvent() {
PeriodDt newType = new PeriodDt();
getEvent().add(newType);
return newType;
}
/**
* Gets the first repetition for <b>event</b> (When the event occurs),
* creating it if it does not already exist.
*
* <p>
* <b>Definition:</b>
* Identifies specific time periods when the event should occur
* </p>
*/
public PeriodDt getEventFirstRep() {
if (getEvent().isEmpty()) {
return addEvent();
}
return getEvent().get(0);
}
/**
* Gets the value(s) for <b>repeat</b> (Only if there is none or one event).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies a repeating pattern to the intended time periods.
* </p>
*/
public Repeat getRepeat() {
if (myRepeat == null) {
myRepeat = new Repeat();
}
return myRepeat;
}
/**
* Sets the value(s) for <b>repeat</b> (Only if there is none or one event)
*
* <p>
* <b>Definition:</b>
* Identifies a repeating pattern to the intended time periods.
* </p>
*/
public ScheduleDt setRepeat(Repeat theValue) {
myRepeat = theValue;
return this;
}
/**
* Block class for child element: <b>Schedule.repeat</b> (Only if there is none or one event)
*
* <p>
* <b>Definition:</b>
* Identifies a repeating pattern to the intended time periods.
* </p>
*/
@Block()
public static class Repeat extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1)
@Description(
shortDefinition="Event occurs frequency times per duration",
formalDefinition="Indicates how often the event should occur."
)
private IntegerDt myFrequency;
@Child(name="when", type=CodeDt.class, order=1, min=0, max=1)
@Description(
shortDefinition="HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events",
formalDefinition="Identifies the occurrence of daily life that determines timing"
)
private BoundCodeDt<EventTimingEnum> myWhen;
@Child(name="duration", type=DecimalDt.class, order=2, min=1, max=1)
@Description(
shortDefinition="Repeating or event-related duration",
formalDefinition="How long each repetition should last"
)
private DecimalDt myDuration;
@Child(name="units", type=CodeDt.class, order=3, min=1, max=1)
@Description(
shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)",
formalDefinition="The units of time for the duration"
)
private BoundCodeDt<UnitsOfTimeEnum> myUnits;
@Child(name="count", type=IntegerDt.class, order=4, min=0, max=1)
@Description(
shortDefinition="Number of times to repeat",
formalDefinition="A total count of the desired number of repetitions"
)
private IntegerDt myCount;
@Child(name="end", type=DateTimeDt.class, order=5, min=0, max=1)
@Description(
shortDefinition="When to stop repeats",
formalDefinition="When to stop repeating the schedule"
)
private DateTimeDt myEnd;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myFrequency, myWhen, myDuration, myUnits, myCount, myEnd);
}
@Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myFrequency, myWhen, myDuration, myUnits, myCount, myEnd);
}
/**
* Gets the value(s) for <b>frequency</b> (Event occurs frequency times per duration).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Indicates how often the event should occur.
* </p>
*/
public IntegerDt getFrequency() {
if (myFrequency == null) {
myFrequency = new IntegerDt();
}
return myFrequency;
}
/**
* Sets the value(s) for <b>frequency</b> (Event occurs frequency times per duration)
*
* <p>
* <b>Definition:</b>
* Indicates how often the event should occur.
* </p>
*/
public Repeat setFrequency(IntegerDt theValue) {
myFrequency = theValue;
return this;
}
/**
* Sets the value for <b>frequency</b> (Event occurs frequency times per duration)
*
* <p>
* <b>Definition:</b>
* Indicates how often the event should occur.
* </p>
*/
public Repeat setFrequency( int theInteger) {
myFrequency = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>when</b> (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* Identifies the occurrence of daily life that determines timing
* </p>
*/
public BoundCodeDt<EventTimingEnum> getWhen() {
if (myWhen == null) {
myWhen = new BoundCodeDt<EventTimingEnum>(EventTimingEnum.VALUESET_BINDER);
}
return myWhen;
}
/**
* Sets the value(s) for <b>when</b> (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events)
*
* <p>
* <b>Definition:</b>
* Identifies the occurrence of daily life that determines timing
* </p>
*/
public Repeat setWhen(BoundCodeDt<EventTimingEnum> theValue) {
myWhen = theValue;
return this;
}
/**
* Sets the value(s) for <b>when</b> (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events)
*
* <p>
* <b>Definition:</b>
* Identifies the occurrence of daily life that determines timing
* </p>
*/
public Repeat setWhen(EventTimingEnum theValue) {
getWhen().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>duration</b> (Repeating or event-related duration).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* How long each repetition should last
* </p>
*/
public DecimalDt getDuration() {
if (myDuration == null) {
myDuration = new DecimalDt();
}
return myDuration;
}
/**
* Sets the value(s) for <b>duration</b> (Repeating or event-related duration)
*
* <p>
* <b>Definition:</b>
* How long each repetition should last
* </p>
*/
public Repeat setDuration(DecimalDt theValue) {
myDuration = theValue;
return this;
}
/**
* Sets the value for <b>duration</b> (Repeating or event-related duration)
*
* <p>
* <b>Definition:</b>
* How long each repetition should last
* </p>
*/
public Repeat setDuration( long theValue) {
myDuration = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>duration</b> (Repeating or event-related duration)
*
* <p>
* <b>Definition:</b>
* How long each repetition should last
* </p>
*/
public Repeat setDuration( double theValue) {
myDuration = new DecimalDt(theValue);
return this;
}
/**
* Sets the value for <b>duration</b> (Repeating or event-related duration)
*
* <p>
* <b>Definition:</b>
* How long each repetition should last
* </p>
*/
public Repeat setDuration( java.math.BigDecimal theValue) {
myDuration = new DecimalDt(theValue);
return this;
}
/**
* Gets the value(s) for <b>units</b> (s | min | h | d | wk | mo | a - unit of time (UCUM)).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* The units of time for the duration
* </p>
*/
public BoundCodeDt<UnitsOfTimeEnum> getUnits() {
if (myUnits == null) {
myUnits = new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER);
}
return myUnits;
}
/**
* Sets the value(s) for <b>units</b> (s | min | h | d | wk | mo | a - unit of time (UCUM))
*
* <p>
* <b>Definition:</b>
* The units of time for the duration
* </p>
*/
public Repeat setUnits(BoundCodeDt<UnitsOfTimeEnum> theValue) {
myUnits = theValue;
return this;
}
/**
* Sets the value(s) for <b>units</b> (s | min | h | d | wk | mo | a - unit of time (UCUM))
*
* <p>
* <b>Definition:</b>
* The units of time for the duration
* </p>
*/
public Repeat setUnits(UnitsOfTimeEnum theValue) {
getUnits().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for <b>count</b> (Number of times to repeat).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* A total count of the desired number of repetitions
* </p>
*/
public IntegerDt getCount() {
if (myCount == null) {
myCount = new IntegerDt();
}
return myCount;
}
/**
* Sets the value(s) for <b>count</b> (Number of times to repeat)
*
* <p>
* <b>Definition:</b>
* A total count of the desired number of repetitions
* </p>
*/
public Repeat setCount(IntegerDt theValue) {
myCount = theValue;
return this;
}
/**
* Sets the value for <b>count</b> (Number of times to repeat)
*
* <p>
* <b>Definition:</b>
* A total count of the desired number of repetitions
* </p>
*/
public Repeat setCount( int theInteger) {
myCount = new IntegerDt(theInteger);
return this;
}
/**
* Gets the value(s) for <b>end</b> (When to stop repeats).
* creating it if it does
* not exist. Will not return <code>null</code>.
*
* <p>
* <b>Definition:</b>
* When to stop repeating the schedule
* </p>
*/
public DateTimeDt getEnd() {
if (myEnd == null) {
myEnd = new DateTimeDt();
}
return myEnd;
}
/**
* Sets the value(s) for <b>end</b> (When to stop repeats)
*
* <p>
* <b>Definition:</b>
* When to stop repeating the schedule
* </p>
*/
public Repeat setEnd(DateTimeDt theValue) {
myEnd = theValue;
return this;
}
/**
* Sets the value for <b>end</b> (When to stop repeats)
*
* <p>
* <b>Definition:</b>
* When to stop repeating the schedule
* </p>
*/
public Repeat setEndWithSecondsPrecision( Date theDate) {
myEnd = new DateTimeDt(theDate);
return this;
}
/**
* Sets the value for <b>end</b> (When to stop repeats)
*
* <p>
* <b>Definition:</b>
* When to stop repeating the schedule
* </p>
*/
public Repeat setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
myEnd = new DateTimeDt(theDate, thePrecision);
return this;
}
}
}

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

@ -1,124 +0,0 @@
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 static org.apache.commons.lang3.StringUtils.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import ca.uhn.fhir.model.api.IValueSetEnumBinder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
@DatatypeDef(name = "CodeableConcept", isSpecialization = true)
public class BoundCodeableConceptDt<T extends Enum<?>> extends CodeableConceptDt {
private IValueSetEnumBinder<T> myBinder;
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder) {
myBinder = theBinder;
}
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, T theValue) {
myBinder = theBinder;
setValueAsEnum(theValue);
}
/**
* Constructor
*/
public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, Collection<T> theValues) {
myBinder = theBinder;
setValueAsEnum(theValues);
}
/**
* Sets the {@link #getCoding()} to contain a coding with the code and
* system defined by the given enumerated types, AND clearing any existing
* codings first. If theValue is null, existing codings are cleared and no
* codings are added.
*
* @param theValue
* The value to add, or <code>null</code>
*/
public void setValueAsEnum(Collection<T> theValues) {
getCoding().clear();
if (theValues != null) {
for (T next : theValues) {
getCoding().add(new CodingDt(myBinder.toSystemString(next), myBinder.toCodeString(next)));
}
}
}
/**
* Sets the {@link #getCoding()} to contain a coding with the code and
* system defined by the given enumerated type, AND clearing any existing
* codings first. If theValue is null, existing codings are cleared and no
* codings are added.
*
* @param theValue
* The value to add, or <code>null</code>
*/
public void setValueAsEnum(T theValue) {
getCoding().clear();
if (theValue == null) {
return;
}
getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue)));
}
/**
* Loops through the {@link #getCoding() codings} in this codeable concept
* and returns the first bound enumerated type that matches. <b>Use
* caution</b> using this method, see the return description for more
* information.
*
* @return Returns the bound enumerated type, or <code>null</code> if none
* are found. Note that a null return value doesn't neccesarily
* imply that this Codeable Concept has no codes, only that it has
* no codes that match the enum.
*/
public Set<T> getValueAsEnum() {
Set<T> retVal = new HashSet<T>();
for (CodingDt next : getCoding()) {
if (next == null) {
continue;
}
T nextT = myBinder.fromCodeString(defaultString(next.getCode().getValue()), defaultString(next.getSystem().getValueAsString()));
if (nextT != null) {
retVal.add(nextT);
} else {
// TODO: throw special exception type?
}
}
return retVal;
}
}

View File

@ -1,138 +0,0 @@
package ca.uhn.fhir.rest.param;
/*
* #%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.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import ca.uhn.fhir.model.api.IQueryParameterOr;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.rest.method.QualifiedParamList;
/**
* @deprecated Use {@link TokenOrListParam} instead
*/
public class CodingListParam implements IQueryParameterOr<IQueryParameterType>, Iterable<CodingDt> {
private List<CodingDt> myCodings = new ArrayList<CodingDt>();
/**
* Constructor. Codings should be added, e.g. using {@link #add(CodingDt)}
*/
public CodingListParam() {
// nothing
}
/**
* Constructor which accepts an array of codings
*
* @param theCodings
* The codings
*/
public CodingListParam(CodingDt... theCodings) {
if (theCodings != null) {
for (CodingDt next : theCodings) {
add(next);
}
}
}
/**
* Constructor which accepts a code system and an array of codes in that system
*
* @param theSystem
* The code system
* @param theCodings
* The codes
*/
public CodingListParam(String theSystem, String... theCodes) {
if (theCodes != null) {
for (String next : theCodes) {
add(new CodingDt(theSystem, next));
}
}
}
/**
* Constructor which accepts a code system and a collection of codes in that system
*
* @param theSystem
* The code system
* @param theCodings
* The codes
*/
public CodingListParam(String theSystem, Collection<String> theCodes) {
if (theCodes != null) {
for (String next : theCodes) {
add(new CodingDt(theSystem, next));
}
}
}
/**
* Returns all Codings associated with this list
*/
public List<CodingDt> getCodings() {
if (myCodings == null) {
myCodings = new ArrayList<CodingDt>();
}
return myCodings;
}
@Override
public List<IQueryParameterType> getValuesAsQueryTokens() {
ArrayList<IQueryParameterType> retVal = new ArrayList<IQueryParameterType>();
for (CodingDt next : myCodings) {
retVal.add(next);
}
return retVal;
}
/**
* Returns all Codings associated with this list
*/
public void setCodings(List<CodingDt> theCodings) {
myCodings = theCodings;
}
@Override
public void setValuesAsQueryTokens(QualifiedParamList theParameters) {
getCodings().clear();
for (String string : theParameters) {
CodingDt dt = new CodingDt();
dt.setValueAsQueryToken(null, string);
myCodings.add(dt);
}
}
public void add(CodingDt theCodingDt) {
myCodings.add(theCodingDt);
}
@Override
public Iterator<CodingDt> iterator() {
return getCodings().iterator();
}
}

View File

@ -1,76 +0,0 @@
package ca.uhn.fhir.rest.param;
/*
* #%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.ArrayList;
import java.util.List;
import ca.uhn.fhir.model.api.IQueryParameterOr;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.rest.method.QualifiedParamList;
/**
* @deprecated Use {@link TokenOrListParam} instead. That class provides similar functionality but is named to be consistent with other types
*/
public class IdentifierListParam implements IQueryParameterOr<IQueryParameterType> {
private List<IdentifierDt> myIdentifiers = new ArrayList<IdentifierDt>();
/**
* Returns all identifiers associated with this list
*/
public List<IdentifierDt> getIdentifiers() {
return myIdentifiers;
}
@Override
public List<IQueryParameterType> getValuesAsQueryTokens() {
ArrayList<IQueryParameterType> retVal = new ArrayList<IQueryParameterType>();
for (IdentifierDt next : myIdentifiers) {
retVal.add(next);
}
return retVal;
}
/**
* Returns all identifiers associated with this list
*/
public void setIdentifiers(List<IdentifierDt> theIdentifiers) {
myIdentifiers = theIdentifiers;
}
@Override
public void setValuesAsQueryTokens(QualifiedParamList theParameters) {
for (String string : theParameters) {
IdentifierDt dt = new IdentifierDt();
dt.setValueAsQueryToken(null, string);
myIdentifiers.add(dt);
}
}
public void addIdentifier(IdentifierDt theIdentifierDt) {
if (theIdentifierDt != null && theIdentifierDt.isEmpty() == false) {
getIdentifiers().add(theIdentifierDt);
}
}
}

View File

@ -1,358 +0,0 @@
package ca.uhn.fhir.rest.server.provider;
/*
* #%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.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.context.RuntimeSearchParam;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Conformance;
import ca.uhn.fhir.model.dstu.resource.Conformance.Rest;
import ca.uhn.fhir.model.dstu.resource.Conformance.RestQuery;
import ca.uhn.fhir.model.dstu.resource.Conformance.RestResource;
import ca.uhn.fhir.model.dstu.resource.Conformance.RestResourceOperation;
import ca.uhn.fhir.model.dstu.resource.Conformance.RestResourceSearchParam;
import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.annotation.Metadata;
import ca.uhn.fhir.rest.method.BaseMethodBinding;
import ca.uhn.fhir.rest.method.DynamicSearchMethodBinding;
import ca.uhn.fhir.rest.method.IParameter;
import ca.uhn.fhir.rest.method.SearchMethodBinding;
import ca.uhn.fhir.rest.method.SearchParameter;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.ResourceBinding;
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.util.ExtensionConstants;
/**
* Server FHIR Provider which serves the conformance statement for a RESTful server implementation
*
* <p>
* Note: This class is safe to extend, but it is important to note that the same instance of {@link Conformance} is
* always returned unless {@link #setCache(boolean)} is called with a value of <code>false</code>. This means that if
* you are adding anything to the returned conformance instance on each call you should call
* <code>setCache(false)</code> in your provider constructor.
* </p>
*/
public class ServerConformanceProvider {
private boolean myCache = true;
private volatile Conformance myConformance;
private String myPublisher = "Not provided";
private final RestfulServer myRestfulServer;
public ServerConformanceProvider(RestfulServer theRestfulServer) {
myRestfulServer = theRestfulServer;
}
/**
* Gets the value of the "publisher" that will be placed in the generated conformance statement. As this
* is a mandatory element, the value should not be null (although this is not enforced). The value defaults
* to "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public String getPublisher() {
return myPublisher;
}
/**
* Actually create and return the conformance statement
*
* See the class documentation for an important note if you are extending this class
*/
@Metadata
public Conformance getServerConformance() {
if (myConformance != null && myCache) {
return myConformance;
}
Conformance retVal = new Conformance();
retVal.setPublisher(myPublisher);
retVal.setDate(DateTimeDt.withCurrentTime());
retVal.setFhirVersion("0.80"); // TODO: pull from model
retVal.setAcceptUnknown(false); // TODO: make this configurable - this is a fairly big effort since the parser needs to be modified to actually allow it
retVal.getImplementation().setDescription(myRestfulServer.getImplementationDescription());
retVal.getSoftware().setName(myRestfulServer.getServerName());
retVal.getSoftware().setVersion(myRestfulServer.getServerVersion());
retVal.addFormat(Constants.CT_FHIR_XML);
retVal.addFormat(Constants.CT_FHIR_JSON);
Rest rest = retVal.addRest();
rest.setMode(RestfulConformanceModeEnum.SERVER);
Set<RestfulOperationSystemEnum> systemOps = new HashSet<RestfulOperationSystemEnum>();
List<ResourceBinding> bindings = new ArrayList<ResourceBinding>(myRestfulServer.getResourceBindings());
Collections.sort(bindings, new Comparator<ResourceBinding>() {
@Override
public int compare(ResourceBinding theArg0, ResourceBinding theArg1) {
return theArg0.getResourceName().compareToIgnoreCase(theArg1.getResourceName());
}
});
for (ResourceBinding next : bindings) {
Set<RestfulOperationTypeEnum> resourceOps = new HashSet<RestfulOperationTypeEnum>();
RestResource resource = rest.addResource();
String resourceName = next.getResourceName();
RuntimeResourceDefinition def = myRestfulServer.getFhirContext().getResourceDefinition(resourceName);
resource.getType().setValue(def.getName());
resource.getProfile().setReference(new IdDt(def.getResourceProfile()));
TreeSet<String> includes = new TreeSet<String>();
// Map<String, Conformance.RestResourceSearchParam> nameToSearchParam = new HashMap<String,
// Conformance.RestResourceSearchParam>();
for (BaseMethodBinding<?> nextMethodBinding : next.getMethodBindings()) {
RestfulOperationTypeEnum resOp = nextMethodBinding.getResourceOperationType();
if (resOp != null) {
if (resourceOps.contains(resOp) == false) {
resourceOps.add(resOp);
resource.addOperation().setCode(resOp);
}
}
RestfulOperationSystemEnum sysOp = nextMethodBinding.getSystemOperationType();
if (sysOp != null) {
if (systemOps.contains(sysOp) == false) {
systemOps.add(sysOp);
rest.addOperation().setCode(sysOp);
}
}
if (nextMethodBinding instanceof SearchMethodBinding) {
handleSearchMethodBinding(rest, resource, resourceName, def, includes, (SearchMethodBinding) nextMethodBinding);
} else if (nextMethodBinding instanceof DynamicSearchMethodBinding) {
handleDynamicSearchMethodBinding(resource, def, includes, (DynamicSearchMethodBinding) nextMethodBinding);
}
Collections.sort(resource.getOperation(), new Comparator<RestResourceOperation>() {
@Override
public int compare(RestResourceOperation theO1, RestResourceOperation theO2) {
RestfulOperationTypeEnum o1 = theO1.getCode().getValueAsEnum();
RestfulOperationTypeEnum o2 = theO2.getCode().getValueAsEnum();
if (o1 == null && o2 == null) {
return 0;
}
if (o1 == null) {
return 1;
}
if (o2 == null) {
return -1;
}
return o1.ordinal() - o2.ordinal();
}
});
}
for (String nextInclude : includes) {
resource.addSearchInclude(nextInclude);
}
}
myConformance = retVal;
return retVal;
}
private void handleDynamicSearchMethodBinding(RestResource resource, RuntimeResourceDefinition def, TreeSet<String> includes, DynamicSearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
List<RuntimeSearchParam> searchParameters = new ArrayList<RuntimeSearchParam>();
searchParameters.addAll(searchMethodBinding.getSearchParams());
sortRuntimeSearchParameters(searchParameters);
if (!searchParameters.isEmpty()) {
for (RuntimeSearchParam nextParameter : searchParameters) {
String nextParamName = nextParameter.getName();
// String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
// chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
String nextParamDescription = nextParameter.getDescription();
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
RestResourceSearchParam param;
param = resource.addSearchParam();
param.setName(nextParamName);
// if (StringUtils.isNotBlank(chain)) {
// param.addChain(chain);
// }
param.setDocumentation(nextParamDescription);
param.setType(nextParameter.getParamType());
}
}
}
private void handleSearchMethodBinding(Rest rest, RestResource resource, String resourceName, RuntimeResourceDefinition def, TreeSet<String> includes, SearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
List<IParameter> params = searchMethodBinding.getParameters();
List<SearchParameter> searchParameters = new ArrayList<SearchParameter>();
for (IParameter nextParameter : params) {
if ((nextParameter instanceof SearchParameter)) {
searchParameters.add((SearchParameter) nextParameter);
}
}
sortSearchParameters(searchParameters);
if (!searchParameters.isEmpty()) {
boolean allOptional = searchParameters.get(0).isRequired() == false;
RestQuery query = null;
if (!allOptional) {
query = rest.addQuery();
query.getDocumentation().setValue(searchMethodBinding.getDescription());
query.addUndeclaredExtension(false, ExtensionConstants.QUERY_RETURN_TYPE, new CodeDt(resourceName));
for (String nextInclude : searchMethodBinding.getIncludes()) {
query.addUndeclaredExtension(false, ExtensionConstants.QUERY_ALLOWED_INCLUDE, new StringDt(nextInclude));
}
}
for (SearchParameter nextParameter : searchParameters) {
String nextParamName = nextParameter.getName();
// String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
// chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
String nextParamDescription = nextParameter.getDescription();
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
RestResourceSearchParam param;
if (query == null) {
param = resource.addSearchParam();
} else {
param = query.addParameter();
param.addUndeclaredExtension(false, ExtensionConstants.PARAM_IS_REQUIRED, new BooleanDt(nextParameter.isRequired()));
}
param.setName(nextParamName);
// if (StringUtils.isNotBlank(chain)) {
// param.addChain(chain);
// }
param.setDocumentation(nextParamDescription);
param.setType(nextParameter.getParamType());
for (Class<? extends IResource> nextTarget : nextParameter.getDeclaredTypes()) {
RuntimeResourceDefinition targetDef = myRestfulServer.getFhirContext().getResourceDefinition(nextTarget);
if (targetDef != null) {
ResourceTypeEnum code = ResourceTypeEnum.VALUESET_BINDER.fromCodeString(targetDef.getName());
if (code != null) {
param.addTarget(code);
}
}
}
}
}
}
/**
* Sets the cache property (default is true). If set to true, the same response will be returned for each
* invocation.
* <p>
* See the class documentation for an important note if you are extending this class
* </p>
*/
public void setCache(boolean theCache) {
myCache = theCache;
}
/**
* Sets the value of the "publisher" that will be placed in the generated conformance statement. As this
* is a mandatory element, the value should not be null (although this is not enforced). The value defaults
* to "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public void setPublisher(String thePublisher) {
myPublisher = thePublisher;
}
private void sortRuntimeSearchParameters(List<RuntimeSearchParam> searchParameters) {
Collections.sort(searchParameters, new Comparator<RuntimeSearchParam>() {
@Override
public int compare(RuntimeSearchParam theO1, RuntimeSearchParam theO2) {
return theO1.getName().compareTo(theO2.getName());
}
});
}
private void sortSearchParameters(List<SearchParameter> searchParameters) {
Collections.sort(searchParameters, new Comparator<SearchParameter>() {
@Override
public int compare(SearchParameter theO1, SearchParameter theO2) {
if (theO1.isRequired() == theO2.isRequired()) {
return theO1.getName().compareTo(theO2.getName());
}
if (theO1.isRequired()) {
return -1;
}
return 1;
}
});
}
}

View File

@ -1,79 +0,0 @@
package ca.uhn.fhir.rest.server.provider;
/*
* #%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.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Profile;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.annotation.IdParam;
import ca.uhn.fhir.rest.annotation.Read;
import ca.uhn.fhir.rest.annotation.Search;
import ca.uhn.fhir.rest.server.IResourceProvider;
public class ServerProfileProvider implements IResourceProvider {
private FhirContext myContext;
public ServerProfileProvider(FhirContext theContext) {
myContext = theContext;
}
@Override
public Class<? extends IResource> getResourceType() {
return Profile.class;
}
@Read()
public Profile getProfileById(@IdParam IdDt theId) {
RuntimeResourceDefinition retVal = myContext.getResourceDefinitionById(theId.getValue());
if (retVal==null) {
return null;
}
return retVal.toProfile();
}
@Search()
public List<Profile> getAllProfiles() {
List<RuntimeResourceDefinition> defs = new ArrayList<RuntimeResourceDefinition>(myContext.getResourceDefinitions());
Collections.sort(defs, new Comparator<RuntimeResourceDefinition>() {
@Override
public int compare(RuntimeResourceDefinition theO1, RuntimeResourceDefinition theO2) {
int cmp = theO1.getName().compareTo(theO2.getName());
if (cmp==0) {
cmp=theO1.getResourceProfile().compareTo(theO2.getResourceProfile());
}
return cmp;
}});
ArrayList<Profile> retVal = new ArrayList<Profile>();
for (RuntimeResourceDefinition next : defs) {
retVal.add(next.toProfile());
}
return retVal;
}
}

View File

@ -1,54 +0,0 @@
Creating your own demo server with Vagrant
========
This source code repository includes configuration files to materialize an _entire_ server implementation off all project build artifacts in a single virtual machine (VM) image from scratch, allowing you to quickly bootstrap your own local copy of the project. The server will be completely encapsulated within the created VM image. The process _should_ run on OSX, Linux and Windows, but YMMV. The built-in settings support creation of a *VirtualBox*-based image on Ubuntu Linux, though with tuning of the base image you should be able to create images suitable for other hypervisors and cloud-based IaaS providers such as VMware and Amazon Web Services (AWS), respectively.
Dependencies
----
Prior to running, please ensure you have all .war files built, and the following installed and functioning propertly.
* All normal Java development dependencies. (Java SDK and Maven 3, specifically.)
* VirtualBox
* Vagrant
Creating Your VM
----
cd hapi-fhir-root/
mvn install # Creates web application .war files. Make sure they're built before proceeding!
cd vagrant
vagrant up # Will take a few minutes to boot up.
Your new server environment should now be running in a headless virtual machine on your local computer. The following step are performed automatically for you within the VM sandbox environment:
* A complete Ubuntu 14.04 Server VM is launched in headless mode, bridged to whatever host network interface you've selected.
* An IPv4 address is assigned via DHCP.
* MySQL Server (Community Edition) is installed from the official 10gen repository. (See the [Vagrantfile](https://github.com/preston/hapi-fhir/blob/master/vagrant/Vagrantfile) for the default root password.)
* Oracle Java 8 is installed.
* Tomcat 7 is installed and configured as a system service.
* All compiled *.war applications are deployed automatically and started.
* A "fhir" user is added to tomcat-users.xml. See [fhir.json](https://github.com/preston/hapi-fhir/blob/master/vagrant/chef/data_bags/tomcat_users/fhir.json) for the default password.
Tomcat will now be running on the VM on port 8080 with the management GUI available. For example, you can now visit:
* *Tomcat Manager*: assigned_ip:8080/manager/html
* *HAPI FHIR* JPA Server: assigned_ip:8080/hapi-fhir-jpaserver/
Screenshots
----
![Tomcat Manager](https://raw.githubusercontent.com/preston/hapi-fhir/master/vagrant/screenshots/tomcat.png)
![Demo Server](https://raw.githubusercontent.com/preston/hapi-fhir/master/vagrant/screenshots/hapi-fhir-jpaserver.png)
Advanced Configuration
----
The Vagrant documentation is the best place to start, but a few more commands of note are:
vagrant ssh # Command-line access to the VM.
vagrant destoy # Shuts down and completely destroys the VM.
Credits
----
Vagrant and Chef configuration by Preston Lee <preston.lee@prestonlee.com>

View File

@ -1,133 +0,0 @@
#bodyColumn {
width: 78.5% !important;
/*
margin-left: 180px !important;
*/
}
#breadcrumbs {
background: white;
padding: 0px;
/*
border-bottom-width: 1px;
border-bottom-color: #C0C0C0;
border-bottom-style: solid;
*/
height: 40px;
}
#search-form {
width: 140px;
}
#navcolumn {
background-color: white !important;
}
#leftColumn {
border: none !important;
width: 19% !important;
margin: 0px;
}
#navcolumn h5 {
color: #806020;
background-color: #FFF0C0;
border-bottom: 1px solid #E3701A;
}
#navcolumn li.expanded {
background: url("") !important;
}
.nobr {
white-space: nowrap;
}
.section {
padding: 0px;
}
.section h2 {
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #CF4711;
background-color: #FF5721;
color: #FFA;
font-size: 1.5em;
line-height: 1.4em;
}
.section h3 {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #993300;
width: 66%;
background-image: url('images/littlehapiface.png');
background-repeat: no-repeat;
padding-left: 25px;
font-size: 1.3em;
line-height: 1.3em;
}
.syntaxhighlighter {
font-size: 0.85em !important;
}
.syntaxhighlighter .line.alt1,
.syntaxhighlighter .line.alt2
{
background-color: #F8F8F8 !important;
}
.table th, .table td {
padding: 2px;
}
tt {
white-space: pre;
color: #448;
margin-bottom: 5px;
margin-top: 10px;
padding: 2px;
border: 1px solid #AAA;
}
h1,h2,h3,h4,h5 {
color: #E3701A;
font-weight: bold;
}
h4 {
font-size: 1.2em;
padding: 0px;
margin-bottom: 0px;
}
li.expanded ul {
border-left: 2px solid #C0FFC0;
margin: 0px 0px 4px 0px !important;
}
li.expanded ul li {
padding-left: 2px !important;
}
dfn {
color: #008000;
background-color: #E0FFE0;
border-bottom: 1px dotted #40A040;
}
a,a.externalLink,a:active,a:hover,a:link,a:visited {
color: #993300;
}
DIV.sidebar-nav UL LI UL LI {
/*
list-style: initial;
list-style-type: circle;
*/
font-size: 0.9em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

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