LRSCTX ;DALOI/FHS/JDB - FIND TERM OR ADD TO FILE ;04/10/12 15:41
Source file <LRSCTX.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
EN(LRFILE,LRTXT,LRSCT,LRHL7,LRERROR,CHECK) | ;
; Main entry point for LRSCTX. ; Returns a matching entry for LRTXT in LRFILE or creates a new entry in LRFILE for LRTXT. ; Called by OBX^LA7VIN7 |
|
CHKSCT(LRFILE,LRSCT,HLINFO,ADD,INACTIVE) | ;
; Private helper method ; Checks for an SCT match. If no existing LRFILE entry is found using the LEX data, a new entry in LRFILE will be created automatically. ; Inputs ; LRFILE: File number to search/add entry to (61, 61.2, 62) ; LRSCT: SCT Code to use for search ; HLINFO:<byref> (from EN^LRSCTX) ; ADD:<opt> dflt=0 0=dont add new entry 1=add new entry ; INACTIVE: <opt>0 or 1 <dflt=0> 1=use SCT even if inactive ; Outputs ; The IEN of the entry found or created. ; If a file error occurred, output=0 and the second "^" piece contains error info. ie "0^Unknown file #" |
|
FIND(LRTXT,LRFILE,NTEXT) | ;
; Private helper method ; Tries to find a matching text entry in the file specified. ; Inputs ; LRTXT: Text of term ; LRFILE: File # to use ; NTEXT:<byref> See Outputs ; Outputs ; 0 if no match, else the IEN of the matching record. ; NTEXT: New text to use for .01 field |
|
MATCH(TEXT,DATA) | ;
; Private helper method ; Scan the DATA array for an entry that matches TEXT. ; Inputs ; TEXT: The .01 text to match on ; DATA: <byref> a DILIST array from FIND^DIC ; Outputs ; 0 = no match or the IEN of the matching record. |