Skip to main content

HS.Data.OIDMap

persistent class HS.Data.OIDMap extends %Library.Persistent, %XML.Adaptor, HS.Sync.BaseClass, HS.HC.Util.OIDMap, %Library.GlobalIdentifier

SQL Table Name: HS_Data.OIDMap

Map OID to facility / endpoint

Property Inventory

Method Inventory

Parameters

parameter SYNCORDER = 70;
parameter XMLIGNOREINVALIDTAG = 1;
Inherited description: The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected elements in the XML input. The XMLIGNOREINVALIDTAG parameter will only take affect if XMLSEQUENCE = 0 (the default). By default (XMLIGNOREINVALIDTAG = 0), will treat an unexpected element as an error. If XMLIGNOREINVALIDTAG is set = 1 and XMLSEQUENCE = 0, then unexpected elements will be ignored.
parameter XMLIGNORENULL = inputonly;
Inherited description: XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.

Properties

property Aliases as %String (MAXLEN = 512) [ Calculated ];
Property methods: AliasesCompute(), AliasesDisplayToLogical(), AliasesGet(), AliasesIsValid(), AliasesLogicalToDisplay(), AliasesLogicalToOdbc(), AliasesNormalize(), AliasesSQLCompute()
property Description as %String (MAXLEN = 512);
used as the AssigningAuthority Name
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property IdentityCode as %String (MAXLEN = 512) [ Required ];
code for entry within the identity type
Property methods: IdentityCodeAliasesBuildValueArray(), IdentityCodeAliasesCollectionToDisplay(), IdentityCodeAliasesCollectionToOdbc(), IdentityCodeAliasesDisplayToCollection(), IdentityCodeAliasesDisplayToLogical(), IdentityCodeAliasesGet(), IdentityCodeAliasesGetObject(), IdentityCodeAliasesGetObjectId(), IdentityCodeAliasesGetStored(), IdentityCodeAliasesGetSwizzled(), IdentityCodeAliasesIsValid(), IdentityCodeAliasesLogicalToDisplay(), IdentityCodeAliasesLogicalToOdbc(), IdentityCodeAliasesNormalize(), IdentityCodeAliasesOdbcToCollection(), IdentityCodeAliasesSet(), IdentityCodeAliasesSetObject(), IdentityCodeAliasesSetObjectId(), IdentityCodeDisplayToLogical(), IdentityCodeGet(), IdentityCodeGetStored(), IdentityCodeIsValid(), IdentityCodeLogicalToDisplay(), IdentityCodeLogicalToOdbc(), IdentityCodeNormalize(), IdentityCodeSet()
property IdentityCodeAliases as list of %String (MAXLEN = 512, STORAGEDEFAULT = "array");
Property methods: IdentityCodeAliasesBuildValueArray(), IdentityCodeAliasesCollectionToDisplay(), IdentityCodeAliasesCollectionToOdbc(), IdentityCodeAliasesDisplayToCollection(), IdentityCodeAliasesDisplayToLogical(), IdentityCodeAliasesGet(), IdentityCodeAliasesGetObject(), IdentityCodeAliasesGetObjectId(), IdentityCodeAliasesGetStored(), IdentityCodeAliasesGetSwizzled(), IdentityCodeAliasesIsValid(), IdentityCodeAliasesLogicalToDisplay(), IdentityCodeAliasesLogicalToOdbc(), IdentityCodeAliasesNormalize(), IdentityCodeAliasesOdbcToCollection(), IdentityCodeAliasesSet(), IdentityCodeAliasesSetObject(), IdentityCodeAliasesSetObjectId()
property IdentityType as HS.Data.OIDType;
Property methods: IdentityTypeGet(), IdentityTypeGetObject(), IdentityTypeGetObjectId(), IdentityTypeGetStored(), IdentityTypeGetSwizzled(), IdentityTypeIndexExists(), IdentityTypeIsValid(), IdentityTypeNewObject(), IdentityTypeSet(), IdentityTypeSetObject(), IdentityTypeSetObjectId(), IdentityTypeUnSwizzle(), IdentityTypesBuildValueArray(), IdentityTypesCollectionToDisplay(), IdentityTypesCollectionToOdbc(), IdentityTypesDisplayToCollection(), IdentityTypesGet(), IdentityTypesGetObject(), IdentityTypesGetObjectId(), IdentityTypesGetStored(), IdentityTypesGetSwizzled(), IdentityTypesIsValid(), IdentityTypesOdbcToCollection(), IdentityTypesSet(), IdentityTypesSetObject(), IdentityTypesSetObjectId()
property IdentityTypes as list of HS.Data.OIDType (STORAGEDEFAULT = "array");
Property methods: IdentityTypesBuildValueArray(), IdentityTypesCollectionToDisplay(), IdentityTypesCollectionToOdbc(), IdentityTypesDisplayToCollection(), IdentityTypesGet(), IdentityTypesGetObject(), IdentityTypesGetObjectId(), IdentityTypesGetStored(), IdentityTypesGetSwizzled(), IdentityTypesIsValid(), IdentityTypesOdbcToCollection(), IdentityTypesSet(), IdentityTypesSetObject(), IdentityTypesSetObjectId()
property OID as %String);
Property methods: OIDDescription(), OIDDisplayToLogical(), OIDForType(), OIDGet(), OIDGetStored(), OIDIndexExists(), OIDIsValid(), OIDItemsClose(), OIDItemsExecute(), OIDItemsFetch(), OIDItemsFetchRows(), OIDItemsFunc(), OIDItemsGetInfo(), OIDItemsGetODBCInfo(), OIDItemsPrepare(), OIDItemsSendODBC(), OIDLogicalToDisplay(), OIDLogicalToOdbc(), OIDNormalize(), OIDRow(), OIDSet()
property Types as %String [ Calculated ];
Property methods: TypesCompute(), TypesDisplayToLogical(), TypesGet(), TypesIsValid(), TypesLogicalToDisplay(), TypesLogicalToOdbc(), TypesNormalize(), TypesSQLCompute()
property URL as %String);
Property methods: URLDescription(), URLDisplayToLogical(), URLGet(), URLGetStored(), URLIndexExists(), URLIsValid(), URLLogicalToDisplay(), URLLogicalToOdbc(), URLNormalize(), URLRow(), URLSet()

