FindCode

Instream and HIPAA Validator Desktop

Issues an error message if the code is not valid. It looks up the code:

Format of Parameters

CodeTable  CodeValue  (ifNotFoundAction) (ifFoundAction)

Where:

CodeTable Name of the external code table.
CodeValue Value to be checked. If omitted, the value in the current element is assumed.
(ifNotFoundAction) Action to be taken if the value is not found in the table. The parentheses must be included. To take no action, use (BusinessRules.Utilities DoNothing)
(ifFoundAction) Optional. Action to be taken if the value is found in the table. The parentheses must be included.

Examples

Example parameters:

CPT4 CPT4 is the code table. Since CodeValue and ifNotFoundAction are omitted, this rule will use the code value in the current element and issue a generic error message.
CPT4 A A is a variable.
Since this has a CodeValue of A, see if the value in variable A is in table CPT4. If the value is not found in table CPT4, issue a generic error message.
CPT4 "A" "A" is a literal.
Since this has a CodeValue of  "A", check for the presence of code A in table CPT4. If A is not found, issue a generic error message.
CPT4 Current_Element (BusinessRules.Utilities DisplayErrorByNumber 32201) If the value in the current element is not found in table CPT4, display the text in error number 32201.
We must include the second parameter, CodeValue, since we are using the third parameter, (ifNotFoundAction).
CPT4 Current_Element (BusinessRules.Utilities DoNothing) (BusinessRules.Utilities DisplayErrorByNumber 32202) If the value in the current element is not found in table CPT4, do nothing.
If the value is found in table CPT4, display the text in error number 32202.
We must include all previous parameters, since we are using the last parameter, (ifFoundAction).