Skip to main content

Utils.LoadNEW

class Utils.LoadNEW

Contains the code we use to load content.

Method Inventory

Methods

classmethod AddBooksToExclusionList(setid As %String = "", verbose As %Boolean = 0)
Given the DocBook ID of a SET -- one that has been loaded into the database --- add all the books in that set to ^Settings("DERIVEDEXCLUSIONS"). Then delete the SET from DocBook.block.
classmethod ClearPendingGlobals(which As %String = "postload")
classmethod GetDirectoryForBook(book As %String = "", verbose As %Boolean = 0) as %String
Returns $LB of directories
classmethod LoadAFile(file As %String, type As %String = "", verbose As %Boolean = 1, isExtra As %Boolean = 0, skipImageFiles As %Boolean = 0)
This method loads an individual doc file.

type is component, set, book, article, or master

isExtra is 1 if this file comes from outside of the configured SOURCE directories.

classmethod LoadAll(verbose As %Boolean = 0, includeExtraSources As %Boolean = 0, buildTables As %Integer = 1)
This method reloads everything. buildTables determines whether and how we build the DBM report tables: 0 = don't build them, 1= build them in background, 2= build them in the foreground.
classmethod LoadAllExtraSources(verbose As %Boolean = 0)
classmethod LoadAndLog(verbose As %Boolean = 0, includeExtraSources As %Boolean = 0)
classmethod LoadArticle(docbookid As %String, verbose As %Boolean = 1, isExtra As %Boolean = 0)
This method loads an article.
classmethod LoadArticles(verbose As %Boolean = 0, navPagesOnly As %Boolean = 0)
classmethod LoadBook(docbookid As %String, verbose As %Boolean = 1, isExtra As %Boolean = 0) as %Status
This method loads an entire book definition.
classmethod LoadBooks(verbose As %Boolean = 0)
classmethod LoadDirectoryNEW(directory As %String, verbose As %Boolean = 1, isExtra As %Boolean = 0) as %Status
This method loads every file in the given directory.
classmethod LoadDocBookId(blockid As %String = "", verbose As %Boolean = 1, isExtra As %Boolean = 0)
we can use to load a book, an article, a set, or ALL, or a component file
classmethod LoadExtraItem(filename As %String = "", verbose As %Boolean = 1)
Utility method
classmethod LoadItem(filename As %String = "", verbose As %Boolean = 1, isExtra As %Boolean = "")
Utility method
classmethod LoadListOfIDs(listofids="", namespace As %String = "DOCBOOK", verbose As %Boolean = 1)
Loads a list of DocBookIDs and then runs all post-load code, in the given namespace or namespaces.
listofids is a space-separated list of DocBookIDs that can also include the following special IDs (not case-sensitive): P (for all PDFs), I (for all images), R (for MR notes), E (for external files). If listofids = SPECIAL, that gets turned into the list ISP GCRN HXHCRN HXIHRN E. GCRN, HXIHRN, and HXHCRN are the release notes for IRIS, IRIS for Health, and HealthConnect respectively. The underlying code does not issue errors when we try to load a file that isn't there, so it is harmless to just attempt to load all three. The E option gets all external files, which includes the MR notes, which could easily have a last minute-change.
namespace can be "DOCBOOK" (the default), "DOCBOOKJ", or "BOTH".
classmethod LoadSET(docbookid As %String, verbose As %Boolean = 1, isExtra As %Boolean = 0)
This method loads a SET file and its books.
classmethod LoadSETs(verbose As %Boolean = 0)
classmethod OKToLoad(DocBookID As %String = "") as %Boolean
Returns 0 if the given DocBookID matches an exclusions item. Comparison is not case-sensitive or sensitive to leading/trailing whitespace.
classmethod RebuildDOCBOOKBLOCKIndices(verbose As %Boolean)
Use this carefully because search won't work while this is running. We need this method because it lets us shrink the database quite a lot!
classmethod SaferReload(verbose As %Boolean = 0, includeExtraSources As %Boolean = 0, callFromTaskManager As %Boolean = 0, buildTables As %Integer = 1)
Use this if none of the set definitions have changed. buildTables determines whether and how we build the DBM report tables: 0 = don't build them, 1= build them in background, 2= build them in the foreground.
classmethod SetLoadDeleteTimeStamp(key As %String = "")
classmethod SetPendingGlobals()
FeedbackOpens in a new tab