Methods

method AliasesGet() as %String
classmethod CMAliasesGet(pID) as %String
classmethod CMTypesGet(pID) as %String
classmethod CodeForOID(pOID As %String = "", pType As %String = "", pDefault As %String) as %String
*** Deprecated by GetCodeForOID() *** Given an oid, return the Code if there is one row matching the oid (pType is ignored)
classmethod CreateOrUpdateOID(pCode As %String, pType As %String, pOID As %String, pDescription As %String, pAdditionalTypeList As %String, pURL As %String, pIdentityCodeAliases As %String) as %Status
Similar to FileOID, but will only make changes if the argument is defined. Omit a parameter to leave it unchanged; only pCode is required.
classmethod DuplicateCheck(pID, pCode, pOID, pURL, pInsert) as %Status
classmethod ExportToFile(pPath, pOIDList As %String = "") as %Status
Input: pPath: Full path/filename for output files pOIDList: OIDs to export, if empty, export all.
classmethod FileOID(pCode As %String, pType As %String = "", pOID As %String = "", pDescription As %String = "", pAdditionalTypeList As %String = "", pURL As %String = "", pIdentityCodeAliases As %String = "") as %Status
pAdditionalTypeList is an optional comma separated string. If passed in, the OID and/or URL will also be used for those types
classmethod GetOIDForURL(pURL As %String = "") as %String
Given a URL, return the OID if there is one row matching the URL. Returns the URL if no OID is found.
classmethod GetURLForOID(pOID As %String = "") as %String
Given an OID, return the URL if there is one row matching the OID. Returns the OID if no URL is found.
classmethod ImportFromFile(pPath) as %Status
Input: pPath - fully pathed file name
classmethod OIDDescription(pOID As %String = "", pIdentityType As %String = "") as %String
Given an OID (and optionally the type) return the description. If not found, the OID will be returned.
classmethod OIDForType(pIdentityCode As %String, pIdentityType As %String = "", pDefault As %String) as %String
*** Deprecated by GetOIDForCode() - For clarity this method has been deprecated by GetOIDForCode() *** either returns the entry for the IdentityCode or returns pDefault which is pIdentityCode if a pDefault is not defined,
pIdentityType is ignored.
classmethod OIDItemsClose(ByRef qHandle As %Binary) as %Status
classmethod OIDItemsExecute(ByRef qHandle As %Binary, pType As %String, pSearch As %String = "") as %Status
classmethod OIDItemsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod OIDRow(pOID As %String = "", ByRef pID As %Integer, ByRef pIdentityCode As %String = "") as %Status
Find an IdentityCode for an OID. When not found the OID will be returned in the IdentityCode but an error will be returned in the Status
classmethod ObjectForOID(pOID As %String = "") as HS.Data.OIDMap
HSIE-3613 Changes in behavior to HS.Data.OIDMAP class methods: 1. A facility may have one active OID and any number of historical OIDs. Historical OIDs will have '~~~' contained within the IdentityCode, and possibly within the URL. 2. This method has been updated to strip away everything after and including '~~~' for both IdentityCode and URL properties. Since this method may return an altered object (e.g. a historical OID row with '~~~' characters in IdentityCode and possible URL), attempting to save an altered object will throw an exception as DuplicateCheck enforces validation: IdentityCode must be unique, and URL must be unique
classmethod ObjectForURL(pURL As %String = "") as HS.Data.OIDMap
HSIE-3613 Changes in behavior to HS.Data.OIDMAP class methods: 1. A facility may have one active OID and any number of historical OIDs. Historical OIDs will have '~~~' contained within the IdentityCode, and possibly within the URL. 2. This method has been updated to strip away everything after and including '~~~' for both IdentityCode and URL properties. Since this method may return an altered object (e.g. a historical OID row with '~~~' characters in IdentityCode and possible URL), attempting to save an altered object will throw an exception as DuplicateCheck enforces validation: IdentityCode must be unique, and URL must be unique
method TypesGet() as %String
classmethod URLDescription(pURL As %String = "", pIdentityType As %String = "") as %String
Given a URL (and optionally the type) return the description. If not found, the URL will be returned.
classmethod URLRow(pURL As %String = "", ByRef pID As %Integer, ByRef pIdentityCode As %String = "") as %Status
Find an IdentityCode for a URL. When not found the URL will be returned in the IdentityCode but an error will be returned in the Status
classmethod flushOIDCache(job As %Boolean = 0) as %Status
flushOIDCache flushes out an OID cache that is built and used by HS.Util.XSLTHelper getOIDForCode and getCodeForOID, and getURLForCode and getCodeForURL. The use of background job, Locks, and Hangs here is to avoid excessive killing of the cache upon sudden numerous updates to HS_Data.OIDMap.

