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

ICDZENT.m

Go to the documentation of this file.
ICDZENT ; IHS/ANMC/MWR - ENTRY POINT FOR GROUPER VERSION 8; AUGUST 14, 1992
 ;; VERSION 8.0;DRG GROUPER;;AUG 14, 1992
 ;
 ; CALLING THIS ROUTINE WITH THE PROPER VARIABLES DEFINED WILL PRODUCE
 ; AN OUTPUT TO THE SCREEN GIVING THE DRG, HCFA WEIGHT AND GEOM MEAN
 ; LENGTH OF STAY.
 ;
 ; THE FOLLOWING VARIABLES NEED TO BE SET WHEN CALLING THE GROUPER
 ; AT THIS ENTRY POINT:
 ;
 ; SEX       - SET SEX EQUAL TO "M" OR "F", E.G., S SEX="M"
 ;
 ; AGE       - SET AGE EQUAL TO NUMBER OF YEARS, E.G., S AGE=35
 ;
 ; ICDEXP    - SET ICDEXP=1 IF PATIENT DIED DURING EPISODE, 0 IF NOT.
 ;
 ; ICDTRS    - SET ICDTRS=1 IF PATIENT TRANSFERRED TO ACUTE CARE
 ;             FACILITY, 0 IF NOT.
 ;
 ; ICDDMS    - SET ICDDMS=1 IF PATIENT DISCHARGED AGAINST MEDICAL
 ;             ADVICE, 0 IF NOT.
 ;
 ; ICDDX(1)  - SET ICDDX(1)=IE# OF THE PRIMARY DIAGNOSIS IN THE ICD9(
 ;             GLOBAL (ICD DIAGNOSIS FILE).
 ;
 ; ICDDX(N)  - SET ICDDX(N)=IE# OF SECONDARY DIAGNOSES IN THE ICD9(
 ;             GLOBAL (ICD DIAGNOSIS FILE), WHERE N>1.  IN OTHER WORDS,
 ;             BUILD A LOCAL ARRAY OF SECONDARY DIAGNOSES.
 ;
 ; ICDPRC(N) - SET ICDPRC(N)=IE# OF PROCEDURES IN THE ICD0( GLOBAL
 ;             (ICD OPERATION/PROCEDURE FILE).  IN OTHER WORDS, BUILD
 ;             A LOCAL ARRAY OF OPERATIONS/PROCEDURES.
 ;             NOTE: IF THERE ARE NO OPERATIONS/PROCEDURES, THIS 
 ;                   MAY BE LEFT UNDEFINED.
 ;
 ; EXAMPLE:
 ;
 ;S SEX="F"
 ;S AGE=35
 ;S ICDEXP=0,ICDTRS=1,ICDDMS=0
 ;S ICDDX(1)=8560,ICDDX(2)=8561
 ;S ICDPRC(1)=3229
 ;
 ; THE CALLING PROGRAM MAY ALSO DEFINE ICDZEN (S ICDZEN="") IN ORDER TO
 ; HAVE THE FOLLING VARIABLES RETURNED:
 ;                                   ICDZDRG = THE CALCULATED DRG NUMBER
 ;                                   ICDZDRT = TEXT OF THE DRG NUMBER
 ;                                   ICDZWT  = THE HCFA WEIGHT
 ;                                   ICDZLOS = THE HCFA GEOM MEAN LOS
 ;      NOTE: THESE VARIABLES WILL NOT BE KILLED BY THE ICD PROGRAM
 ;            AND ARE THE RESPONSIBILITY OF THE CALLING PROGRAM.
 ;
 ; THE CALLING PROGRAM MAY ALSO DEFINE ICDZNOT (S ICDZNOT="") IN ORDER
 ; TO SUPPRESS ALL OUTPUT (FOR CASES WHEN ONLY THE RETURNED VARIABLES
 ; ARE DESIRED).
 ;
BEGIN ;
 D ^XBKVAR
 K ICDERR,ICDZDRG,ICDZLOS,ICDZWT
 F ICDI="SEX","AGE","ICDEXP","ICDTRS","ICDDMS","ICDDX(1)" D
 .I '$D(@ICDI) D  S ICDERR=""
 ..W !,"The variable """,ICDI,""" is not defined. "
 G:$D(ICDERR) EXIT
 D ^ICDDRG
 D WRT^ICDDRGM
 ;
EXIT ;    
 K ICDI,ICDERR,ICDZEN,ICDZNOT