source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMXSC.m@ 794

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

revised back to 6/30/08 version

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