Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VADPT0

VADPT0.m

Go to the documentation of this file.
  1. VADPT0 ;ALB/MRL,MJK,ERC,TDM,ARF,JAM,JMM - PATIENT VARIABLE ROUTINE DRIVER, CONT. ;02/22/2016
  1. ;;5.3;Registration;**343,342,415,489,498,528,689,789,688,759,754,887,952,996,1059,1064,1103,1121**;Aug 13, 1993;Build 14
  1. ;
  1. ;Initialize variables
  1. N I1
  1. S U="^" D DT^DICRW:'$D(DT)
  1. S VAERR=$S($G(DFN)="":1,'$D(^DPT(DFN,0)):1,1:0)
  1. S Y=VAN'=13 I Y,$D(VAROOT)'[0,VAROOT]"" S Y=0,VAV=VAROOT K @VAV
  1. I Y S:$S(VAN>9:1,'$D(VAHOW):0,1:VAHOW[2) VAV="^UTILITY("_""""_VAV_""""_","_$J_")"
  1. D @VAN
  1. Q K X,Y,VAC,VAS,VAV,VAW,VAN,I,VAX,VAZ Q
  1. ;
  1. INIT ; -- determine #'s or names then init array
  1. ;
  1. 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^26^27^28^29"
  1. I VAN<10,$D(VAHOW),VAHOW[1 S VAS=$P($T(SS+VAN),";;",2)
  1. I $D(VAN(1)) F I=1:1:VAN(1) S @VAV@($P(VAS,"^",I))=""
  1. Q
  1. ;
  1. 1 ; -- [DEM] demos
  1. D C1,INIT I 'VAERR D 1^VADPT1,13 Q
  1. ;
  1. 01 ; -- [DEMUPD] demos with PREFERRED NAME added - DG*5.3*996
  1. D C01,INIT S @VAV@($P(VAS,"^",1),1)="" I 'VAERR D 1^VADPT1 S @VAV@($P(VAS,"^",1),1)=$$GET1^DIQ(2,+DFN_",",.2405,"E") D 13 Q
  1. ;
  1. 2 ; -- [OPD] other pt vars
  1. D C2,INIT,2^VADPT1:'VAERR Q
  1. ;
  1. 3 ; -- [ADD] current address
  1. D C3,INIT,3^VADPT1:'VAERR Q
  1. ;
  1. 4 ; -- [OAD] other pt vars
  1. D C4,INIT,4^VADPT1:'VAERR Q
  1. ;
  1. 5 ; -- [INP] inpt data -v5
  1. D C5,INIT,5^VADPT2:'VAERR Q
  1. ;
  1. 6 ; -- [IN5] inpt data v5
  1. D C6,INIT F I=13:1:17 F I1=1:1:7 S @VAV@($P(VAS,"^",I),I1)=""
  1. F I=1:1:3 S @VAV@($P(VAS,"^",19),I)=""
  1. D 6^VADPT3:'VAERR Q
  1. ;
  1. 7 ; -- [ELIG] elig data
  1. D C7,INIT F I=1:1:6 S @VAV@($P(VAS,"^",5),I)=""
  1. D 7^VADPT4:'VAERR Q
  1. ;
  1. 8 ; -- [MB] $ benefits
  1. D C8,INIT D 8^VADPT4:'VAERR Q
  1. ;
  1. 9 ; -- [SVC] service data
  1. D C9,INIT F I=1:1:9 S @VAV@($P(VAS,"^",I),1)="",@VAV@($P(VAS,"^",I),2)=""
  1. S @VAV@($P(VAS,"^",10),1)=""
  1. F I=11:1:13 S @VAV@($P(VAS,"^",I))=0
  1. S @VAV@($P(VAS,"^",14),1)=""
  1. S @VAV@($P(VAS,"^",4),3)="",@VAV@($P(VAS,"^",5),3)=""
  1. F I=2,6,7,8 F I1=3,4,5 S @VAV@($P(VAS,"^",I),I1)=""
  1. D 9^VADPT4:'VAERR Q
  1. ;
  1. 10 ; -- [REG] registration data
  1. D C10,INIT D 10^VADPT5:'VAERR Q
  1. ;
  1. 11 ; -- [SDE] clinic enrollment data
  1. D C11,INIT D 11^VADPT5:'VAERR Q
  1. ;
  1. 12 ; -- [SDA] appt data
  1. D C12,INIT D 12^VADPT5:'VAERR Q
  1. ;
  1. 13 ; -- [PID] pt id's
  1. S (VA("PID"),VA("BID"))="" D 13^VADPT6:'VAERR Q
  1. ;
  1. KVAR ; kill all vadpt data
  1. K VAN
  1. C1 K ^UTILITY("VADM",$J),VADM Q:$D(VAN)
  1. C01 K ^UTILITY("VADEMO",$J),VADEMO Q:$D(VAN) ;DG*5.3*996
  1. C2 K ^UTILITY("VAPD",$J),VAPD Q:$D(VAN)
  1. C3 K X S:$D(VAPA("P")) X("P")=VAPA("P")
  1. S:$D(VAPA("CD")) X("CD")=VAPA("CD")
  1. K ^UTILITY("VAPA",$J),VAPA
  1. S:$D(X("P")) VAPA("P")=X("P") K X("P")
  1. S:$D(X("CD")) VAPA("CD")=X("CD") K X Q:$D(VAN)
  1. C4 K X S:$D(VAOA("A")) X("A")=VAOA("A")
  1. K ^UTILITY("VAOA",$J),VAOA
  1. S:$D(X("A")) VAOA("A")=X("A") K X Q:$D(VAN)
  1. C5 K ^UTILITY("VAIN",$J),VAIN Q:$D(VAN)
  1. C6 K X F I="D","E","L","M","V" I $D(VAIP(I)) S X(I)=VAIP(I)
  1. S Y=$S('$D(VAIP("V")):"VAIP",VAIP("V")'?1A.E:"VAIP",1:VAIP("V")) K ^UTILITY(Y,$J),@Y
  1. F I="D","E","L","M","V" I $D(X(I)) S VAIP(I)=X(I)
  1. K X Q:$D(VAN)
  1. C7 K ^UTILITY("VAEL",$J),VAEL Q:$D(VAN)
  1. C8 K ^UTILITY("VAMB",$J),VAMB Q:$D(VAN)
  1. C9 K ^UTILITY("VASV",$J),VASV Q:$D(VAN)
  1. C10 K ^UTILITY("VARP",$J) Q:$D(VAN)
  1. C11 K ^UTILITY("VAEN",$J) Q:$D(VAN)
  1. C12 K ^UTILITY("VASD",$J) Q
  1. C13 Q
  1. ;
  1. ; DG*5.3*1064 - add subscript IND to 16th piece
  1. ; DG*5.3*1103 - TERA indicator to 15th piece of line SS+9
  1. ; DG*5.3.1121 - add Persian Gulf Indicator to 16th piece of SS+9
  1. ; DG*5.3*1121 - add Last Change Date of Persian Gulf Indicator to SS+9
  1. SS ; 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^26^27^28
  1. ;;NM^SS^DB^AG^SX^EX^RE^RA^RP^MS^ET^RC^PL^SOGI^IND
  1. ;;BC^BS^FN^MN^MM^OC^ES^WP
  1. ;;L1^L2^L3^CI^ST^ZP^CO^PN^TS^TE^Z4^CCA^CL1^CL2^CL3^CCI^CST^CZP^CCO^CCS^CCE^CTY^PR^PC^CT^CPR^CPC^CCT^CPN
  1. ;;L1^L2^L3^CI^ST^ZP^CO^PN^NM^RE^Z4
  1. ;;AN^DR^TS^WL^RB^BS^AD^AT^AF^PT^AP
  1. ;;MN^TT^MD^MT^WL^RB^DR^TS^MF^BS^RD^PT^AN^LN^PN^NN^DN^AP^FD
  1. ;;EL^PS^SC^VT^IN^TY^CN^ES^MT^OTH
  1. ;;AA^HB^SS^PE^MR^SI^DI^OR^GI
  1. ;;VN^AO^IR^PW^CS^S1^S2^S3^PH^CV^OIF^OEF^UNK^SHD^TERA^PGI^LCD