Skip to main content

HS.FHIRServer.Util.FHIRQueryUtils

class HS.FHIRServer.Util.FHIRQueryUtils extends HS.FHIRMeta.MetaUtils, HS.FHIRServer.Util.RunSQLQuery

This class is intended to be inherited into other classes that work with SQL and FHIR-based data. It provides conversion utilities as well as naming conventions that are shared among Table Generation, Indexing, and Querying

Method Inventory

Parameters

parameter PERIODENDSUFFIX = End;
Suffix to create Column Name from property name for end-of-period
parameter PERIODSTARTSUFFIX = Start;
Suffix to create Column Name from property name for start-of-period

Methods

classmethod FirstInstant(pVal As %String) as %String
This method is used by Indexer and by Search.

Given a date, partial date or partial timestamp, return the first instant (second), converted to UTC, that falls within that input.
For example, an input value of "1974" when the current server is in US Eastern time would return "1974-01-01T05:00:00Z".
A date/time that already has second precision will be returned with fractional seconds stripped.
classmethod HighDecimal(pVal As %String) as %Decimal
Method used by Indexer and Search Calculates the high value of the implicit range of a Decimal based on its precision Should be passed in as a string to preserve trailing zeros Supports decimal and exponential notation e.g.: the high value of 2 is 2.5, 2.0 is 2.05
classmethod LastInstant(pVal As %String) as %String
This method is used by Indexer and by Search. It assumes that the input value has already been validated.
Given a date, partial date or partial timestamp, return the last instant (second), converted to UTC, that falls within that input.
For example, an input value of "1974" when the current server is in US Eastern time would return "1975-01-01T04:59:59Z".
classmethod LowDecimal(pVal As %String) as %Decimal
Method used by Indexer and Search Calculates the low value of the implicit range of a Decimal based on its precision Should be passed in as a string to preserve trailing zeros Supports decimal and exponential notation e.g.: the low value of 2 is 1.5, 2.0 is 1.95
classmethod NormalizePhone(pVal As %String) as %String
Normalize a phone number for indexing and search by stripping out punctuation and whitespace
classmethod PreviousInstant(pVal As %String) as %String
Given a timestamp in YYYY-MM-DDThh:mm:ss format, return the value of the timestamp that is one second prior

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab