Skip to main content

HS.BulkFHIR.Session

persistent class HS.BulkFHIR.Session extends %Library.Persistent, HS.BulkFHIR.Util

SQL Table Name: HS_BulkFHIR.Session

Property Inventory

Method Inventory

Properties

property client as %String (MAXLEN = 300);
Name of the client making the request (username or client id)
Property methods: clientDisplayToLogical(), clientGet(), clientGetStored(), clientIsValid(), clientLogicalToDisplay(), clientLogicalToOdbc(), clientNormalize(), clientSet()
property completionTime as %TimeStamp;
The time when a session reached a final state (complete, terminated).
Property methods: completionTimeDisplayToLogical(), completionTimeGet(), completionTimeGetStored(), completionTimeIsValid(), completionTimeLogicalToDisplay(), completionTimeNormalize(), completionTimeOdbcToLogical(), completionTimeSet()
property config as %DynamicObject;
Copy of BulkFHIR configuration at time session started (in dynamic object format)
Property methods: configGet(), configGetObject(), configGetObjectId(), configGetStored(), configGetSwizzled(), configIsValid(), configNewObject(), configSet(), configSetObject(), configSetObjectId(), configUnSwizzle()
property configuration as HS.BulkFHIR.API.Data.Config [ Calculated ];
calculated property to return parsed configuration
property deleteInProgress as %Boolean [ InitialExpression = 0 ];
Flag to indicate that a session delete (Terminate or Delete) is in progress.
Property methods: deleteInProgressDisplayToLogical(), deleteInProgressGet(), deleteInProgressGetStored(), deleteInProgressIsValid(), deleteInProgressLogicalToDisplay(), deleteInProgressNormalize(), deleteInProgressSet()
property errorCount as %Integer;
How many errors are included in this export operation
Property methods: errorCountDisplayToLogical(), errorCountGet(), errorCountGetStored(), errorCountIsValid(), errorCountLogicalToDisplay(), errorCountNormalize(), errorCountSet()
property expiresTime as %TimeStamp;
The time when a session will be deemed expired and files may be purged
Property methods: expiresTimeDisplayToLogical(), expiresTimeGet(), expiresTimeGetStored(), expiresTimeIsValid(), expiresTimeLogicalToDisplay(), expiresTimeNormalize(), expiresTimeOdbcToLogical(), expiresTimeSet()
property exportSize as %Integer;
How large (in bytes) the contents of the export operation are
Property methods: exportSizeDisplayToLogical(), exportSizeGet(), exportSizeGetStored(), exportSizeIsValid(), exportSizeLogicalToDisplay(), exportSizeNormalize(), exportSizeSet()
property fetchTokenInfo as %DynamicObject;
%DynamicObject of information to be used as part of access token request to the resource server during export processing.
Property methods: fetchTokenInfoGet(), fetchTokenInfoGetObject(), fetchTokenInfoGetObjectId(), fetchTokenInfoGetStored(), fetchTokenInfoGetSwizzled(), fetchTokenInfoIsValid(), fetchTokenInfoNewObject(), fetchTokenInfoSet(), fetchTokenInfoSetObject(), fetchTokenInfoSetObjectId(), fetchTokenInfoUnSwizzle()
property fileEndpoint as %String (MAXLEN = 512);
Property methods: fileEndpointDisplayToLogical(), fileEndpointGet(), fileEndpointGetStored(), fileEndpointIsValid(), fileEndpointLogicalToDisplay(), fileEndpointLogicalToOdbc(), fileEndpointNormalize(), fileEndpointSet()
property permitSystemScopes as %Boolean [ InitialExpression = 0 ];
Property methods: permitSystemScopesDisplayToLogical(), permitSystemScopesGet(), permitSystemScopesGetStored(), permitSystemScopesIsValid(), permitSystemScopesLogicalToDisplay(), permitSystemScopesNormalize(), permitSystemScopesSet()
property purged as %Boolean [ InitialExpression = 0 ];
Whether the files for this session have been successfully purged, either due to its early termination or expiration window passing.
Property methods: purgedDisplayToLogical(), purgedGet(), purgedGetStored(), purgedIsValid(), purgedLogicalToDisplay(), purgedNormalize(), purgedSet()
property request as HS.FHIRServer.API.Data.Request;
Property methods: requestGet(), requestGetObject(), requestGetObjectId(), requestGetStored(), requestGetSwizzled(), requestIsEmpty(), requestIsValid(), requestNewObject(), requestSet(), requestSetObject(), requestSetObjectId(), requestUnSwizzle()
property requestJson as %DynamicObject [ Calculated , Transient ];
%DynamicObject of the HTTP content body of the $export request.
property requestTime as %TimeStamp [ InitialExpression = $zdt($zts, 3) ];
A collection of url's (stored items) storing the resourceType, count, and size $lb(type, count, size) Similar to the collection of links but a collection of error files, url for the item with type, count and size $lb(type, count, size) The time when the export operation was requested.
Property methods: requestTimeDisplayToLogical(), requestTimeGet(), requestTimeGetStored(), requestTimeIsValid(), requestTimeLogicalToDisplay(), requestTimeNormalize(), requestTimeOdbcToLogical(), requestTimeSet()
property requestUrl as %String (MAXLEN = 500);
Full url containing the request made by the client
Property methods: requestUrlDisplayToLogical(), requestUrlGet(), requestUrlGetStored(), requestUrlIsValid(), requestUrlLogicalToDisplay(), requestUrlLogicalToOdbc(), requestUrlNormalize(), requestUrlSet()
property resourceCount as %Integer;
How many resources are included in this export operation
Property methods: resourceCountDisplayToLogical(), resourceCountGet(), resourceCountGetStored(), resourceCountIsValid(), resourceCountLogicalToDisplay(), resourceCountNormalize(), resourceCountSet()
property runningSession as %DynamicObject [ Transient ];
used for storage of compute intensive items ie runningSession.meta = ##class(HS.FHIRMeta.API).getInstance($lb("hl7.fhir.r4.core@4.0.1"))
Property methods: runningSessionGet(), runningSessionGetObject(), runningSessionGetObjectId(), runningSessionGetSwizzled(), runningSessionIsValid(), runningSessionNewObject(), runningSessionSet(), runningSessionSetObject(), runningSessionSetObjectId(), runningSessionUnSwizzle()
property schedule as %DynamicObject;
Property methods: scheduleGet(), scheduleGetObject(), scheduleGetObjectId(), scheduleGetStored(), scheduleGetSwizzled(), scheduleIsValid(), scheduleNewObject(), scheduleSet(), scheduleSetObject(), scheduleSetObjectId(), scheduleUnSwizzle()
property sessionId as %String [ Transient ];
backward compatible for UI
Property methods: sessionIdCompute(), sessionIdDisplayToLogical(), sessionIdIsValid(), sessionIdLogicalToDisplay(), sessionIdLogicalToOdbc(), sessionIdNormalize(), sessionIdSQLCompute(), sessionIdSet(), sessionIdSetT()
property sinceSeconds as %Decimal [ InitialExpression = 0.0 ];
"_since" requestUrl parameter value, expressed as number of seconds since $Horolog 0, in UTC time.
Property methods: sinceSecondsDisplayToLogical(), sinceSecondsGet(), sinceSecondsGetStored(), sinceSecondsIsValid(), sinceSecondsLogicalToDisplay(), sinceSecondsNormalize(), sinceSecondsSet()
property status as %String (VALUELIST = ",pending,in-progress,error,complete,terminated,") [ InitialExpression = "pending" ];
Status of the operation. "pending" is the initial state and is used when the job has been requested but isn't actively being worked on (either waiting or paused) "in-progress" represents a job that's actively being worked on, and may transition to any of the other statuses (ie. may be paused, may finish, may error out). "complete" is a terminal status representing an export operation that has finished without error "terminated" is a terminal status representing an export operation that was stopped before it could finish, either by client request or by fatal error.
Property methods: statusDisplayToLogical(), statusGet(), statusGetStored(), statusIsValid(), statusLogicalToDisplay(), statusLogicalToOdbc(), statusNormalize(), statusSet()
property terminatedReason as %String);
If the session was terminated before it could be completed, a description (or error text) of why that occurred.
Property methods: terminatedReasonDisplayToLogical(), terminatedReasonGet(), terminatedReasonGetStored(), terminatedReasonIsValid(), terminatedReasonLogicalToDisplay(), terminatedReasonLogicalToOdbc(), terminatedReasonNormalize(), terminatedReasonSet()
property tokenInfo as %DynamicObject;
%DynamicObject of Bulk FHIR endpoint request access token properties to make available for reference during export processing.
Property methods: tokenInfoGet(), tokenInfoGetObject(), tokenInfoGetObjectId(), tokenInfoGetStored(), tokenInfoGetSwizzled(), tokenInfoIsValid(), tokenInfoNewObject(), tokenInfoSet(), tokenInfoSetObject(), tokenInfoSetObjectId(), tokenInfoUnSwizzle()
property transactionTime as %TimeStamp;
The time when the export operation first began. This may be different from the time the request was made, if jobs aren't auto-started.
Property methods: transactionTimeDisplayToLogical(), transactionTimeGet(), transactionTimeGetStored(), transactionTimeIsValid(), transactionTimeLogicalToDisplay(), transactionTimeNormalize(), transactionTimeOdbcToLogical(), transactionTimeSet()
property transactionTimeSeconds as %Decimal [ InitialExpression = 0.0 ];
transactionTime, expressed as number of seconds since $Horolog 0, in UTC time.
Property methods: transactionTimeSecondsDisplayToLogical(), transactionTimeSecondsGet(), transactionTimeSecondsGetStored(), transactionTimeSecondsIsValid(), transactionTimeSecondsLogicalToDisplay(), transactionTimeSecondsNormalize(), transactionTimeSecondsSet()

