Print Page as PDF
Lexicon Expression Extracts ICR (6265)

Lexicon Expression Extracts    ICR (6265)

Name Value
NUMBER 6265
IA # 6265
DATE CREATED 2015/11/16
CUSTODIAL PACKAGE LEXICON UTILITY
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE LEXU
NAME Lexicon Expression Extracts
GENERAL DESCRIPTION
Effective upon release of patch LEX*2.0*103.

STATUS Active
KEYWORDS
  • EXP
  • EXPS
  • LEXU
  • SOS
  • PREF
  • SUBSETS
DURATION Till Otherwise Agreed
ID LEXU
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$EXP(IEN)
This API returns Display Text (.01 field) of the
EXPRESSIONS file #757.01.

VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is an Internal Entry Number to the EXPRESSIONS
file #757.01.

$$EXP Output
This is the Display Text taken from the .01 field of
the EXPRESSIONS file 757.01.

EXPS(IEN,CDT,.ARY)
This API returns the display text of an expression
from the EXPRESSIONS ifle #757.01 and active codes associated with the
expression.

VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is an Internal Entry Number to the EXPRESSIONS
file #757.01.

CDT Input
This is the date that will be used to determine
whether the code is active or inactive. If not passed, TODAY's date will be
used.

.ARY Both
Local array passed by reference with the following
output format:

ARY(IEN)=EXP
ARY(IEN,SRC)=COD ^ NOM ^ VAR

Where:

IEN   Internal Entry number in the EXPRESSION
file 757.01

EXP   The Display Text from the EXPRESSION
file 757.01

SRC   A Coding System (pointer to CODING
SYSTEMS file 757.03)

COD   A code taken from the CODES file 757.02

NOM   Coding Nomentclature from the CODING
SYSTEMS file #757.03, examples:

ICD-10-CM
ICD-10-PCS
SNOMED CT

VAR  This is a varable pointer to a national
coding file if one exist (optional)

$$PREF(COD,SAB,CDT)
This API returns the preferred term for a code and
coding system based on date.

VARIABLES TYPE VARIABLES DESCRIPTION
COD Input
This is a code taken from the CODES file 757.02

SAB Input
Source Abbreviation from the .01 field of the CODING
SYSTEMS file #757.03.

CDT Input
This is the date that will be used to determine
whether the code is active or inactive. If not passed, TODAY's date will be
used.

$$PREF Output
This is a two piece "^" delimited string:

IEN ^ EXP

Where

IEN   This is the Internal Entry Number for the
preferred term in file 757.01.

EXP   This is the display text of the preferred
term in file 757.01

or

-1    if no preferred term is found for the code

$$IENS(CODE,.ARY,CDT)
This API returns IENs from the Lexicon and National
files for a code.

VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
This is a code from one of the coding systems in the
Lexicon.

.ARY Both
This is an input/output array passed by reference.
It will be killed and rebuilt as follows:

Output Local Array ARY

ARY(0)   3 Piece "^" delimited string

1  Number of Entries in the Lexicon for Code
2  Code
3  Date used to extract data

