HS.InteropTools.HL7.Compare.ProductionExtract
class HS.InteropTools.HL7.Compare.ProductionExtract
This class is a utility which is used to extract messages fromExecute Run() to begin the process
Method Inventory
- ConfigureAndImport()
- ConfigureNamespace()
- GetDate()
- GetServiceList()
- Import()
- Run()
- Template()
- UpdateProductionToTest()
Parameters
parameter EXPORTVERSION;
EXPORTVERSION is used to track the export filename that included this file (when exporting to older versions). This is updated by PV.Export:ExportCode
Methods
@API
This method uses data exported to the database from the source system to configure the target system. Optionally, if issues occur or additional setup is required, consider using ConfigureNamespace() and apply any changes needed.
Calling this method will create the foundation namespace in the instance, and reprocess all messages. Upon return the user will be in the namespace pNamespace ready to call Set stats=##class(HS.InteropTools.HL7.Compare.Compare).Run("Source","Target")
@argument pNamespace - A valid namespace (and database) name
@argument pDirectory - The full path to the location of the IRIS.DAT
@returns %Status
This method uses data exported to the database from the source system to configure the target system. Optionally, if issues occur or additional setup is required, consider using ConfigureNamespace() and apply any changes needed.
Calling this method will create the foundation namespace in the instance, and reprocess all messages. Upon return the user will be in the namespace pNamespace ready to call Set stats=##class(HS.InteropTools.HL7.Compare.Compare).Run("Source","Target")
@argument pNamespace - A valid namespace (and database) name
@argument pDirectory - The full path to the location of the IRIS.DAT
@returns %Status
@API
This method configures the Foundation namespace with name pNamespace using the IRIS.DAT provided in pDirectory.
@argument pNamespace Namespace (and database) name
@argument pDirectory - The full path to the location of the IRIS.DAT @returns %Status
This method configures the Foundation namespace with name pNamespace using the IRIS.DAT provided in pDirectory.
@argument pNamespace Namespace (and database) name
@argument pDirectory - The full path to the location of the IRIS.DAT @returns %Status
Convert pDate into low or high time
@argument pDateTime - %String - date in form 2023-12-15 or fully inclusive of time 2023-12-15T09:30:15 (assumed local in unless timezone specified ie -05:00 or trailing Z
@argument pLow - %Boolean indicating it should be 00:00:00 (0) or 23:59:59.99999 (1) when no time is specified
@returns %String - date time in UTC ie 2023-12-15 14:30:15
@argument pDateTime - %String - date in form 2023-12-15 or fully inclusive of time 2023-12-15T09:30:15 (assumed local in unless timezone specified ie -05:00 or trailing Z
@argument pLow - %Boolean indicating it should be 00:00:00 (0) or 23:59:59.99999 (1) when no time is specified
@returns %String - date time in UTC ie 2023-12-15 14:30:15
classmethod GetServiceList() as %DynamicObject
@API
Build and return a list of services {"Services":["AService":{"from":"","to":"","sessionCount":0}]}
@returns %DynamicObject a template of available work to be done as well as suggested temporary database to store export information
classmethod Import(pTemplate As %DynamicObject = $$$NULLOREF, pUpdateProductionToTest As %Boolean = 1) as %Status
@API
ConfigureAndImport() is the preferred mechanism for configuring the namespace and starting the import.
Using a Template that has been created via the Run method from the source system execute Import on the configured test system.
@argument pTemplate - %DynamicObject object which contains the settings for the job
@argument pUpdateProductionToTest - %Boolean When true (default), update all operations, those that extend EnsLib.HL7.Operation.Standard will be updated to ISC.Test.NullDevice, others will be disabled
ConfigureAndImport() is the preferred mechanism for configuring the namespace and starting the import.
Using a Template that has been created via the Run method from the source system execute Import on the configured test system.
@argument pTemplate - %DynamicObject object which contains the settings for the job
@argument pUpdateProductionToTest - %Boolean When true (default), update all operations, those that extend EnsLib.HL7.Operation.Standard will be updated to ISC.Test.NullDevice, others will be disabled
classmethod Run(pTemplate As %DynamicObject = "", pWorkerJobs As %Integer = "") as %Status
@API
Export the collected messages (from Template) to the temp database
@argument pTemplate %DynamicObject pTemplate is output from Template() the settings in pTemplate can be updated before passing to Run(), if pTemplate is "" the Template method will be called fetching everyting
@argument pWorkerJobs %Integer The number of worker jobs to use, where "" will use the system default, 0 will use none @returns %Status
Export the collected messages (from Template) to the temp database
@argument pTemplate %DynamicObject pTemplate is output from Template() the settings in pTemplate can be updated before passing to Run(), if pTemplate is "" the Template method will be called fetching everyting
@argument pWorkerJobs %Integer The number of worker jobs to use, where "" will use the system default, 0 will use none @returns %Status
classmethod Template(pTemplate="", pIsOutput As %Boolean = 1, pWorkerJobs="") as %DynamicObject
@API
Template supports two modes export (pIsOutput=1) and import (pIsOutput = 0). When pIsOutput = 1 - gather production data into temp database to be reprocessed on upgraded system, versus pIsOutput=0 - gather data from the run on the upgraded system
For export Generate json Template and $$$ExtractGlobal, for import generate $$$ExtractGlobal
@argument pTemplate a json string or object used to determine where the temp database is located, and what sources [and targets] to include
@argument pIsOutput boolean indicating whether in the output generation phase (versus input & compare)
@argument pWorkerJobs 0 - no workerqueue jobs, "" system choosese default @returns DynamicObject Information about work to be exported
For export Generate json Template and $$$ExtractGlobal, for import generate $$$ExtractGlobal
@argument pTemplate a json string or object used to determine where the temp database is located, and what sources [and targets] to include
@argument pIsOutput boolean indicating whether in the output generation phase (versus input & compare)
@argument pWorkerJobs 0 - no workerqueue jobs, "" system choosese default @returns DynamicObject Information about work to be exported
classmethod UpdateProductionToTest(pProduction As %String = "")
Disable any operation that does not extend EnsLib.HL7.Operation.Standard, and for those that do, update the operation class to ISC.Test.NullDevice
@API
@argument pProduction String Optional production name to update, when not provided, the default production for the namespace will be used.