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

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1VADPT0 ;ALB/MRL/MJK - PATIENT VARIABLE ROUTINE DRIVER, CONT.; 12 DEC 1988
2 ;;5.3;Registration;**343,342,415,489,498,528,689**;Aug 13, 1993;Build 1
3 ;
4 ;Initialize variables
5 N I1
6 S U="^" D DT^DICRW:'$D(DT)
7 S VAERR=$S('$D(DFN)#2:1,'$D(^DPT(DFN,0)):1,1:0)
8 S Y=VAN'=13 I Y,$D(VAROOT)'[0,VAROOT]"" S Y=0,VAV=VAROOT K @VAV
9 I Y S:$S(VAN>9:1,'$D(VAHOW):0,1:VAHOW[2) VAV="^UTILITY("_""""_VAV_""""_","_$J_")"
10 D @VAN
11Q K X,Y,VAC,VAS,VAV,VAW,VAN,I,VAX,VAZ Q
12 ;
13INIT ; -- determine #'s or names then init array
14 ;
15 S VAS="1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25"
16 I VAN<10,$D(VAHOW),VAHOW[1 S VAS=$P($T(SS+VAN),";;",2)
17 I $D(VAN(1)) F I=1:1:VAN(1) S @VAV@($P(VAS,"^",I))=""
18 Q
19 ;
201 ; -- [DEM] demos
21 D C1,INIT I 'VAERR D 1^VADPT1,13 Q
22 ;
232 ; -- [OPD] other pt vars
24 D C2,INIT,2^VADPT1:'VAERR Q
25 ;
263 ; -- [ADD] current address
27 D C3,INIT,3^VADPT1:'VAERR Q
28 ;
294 ; -- [OAD] other pt vars
30 D C4,INIT,4^VADPT1:'VAERR Q
31 ;
325 ; -- [INP] inpt data -v5
33 D C5,INIT,5^VADPT2:'VAERR Q
34 ;
356 ; -- [IN5] inpt data v5
36 D C6,INIT F I=13:1:17 F I1=1:1:7 S @VAV@($P(VAS,"^",I),I1)=""
37 F I=1:1:3 S @VAV@($P(VAS,"^",19),I)=""
38 D 6^VADPT3:'VAERR Q
39 ;
407 ; -- [ELIG] elig data
41 D C7,INIT F I=1:1:6 S @VAV@($P(VAS,"^",5),I)=""
42 D 7^VADPT4:'VAERR Q
43 ;
448 ; -- [MB] $ benefits
45 D C8,INIT D 8^VADPT4:'VAERR Q
46 ;
479 ; -- [SVC] service data
48 D C9,INIT F I=1:1:9 S @VAV@($P(VAS,"^",I),1)="",@VAV@($P(VAS,"^",I),2)=""
49 F I=11:1:13 S @VAV@($P(VAS,"^",I))=0
50 S @VAV@($P(VAS,"^",4),3)="",@VAV@($P(VAS,"^",5),3)=""
51 F I=2,6,7,8 F I1=3,4,5 S @VAV@($P(VAS,"^",I),I1)=""
52 D 9^VADPT4:'VAERR Q
53 ;
5410 ; -- [REG] registration data
55 D C10,INIT D 10^VADPT5:'VAERR Q
56 ;
5711 ; -- [SDE] clinic enrollment data
58 D C11,INIT D 11^VADPT5:'VAERR Q
59 ;
6012 ; -- [SDA] appt data
61 D C12,INIT D 12^VADPT5:'VAERR Q
62 ;
6313 ; -- [PID] pt id's
64 S (VA("PID"),VA("BID"))="" D 13^VADPT6:'VAERR Q
65 ;
66KVAR ; kill all vadpt data
67 K VAN
68C1 K ^UTILITY("VADM",$J),VADM Q:$D(VAN)
69C2 K ^UTILITY("VAPD",$J),VAPD Q:$D(VAN)
70C3 K X S:$D(VAPA("P")) X("P")=VAPA("P")
71 S:$D(VAPA("CD")) X("CD")=VAPA("CD")
72 K ^UTILITY("VAPA",$J),VAPA
73 S:$D(X("P")) VAPA("P")=X("P") K X("P")
74 S:$D(X("CD")) VAPA("CD")=X("CD") K X Q:$D(VAN)
75C4 K X S:$D(VAOA("A")) X("A")=VAOA("A")
76 K ^UTILITY("VAOA",$J),VAOA
77 S:$D(X("A")) VAOA("A")=X("A") K X Q:$D(VAN)
78C5 K ^UTILITY("VAIN",$J),VAIN Q:$D(VAN)
79C6 K X F I="D","E","L","M","V" I $D(VAIP(I)) S X(I)=VAIP(I)
80 S Y=$S('$D(VAIP("V")):"VAIP",VAIP("V")'?1A.E:"VAIP",1:VAIP("V")) K ^UTILITY(Y,$J),@Y
81 F I="D","E","L","M","V" I $D(X(I)) S VAIP(I)=X(I)
82 K X Q:$D(VAN)
83C7 K ^UTILITY("VAEL",$J),VAEL Q:$D(VAN)
84C8 K ^UTILITY("VAMB",$J),VAMB Q:$D(VAN)
85C9 K ^UTILITY("VASV",$J),VASV Q:$D(VAN)
86C10 K ^UTILITY("VARP",$J) Q:$D(VAN)
87C11 K ^UTILITY("VAEN",$J) Q:$D(VAN)
88C12 K ^UTILITY("VASD",$J) Q
89C13 Q
90 ;
91SS ; 1^ 2^ 3^ 4^ 5^ 6^ 7^ 8^ 9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25
92 ;;NM^SS^DB^AG^SX^EX^RE^RA^RP^MS^ET^RC
93 ;;BC^BS^FN^MN^MM^OC^ES
94 ;;L1^L2^L3^CI^ST^ZP^CO^PN^TS^TE^Z4^CCA^CL1^CL2^CL3^CCI^CST^CZP^CCO^CCS^CCE^CTY
95 ;;L1^L2^L3^CI^ST^ZP^CO^PN^NM^RE^Z4
96 ;;AN^DR^TS^WL^RB^BS^AD^AT^AF^PT^AP
97 ;;MN^TT^MD^MT^WL^RB^DR^TS^MF^BS^RD^PT^AN^LN^PN^NN^DN^AP^FD
98 ;;EL^PS^SC^VT^IN^TY^CN^ES^MT
99 ;;AA^HB^SS^PE^MR^SI^DI^OR^GI
100 ;;VN^AO^IR^PW^CS^S1^S2^S3^PH^OIF^OEF^VIS
Note: See TracBrowser for help on using the repository browser.