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

DGANHD3.m

Go to the documentation of this file.
  1. DGANHD3 ;ALB/RMO - Set-up Utility and Print NHCU and DOM AMIS's 345-346 ; 01 SEP 90 9:20 am
  1. ;;5.3;Registration;;Aug 13, 1993
  1. ;==============================================================
  1. ;Set-up Utility Global to print NHCU and DOM AMIS segments for
  1. ;a selected Month/Year.
  1. ;
  1. ;Input:
  1. ; DGMYR -(Optional) Month/Year being printed in internal date format
  1. ;==============================================================
  1. EN ;Entry point for IMS and MAS Inpatient AMIS 345-346 Print
  1. I '$D(DGMYR) S DIC("A")="Select AMIS 345-346 MONTH/YEAR: ",DIC="^DGAM(345,",DIC(0)="AEMQ" W ! D ^DIC K DIC G Q:Y<0 S DGMYR=+Y
  1. S DGPGM="START^DGANHD3",DGVAR="DGMYR" D ZIS^DGUTQ G Q:POP
  1. ;
  1. START U IO K ^UTILITY($J,"DGANHD") F DGSEG=0:0 S DGSEG=$O(^DGAM(345,DGMYR,"SE",DGSEG)) Q:'DGSEG D DIV
  1. D ^DGANHD4
  1. ;
  1. Q K ^UTILITY($J,"DGANHD"),%,DGAM,DGAM0,DGDIV,DGEND,DGMYR,DGPGM,DGSEG,DGVAR,I,POP W ! D CLOSE^DGUTQ
  1. Q
  1. ;
  1. DIV ;Loop through AMIS Segments by Division to set the Utility Global
  1. S DGEND=17
  1. F DGDIV=0:0 S DGDIV=$O(^DGAM(345,DGMYR,"SE",DGSEG,"D",DGDIV)) Q:'DGDIV I $D(^(DGDIV,0)) S DGAM0=^(0) D SET
  1. Q
  1. ;
  1. SET ;Set Utility Global by Month/Year, Segment and Division
  1. S DGAM="" F I=1:1:DGEND S $P(DGAM,"^",I)=0
  1. F I=1:1:DGEND S $P(DGAM,"^",I)=+$P(DGAM0,"^",I+1)
  1. S ^UTILITY($J,"DGANHD",DGMYR,DGSEG,DGDIV)=DGAM
  1. Q