source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOSTART.m@ 1128

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSOSTART ;BHAM ISC/SAB - pre init for v7 ;2/28/95 [ 07/29/96 9:15 AM ]
2 ;;7.0;OUTPATIENT PHARMACY;**10**;DEC 1997
3 ;this routine should only called by the KIDS installer
4 ;Q:'$G(PSOINST)
5 S (XQABT1,XQABT2,XQABT3)=$H,PSOIT=$P(XQABT1,",",2)
6 ;master file update
7 ;D EN1^PSSHL1 I $G(XPDABORT) K XQABT1,XQABT2,XQABT3 Q
8 D:$P(^PS(59.7,1,49.99),"^")'="7.0"
9 .S $P(^PS(59.7,1,49.99),"^",7)="",ZTDTH=$H,ZTRTN="POST^PSOPOST",ZTIO="",ZTDESC="Outpatient Pharmacy version 7.0 background conversion" D ^%ZTLOAD
10 .S DIU(0)="DT" F DIU=52.41 D EN^DIU2 K DIU W "." ;deletes *REFILL WITH NON VERIFIED NEWS (#52.41) file
11 K DIK,DA S DIK="^DD(52,",DA(1)=52 F DA=6,17,39.4,39.5 D ^DIK
12 K DIK,DA S DIK="^DD(59,",DA(1)=59 F DA=.19,.093 D ^DIK
13 K DIK,DA S DIK="^DD(52.11,",DA(1)=52.11 F DA=.01,1,4,6,7,8 D ^DIK
14 K DIK,DA S DIK="^DD(59.3,",DA(1)=59.3,DA=2 D ^DIK
15 K DA,DIK F DA=3,4,5,6,7 S DIK="^DD(50.9006,",DA(1)=50.9006 D ^DIK ;deletes duplicate fields in 50.9
16 K DIK,DA
17 I $P($G(^PS(54,0)),"^")'="RX CONSULT" D W "."
18 .K ^PS(54)
19 .S %X="^DIC(54,",%Y="^PS(54," D %XY^%RCR K ^PS(54,0,"GL"),^PS(54,"%"),^PS(54,"%D") K ^DIC(54,"B") F I=0:0 S I=$O(^DIC(54,I)) Q:'I K ^DIC(54,I)
20 .S DIU="^DIC(54,",DIU(0)="" D EN^DIU2
21 S DIU(0)="DT" F DIU=59.9 D EN^DIU2 K DIU W "." ;deletes pharmacy functions file
22 K ^PSRX("AP"),DA,DIK S DIK="^DD(52,",DA(1)=52 F DA=10,100 D ;removes old sig and status fields
23 .I DA=10,$P($G(^DD(52,10,0)),"^",4)'="SIG;1" D ^DIK W "."
24 .I DA=100,$P($G(^DD(52,100,0)),"^",4)'="STA;1" D ^DIK W "."
25 ;delete Pharmacy Archive data
26 K DA,DIK S DIK="^PSOARC(" F DA=0:0 S DA=$O(^PSOARC(DA)) Q:'DA D
27 .I $P($G(^PSOARC(DA,0)),"^"),$P($G(^(0)),"^",2),$D(^PSRX(DA,0)),$P($G(^(0)),"^",2) D ^DIK Q
28 .K ^PSOARC(DA,0)
29 K ^PSOARC("B"),^PSOARC("C")
30 K DA,DIK
31 Q
Note: See TracBrowser for help on using the repository browser.