source: FOIAVistA/trunk/r/PHARMACY_PRESCRIPTION_PRACTICE-PPP/PPPST04.m@ 1800

Last change on this file since 1800 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1PPPST04 ;ALB/JFP/DAD - post inits for prescription practices;01MAR94
2 ;;V1.0;PHARMACY PRESCRIPTION PRACTICE;**2**;APR 7,1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5PARMEDT ; Set up the parameter file
6 ;
7 N DIK,DA,DIC,X,Y,DIE,DR,DUOUT,DTOUT,SITE
8 N DLAYGO,DIDEL
9 ;
10 W !!,">>> Setting Up PPP Parameter File..."
11 S (DLAYGO,DIDEL)=1020.1
12 S SITE=$$SITE^VASITE,SITE=$S($P(SITE,"^",1)'=-1:$P(SITE,"^",3),1:0)
13 S DA=1,DIK="^PPP(1020.1," D ^DIK:$D(^PPP(1020.1,1,0))
14 ;
15 W !
16 S DIC(0)="L",DIC=1020.1,X=1,DIC("DR")="4///[""VAH"",""PPS""]"
17 D ^DIC
18 I +Y>0 D
19 .S DIE=1020.1,DA=+Y,DR="1//7;9//7;2//30;6//YES;7//NO;8//"_SITE_";10//30;11//365;12;13"
20 .D ^DIE
21 E W !,*7,"Error Initializing PARAMETER File."
22 Q
23 ;
24DOMXREF ; Build the domain cross-reference
25 ;
26 N DOMAIN,IFN,STATION,DIC,X,Y,DINUM,DD,DO
27 ;
28 W !!,">>> Setting Up Station Vs. Domain Cross-Reference..."
29 W !!,"This routine will DELETE your existing PPP DOMAIN XREF file"
30 W !,"(if it exists) and then create it using your current DOMAIN file.",!
31 ;S DIR(0)="Y"
32 ;S DIR("A")="Do you wish to continue"
33 ;S DIR("B")="YES"
34 ;D ^DIR K DIR
35 S Y=1
36 I Y D
37 .W !,">>> Loading PPP Domain Cross-reference..."
38 .S DOMAIN=""
39 .S DIC="^PPP(1020.8,",DIC(0)=""
40 .K ^PPP(1020.8)
41 .S ^PPP(1020.8,0)="PPP DOMAIN XREF^1020.8P^^"
42 .F S DOMAIN=$O(^DIC(4.2,"B",DOMAIN)) Q:DOMAIN="" D
43 ..S IFN=$O(^DIC(4.2,"B",DOMAIN,0)) Q:'IFN
44 ..I '$P($G(^DIC(4.2,IFN,0)),"^",13) W !!,"Station Number missing for "_DOMAIN,! Q
45 ..S STATION=$O(^DIC(4,"D",$P($G(^DIC(4.2,IFN,0)),"^",13),0)) ;Q:'STATION
46 ..W !,"Filing Station ",STATION," as ",DOMAIN,"..."
47 ..I '$D(^DIC(4,+STATION,0)) W !,"...(Station # not in INSTITUTION file)" Q
48 ..S X=STATION,DINUM=X
49 ..S DIC("DR")=".02///"_DOMAIN
50 ..K DD,DO D FILE^DICN
51 ..I +Y>0 W "Filed"
52 ..E W "...(Error)"
53 Q
Note: See TracBrowser for help on using the repository browser.