Queries

query OIDItems(pType As %String, pSearch As %String = "")
Selects ID As %Integer, IdentityCode As %String, Types As %String, OID As %String, Description As %String, URL As %String, Aliases As %String
query OrganizationItems()
SQL Query:
SELECT %ID,IdentityCode FROM OIDMap Group BY IdentityCode

Indexes

index (CodeTypeIndex on IdentityCode,IdentityType) [Unique];
Index methods: CodeTypeIndexCheck(), CodeTypeIndexCheckUnique(), CodeTypeIndexDelete(), CodeTypeIndexExists(), CodeTypeIndexOpen(), CodeTypeIndexSQLCheckUnique(), CodeTypeIndexSQLExists(), CodeTypeIndexSQLFindPKeyByConstraint(), CodeTypeIndexSQLFindRowIDByConstraint()
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (IdentityCodeAliasesIndex on IdentityCodeAliases(ELEMENTS));
index (IdentityTypeIndex on IdentityType);
Index methods: IdentityTypeIndexExists()
index (IdentityTypesIndex on IdentityTypes(ELEMENTS));
index (OIDIndex on OID);
Index methods: OIDIndexExists()
index (URLIndex on URL);
Index methods: URLIndexExists()

Triggers

trigger OnInsertUpdate (BEFORE event INSERT/UPDATE);

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (HS.Data.OIDMap)

^HS.Data.OIDMapD(ID,"IdentityCodeAliases",n)
=
IdentityCodeAliases(n)

Storage Model: Storage (HS.Data.OIDMap)

^HS.Data.OIDMapD(ID,"IdentityTypes",n)
=
IdentityTypes(n)

Storage Model: Storage (HS.Data.OIDMap)

^HS.Data.OIDMapD(ID)
=
%%CLASSNAME
OID
IdentityCode
IdentityType
Description
URL
FeedbackOpens in a new tab