ARY(#,757)   2 Piece "^" delimited string

1  IEN to the MAJOR CONCEPT MAP file #757
2  IEN to the Major Concept Expression in File #757.01

ARY(#,757.001)   3 Piece "^" delimited string

1  IEN to the CONCEPT USAGE file #757.001
2  Originating Value
3  Frequency

ARY(#,757.01)   8 Piece "^" delimited string

1  IEN to the EXPRESSION file #757.01
2  Expression Type
3  Expression Form
4  Expression Deactivation Flag
5  External Expression Type
6  External Expression Form
7  External Deactivation Flag
8  Expression

ARY(#,757.01,7,CD)   5 Piece "^" delimited string

Where CD is a Designation Code

1  IEN of the DESIGNATION CODE sub-file #757.118
2  Pointer to the CODING SYSTEM file #757.03
3  Pointer to the SNOMED CT HIERARCHY file #757.018
4  External nomenclature for CODING SYSTEM
5  External name of SNOMED CT Hierarchy

ARY(#,757.02)   5 Piece "^" delimited string

1  IEN to the CODE file #757.02
2  Code from CODE file #757.02
3  Initial Activation Date in the Lexicon
4  Status in the Lexicon
5  Status Effective Date in the Lexicon

ARY(#,757.02,4,EFF)   2 Piece "^" delimited string

Where EFF is the effective date for a Status

1  IEN of the ACTIVATION STATUS subfile #757.28
2  STATUS (1=Active, 0=Inactive)

ARY(#,757.03)   3 Piece "^" delimited string

1  IEN to the CODING SYSTEM file #757.03
2  Source Abbreviation from file #757.03
3  Source Nomenclature from file #757.03

ARY(#,757.1,#)   6 Piece "^" delimited string (multiple)

1  IEN to the SEMANTIC MAP file #757.1
2  IEN to the MAJOR CONCEPT MAP file #757
3  IEN to the SEMANTIC CLASS file #757.11
4  IEN to the SEMANTIC TYPE file #757.12
5  Semantic Class (external)
6  Semantic Type (external)

ARY(#,"VA",SR)   6 Piece "^" delimited string (multiple)

Where SR is a pointer to the CODING SYSTEM file 757.03

1  Variable Pointer to a VA National File 80, 80.1 or 81
2  Code from VA file
3  Coding System Nomenclature
4  Initial Activation Date in the VA file
5  Status in the VA file
6  Status Effective Date in the VA file

Example

ARY(0)="2^250.01^3150101"
ARY(1,757)="7006^33586"
ARY(1,757.001)="7006^4^4"
ARY(1,757.01)="33586^1^1^^Major Concept^Major Concept^^
Diabetes Mellitus Type I"
ARY(1,757.02)="316386^250.01^2781001^0^3041001"
ARY(1,757.02,4,2781001)="1^1"
ARY(1,757.02,4,3041001)="2^0"
ARY(1,757.03)="1^ICD^ICD-9-CM"
ARY(1,757.1,1)="10167^7006^6^47^Diseases/Pathologic
Processes^Disease or Syndrome"
ARY(1,"VA",1)="851;ICD9(^250.01^ICD-9-CM^2781001^1^2781001"
ARY(2,757)="182207^331780"
ARY(2,757.001)="182207^4^4"
ARY(2,757.01)="331780^1^1^^Major Concept^Major Concept^^
Diabetes Mellitus without mention of
Complication, type i [Juvenile type], not
stated as Uncontrolled"
ARY(2,757.02)="327553^250.01^3041001^1^3041001"
ARY(2,757.02,4,3041001)="1^1"
ARY(2,757.02,4,3151001)="2^0"
ARY(2,757.03)="1^ICD^ICD-9-CM"
ARY(2,757.1,1)="259374^182207^6^47^Diseases/Pathologic
Processes^Disease or Syndrome"
ARY(2,"VA",1)="851;ICD9(^250.01^ICD-9-CM^2781001^1^2781001"

CDT Input
This the Versioning Date (default TODAY) used to
extract data.

$$IENS Output
This is the number of entries found in the Lexicon
for Code.

$$SOS(IEN,.ARY,SYN)
This API returns a local array (passed by reference)
of codes for an Expression. If the synonym flag is set to 1 then it will
return codes for and expression and its synonyms.  These codes may be active
or inactive.

VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is an Internal Entry Number to the EXPRESSIONS
file #757.01.

.ARY Both
Local array passed by reference with the following
output format:

ARY(IEN)    IEN is from file #757.01 (same as X) ARY(IEN,0)  Number of Codes
Found ARY(IEN,#)  # is a sequence number

Equals an 13 Piece "^" delimited string

1   Code
2   Coding System Nomenclature
3   Coding System Source Abbreviation
4   Code Status
5   Code Active Date
6   Code Inactive Date
7   Expression Status
8   Expression Active Date
9   Expression Inactive Date
10   Expression Variable Pointer
11   Code Variable Pointer
12   Coding System Variable Pointer
13   National File Variable Pointer (if it exist)

The array has two indexes:

ARY(LEXEIEN,"B",(CODE_" "),#)=Code_"^"_Nomenclature
ARY(LEXEIEN,"C",SOURCE,#)=Code_"^"_Nomenclature

$$SOS Output
$$SOS returns the number of codes found for an
expression, both active and inactive.

SYN Input
This is a boolean flag to indicate if codes linked to
synonyms to the expression are to be returned.

0  Don't return Synonym codes (default)
1  Return Synonym codes

$$EXM(TEXT,.ARY,DF,MC)
This API returns IENs in a local array of the
Expressions in the EXPRESSIONS file #757.01 that match the input text exactly.

VARIABLES TYPE VARIABLES DESCRIPTION
TEXT Input
This is the Text to Search for (required)

.ARY Both
This is a local array passed by reference and will
contain the IENs of the expressions that match the input text exactly.

LEX(0)   2 piece "^" dilimited string

1  Total Exact Matches found
2  Text Searched for

LEX(#)   5 piece "^" dilimited string

1  IEN of Exact Match Expression
2  IEN of Major Concept for Expression
3  Type of Exact Match Expression (internal)
4  Deactivation Flag (internal)
5  Type of Exact Match Expression (external)

DF Input
This is a Boolean Flag indicating whether to include
or exclude Deactivated Terms (optional)

1  Include deactivated terms
0  Do not include deactivated terms (default)

MC Input
This is a Boolean Flag to include Major Concepts only
(optional)

1  Include Major Concepts ONLY in the array
0  Include all expressions found in the array;
Major Concepts, Synonyms, Lexical
Variants and Fully Specified Names
(default)

PRF(LEX,LEXVDT,LEXSAB)
This API returns a code for a preferred term of a
coding system.

It is Similar to $$ONE^LEXU except the expression identified by the input
parameter LEX must be a preferred term of the coding system identified by the
input parameter LEXSAB and the code must be active on the date identified by
input parameter LEXVDT to return a code

It is intended to be used as a filter for screening searches.  Example screen
using ICD-10-CM:

I $L($$PRF^LEXU(+Y,+($G(LEXVDT))),"10D")
or
I $L($$PRF^LEXU(+Y,+($G(LEXVDT))),30)

Using the above screen, terms that are not the preferred term in ICD-10-CM
(i.e., synonyms, lexical variants or orphan terms) will not be displayed in
the selection list during lookup. Only the ICD-10-CM Code Set will be
selectable.

VARIABLES TYPE VARIABLES DESCRIPTION
LEX Input
IEN of the EXPRESSION file 757.01

LEXVDT Input
Date to use for screening by codes, if not provided
TODAY will be used.

LEXSAB Input
Source Abbreviation or a pointer to the CODES file
#757.03

$$PRF Output
Null    If the IEN is NOT the preferred term of
an active code of the specified coding
system

CODE    If the IEN is the preferred term of an
active code of the specified coding
system

$$SUBSETS(CODE,SRC,.ARY)
This API returns the names of the subsets for which a
code is assigned.

VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
This is a valid classification code from one of the
coding systems in the Lexicon (see the CODING SYSTEMS file #757.03)

ARY Both
This is an optional local array passed by reference
in the following format:

LEX(<sub>) = 4 Piece "^" delimited string

1  Subset Name
2  Subset Definition IEN file 757.2
3  Subset IEN file 757.21
4  Expression IEN file 757.01

Where <sub> is a three character identifier of a subset.

Example of the LEX array:

$$SUBSETS^LEXU(205365003,56,.ARY)

ARY("CLF")="Clinical Findings^7000039^70071537^7301845"
ARY("DIS")="Disorder^7000002^7150923^7301845"
ARY("PLS")="PL Standard^7000038^70175664^7301845"
ARY("SCT")="SNOMED CT^7000037^7457760^7301845"

SRC Input
This is coding system for which the code belongs.  It
can either be the Source Abbreviation (SAB) found in the .01 field of the
CODING SYSTEMS file #757.03 or a pointer to the CODING SYSTEMS file #757.03

$$SUBSETS Output
This is a 2 or more (variable) Piece "^" delimited
string:

1  Number of Subsets found
2  Subset Identifier #1
3  Subset Identifier #2
4  Subset Identifier #n

Example:

$$SUBSETS^LEXU(205365003,56)

"4^CLF^DIS^PLS^SCT^"

4 Subsets found including CLF, DIS, PLS and SCT

or if not found or error:

-1 ^ Error Message

CODE(CODE,SRC,CDT,.ARY,OUT)
This API returns information about a code in a local
array passed by reference.

VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
This is a Classification Code from the CODES file
#757.02 (Required)

SRC Input
This is either a Source Abbreviation (.01) or pointer
to file 757.03 (Required)

CDT Input
This is a date in FileMan format used to determine
status, default TODAY

OUT Input
This is an Output flag (Optional)

0  Do not Display array, leave local array (default)
1  Display array , kill local array

.ARY Both
Local Array, passed by reference

Code

ARY("CO")="Code"
ARY("CO",n)=<code>
ARY("CO","B",<code>,n)=""
ARY("CO",n,"I")= 6 piece "^" delimited string

1  Status
2  Effective Date
3  Initial Activation Date
4  Pointer to CODES file #757.02
5  Coding System Nomenclature
6  Coding System

ARY("CO",n,"VA")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  VA File Number
4  Variable Pointer to VA File

Diagnostic Categories (ICD-10-CM only)

ARY("DC")="Diagnostic Categories"
ARY("DC",1)=<category>
ARY("DC",1,"I")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  Category Name
4  Pointer to CHARACTER POSITIONS file #757.033

Procedure Characters Positions (ICD-10-PCS only)

Where n is a character position number 1-7

ARY("CP")="Procedure Characters"
ARY("CP","I")=<code>
ARY("CP",n)=<character position 1-n>
ARY("CP",n,"I")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  Name
4  Pointer to CHARACTER POSITIONS file #757.033

Terms

Subscript SUB can be:

PF  Preferred Term
FS  Fully Specified Term
MC  Major Concept
SY  Synonyms
LV  Lexical Variants
OR  Orphan Text

ARY(SUB)=type
ARY(SUB,n)=<expression>
ARY(SUB,n,"I")= 4 piece "^" delimited string

1  Status
2  Type
3  Current/Retired
4  Pointer to EXPRESSIONS file #757.01

ARY(SUB,n,"ID")="Designation ID"
ARY(SUB,n,"ID",n)<designation ID>
ARY(SUB,n,"ID",n,"I")= 4 piece "^" delimited string

1  Status
2  Coding System
3  Hierarchy
4  Pointer to DESIGNATION CODE subfile #757.118

ARY(SUB,n,"SK")="Supplemental Keywords"
ARY(SUB,n,"SK",n)=<keyword>
ARY(SUB,n,"SK",n,"I")= 4 piece "^" delimited string

1  Status
2  Not used
3  Not used
4  Pointer to SUPPLEMENTAL subfile #757.18

Mappings

ARY("MP")="Mapping"
ARY("MP",n)=<map to target code>
ARY("MP",n,"I")= 6 piece "^" delimited string

1  Status
2  Effective
3  Coding System
4  Pointer to MAPPINGS file #757.33
5  Match (full/partial)
6  Source Code
7  Source Coding System

Subsets

ARY("SB")="Subsets"
ARY("SB",n)=<subset>
ARY("SB",n,"I")= 5 piece "^" delimited string

1  Status
2  Pointer to SUBSET file #757.21
3  Pointer to EXPRESSION file #757.01
4  Pointer to SUBSET DEFINITION file #757.2
5  Subset ID

Source

ARY("SR")="Source"
ARY("SR",n)=<source abbreviation>
ARY("SR",n,"I")= 4 piece "^" delimited string
ARY("SR","B",<source>,n)=""

1  Source Abbreviation
2  Source Nomenclature
3  Source Title
4  Pointer to CODING SYSTEMS file #757.03

TERM(IEN,CDT,.ARY,OUT)
This API will return information about a term in a
local array passed by reference.

VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is an internal entry number of an Expression in
the EXPRESSIONS file #757.01 (required)

CDT Input
This is a date in FileMan format used to determine
status, default TODAY

OUT Input
This is an Output flag (Optional)

0  Do not Display array, leave local array (default)
1  Display array , kill local array

.ARY Both
Local Array, passed by reference

Code

ARY("CO")="Code"
ARY("CO",n)=<code>
ARY("CO","B",<code>,n)=""
ARY("CO",n,"I")= 6 piece "^" delimited string

1  Status
2  Effective Date
3  Initial Activation Date
4  Pointer to CODES file #757.02
5  Coding System Nomenclature
6  Coding System

ARY("CO",n,"VA")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  VA File Number
4  Variable Pointer to VA File

Diagnostic Categories (ICD-10-CM only)

ARY("DC")="Diagnostic Categories"
ARY("DC",1)=<category>
ARY("DC",1,"I")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  Category Name
4  Pointer to CHARACTER POSITIONS file #757.033

Procedure Characters Positions (ICD-10-PCS only)

Where n is a character position number 1-7

ARY("CP")="Procedure Characters"
ARY("CP","I")=<code>
ARY("CP",n)=<character position 1-n>
ARY("CP",n,"I")= 4 piece "^" delimited string

1  Status
2  Effective Date
3  Name
4  Pointer to CHARACTER POSITIONS file #757.033

Terms

Subscript SUB can be:

MC  Major Concept
FS  Fully Specified Term
SY  Synonyms
LV  Lexical Variants
OR  Orphan Text

ARY(SUB)=type
ARY(SUB,n)=<expression>
ARY(SUB,n,"I")= 4 piece "^" delimited string

1  Status
2  Type
3  Current/Retired
4  Pointer to EXPRESSIONS file #757.01

ARY(SUB,n,"ID")="Designation ID"
ARY(SUB,n,"ID",n)<designation ID>
ARY(SUB,n,"ID",n,"I")= 4 piece "^" delimited string

1  Status
2  Coding System
3  Hierarchy
4  Pointer to DESIGNATION CODE subfile #757.118

ARY(SUB,n,"SK")="Supplemental Keywords"
ARY(SUB,n,"SK",n)=<keyword>
ARY(SUB,n,"SK",n,"I")= 4 piece "^" delimited string

1  Status
2  Not used
3  Not used
4  Pointer to SUPPLEMENTAL subfile #757.18

Mappings

ARY("MP")="Mapping"
ARY("MP",n)=<map to target code>
ARY("MP",n,"I")= 6 piece "^" delimited string

1  Status
2  Effective
3  Coding System
4  Pointer to MAPPINGS file #757.33
5  Match (full/partial)
6  Source Code
7  Source Coding System

Subsets

ARY("SB")="Subsets"
ARY("SB",n)=<subset>
ARY("SB",n,"I")= 5 piece "^" delimited string

1  Status
2  Pointer to SUBSET file #757.21
3  Pointer to EXPRESSION file #757.01
4  Pointer to SUBSET DEFINITION file #757.2
5  Subset ID

Source

ARY("SR")="Source"
ARY("SR",n)=<source abbreviation>
ARY("SR","B",<source>,n)=""
ARY("SR",n,"I")= 4 piece "^" delimited string

1  Source Abbreviation
2  Source Nomenclature
3  Source Title
4  Pointer to CODING SYSTEMS file #757.03

DATE ACTIVATED 2015/01/15