source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCPC1.m@ 1006

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1GMRCPC1 ;SLC/dee - List Manager Routine: Collect and display consults by service and status ;1/27/00
2 ;;3.0;CONSULT/REQUEST TRACKING;**7**;DEC 27, 1997
3 Q
4 ;
5ENSTS ;GMRC List Manager Routine -- Second entry point for GMRC PENDING CONSULTS with user selected statuses
6 S GMRCSTAT=$$STS
7 I $D(GMRCQUT) D EXIT^GMRCPC Q
8 D EN^GMRCPC
9 Q
10 ;
11NEWSTS ;
12 N TEMPSTAT
13 S TEMPSTAT=GMRCSTAT
14 S GMRCSTAT=$$STS
15 S:$D(GMRCQUT) GMRCSTAT=TEMPSTAT
16 Q
17 ;
18STS() ;Select a set of status for view.
19 I $D(IOTM),$D(IOBM),$D(IOSTBM) D FULL^VALM1
20 N DIR,X,Y,GMRCSTCK
21STSAGAIN ;Loop to get another status.
22 ;The following commented line would as for all of the statuses.
23 ;S DIR(0)="SAOM^al:All Status's;ap:All Pending;dc:Discont.;c:Completed;h:On Hold;f:Flagged;p:Pending;a:Active;e:Expired;s:Scheduled;pr:Incomplete;d:Delayed;u:Unreleased;dce:Discont/Ed;x:Cancelled;l:Lapsed;rn:Renewed;':No Status"
24 S DIR(0)="SAOM^al:All Status's;ap:All Pending;dc:Discont.;c:Completed;p:Pending;a:Active;s:Scheduled;pr:Incomplete;x:Cancelled"
25 S DIR("A")="Only Display Consults With Status of: "
26 S DIR("B")="All Status's"
27 I $G(GMRCSTCK) D
28 . S DIR("A")="Another Status to display: "
29 . K DIR("B")
30 D ^DIR
31 I $D(DUOUT)!($D(DTOUT)) S GMRCQUT=1 G END
32 I '$L(Y) G END
33 D STCK($$LOW^XLFSTR(Y))
34 G:$G(GMRCSTCK)'="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,99" STSAGAIN
35END Q $S($D(GMRCSTCK):GMRCSTCK,1:"")
36 ;
37STCK(RES) ;change code to status
38 N CODE
39 ; al:All Status's;dc:Discont.;c:Completed;h:On Hold;f:Flagged;p:Pending;a:Active;e:Expired;s:Scheduled
40 ;;pr:Incomplete;d:Delayed;u:Unreleased;dce:Discont/Ed;x:Cancelled;l:Lapsed;rn:Renewed;':No Status")
41CASE ;
42 I RES="al" S GMRCSTCK="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,99" Q ;All Status's
43 ; display no. file name file abbr.
44 I RES="ap" D Q
45 .F CODE=3,4,5,6,8,9,11,99 D CKCODE(CODE) ; All Pending Statuses
46 I RES="dc" D CKCODE(1) Q ; Discont. 1 DISCONTINUED dc
47 I RES="c" D CKCODE(2) Q ; Completed 2 COMPLETE c
48 I RES="h" D CKCODE(3) Q ; On Hold 3 HOLD h
49 I RES="f" D CKCODE(4) Q ; Flagged 4 FLAGGED "?"
50 I RES="p" D CKCODE(5) Q ; Pending 5 PENDING p
51 I RES="a" D CKCODE(6) Q ; Active 6 ACTIVE a
52 I RES="e" D CKCODE(7) Q ; Expired 7 EXPIRED e
53 I RES="s" D CKCODE(8) Q ; Scheduled 8 SCHEDULED s
54 I RES="pr" D CKCODE(9) Q ; Incomplete 9 PARTIAL RESULTS pr
55 I RES="d" D CKCODE(10) Q ; Delayed 10 DELAYED d
56 I RES="u" D CKCODE(11) Q ; Unreseased 11 UNRELEASED u
57 I RES="dce" D CKCODE(12) Q ;Discont/Ed 12 DISCONTINUED/EDIT dce
58 I RES="x" D CKCODE(13) Q ; Cancelled 13 CANCELLED x
59 I RES="l" D CKCODE(14) Q ; Lapsed 14 LAPSED l
60 I RES="rn" D CKCODE(15) Q ; Renewed 15 RENEWED rn
61 I RES="'" D CKCODE(99) Q ; No Status 99 NO STATUS '
62ENDCASE Q
63 ;
64CKCODE(CODE) ;
65 I $D(GMRCSTCK),$$FND(CODE) W $C(7),!,"Already selected" Q
66 I +$G(GMRCSTCK) S GMRCSTCK=GMRCSTCK_","_CODE
67 E S GMRCSTCK=CODE
68 Q
69 ;
70FND(CD) ;status already selected?
71 I GMRCSTCK=CD Q 1
72 I $F(GMRCSTCK,(CD_",")) Q 1
73 I $E(GMRCSTCK,$L(GMRCSTCK))=CD Q 1
74 Q 0
75 ;
76NUMBER ;
77 I GMRCCTRL'=120 S GMRCCTRL=120
78 E S GMRCCTRL=0
79 Q
80 ;
Note: See TracBrowser for help on using the repository browser.