Skip to main content

HS.FHIRServer.Utils

abstract class HS.FHIRServer.Utils

This class has a subset of methods refactored from HS.FHIR.Util

Method Inventory

Methods

classmethod ConvertToUTC(pDateTime As %String) as %String
API ConvertToUTC takes a date time value and converts it to UTC time. Expected input format is YYYY-MM-DDTHH:MM:SS[.ssss][(+/-)HH:MM]/[Z]. A date-only input value is returned unchanged. A date time input value with the "Z" time zone appended is returned unchanged.
classmethod GetOAuthServerMetaByService(pServiceName As %String) as %DynamicObject
API
GetOAuthMetadataByServiceName derives an endpoint URL from the specified Service Registry entry, then gets the OAuth 2.0 authorization server metadata at that issuer URL. It then returns the metadata as a %DynamicObject.
classmethod Subsetted(ByRef pResource As %DynamicObject, pReason As %String)
Adds the SUBSETTED code to a resource's meta.tag to indicate some portion was omitted (like from _summary or _elements)
classmethod URLParamStringToArray(pParametersString As %String, Output pParametersArray As HS.FHIRServer.API.Data.QueryParameters)
API URLParamStringToArray takes a URL parameters string and converts it to an array of $List.

Input:
  • pParametersString : Parameters string exactly as one would see in a request URL.

    Output:
  • pParametersArray : %Library.ArrayOfDataTypes that is an array of $List, indexed by parameter name. Use the GetParameterCount() and GetParameterValue() methods of this class to extract information from this array.
  • classmethod URLParameterArrayToString(pParametersArray As %Library.ArrayOfDataTypes) as %String
    classmethod ValidateAndConvertDate(pParamName As %String, ByRef pDate As %String)
    @API Method
    Validate a date query param and convert to a UTC timestamp
    Throws an error if pDate fails validation
    Input: pParamName is just informational in the event an error is thrown
    Input: pDate can be in the format:
    YYYY
    YYYY-MM
    YYYY-MM-DD
    YYYY-MM-DDThh:mm
    YYYY-MM-DDThh:mm:ss[+/-hh:mm|Z] (timezone optional)
    YYYY-MM-DDThh:mm:ss.nnn[+/-hh:mm|Z] (timezone optional)
    This method will also assert that month, date, hour, minute and second values are valid
    final classmethod isLicensedforRepo() as %Boolean
    FeedbackOpens in a new tab