source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPMBSG.m@ 1751

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1DGPMBSG ;ALB/LM - BED STATUS GENERATION; 6 JUNE 90
2 ;;5.3;Registration;**34**;Aug 13, 1993
3 ;
41 D ^DGPMBSG1
5 S M=MV("MT") ; Movement type
6 S T=MV("TT") ; Transaction type
72 I T'=1,'REM D ^DGPMBSG2
83 D ^DGPMBSG3
9 I T=2 D TRF ; if Transfer
10 I '$D(E("LW")) S ^UTILITY("DGCN",$J,+MV("LWD"))=LW
11 I '$D(E("PW")) S ^UTILITY("DGCN",$J,+MV("PWD"))=PW
12 I '$D(E("LT")) S ^UTILITY("DGSN",$J,LTSDV,+MV("LTS"))=LT
13 I '$D(E("PT")) S ^UTILITY("DGSN",$J,PTSDV,+MV("PTS"))=PT
14K K E,II,JJ,LDV,LT,LW,M,MP,PT,PW,X,X1,Z
15Q K E Q
16 ;
17TRF ; T=2 (Transfer)
18 ; M=44 (resume ASIH in parent facility) M=45 (change ASIH other facility)
19 I "^44^45^"[("^"_M_"^") S (E("LW"),E("LT"),E("PW"),E("PT"))="" Q
20 ;
21 ; M=13 (to ASIH) 43=TO ASIH (OTHER FAC) 20=To ASIH 24=Cum Losses
22 I "^13^43^"[("^"_M_"^") S $P(LW,"^",20)=$P(LW,"^",20)+1,$P(LW,"^",24)=$P(LW,"^",24)+1,$P(LT,"^",20)=$P(LT,"^",20)+1,$P(LT,"^",24)=$P(LT,"^",24)+1 K E S (E("PW"),E("PT"))="" Q
23 ;
24 ; M=14 (From ASIH) 19=From ASIH 28=Gains Total
25 I M=14 S $P(LW,"^",19)=$P(LW,"^",19)+1,$P(LW,"^",28)=$P(LW,"^",28)+1,$P(LT,"^",19)=$P(LT,"^",19)+1,$P(PT,"^",28)=$P(PT,"^",28)+1 K E S E("PW")="" Q
26 ;
27 ; M=2 (AA) M=3 (UA) 24=Cum Losses 26=Cum AA 27=Cum UA
28 I "^2^3^"[("^"_M_"^") S $P(LW,"^",24)=$P(LW,"^",24)+1,$P(LW,"^",(M+24))=$P(LW,"^",(M+24))+1,$P(LT,"^",24)=$P(LT,"^",24)+1,$P(LT,"^",(M+24))=$P(LT,"^",(M+24))+1 K E S (E("PW"),E("PT"))="" Q
29 ;
30 ; M=22 (From UA) 28=Gain Cum
31 I M=22 S $P(LW,"^",28)=$P(LW,"^",28)+1,$P(PT,"^",28)=$P(PT,"^",28)+1 K E S (E("PW"),E("LT"))="" Q
32 ;
33 ; M=24 (From AA) 28=Gain Cum
34 I M=24 S $P(LW,"^",28)=$P(LW,"^",28)+1,$P(PT,"^",28)=$P(PT,"^",28)+1 K E S (E("PW"),E("LT"))="" Q
35 ;
36 ; M=25 (From AA to UA) 26=Cum AA
37 I M=25 S $P(LW,"^",26)=$P(LW,"^",26)+1,$P(PT,"^",26)=$P(PT,"^",26)+1 K E S (E("PW"),E("LT"))="" Q
38 ;
39 ; M=26 (From UA to AA) 27=Cum UA
40 I M=26 S $P(LW,"^",27)=$P(LW,"^",27)+1,$P(PT,"^",27)=$P(PT,"^",27)+1 K E S (E("PW"),E("LT"))="" Q
41 ;
42WDC Q:'WDC ; Ward Change
43 ; 28=Gain Cum, 23=Cum InterServ Xfer In, 8=Cum InterServ Xfer Out, 6=Cum Inter Xfer, 24=Cum Losses, 29=Cum IWT
44 S $P(LW,"^",28)=$P(LW,"^",28)+1,X=$S($D(^DIC(42,+MV("LWD"),0)):$P(^(0),"^",3),1:0),X1=$S($D(^DIC(42,+MV("PWD"),0)):$P(^(0),"^",3),1:0) I X'=X1 S $P(LW,"^",23)=$P(LW,"^",23)+1,$P(PW,"^",8)=$P(PW,"^",8)+1
45 S $P(PW,"^",6)=$P(PW,"^",6)+1,$P(PW,"^",24)=$P(PW,"^",24)+1,$P(LW,"^",29)=$P(LW,"^",29)+1
46 Q
Note: See TracBrowser for help on using the repository browser.