Class EverythingOperation
- java.lang.Object
-
- org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
-
- org.linuxforhealth.fhir.operation.everything.EverythingOperation
-
- All Implemented Interfaces:
FHIROperation
public class EverythingOperation extends AbstractOperation
This class implements the $everything operation which is used to return all the information related to one or more patients described in the resource or context on which this operation is invoked.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DATE_QUERY_PARAMETER
The "date" query parameter used in the underlying search operation.protected static java.lang.String
END_QUERY_PARAMETER
The query parameter to indicate a stop date for the $everything operationprotected static java.lang.String
LAST_UPDATED_QUERY_PARAMETER
The "_lastUpdated" query parameter used in the underlying search operation.protected static java.lang.String
SINCE_QUERY_PARAMETER
The query parameter to only return resources last update since a date for the $everything operationprotected static java.lang.String
START_QUERY_PARAMETER
The query parameter to indicate a start date for the $everything operationprotected static java.lang.String
STARTING_FROM
The prefix used to indicate the start date for the $everything resourcesprotected static java.lang.String
UP_UNTIL
The prefix used to indicate the end date for the $everything resources-
Fields inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
definition
-
-
Constructor Summary
Constructors Constructor Description EverythingOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationDefinition
buildOperationDefinition()
protected Parameters
doInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper)
This is the method that concrete subclasses must implement to perform the operation logic.protected java.util.List<java.lang.String>
getOverridenIncludedResourceTypes(Parameters parameters, java.util.List<java.lang.String> defaultResourceTypes)
Get the list of resource types requested by the user via the _type parameterprotected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
parseQueryParameters(Parameters parameters, int maxPageSize)
Parse the parameters and turn them into aMultivaluedMap
to pass to the search service-
Methods inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, countParameters, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, isAbstractResourceTypesDisallowed, isAdditionalMethodAllowed, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters
-
-
-
-
Field Detail
-
STARTING_FROM
protected static final java.lang.String STARTING_FROM
The prefix used to indicate the start date for the $everything resources
-
UP_UNTIL
protected static final java.lang.String UP_UNTIL
The prefix used to indicate the end date for the $everything resources
-
DATE_QUERY_PARAMETER
protected static final java.lang.String DATE_QUERY_PARAMETER
The "date" query parameter used in the underlying search operation.- See Also:
- Constant Field Values
-
LAST_UPDATED_QUERY_PARAMETER
protected static final java.lang.String LAST_UPDATED_QUERY_PARAMETER
The "_lastUpdated" query parameter used in the underlying search operation.- See Also:
- Constant Field Values
-
START_QUERY_PARAMETER
protected static final java.lang.String START_QUERY_PARAMETER
The query parameter to indicate a start date for the $everything operation- See Also:
- Constant Field Values
-
END_QUERY_PARAMETER
protected static final java.lang.String END_QUERY_PARAMETER
The query parameter to indicate a stop date for the $everything operation- See Also:
- Constant Field Values
-
SINCE_QUERY_PARAMETER
protected static final java.lang.String SINCE_QUERY_PARAMETER
The query parameter to only return resources last update since a date for the $everything operation- See Also:
- Constant Field Values
-
-
Method Detail
-
buildOperationDefinition
protected OperationDefinition buildOperationDefinition()
- Specified by:
buildOperationDefinition
in classAbstractOperation
-
doInvoke
protected Parameters doInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper) throws FHIROperationException
Description copied from class:AbstractOperation
This is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
doInvoke
in classAbstractOperation
- Returns:
- the Parameters object to return or null if there is no response Parameters object to return
- Throws:
FHIROperationException
-
parseQueryParameters
protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parseQueryParameters(Parameters parameters, int maxPageSize)
Parse the parameters and turn them into aMultivaluedMap
to pass to the search service- Parameters:
parameters
- the operation parametersmaxPageSize
- the max page size- Returns:
- the
MultivaluedMap
for the search service built from the parameters
-
getOverridenIncludedResourceTypes
protected java.util.List<java.lang.String> getOverridenIncludedResourceTypes(Parameters parameters, java.util.List<java.lang.String> defaultResourceTypes) throws FHIRSearchException
Get the list of resource types requested by the user via the _type parameter- Parameters:
parameters
- theParameters
object- Returns:
- the list of patient subresources that will be included in the $everything operation, as provided by the user
- Throws:
FHIRSearchException
-
-