Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

HS.Util.Installer.Upgrade.Abstract

abstract class HS.Util.Installer.Upgrade.Abstract extends %Library.RegisteredObject

^HS.Upgrade("Product",product,"CurrentVersion")=tVersion $$$ProductCurrentVersion(product,namespace) ^HS.Upgrade("Product",product,"UpgradeVersionSteps",tVersion,tStep)=tSC $$$ProductVersionStep(product,namespace,tVersion,tStep) or tStep="*" for all (in a kill) new install needs to set the version to the current version and not run an upgrade
  	///Upgrade is a generic upgrade step for HealthShare Information Exchange/Unified Care Record namespaces that are shared across multiple gateways.  
  		///Use UpgradeStep1,UpgradeStep2, executed in order 1...N
  		///UpgradeSteps in HSLIB are only applied to Information Exchange/Unified Care Record namespaces. 
  ClassMethod UpgradeStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ClassMethod UpgradeStep2(ByRef pLogFile As %File) as %Status {
  	///Do some additional work
  	Quit $$$OK
  }
  ///Core is for security or system level tasks for any HealthShare Application using HSLIB, such as Patient Index, Health Insight, etc.
  ClassMethod CoreStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ClassMethod CoreStep2(ByRef pLogFile As %File) as %Status {
  	///Do some additional work
  	Quit $$$OK
  }
  ///Upgrade Hub in as many steps as required executed in order 1...N
  ClassMethod HubStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ///Upgrade Access Gateway in as many steps as required executed in order 1...N
  ClassMethod AccessGatewayStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ///Upgrade Edge Gateway in as many steps as required executed in order 1...N
  ClassMethod EdgeGatewayStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ///Upgrade Flash Gateway in as many steps as required executed in order 1...N
  ClassMethod FlashGatewayStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  ///Upgrade Bus in as many steps as required executed in order 1...N
  ClassMethod BusStep1(ByRef pLogFile As %File) as %Status {
  	///Do some work
  	Quit $$$OK
  }
  
  	/// To have code execute after the production startup
  	/// Set ^HS.Upgrade("OnStart",$i(^HS.Upgrade("OnStart")))=$lb(class,method)
  	Set ^HS.Upgrade("OnStart",$i(^HS.Upgrade("OnStart")))=$lb("HS.Util.Installer.Upgrade.V7","ConvertPushDocuments")
  	///	Where the method must have a status return value
  

Method Inventory

Methods

classmethod AddConfigItem(pFromProd As Ens.Config.Production, pItemClassName, pToProd As Ens.Config.Production, pItemConfigName As %String = "") as %Status
Call this to copy config item pItemClassName from sample production pFromProd to exisitng production pToProd This does not save pToProd pItemConfigName is optional, to support using the same class name in more than one config item.
classmethod AddItemSetting(pProd As Ens.Config.Production, pItemClassName As %String, pSettingName As %String, pSettingValue As %String, pTarget As %String) as %Status
Add setting pSetting on item pItemClassName in production oref pProd, with target pTarget and
classmethod AddItemSettingByName(pProd As Ens.Config.Production, pItemName As %String, pSettingName As %String, pSettingValue As %String, pTarget As %String) as %Status
Add setting pSetting on item pItemName in production oref pProd, with target pTarget and
classmethod AddProductionSetting(pProd As Ens.Config.Production, pSettingName As %String, pSettingValue As %String) as %Status
Add a setting to pProd (oref)
classmethod AsyncOperationComplete(pQnum)
Close a successfully processed AsyncOpQ entry
classmethod CheckMRNs(pPriorMRN, pCurrentMRN) as %Status
Called for patient actions during the update. pPrior is the prior MRNs for merges, moves, etc. - it might be null
classmethod ConfigItemExists(pProd As Ens.Config.Production, pItemClassName As %String) as %Boolean
Check to see if a config item with the specified class name exists in the production.
classmethod ConvertPatient(pPatId As %Integer, pMark As %Integer = 1, ByRef %OnStartLogFile As %File = "") as %Status
Perform all the version conversions for one patient It should be called any time a patient is to be processed, and a Patient conversion is in progress. pPatID is the aggregation ID in the streamlet ECR, and for converting old systems, the patient ID in the HSDB
classmethod ConvertPatients(ByRef %OnStartLogFile As %File) as %Status
For each patient (that has not yet been converted), convert the patient for each version that needs it and has an OnPatient() method
classmethod FixBaseClass() as %Status
For initial upgrade - fix up production base class
classmethod GetAsyncOperation(Output pOpDispatchName, Output pRequest As Ens.Request, Output pQnum) as %Status
Get the next AsyncOpQ entry (if any), and return its dispatchname and opened message with its sequence number in pQnum
classmethod GetItemSetting(pProd As Ens.Config.Production, pItemClassName As %String, pSettingName As %String, Output pSettingValue As %String) as %Status
Find the value of setting pSetting on item pItemClassName in production oref pProd
classmethod InvokeAsyncOperation(pOpDispatchName, pRequest As Ens.Request, Output pQnum) as %Status
Put an entry in the AsyncOpQ in ^HS.Upgrade. HS.Util.MaintenanceService will run at intervals set by the production (default = 60 secs) and will submit up to 200 of these requests for processing ^HS.Upgrade("AsyncOpQ",n)=dispatchname,messageclass,messageid
classmethod LayoutUpgrade(ByRef pLogFile As %File) as %Status
classmethod MergeConfigItems(pNamespace As %String, pFromName As %String, pToName As %String) as %Status
Add configuration items from one production into an existing production, and save the new production
classmethod OpenCurrentProduction(Output pProdRef As Ens.Config.Production) as %Status
Call this to open the current production in order to modify it
classmethod OpenProduction(pProdClass As %String, Output pProdRef As Ens.Config.Production) as %Status
Call this to open a sample production in order to copy config items and settings from it
classmethod RemoveConfigItem(pFromProd As Ens.Config.Production, pItemClassName) as %Status
Call this to copy config item pItemClassName from sample production pFromProd to exisitng production pToProd This does not save pToProd
classmethod SaveProduction(pProd As Ens.Config.Production) as %Status
Save pProd (oRef)
classmethod SetItemProperty(pProd As Ens.Config.Production, pItemName As %String, pName As %String, pValue As %String) as %Status
Set ConfigItem property to a specified value pProd: Prod ref pItemName: Config item name pName: Property name pValue: Property value
classmethod SetItemSetting(pProd As Ens.Config.Production, pItemClassName As %String, pSettingName As %String, pSettingValue As %String) as %Status
Update the value of setting pSetting on item pItemClassName in production oref pProd
classmethod UpgradeMethods(pProduct="", pType, pAry As %String, pKeep=0) as %Status
Set up an array of methods defined for the upgrade pAry(type,seq)=name where type= "Hub", "EdgeGateway", "AccessGateway", "FlashGateway", "Core"

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab