source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXQDVST.m@ 634

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1PXQDVST ;ISL/JVS - DISPLAY ENCOUNTERS-NORMAL ;8/29/96 10:30
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
3 ;
4EN0 ;---Main entry point
5 ;
6 ;
7 D DVST4("BEGIN")
8 W IOINORM
9 Q
10 ;
11 ;
12DVST4(SIGN) ;--Display the ENCOUNTERS
13 ;
14 ;SIGN=
15 ; '+' add 10 to the starting point in ^TMP("PXBDVST",$J)
16 ; '-' subtract 10 from the starting point but not less that 0
17 ; 'BEGIN' start at the beginning
18 ; 'SAME' start stays where it's at
19 ; '3'--any number set start to that number
20 ;
21 N PXBSTART
22 I SIGN="BEGIN" S ^TMP("PXBDVST",$J,"START")=0,PXBSTART=0
23 I SIGN="SAME" S PXBSTART=^TMP("PXBDVST",$J,"START")
24 I SIGN="+" S PXBSTART=($G(^TMP("PXBDVST",$J,"START"))+(10)) S:PXBSTART'<PXBCNT PXBSTART=(PXBCNT-(10)) S ^TMP("PXBDVST",$J,"START")=PXBSTART
25 I SIGN="-" S PXBSTART=$G(^TMP("PXBDVST",$J,"START"))-10,^TMP("PXBDVST",$J,"START")=PXBSTART I PXBSTART<0 S PXBSTART=0 S ^TMP("PXBDVST",$J,"START")=0
26 I +SIGN>0&(SIGN#10) S PXBSTART=$P((SIGN/10),".")*10 S:PXBSTART<10 PXBSTART=0 Q:^TMP("PXBDVST",$J,"START")=PXBSTART S ^TMP("PXBDVST",$J,"START")=PXBSTART
27 I +SIGN>0&'(SIGN#10) S PXBSTART=(($P((SIGN/10),".")*10)-10) S:PXBSTART<10 PXBSTART=0 Q:^TMP("PXBDVST",$J,"START")=PXBSTART S ^TMP("PXBDVST",$J,"START")=PXBSTART
28 ;
29 ;
30 I SIGN'="BEGIN" D LOC^PXBCC(3,0) W IOEDEOP
31HEAD4 ;--HEADER ON LIST
32 S HEAD="- - "_$G(PXBCNT)_" E N C O U N T E R S - -"
33 W IOINHI,!,IOCUU,?(IOM-$L(HEAD))\2,HEAD ;--F W $C(32) Q:$X=(IOM-(4))
34 W IOINLOW,IOELEOL K HEAD
35 ;
36 ;
37 N ENTRY,J
38 D UNDON^PXBCC
39 I '$G(COSTATUS) W !,"No.",?4,"DATE TIME",?29,"HOSPITAL LOCATION",?51,"CATEGORY",?63,"UNIQUE I D"
40 E W !,"No.",?4,"DATE TIME",?29,"HOSPITAL LOCATION",?51,"CATEGORY",?63,"C/O STATUS"
41 W IOEDEOP
42 D UNDOFF^PXBCC
43 I '$D(^TMP("PXBSAM",$J)) D NONE^PXBUTL(6)
44 ;
45 S J=PXBSTART F S J=$O(^TMP("PXBSAM",$J,J)) Q:J="" Q:J=(PXBSTART+(11)) D
46 .S ENTRY=$G(^TMP("PXBSAM",$J,J)),PXBHIGH=$S($G(PXBHIGH)>J:$G(PXBHIGH),$G(PXBHIGH)<J:J,1:$G(PXBHIGH))
47 .I $G(COSTATUS) W !,J,?4,$P(ENTRY,"^",1),?29,$E($P(ENTRY,"^",3),1,19),?51,$E($P(ENTRY,"^",5),1,10),?63,$E($P(ENTRY,"^",8),1,17)
48 .E W !,J,?4,$P(ENTRY,"^",1),?29,$E($P(ENTRY,"^",3),1,19),?51,$E($P(ENTRY,"^",5),1,14),?67,$E($P(ENTRY,"^",7),1,13)
49 I J="",$G(PXBCNT)'<1 D HELP1^PXBUTL1("LST")
50 I SIGN'="BEGIN" W !!
51 Q
52 ;
Note: See TracBrowser for help on using the repository browser.