Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ICDSAPI

ICDSAPI.m

Go to the documentation of this file.
  1. ICDSAPI ;ISL/KER - ICD Search API ;04/21/2014
  1. ;;18.0;DRG Grouper;**57**;Oct 20, 2000;Build 1
  1. ;
  1. ; Global Variables
  1. ; None
  1. ;
  1. ; External References
  1. ; ^DIC ICR 10006
  1. ;
  1. EN ; Main Entry Point
  1. HELP ; Developer Help for an API
  1. D HLP^ICDEXH("SDD") Q
  1. ;
  1. ;
  1. ; Input:
  1. ;
  1. ; FILEID This can be either a file number, a file root,
  1. ; a file identifier, a coding system or a source
  1. ; abbreviation that can be resolved to a file
  1. ; number. FILEID may be in the form of a file
  1. ; number, a global root, a coding system (1, 2,
  1. ; 30 OR 31), a source abbrevation (ICD, ICP,
  1. ; 10D or 10P) or a mnemonic (DIAG or PROC).
  1. ;
  1. ; SCREEN This is a string of MUMPS code that is
  1. ; executed to screen an entry from selection.
  1. ; It must contain an IF statement to set the
  1. ; value of $T. Those entries that the IF
  1. ; statement sets $T to 0 (false) will not be
  1. ; displayed or selectable.
  1. ;
  1. ; DISFIL A string of alphabetic characters which
  1. ; alter how the lookup responds. Default
  1. ; value "AEMQZ". DIC(0) will be set to the
  1. ; contents of this parameter.
  1. ;
  1. ; Parameters applicable to a versioned file
  1. ;
  1. ; A Ask the entry; if erroneous, ask again
  1. ; B Only the B index is used
  1. ; E Echo information
  1. ; F Forget the lookup value
  1. ; I Ignore the special lookup program
  1. ; M Multiple-index lookup allowed
  1. ; N Uppercase, IEN lookup allowed (not forced)
  1. ; O Only find one entry if it matches exactly
  1. ; S Suppresses display of .01
  1. ; T Search until user selects or enters ^^
  1. ; X EXact match required
  1. ; Z Zero node in Y(0), external form in Y(0,0)
  1. ;
  1. ; Parameters not Applicable to a versioned file
  1. ; and ignored by this lookup
  1. ;
  1. ; C Versioned cross-references not turned off
  1. ; K Primary Key not established
  1. ; L Learning a new entry LAYGO not allowed
  1. ; n ICD has no pure numeric entries
  1. ; Q Input is pre-processed, ?? not necessary
  1. ; U All values are external
  1. ; V Verification is not optional
  1. ;
  1. ; DATE Versioning Date (Fileman format)
  1. ;
  1. ; If supplied only active codes on that date
  1. ; will be included in the selection list.
  1. ;
  1. ; If not supplied, the date will default to
  1. ; TODAY and all codes may be selected, active
  1. ; and inactive.
  1. ;
  1. ; In both cases the display will be altered
  1. ; based on the date.
  1. ;
  1. ; ICDFMT Output Format
  1. ;
  1. ; 1 Fileman, Code and Short Text (default)
  1. ;
  1. ; 250.00 DMII WO CMP NT ST UNCNTR
  1. ;
  1. ; 2 Fileman, Code and Description
  1. ;
  1. ; 250.00 DIABETES MELLITUS WITHOUT
  1. ; MENTION OF COMPLICATION, TYPE
  1. ; II OR UNSPECIFIED TYPE, NOT
  1. ; STATED AS UNCONTROLLED
  1. ;
  1. ; 3 Lexicon, Short Text and Code
  1. ;
  1. ; DMII WO CMP NT ST UNCNTR (250.00)
  1. ;
  1. ; 4 Lexicon, Description and Code
  1. ;
  1. ; DIABETES MELLITUS WITHOUT MENTION OF
  1. ; COMPLICATION, TYPE II OR UNSPECIFIED TYPE,
  1. ; NOT STATED AS UNCONTROLLED (250.00)
  1. ;
  1. ; Output:
  1. ;
  1. ; $$SEARCH This is the value of Y (below)
  1. ;
  1. ; Y IEN ^ Code Fileman
  1. ;
  1. ; or
  1. ;
  1. ; -1 iF not found
  1. ;
  1. ; If DISFIL/DIC(0) containg the character "Z"
  1. ;
  1. ; Y(0) 0 Node Fileman
  1. ; Y(0,0) Code Fileman
  1. ; Y(0,1) $$ICDDX or $$ICDOP Non-Fileman
  1. ; Y(0,2) Long Description Non-Fileman
  1. ;
  1. N ROOT,FILE,SYS,ICDVDT
  1. S FILE=$$FILE^ICDEX($G(FILEID)) Q:+FILE'>0 -1
  1. S (DIC,ROOT)=$$ROOT^ICDEX(FILE) Q:'$L(ROOT) -1
  1. S DIC("S")=$S($L($G(SCREEN)):$G(SCREEN),1:"I 1")
  1. S:$G(DATE)?7N ICDVDT=$G(DATE)
  1. S SYS=$$SYS^ICDEX(FILE,$G(ICDVDT)) S:+SYS>0 ICDSYS=+SYS
  1. S DISFIL=$G(DISFIL,"AEMQZ") S DISFIL=$TR(DISFIL,"L","") K DLAYGO
  1. S DIC(0)=DISFIL D ^DIC S:+($G(Y))'>0 Y=-1 K DIC,ICDSYS,ICDFMT
  1. Q Y