source: WorldVistAEHR/trunk/r/BAR_CODE_MED_ADMIN-ALPB-PSB/ALPBSPAT.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 
1ALPBSPAT ;OIFO-DALLAS MW,SED,KC-SELECT AND SHOW PATIENT ORDER(S) ;01/01/03
2 ;;3.0;BAR CODE MED ADMIN;**8**;Mar 2004
3 ;
4EN ; -- main entry point for ALPB SELECT PATIENT
5 D EN^VALM("PSB SELECT PATIENT")
6 Q
7 ;
8HDR ; -- header code
9 S VALMHDR(1)="BCMA Backup System :: Patient Listing"
10 Q
11 ;
12INIT ; -- init variables and list array
13 K ^TMP("ALPBPLIST",$J)
14 I $G(ALPBLTYP)="" S ALPBLTYP="ALL"
15 D PTLIST^ALPBUTL1(ALPBLTYP,.ALPBLIST)
16 S (ALPBLINE,ALPBX)=0
17 F S ALPBX=$O(ALPBLIST(ALPBX)) Q:'ALPBX D
18 .S ALPBDATA=" "_$P(ALPBLIST(ALPBX),"^")
19 .S ALPBDATA=$$PAD^ALPBUTL(ALPBDATA,31)_$P(ALPBLIST(ALPBX),"^",2)
20 .S ALPBDATA=$$PAD^ALPBUTL(ALPBDATA,41)_$P(ALPBLIST(ALPBX),"^",3)
21 .I $P(ALPBLIST(ALPBX),"^",4)']"" S $P(ALPBLIST(ALPBX),"^",4)="Unknown"
22 .S ALPBDATA=$$PAD^ALPBUTL(ALPBDATA,60)_$P(ALPBLIST(ALPBX),"^",4)
23 .I $P(ALPBLIST(ALPBX),"^",5)']"" S $P(ALPBLIST(ALPBX),"^",5)="?"
24 .S ALPBDATA=$$PAD^ALPBUTL(ALPBDATA,70)_$P(ALPBLIST(ALPBX),"^",5)
25 .S ALPBLINE=ALPBLINE+1
26 .S ^TMP("ALPBPLIST",$J,ALPBLINE,0)=ALPBDATA
27 .K ALPBDATA
28 S VALMCNT=ALPBLINE
29 K ALPBLINE,ALPBLIST,ALPBLTYP
30 Q
31 ;
32HELP ; -- help code
33 S X="?" D DISP^XQORM1 W !!
34 Q
35 ;
36EXIT ; -- exit code
37 K ^TMP("ALPBPLIST",$J)
38 Q
39 ;
40EXPND ; -- expand code
41 Q
42 ;
43SELALL ; reset and list all patients...
44 S ALPBLTYP="ALL"
45 S VALM("TITLE")="BCMAbu Patient List (All)"
46 D INIT
47 Q
48 ;
49SELWARD ; select list type...
50 N ALPBSEL,DIR,DIRUT,DTOUT,X,Y
51 I $G(ALPBLTYP)="" S ALPBLTYP=""
52 D FULL^VALM1
53 D WARDLIST^ALPBUTL("C")
54 F D Q:$D(DIRUT)!($G(ALPBLTYP)'="")
55 .S DIR(0)="FAO^1:45"
56 .S DIR("A")="Select WARD: "
57 .S DIR("?")="^D WARDLIST^ALPBUTL(""C"")"
58 .W !
59 .D ^DIR K DIR
60 .I $D(DIRUT) Q
61 .D WARDSEL^ALPBUTL(Y,.ALPBSEL)
62 .I +$G(ALPBSEL(0))=0 D Q
63 ..W $C(7)
64 ..W " ?? -- not a valid ward selection"
65 .I +$G(ALPBSEL(0))=1 S ALPBLTYP=ALPBSEL(1) Q
66 .F I=1:1:ALPBSEL(0) W !?2,I," ",ALPBSEL(I)
67 .S DIR(0)="NA^1:"_ALPBSEL(0)
68 .S DIR("A")="Which one? (1-"_ALPBSEL(0)_")"
69 .D ^DIR K DIR
70 .I $D(DIRUT) Q
71 .S ALPBLTYP=ALPBSEL(+Y)
72 I $D(DIRUT) K DIRUT,DTOUT,X,Y Q
73 S VALM("TITLE")="BCMAbu Patient List (Ward)"
74 D INIT
75 I $G(VALMBG)'=1 D FIRST^VALM4
76 Q
77 ;
78SELPAT ; select patient...
79 N DIR,DIRUT,DTOUT,X,Y
80 S DIR(0)="PAO^53.7:QEMZ"
81 S DIR("A")="Select PATIENT: "
82 D ^DIR K DIR
83 I $D(DIRUT) K DIRUT,DTOUT,X,Y Q
84 S ALPBIEN=+Y
85 D ^ALPBSP1
86 K ALPBIEN
87 Q
Note: See TracBrowser for help on using the repository browser.