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

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

initial load of WorldVistAEHR

File size: 1006 bytes
RevLine 
[613]1VADPT32 ;ALB/MRL/MJK - PATIENT VARIABLES [IN5], CONT.; 12 DEC 1988
2 ;;5.3;Registration;;Aug 13, 1993
3 ;Inpatient variables [Version 5.0 and above]
4 ;
5BLD ; build array of mvt in reverse order up one before E mvt
6 K ^UTILITY("VADPTZ",$J,DFN) S (VANN,VAQ,VAZ,VACC)=0
7 I "^4^5^"[("^"_$P(VAMV0,"^",2)_"^") D LODGER G BLDQ
8 F I=0:0 S VAZ=$O(^DGPM("APMV",DFN,VAX("CA"),VAZ)),VAZ(1)=0 Q:VAQ!(VAZ'>0) F I1=0:0 S VAZ(1)=$O(^DGPM("APMV",DFN,VAX("CA"),VAZ,VAZ(1))) Q:VAQ!(VAZ(1)'>0) S VACC=VACC+1 D BA
9BLDQ K VACC,VAQ,VAZ Q
10 ;
11BA ;Build Movement Array
12 I VANN,VACC=(VANN+2) S VAQ=1 Q
13 S:VAZ(1)=+E VANN=VACC S X=$S($D(^DGPM(+VAZ(1),0)):^(0),1:""),^UTILITY("VADPTZ",$J,DFN,VACC)=VAZ(1)_"||"_X Q
14 ;
15LODGER ;
16 S VANN=1,X=^DGPM(E,0)
17 I $P(X,"^",2)=5 S ^UTILITY("VADPTZ",$J,DFN,1)=E_"||"_X S:$D(^DGPM(+$P(X,"^",14),0)) ^UTILITY("VADPTZ",$J,DFN,2)=+$P(X,"^",14)_"||"_^(0)
18 I $P(X,"^",2)=4 S:$D(^DGPM(+$P(X,"^",17),0)) ^UTILITY("VADPTZ",$J,DFN,1)=+$P(X,"^",17)_"||"_^(0),VANN=2 S ^UTILITY("VADPTZ",$J,DFN,VANN)=E_"||"_X
19 Q
Note: See TracBrowser for help on using the repository browser.