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

AVASLXR.m

Go to the documentation of this file.
AVASLXR ;IHS/DSD/CRG - STATE LICENSE FIELD X-REF ROUTINE [ 07/03/97  1:14 PM ]
 ;;93.2;VA SUPPORT FILES;**9**;JUL 01, 1993;Build 12
SET ;EP - SET LOGIC
 S AVA200=$G(^DIC(16,DA(1),"A3")) Q:'AVA200
 S:'$D(^VA(200,AVA200,"PS1",0)) ^(0)="^200.541P^^"
 S ^VA(200,AVA200,"PS1",DA,0)=^DIC(6,DA(1),999999921,DA,0)
 S ^VA(200,AVA200,"PS1","B",DA,DA)=""
 D ZSET
 K AVA200
 Q
KILL ;EP - KILL LOGIC
 S AVA200=$G(^DIC(16,DA(1),"A3")) Q:'AVA200
 Q:'$D(^VA(200,AVA200,"PS1"))
 K ^VA(200,AVA200,"PS1",DA,0)
 K ^VA(200,AVA200,"PS1","B",DA,DA)
 D ZSET
 K AVA200
 Q
ZSET ;RESET ZERO NODE
 N I,J S I=0,J="" F  S I=$O(^VA(200,AVA200,"PS1",I)) Q:'I  D
 .S J=J+1
 S $P(^VA(200,AVA200,"PS1",0),"^",4)=J,$P(^(0),"^",3)=DA
 Q
INSTALL ;EP - INSTALL PATCH
 D DINUM
 D PRTR I $G(AVAQUIT) W !!,"Update aborted.",!! Q
 D IXALL
 K AVAQUIT,AVAEQ,AVAPAGE,AVACOUNT,AVADASH
 D ^%ZISC
 Q
DINUM ;DINUM FILE 200 ENTRIES
 S DA(1)=0 F  S DA(1)=$O(^VA(200,DA(1))) Q:'DA(1)  D
 .Q:'$D(^VA(200,DA(1),"PS1"))
 .D ONE
 K AVASTATE
 Q
ONE ;CONVERT ONE FILE 200 ENTRY
 M AVATMP=^VA(200,DA(1),"PS1")
 K ^VA(200,DA(1),"PS1")
 S ^VA(200,DA(1),"PS1",0)="^200.541P^^"
 S DA=0 F  S DA=$O(AVATMP(DA)) Q:'DA  D
 .S AVASTATE=$P(AVATMP(DA,0),"^",1)
 .S ^VA(200,DA(1),"PS1",AVASTATE,0)=AVATMP(DA,0)
 .S ^VA(200,DA(1),"PS1","B",AVASTATE,AVASTATE)=""
 .S $P(^VA(200,DA(1),"PS1",0),"^",3)=AVASTATE
 .S $P(^VA(200,DA(1),"PS1",0),"^",4)=$P(^(0),"^",4)+1
 K AVATMP
 Q
PRTR ;SELECT PRINTER FOR REPORT
 K AVAQUIT
 S %ZIS="",%ZIS("A")="Select device for update report: "
 D ^%ZIS I POP D
 .S DIR(0)="Y",DIR("A")="Device Not Selected. Continue",DIR("B")="NO"
 .D ^DIR K DIR
 .I Y'=1 S AVAQUIT=1
 Q
IXALL ;X-REF ALL ENTRIES, FILE 6   
 U IO
 S $P(AVAEQ,"=",80)=""
 S $P(AVADASH,"-",80)=""
 S AVAPAGE=0,AVACOUNT=0 D HDR
 S DA(1)=0 F  S DA(1)=$O(^DIC(6,DA(1))) Q:'DA(1)  D
 .S DA=0 F  S DA=$O(^DIC(6,DA(1),999999921,DA)) Q:'DA  D
 ..D SET
 ..S AVACOUNT=AVACOUNT+1
 ..W !,$P(^DIC(16,DA(1),0),"^",1)
 ..W ?30,$P(^DIC(5,DA,0),"^",1)
 ..W ?50,$P(^DIC(6,DA(1),999999921,DA,0),"^",2)
 ..D:$Y+6>IOSL HDR
 W !!,AVACOUNT," Records Processed."
 W !!!,"E N D  O F  R E P O R T",@IOF
 Q
HDR ;PRINT HEADER
 I '$D(DT) S DT=($$HTFM^XLFDT($H)\1)
 U IO
 S AVAPAGE=AVAPAGE+1
 W @IOF
 W !,?25,"STATE LICENSE NUMBER CONVERSION",?65,$$FMTE^XLFDT(DT,"D")
 W !,?15,"from file DIC(6 PROVIDER File to VA(200 NEW PERSON File"
 W !,AVADASH
 W !,"PROVIDER",?30,"STATE",?50,"LICENSE #",?70,"PAGE ",AVAPAGE
 W !,AVAEQ,!
 Q