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

ADGCRBL1.m

Go to the documentation of this file.
  1. ADGCRBL1 ; IHS/ADC/PDW/ENM - CODED A SHEETS (CALC) ; [ 03/25/1999 11:48 AM ]
  1. ;;5.0;ADMISSION/DISCHARGE/TRANSFER;;MAR 25, 1999
  1. ;
  1. ;***> initialize variables
  1. K ^TMP("DGZCRBL",$J)
  1. ;
  1. ;***> find visits by date and then by patient name
  1. ;
  1. S DGZDDT=DGZBDT-.0001
  1. VST S DGZDDT=$O(^AUPNVINP("B",DGZDDT))
  1. G NEXT:DGZDDT="",NEXT:DGZDDT>(DGZEDT+.2359) S DGZIDFN=0
  1. VST1 S DGZIDFN=$O(^AUPNVINP("B",DGZDDT,DGZIDFN)) G VST:DGZIDFN=""
  1. ;
  1. G VST1:'$D(^AUPNVINP(DGZIDFN,0)) S DGZVDFN=$P(^(0),U,3)
  1. G VST1:$P(^AUPNVINP(DGZIDFN,0),U,15)'="" ;check coded flag
  1. G VST1:'$D(^AUPNVSIT(DGZVDFN,0)) S DGSTR=^(0)
  1. G VST1:$P(DGSTR,U,11)'="" ;screen out deleted visits
  1. G VST1:$P(DGSTR,U,6)'=DUZ(2) ;screen out other facilities
  1. ;
  1. S DFN=$P(DGSTR,U,5),DGZNAME=$P(^DPT(DFN,0),U)
  1. S DGZVDT=$P(DGSTR,U)
  1. ;***> set ^utility with data
  1. S ^TMP("DGZCRBL",$J,$P(DGZDDT,"."),DGZNAME,DFN,DGZIDFN)=DGZVDFN_U_DGZVDT G VST1
  1. ;
  1. NEXT G ^ADGCRBL2 ;go to print rtn