source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMXSC.m@ 1374

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1PXRMXSC ; SLC/PJH - Reminder reports service category selection ;12/18/2006
2 ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
3 ;
4SCAT ;Get the list of service categories.
5 N DIR,DIEA,IC,JC,NSC,PCESVC,SCA,VALID,X,Y
6 K DIRUT,DTOUT,DUOUT
7 ;Build a list of allowed service categories. PCE uses a subset of the
8 ;categories in the file. These are stored in PCESVC.
9 S PCESVC=""
10 D HELP^DIE(9000010,"",.07,"S","SCA")
11 S NSC=SCA("DIHELP")
12 S DIR("?")=U_"D SCATHELP^PXRMXSC"
13 S DIR("??")=U_"D SCATHELP^PXRMXSC"
14SCATP ;
15 S DIR(0)="FU"_U_"1:"_NSC
16 S DIR("A")="Select SERVICE CATEGORIES"
17 S DIR("B")="A,I"
18 W !
19 D ^DIR K DIR
20 I $D(DIROUT) S DTOUT=1
21 I $D(DTOUT)!($D(DUOUT)) Q
22 ;Make sure we have a valid list.
23 S VALID=$$VSCLIST(Y,PCESVC)
24 I 'VALID G SCATP
25 S PXRMSCAT=$$UP^XLFSTR(Y)
26 F IC=1:1:$L(PXRMSCAT,",") S X=$P(PXRMSCAT,",",IC),PXRMSCAT(X)=""
27 Q
28 ;
29 ;======================================================
30SCATHELP ;? help for service categories.
31 N ARRAY,IC,JC,NSC,PCESVC
32 S PCESVC=""
33 D HELP^DIE(9000010,"",.07,"S","SCA")
34 S NSC=SCA("DIHELP")
35 S JC=0
36 F IC=2:1:NSC D
37 . S X=$P(SCA("DIHELP",IC)," ",1)
38 . I PCESVC="" S PCESVC=X
39 . E S PCESVC=PCESVC_","_X
40 . S JC=JC+1
41 . S ARRAY(JC)=SCA("DIHELP",IC)
42 S NSC=JC
43 W !!,"Enter the letter(s), separated by commas, corresponding to the desired service"
44 W !,"category or categories. For example A,H,T,E would allow only encounters with"
45 W !,"service categories of ambulatory, hospitalization, telecommunications, and"
46 W !,"event (historical) to be included."
47 W !!,"The possible service categories for the report are:",!
48 F IC=1:1:NSC W !,ARRAY(IC)
49 Q
50 ;
51 ;======================================================
52VSCLIST(LIST,SLIST) ;LIST is a comma separated list of service categories. SLIST
53 ;is the standard list of service categories. Make sure all the
54 ;elements of LIST are in the standard list SLIST. If they are, then
55 ;LIST is valid. Used for selection in reminder reports and as input
56 ;transform SERVICE CATEGORY LIST in the REMINDER REPORT TEMPLATE
57 ;file #810.1.
58 I LIST="" Q 1
59 I $G(SLIST)="" D
60 . N IC,SCA,TEMP
61 . D HELP^DIE(9000010,"",.07,"S","SCA")
62 . S SLIST=""
63 . F IC=2:1:SCA("DIHELP") D
64 .. S TEMP=$P(SCA("DIHELP",IC)," ",1)
65 .. I SLIST="" S SLIST=TEMP
66 .. E S SLIST=SLIST_","_TEMP
67 N IC,LE,LEN,VALID
68 S LIST=$$UP^XLFSTR(LIST)
69 S VALID=1
70 S LEN=$L(LIST,",")
71 F IC=1:1:LEN D
72 . S LE=$P(LIST,",",IC)
73 . I LE="" D Q
74 .. D EN^DDIOL("Null is not a valid service category!")
75 .. S VALID=0
76 . I SLIST'[LE D
77 .. D EN^DDIOL(LE_" is an invalid service category!")
78 .. S VALID=0
79 Q VALID
80 ;
Note: See TracBrowser for help on using the repository browser.