Class Name: SQLSchemaAPIKey
Scope: Public - Restricted ( License Required )
Visual Basic
Dim sValue As String = "<filename or APIKey text>" Dim myKey As New SQLSchemaAPIKey(sValue)
C#
string sValue = "<filename or APIKey text>"; SQLSchemaAPIKey myKey = new SQLSchemaApiKey(sValue); |
CheckForDuplicateMessages [Boolean] Default [True]. This property was a read/write property in the SQLHL7Importer class in versions prior to version 1.0.3.
History: The SQLSchemaAPIKey class is an encapsulation of SQL Schema Profiles created in the SQL Schema Engine. However, to allow this API to import HL7 messages into the database we also have to incorporate some of the properties which would normally be stored in an Inbound Processor and thus we can't get that value from the SQL Schema Engine because the whole purpose of the API is to allow you to create your own "Inbound Processor" to be used either in addition to or in-lieu of the ones created in the Schema Engine itself. This property is propagated downward to all class objects that perform Import Operations.
TruncatedColumnPaddingSize [Integer][Get : Set]. A value between 0 and 15 (default is 5) used in Schema TrainingOperations. Example: If a component value is detected to be too large to fit in the data column ( Example: Data="ABCDEF" Column = Varchar(5) ) the training operation will attempt to alter the schema table to increase the size of the column. In the example the Data is 6 characters but the column is only 5 characters wide. In these instances the training operation will alter the column width to be: <Offending Data Width> + TruncatedColumnPaddingSize. If TruncatedColumnPadding size is 5 and the "Offending Data Width" is 6 ("ABCDEF") it would change the column width from Varchar(5) to Varchar(11)thus giving some small insurance against future values being 7, 8, etc characters wide and not requiring retraining.
Behavior Note: In both the Schema Engine and the API no component data column will ever be automatically sized to > 512 characters. If the "Offending Data Length" in a data column ever exceeds 512 the column is converted to Varchar(Max).
IMPORT Warning Levels (These are currently ReadWrite) with their default source values coming from the Schema Profile.
SQL_IMPORTAPIWARNINGLEVEL DataTruncationWarningLevel. SQL_IMPORTAPIWARNINGLEVEL UnknownSegmentWarningLevel. SQL_IMPORTAPIWARNINGLEVEL UnknownFieldWarningLevel. SQL_IMPORTAPIWARNINGLEVEL UnknownComponentWarningLevel.
See the section on Fatal Errors for more information on how these properties work.
|
Primary Database Properties
ServerName [String][ReadOnly]. Corresponds to your Schema Profile. DatabaseName [String][ReadOnly]. Corresponds to your Schema Profile. SQLUserID [String][ReadOnly]. Corresponds to your Schema Profile. SQLPassword [String][ReadOnly]. Corresponds to your Schema Profile. ConnectionTimeout [Integer][ReadOnly]. Corresponds to your Schema Profile. UseTrustedConnection [Boolean][ReadOnly]. Corresponds to your Schema Profile. UseAzureConnection [Boolean][ReadOnly]. Corresponds to your Schema Profile. StoreSegmentDataInManifest [Boolean][ReadOnly]. Corresponds to your Schema Profile. Miscellaneous Properties
AllowAPIToAlterSchema [Boolean][ReadOnly]. The value from your Schema Profile. See Enabling the API. See the discussion about how this property might cause Unhandled Exceptions HERE.
APIKeyID [String][ReadOnly]. The value entered in the API Key ID field in the UltraPort SQL Schema Engine. See Enabling the API.
APIKeyValue [String][ReadOnly]. The XML text value of the API Key. It is created by the database maintenance service and refreshed every time the service starts and daily thereafter.
CreatedOn [DateTime][ReadOnly]. When the APIKeyValue was created by the database maintenance service.
HL7VendorName [String][ReadOnly]. The name of the EasyHL7 Vendor Definition used to create the schema..
HL7VendorVersion [String][ReadOnly]. The Version property of the EasyHL7 Vendor Definition used to create the schema.
IsError [Boolean][ReadOnly]. The current error state of the LastException. See the Common Exceptions Interface.
LastError [String][ReadOnly]. The current value of the ExceptionMessage property of the LastException object. See the Common Exceptions Interface.
SchemaEngineVersion [String][ReadOnly]. The version property of the SQL Schema Engine used to generate the APIKeyValue.
StoreSegmentDataInManifest [Boolean][ReadOnly]. Indicates whether, during Import Operations, the API should store HL7 segment data in the <prefix>_MessageManifest table.
Utils [HTUtilities] [ReadOnly]. A public implementation of the HTUtilities class. NOTE: This is a free property. It will work even if IsRunnable is False.
|
Void ClearErrors() - Clears the error state of the LastException. See the Common Exceptions Interface.
Boolean ExportAPIKey(String, Boolean) Parameter 1: String - fileName. Parameter 2: Boolean - overWrite (Optional Default is True).
Returns: Boolean Success/Failure - Failure follows the common exception interface of other objects. Description: Exports your APIKeyValue to a file which can be used with the Refresh() method or as the parameter when creating this object class. IsRunnable must be True.
HL7DateConverter HL7Date(). Returns: A new HL7DateConverter object is returned loaded with System.DateTime.Now.
HL7DateConverter HL7Date(2 Overloads). Overload 1: Parameter 1: DateTime. dateValue. Value to load into the HL7DateConverter. Overload 2: Parameter 1: String - stringValue. A HL7Formatted Date String to load into the HL7DateConverter. Returns: A new HL7DateConverter object.
EasyHL7 Vendor Object Encapsulation HL7DefinitionData NewDefinitionDataClass(2 overloads). Overload 1: Parameter 1: Boolean loadFromSchemaTables (Optional - Default = True). Overload 2: Parameter 1: String xmlStringOrFileName. Can be a full path / name to a file containing a "exported" stand-alone EasyHL7 Vendor definition or the XML contents of such a file.
Returns: A new HL7DefinitionData object as long as your SQLSchemaAPIKey.IsRunnable property is True otherwise Null.
Description: If called with Overload 1 and loadFromSchemaTables is True your SQLSchemaAPIKey will create the object and automatically call the LoadVendor() method. If called with Overload 2 and xmlStringOrFileName is not an empty string your API Key object will create the object and automatically call the OpenVendor() method.
Note: To just create an empty HL7DefinitionData object just call this method using Overload 1 passing False in loadFromSchemaTables OR call it using Overload 2 and pass "" as xmlStringOrFileName.
HTSQLHL7Message NewHL7Message(3 overloads). Overload 1: No Parameters: (). An "empty" HL7 message object using a default HL7MessageEncoder. Overload 2: Parameter 1: HL7MessageEncoder. The HL7MessageEncoder to be used when parsing HL7 messages. Overload 3: Parameter 1: String - Fully formed HL7 message string containing ONE (1) HL7 message. For String values containing more than 1 message use the HL7StringAnalyzer class. Parameter 2: HL7MessageEncoder (optional). If not passed a default HL7MessageEncoder will be used.
Description: Creates and returns a new HTSQLHL7Message object. IsRunnable must be TRUE or Null will be returned with LastException set.
HL7StringAnalyzer NewHL7StringAnalyzer(2 overloads). Overload 1: Parameter 1: HL7MessageEncoder (optional). If not passed a default HL7MessageEncoder will be used. Overload 2: Parameter 1: String - Fully formed HL7 message string containing 1 or more HL7 messages. Parameter 2: HL7MessageEncoder (optional). If not passed a default HL7MessageEncoder will be used.
Description: Creates and returns a new HL7StringAnalyzer object. (IsRunnable must be TRUE).
SQLServerConnector NewSchemaConnector() Returns: A new HTSQLServerConnector object or null if IsRunnable is False.
HTUtilities NewUtilities() Returns: A new HTUtilities object. Note that there is always a public instance of this class available in the SQLSchemaAPIKey.Utils property.
UPSInfo NewSQLSchemaInfo(). Returns: A new UPSInfo object or null if IsRunnable is False.
Boolean Refresh(APIKeyOrFile) Parameter 1: String - string containing a valid APIKeyValue XML OR a full path/filename that contains 1.
Returns: Boolean Success/Failure - Failure follows the common exception interface of other objects. Description: Reloads the object.
Boolean UpdateAPIKey() Returns: Boolean Success/Failure - Failure follows the common exception interface of other objects. Description: Reloads the object by retrieving the APIKey value from the database. You can use this method in conjunction with the ExportAPIKey() method to reduce or eliminate the need to use the file exported by the Database Maintenance Service. |
Enumerators: See Enumerators
Exception Handling: Follows the Common Exceptions Interface.
