FindCodeWithDate

Instream and HIPAA Validator Desktop

Issues an error message if the code is not valid on a specific date. It looks up the code:

Format of Parameters

CodeTable  CodeValue  DateFormat  DateToCheck  (ifNotFoundAction) (ifFoundAction)

Where:

CodeTable Name of the external code table.
CodeValue Value to be checked. It can be a literal in double quotes, a variable, or Current_Element.
DateFormat The format of the date, which must match the format of DateToCheck. This can be a variable or a literal. If the date can be in more than one format, assign a variable to the format element and then call FindCodeWithDate.
DateToCheck The date: a variable that has been assigned to a date element, a literal in double quotes (such as "20030625"), or Current_Element if it is a date.
(ifNotFoundAction) The action to be taken if the value is not effective on that date. If omitted, a generic error message appears. The parentheses must be included. To take no action, use (BusinessRules.Utilities DoNothing)
(ifFoundAction) Optional. Action to be taken if the value is effective on that date. The parentheses must be included.

Example 1:

This rule checks to see if the facility code is valid for the transaction date. If not, it displays error 32222.

Where:

FacilityCode The table.
Current_Element Value of the element where the rule is attached.
D8 Date format for BHT04TransactionDate.
BHT04TransactionDate Variable assigned to the transaction date element.
(BusinessRules.Utilities DisplayErrorByNumber 32222) Specifies that error message 32222 should be displayed if the code is not valid for the transaction date.

Example 2:

This rule on the statement date element checks to see if the date format is D8. If so, it checks the facility code to see if it is valid on that date.

Where:

CompareString checks the element that has the BusinessRules.Variable S2300DTP02StmtDt assigned to see if it contains D8.

If so, it executes the FindCodeWithDate function inside the outer parentheses:

FacilityCode The table.
S2300CLM0501FacilityType Variable assigned to the facility type element that is being checked.
D8     Date format.
Current_Element Value of the element where the rule is attached - the statement date.
(BusinessRules.Utilities DisplayErrorByNumber 32213) Specifies that error 32213 should be displayed if the code is not valid for the transaction date.