source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGXR37.m@ 1710

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

revised back to 6/30/08 version

File size: 2.5 KB
RevLine 
[623]1PSGXR37 ; COMPILED XREF FOR FILE #53.1 ; 01/17/08
[613]2 ;
3 S DIKZK=1
4 S DIKZ(0)=$G(^PS(53.1,DA,0))
5 S X=$P(DIKZ(0),U,1)
6 I X'="" S ^PS(53.1,"B",$E(X,1,30),DA)=""
7 S X=$P(DIKZ(0),U,15)
8 I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENNPS^PSGAXR
9 S X=$P(DIKZ(0),U,2)
10 I X'="" I $P($G(^PS(53.1,DA,0)),"^",15),$D(^PS(55,+$P(^(0),U,15),0)),$P($G(^(5.1)),"^",2)'=X S $P(^(5.1),"^",2)=X
11 S X=$P(DIKZ(0),U,5)
12 I X'="" D
13 .N DIK,DIV,DIU,DIN
14 .I 'X S DIU=$S($D(^PS(53.1,DA,0)):$P(^(0),"^",6),1:"") I DIU]"" S $P(^(0),"^",6)="" I $O(^DD(53.1,6,1,0)) K DIV S (DIV(0),D0)=DA,DIV="",DIH=53.1,DIG=6 D ^DICR K DIV
15 S DIKZ(0)=$G(^PS(53.1,DA,0))
16 S X=$P(DIKZ(0),U,7)
17 I X'="" D
18 .N DIK,DIV,DIU,DIN
19 .I X="OC" S DIU=$P($G(^PS(53.1,DA,2)),"^") I DIU'="ON CALL" S $P(^(2),"^")="ON CALL" I $O(^DD(53.1,26,1,0)) K DIV S (DIV(0),D0)=DA,DIV="ON CALL",DIH=53.1,DIG=26,(PSGS0XT,PSGS0Y)="" D ^DICR K DIV
20 S X=$P(DIKZ(0),U,7)
21 I X'="" D
22 .N DIK,DIV,DIU,DIN
23 .I X="O",$D(^PS(53.1,DA,2)),$P(^(2),"^",2),$P(^(2),"^",4),$P(^(2),"^",2)'=$P(^(2),"^",4) S DIU=$P(^(2),"^",4),$P(^(2),"^",4)=$P(^(2),"^",2) I $O(^DD(53.1,25,1,0)) K DIV S DIV=$P(^PS(53.1,DA,2),"^",2) X ^DD(53.1,7,1,2,1.4)
24 S DIKZ(4)=$G(^PS(53.1,DA,4))
25 S X=$P(DIKZ(4),U,1)
26 I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENNACK^PSGAXR
27 S DIKZ(2)=$G(^PS(53.1,DA,2))
28 S X=$P(DIKZ(2),U,1)
29 I X'="" D
30 .N DIK,DIV,DIU,DIN
31 .I '$D(DIU(0)),$D(PSGS0Y),PSGS0Y S DIU=$S($D(^PS(53.1,DA,2)):$P(^(2),"^",5),1:"") I DIU'=PSGS0Y S $P(^(2),"^",5)=PSGS0Y I $O(^DD(53.1,39,1,0)) K DIV S (DIV(0),D0)=DA,DIV=PSGS0Y,DIH=53.1,DIG=39 D ^DICR K DIV
32 S X=$P(DIKZ(2),U,1)
33 I X'="" D
34 .N DIK,DIV,DIU,DIN
35 .I $D(PSGS0XT),PSGS0XT S DIU=$S($D(^PS(53.1,DA,2)):$P(^(2),"^",6),1:"") I DIU'=PSGS0XT S $P(^(2),"^",6)=PSGS0XT I $O(^DD(53.1,41,1,0)) K DIV S (DIV(0),D0)=DA,DIV=PSGS0XT,DIH=53.1,DIG=41 D ^DICR K DIV
36 S DIKZ(0)=$G(^PS(53.1,DA,0))
37 S X=$P(DIKZ(0),U,9)
38 I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENSS^PSGAXR
39 S DIKZ(2)=$G(^PS(53.1,DA,2))
40 S X=$P(DIKZ(2),U,5)
41 I X'="" S PSGS0Y=X
42 S X=$P(DIKZ(2),U,5)
43 I X'="" I $D(^PS(53.1,DA,2)),$P(^(2),"^")["@" S $P(^(2),"^")=$P($P(^(2),"^"),"@")_"@"_X
44 S DIKZ(.1)=$G(^PS(53.1,DA,.1))
45 S X=$P(DIKZ(.1),U,1)
46 I X'="" D ENNDS^PSGAXR
47 S DIKZ(.2)=$G(^PS(53.1,DA,.2))
48 S X=$P(DIKZ(.2),U,8)
49 I X'="" S ^PS(53.1,"ACX",$E(X,1,30),DA)=""
50CR1 S DIXR=498
51 K X
52 S DIKZ("DSS")=$G(^PS(53.1,DA,"DSS"))
53 S X(1)=$P(DIKZ("DSS"),U,1)
54 S X(2)=$P(DIKZ(0),U,15)
55 S X=$G(X(1))
56 I $G(X(1))]"",$G(X(2))]"" D
57 . K X1,X2 M X1=X,X2=X
58 . S ^PS(53.1,"AD",$E(X(1),1,20),$E(X(2),1,20),DA)=""
59CR2 K X
60END G ^PSGXR38
Note: See TracBrowser for help on using the repository browser.