HS.FHIRServer.Storage.JsonAdvSQL.Search
abstract class HS.FHIRServer.Storage.JsonAdvSQL.Search extends %Library.RegisteredObject, HS.FHIRServer.API.Interactions, HS.FHIRServer.Util.FHIRQueryUtils
Property Inventory
- JSONSearchColumnContext
- SearchContext
- isPreferStrictHandling
- queriedResourceTypes
- strategy
- useTopForMaxResults
Method Inventory
- AddQueriedResourceTypes()
- Search()
- SearchIncludes()
- findSearchColumn()
- getSearchColumn()
- getTableForResourceType()
- isSelectCountAllowed()
- searchColumnFromSearchParam()
Properties
property JSONSearchColumnContext [ MultiDimensional , Transient ];
Cache info about JSON Search columns needed to generate include queries
Property methods: JSONSearchColumnContextDisplayToLogical(), JSONSearchColumnContextGet(), JSONSearchColumnContextIsValid(), JSONSearchColumnContextLogicalToDisplay(), JSONSearchColumnContextLogicalToOdbc(), JSONSearchColumnContextNormalize(), JSONSearchColumnContextSet()
property SearchContext [ MultiDimensional , Transient ];
useful catch-all for SQL Queries, table aliases, which resource types have been 'included' via _include/_revinclude
Structure:
SearchContext("searchParameters") = ; reference to the HS.FHIRServer.API.Data.QueryParameters passed into the Search() method
SearchContext("SELECT") =
SearchContext("FROM") =
SearchContext("JOINIDX") = counter for assigning Match query aliases
SearchContext("JOINIDX", ) =
SearchContext("sqlANDWHEREparams") =
SearchContext("sqlANDWHEREparams", ) =
SearchContext("sqlORWHEREparams") =
SearchContext("sqlORWHEREparams", ) =
SearchContext("whereClauseSeparator") =
Property methods: SearchContextDisplayToLogical(), SearchContextGet(), SearchContextIsValid(), SearchContextLogicalToDisplay(), SearchContextLogicalToOdbc(), SearchContextNormalize(), SearchContextSet()
property isPreferStrictHandling as %Boolean;
Is 'handling=strict' from the Prefer http header
Property methods: isPreferStrictHandlingDisplayToLogical(), isPreferStrictHandlingGet(), isPreferStrictHandlingIsValid(), isPreferStrictHandlingLogicalToDisplay(), isPreferStrictHandlingNormalize(), isPreferStrictHandlingSet()
property queriedResourceTypes as %List;
Property methods: queriedResourceTypesGet(), queriedResourceTypesIsValid(), queriedResourceTypesLogicalToOdbc(), queriedResourceTypesOdbcToLogical(), queriedResourceTypesSet()
property strategy as HS.FHIRServer.Storage.JsonAdvSQL.InteractionsStrategy;
Property methods: strategyGet(), strategyGetSwizzled(), strategyIsValid(), strategyNewObject(), strategySet()
property useTopForMaxResults as %Boolean;
This property is set to 1 when ..strategy.GetStrategyConfigInfo()."use_top_for_maxresults" is true and is initialized when calling ##class(HS.FHIRServer.Storage.JsonAdvSQL.Interactions).%OnNew()
Property methods: useTopForMaxResultsDisplayToLogical(), useTopForMaxResultsGet(), useTopForMaxResultsIsValid(), useTopForMaxResultsLogicalToDisplay(), useTopForMaxResultsNormalize(), useTopForMaxResultsSet()
Methods
method AddQueriedResourceTypes(resourceType As %String)
Allows specific interactions to compile a list of all resource types
which are queried for this request (regardless of whether any are
actually returned).
method Search(pResourceType As %String, pCompartment As %String, pCompartmentId As %String, pParameters As HS.FHIRServer.API.Data.QueryParameters = "", ByRef pSortKeys="") as HS.FHIRServer.Util.SearchResult
@API
This method performs the requested search for resources and returns a HS.FHIRServer.Util.SearchResult
with the selected resource information. If the query specifies _include or _revinclude parameters, then
resources of type other than 'pResourceType' will be part of the result set. Included resources will
be denoted in the result set 'Mode' column with the value 'include'
@Input pResourceType The 'resourceType' of the resource to be searched
@Input pCompartmentType If not "", indicates a compartment search of the specified Compartment Type and Id
@Input pCompartmentId The ID of the resource comartment being searched
@Input pParameters A HS.FHIRServer.API.Data.QueryParameters describing the query parameters specified for the search
@Input pSortKeys (ByRef) A multi-dimensional structure describing any sorting to be performed on the result set. The
structure of pSortKeys is an array of sort keys indexed 1-n:
pSortKeys(n) = 1 for ascending, 0 for descending
pSortKeys(n, "SearchParam") = An HS.FHIRServer.SearchParam object whose value is used to sort.
@Return A HS.FHIRServer.Util.SearchResult object containing one row for each selected resource.
@Throws The implementation must report errors via $$$ThrowStatus.
method SearchIncludes(pResultSet As HS.FHIRServer.Util.SearchResult, pParameters As %Library.String, ByRef pContext As %Library.String, ByRef pIncludeIterArr As %Library.String, ByRef pIterateConfig As %Library.String)
Perform all searching of included resources for _include and _revinclude search params.
Recurses for :iterate modifier
abstract method findSearchColumn(resourceType As %String, paramName As %String) as HS.FHIRServer.Storage.Json.SearchColumn
This method is in the subclass of this (part of the Interactions object)
abstract method getSearchColumn(resourceType As %String, paramName As %String) as HS.FHIRServer.Storage.Json.SearchColumn
abstract method getTableForResourceType(pResourceType As %String, pChildName As %String = "", pShortName As %Boolean = 0) as %String
method isSelectCountAllowed(pResourceType As %String, pCompartment As %String, pCompartmentId As %String, pParameters As HS.FHIRServer.API.Data.QueryParameters = "") as %Boolean
@API.Overridable
Return a Boolean value indicating whether SQL SELECT COUNT for _summary=count or _count=0 is allowed by this implementation.
The default implementation is to return True only if this is the base 'Json/JsonAdvSQL' strategy implementation. If the base implementation is overridden and customized, that implementation must OPT IN to allowing SELECT COUNT by overriding this method and adding their own desired heuristic.
@Input pResourceType The 'resourceType' of the resource to be searched
@Input pCompartmentType If not "", indicates a compartment search of the specified Compartment Type and Id
@Input pCompartmentId The ID of the resource comartment being searched
@Input pParameters A HS.FHIRServer.API.Data.QueryParameters describing the query parameters specified for the search
@Return Boolean value indicating whether using SQL SELECT COUNT is allowed.
Return a Boolean value indicating whether SQL SELECT COUNT for _summary=count or _count=0 is allowed by this implementation.
The default implementation is to return True only if this is the base 'Json/JsonAdvSQL' strategy implementation. If the base implementation is overridden and customized, that implementation must OPT IN to allowing SELECT COUNT by overriding this method and adding their own desired heuristic.
@Input pResourceType The 'resourceType' of the resource to be searched
@Input pCompartmentType If not "", indicates a compartment search of the specified Compartment Type and Id
@Input pCompartmentId The ID of the resource comartment being searched
@Input pParameters A HS.FHIRServer.API.Data.QueryParameters describing the query parameters specified for the search
@Return Boolean value indicating whether using SQL SELECT COUNT is allowed.
method searchColumnFromSearchParam(searchParam As HS.FHIRServer.SearchParam) as HS.FHIRServer.Storage.Json.SearchColumn
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Add()
- AddNewFHIRMetaSubs()
- Batch()
- Delete()
- FindResourceMeta()
- FirstInstant()
- GetListOfResources()
- GetPatientStatus()
- GetResourceMeta()
- GetVersionList()
- HardDelete()
- HighDecimal()
- History()
- JSONPatch()
- LastInstant()
- LoadMetadata()
- LowDecimal()
- MapToFHIRVersionHeader()
- MapToPackageId()
- NormalizeParamName()
- NormalizePhone()
- OnAfterRequest()
- OnBeforeRequest()
- Operation()
- PostProcessRead()
- PostProcessSearch()
- PreviousInstant()
- Read()
- SetMetadata()
- SetupVersionsTable()
- Update()
- runQuery()