Methods

method %OnAfterSave(insert As %Boolean) as %Status
Inherited description: This callback method is invoked by the %Save() method to provide notification that the object is being saved. It is called after the object's data has been successfully written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save() will fail.

method Complete(expiresAfterMins As %Integer)
method FinishDelete()
Mark the current session as having completed a Terminate/Cancel/Purge.
classmethod GetExpiredSessions() as %ListOfObjects
@API Returns all expired sessions that are not already purged or in the process of being purged, optionally filtered by status, sorted by when the request was initially made.
classmethod GetSessions(pStatus As %String = "", pEndpoint As %String = "", pPurged As %Boolean = "", pFileEndpoint As %String = "", pDeleteInProgress As %Boolean = "") as %ListOfObjects
@API Returns a list of sessions, filtered by the optional input parameters, sorted by when the request was initially made.
classmethod LinkPatient(pSession As HS.BulkFHIR.Session, pPatientId As %String)
Utility to indicate a patient id was accessed in this export operation This utility calls a SQL stored procedure to file the data (so that the permissions can be granted to UnknownUser)
method Pause()
method SafeSave() as %Status
if we don't remove the paramters we end up with a %GetSerial+1^%Library.ListOfObjects.1
method Start()
method StartDelete(reason As %String)
Mark the current session as having started a Terminate/Cancel/Purge.
method Terminate(reason As %String, expiresAfterMins)
Mark the current session as having completed the process of Terminating/Cancelling/Purging.
method ToJsonOutput(pBaseUrl As %String = "") as %DynamicObject
Using the specified full base url, plus current session object properties, generate and return the "status Complete" response content object.
method configurationGet() as HS.BulkFHIR.API.Data.Config
classmethod getBySessionId(pSessionId As %String, pConcurrency=0) as HS.BulkFHIR.Session
method requestJsonGet() as %DynamicObject
method requestJsonSet(pDynObj As %DynamicObject) as %Status
method sessionIdGet() as %String

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (clientIdx on client);
Index methods: clientIdxExists()
index (fileEndpointIdx on fileEndpoint);
Index methods: fileEndpointIdxExists()
index (purgedIdx on purged,expiresTime);
Index methods: purgedIdxExists()
index (sessionApplicationIdx on request.SessionApplication);
Index methods: sessionApplicationIdxExists()
index (statusIdx on status,requestTime);
Index methods: statusIdxExists()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (HS.BulkFHIR.Session)

^HS.BulkFHIR.SessionD(ID)
=
%%CLASSNAME
sessionId
requestUrl
client
status
requestTime
transactionTime
completionTime
expiresTime
terminatedReason
purged
request
resourceCount
errorCount
exportSize
sinceSeconds
transactionTimeSeconds
fileEndpoint
requestJsonStream
permitSystemScopes
deleteInProgress

Storage Model: Storage (HS.BulkFHIR.Session)

^HS.BulkFHIR.SessionD(ID,"config")
=
config

Storage Model: Storage (HS.BulkFHIR.Session)

^HS.BulkFHIR.SessionD(ID,"fetchTokenInfo")
=
fetchTokenInfo

Storage Model: Storage (HS.BulkFHIR.Session)

^HS.BulkFHIR.SessionD(ID,"schedule")
=
schedule

Storage Model: Storage (HS.BulkFHIR.Session)

^HS.BulkFHIR.SessionD(ID,"tokenInfo")
=
tokenInfo
FeedbackOpens in a new tab