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

ACHSVPS.m

Go to the documentation of this file.
ACHSVPS ; IHS/ITSC/PMF - VENDOR REPORT BY PHYSICIAN SPECIALITY ;  [ 10/16/2001   8:16 AM ]
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
 ;
 D HOME^%ZIS,DT^DICRW
 N L,DIC,FLDS,BY,DHD
 S L=0,DIC="^AUTTVNDR(",FLDS="1103.01,1108,.01"
 S BY="1103.01;#,1108",DHD="VENDOR BY SPECIALITY & P.O. ISSUANCE DATE"
 D EN1^DIP
 I $$DIR^XBDIR("E","Press RETURN...")
 Q
 ;
LAD(DA,ACHSDATE) ;EP - Update LAST AUTH DATE in VENDOR.
 I '$$LOCK^ACHS("^AUTTVNDR(DA,0)","+") W:'$D(ZTQUEUED) *7,!,"LOCK at LAD^ACHSVPS failed.  NOTIFY PROGRAMMER." Q
 N DIE
 S DIE="^AUTTVNDR(",DR="1108///"_ACHSDATE
 D ^DIE
 I $$LOCK^ACHS("^AUTTVNDR(DA,0)","-")
 Q
 ;
OKC ;
 D HOME^%ZIS,DT^DICRW,^XBKVAR
 W !,"Updating LAST AUTH DATE in VENDOR file for Vendor Specialty Report..."
 N ACHSDATE,ACHSDIEN,ACHSPROV
 S ACHSPROV=9999999999
 F  S ACHSPROV=$O(^ACHSF(DUZ(2),"VB",ACHSPROV),-1) W "." Q:'(ACHSPROV=+ACHSPROV)  D
 . S ACHSDIEN=$O(^ACHSF(DUZ(2),"VB",ACHSPROV,999999999),-1)
 . Q:'ACHSDIEN
 . S ACHSDATE=$P($G(^ACHSF(DUZ(2),"D",ACHSDIEN,"T",1,0)),U)
 . Q:'ACHSDATE
 . D LAD^ACHSVPS(ACHSPROV,ACHSDATE)
 .Q
 W "DONE.",!
 Q
 ;