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

AUFLST.m

Go to the documentation of this file.
AGPORT ;PCISPORT INITILIZATION ROUTINE [ 06/04/85  8:14 AM ]
 ;OCAO-IHS  DRS
INIT D ^AUCLS
 S UDEV=47,BDC=0,EFLG=0,EFLG=0,RUNADD=0,PATSAVE="",PATSKFLG=0,R15FLG=0,DUZ(0)="@"
 S RWFLG=0 K ^REGCVTER,^COMERROR,^FACERROR
 S X="TODAY" D ^%DT S DT=Y IF Y=-1 Q
 F I=1:1:79 U 0 W "*"
QNTVAR I +^AQUAN(1,0)'=0 S (QT(2),QT(3),QT(4))="",QT(1)="FULL",QT(5)="NONE",QT(6)="UNSPECIFIED",QT(7)="UNKNOWN"
 E  S QT(0)="NONE",QT(8)="FULL",QT(9)="UNKNOWN" F I=1:1:7 S QT(I)=""
 W !,?22,"PROGRAM TO PORT REGISTRATION DATA",!
 W ?24,"OCAO  RPMS  DEVELOPMENT  SITE",!
 F I=1:1:79 U 0 W "*"
 S TODAY=Y
 I $D(^APAT(0))=1 G IADDMSG
 G INITKILL
IADDMSG S TRECDS=$P(^APAT(0),"^",4)
 I +TRECDS<1 G INITKILL
 S MCRDFN=0 S:$D(^AMCR(0)) MCRDFN=$P(^AMCR(0),"^",3)
 S MCDDFN=0 S:$D(^AMCD(0)) MCDDFN=$P(^AMCD(0),"^",3)
 S RREDFN=0 S:$D(^ARRE(0)) RREDFN=$P(^ARRE(0),"^",3)
 S MCRRCT=0 S:$D(^AMCR(0)) MCRRCT=$P(^AMCR(0),"^",4)
 S MCDRCT=0 S:$D(^AMCD(0)) MCDRCT=$P(^AMCD(0),"^",4)
 S RRERCT=0 S:$D(^ARRE(0)) RRERCT=$P(^ARRE(0),"^",4)
 W !,"TOTAL PATIENTS RECORDS ON FILE =",TRECDS,!!
 W !,"DO YOU WANT TO ADD TO THESE RECORDS (Y/N) "
 U 0 R X
 I $E(X)="Y" S RCT=TRECDS G STEP1
INITKILL U 0 R !,"I AM GOING TO KILL THE PATIENT FILES  (Y/N) ??? ",X
 I $E(X)'="Y" G JOBEND^AGPORTM
 U 0 W !!,"ARE YOU SURE (YES/NO)   "
 U 0 R X
 I X'="YES" G JOBEND^AGPORTM
 K ^APAT,^AMCR,^ARRE,^AMCD,^APRVT,^DPT
 S (RCT,MCRRCT,RRERCT,MCDRCT,MCDDFN,RREDFN,MCRDFN)=0
STEP1 S ^APAT(0)="IHS PATIENT^9000001IP",^DPT(0)="PATIENT^2"
 O UDEV C UDEV O UDEV:("AFU":166:8134)
 W !!,"DO YOU WANT TO REWIND TAPE (Y/N) "
 U 0 R X
 I X'="Y" G STEP1A
 U UDEV W *5
STEP1A G ^AGPORTM
AUFLST ;TEST PROGRAM TO FIND LAST ENTRY IN GLOBAL
 
 F DFN=1:1 S X=$O(^APAT(DFN)) Q:X'?.N
 W !,"LAST # USED = ",DFN
 Q