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

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1PXQDVST2 ;ISL/JVS - DISPLAY ENCOUNTERS-INTERNAL POINTER ;8/29/96 10:30
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
3 ;
4 ;
5EN02 ;---SECOND Main entry point
6 ;
7 ;
8 D DVST42("BEGIN")
9 W IOINORM
10 Q
11 ;
12 ;
13DVST42(SIGN) ;--Display the ENCOUNTERS
14 ;
15 ;SIGN=
16 ; '+' add 10 to the starting point in ^TMP("PXBDVST",$J)
17 ; '-' subtract 10 from the starting point but not less that 0
18 ; 'BEGIN' start at the beginning
19 ; 'SAME' start stays where it's at
20 ; '3'--any number set start to that number
21 ;
22 N PXBSTART
23 I SIGN="BEGIN" S ^TMP("PXBDVST",$J,"START")=0,PXBSTART=0
24 I SIGN="SAME" S PXBSTART=^TMP("PXBDVST",$J,"START")
25 I SIGN="+" S PXBSTART=($G(^TMP("PXBDVST",$J,"START"))+(10)) S:PXBSTART'<PXBCNT PXBSTART=(PXBCNT-(10)) S ^TMP("PXBDVST",$J,"START")=PXBSTART
26 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
27 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
28 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
29 ;
30 ;
31 I SIGN'="BEGIN" D LOC^PXBCC(3,0) W IOEDEOP
32HEAD42 ;--HEADER ON LIST
33 S HEAD="- - "_$G(PXBCNT)_" E N C O U N T E R S - -"
34 W IOINHI,!,IOCUU,?(IOM-$L(HEAD))\2,HEAD ;--F W $C(32) Q:$X=(IOM-(4))
35 W IOINLOW,IOELEOL K HEAD
36 ;
37 ;
38 N ENTRY,J
39 D UNDON^PXBCC
40 W !,"No.",?5,"IEN",?15,"DATE/TIME",?31,"CLINIC",?38,"CATE",?43,"TYPE",?48,"APP`NT",?55,"DISP",?60,"HIST"
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 .W !,J,?5,$P(ENTRY,"^",1),?15,$P(ENTRY,"^",2),?32,$P(ENTRY,"^",3),?39,$P(ENTRY,"^",4),?44,$P(ENTRY,"^",5),?48,$P(ENTRY,"^",6),?55,$P(ENTRY,"^",7),?60,$P(ENTRY,"^",8)
48 I J="",$G(PXBCNT)'<1 D HELP1^PXBUTL1("LST")
49 I SIGN'="BEGIN" W !!
50 Q
Note: See TracBrowser for help on using the repository browser.