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

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1PXRRECSC ;ISL/PKR - PCE reports encounter selection criteria routines. ;7/7/97
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**12,18,20**;Aug 12, 1996
3 ;
4 ;=======================================================================
5ECAT ;Get a list of attributes for screening encounters.
6 N C2S,INDENT,VALID,X,Y
7 K DIRUT,DTOUT,DUOUT
8 S DIR(0)="YA"
9 S DIR("A",1)="This report will include all VA clinic encounters for all patients"
10 S DIR("A",2)="unless you modify the criteria. Do you want to modify the criteria?"
11 S DIR("A")="Enter Y (YES) or N (NO) "
12 S DIR("B")="N"
13 W !
14 D ^DIR K DIR
15 I $D(DIROUT) S DTOUT=1
16 I $D(DTOUT)!($D(DUOUT)) Q
17 I 'Y S PXRRECAT="" Q
18 ;
19 S INDENT=2
20 S C2S=INDENT+5
21 K DIRUT,DUOUT
22ECATP W !!,"Encounters may be selected by any combination of the following attributes:"
23 W !,?INDENT,"1",?C2S,"Service Category"
24 ;W !,?INDENT,"2",?C2S,"Encounter Type"
25 W !,?INDENT,"2",?C2S,"Location"
26 W !,?INDENT,"3",?C2S,"Provider"
27 W !,?INDENT,"4",?C2S,"Age of Patient"
28 W !,?INDENT,"5",?C2S,"Race of Patient"
29 W !,?INDENT,"6",?C2S,"Sex of Patient"
30 S DIR(0)="LAO"_U_"1:6"
31 S DIR("A")="Enter encounter selection attribute number(s) "
32 S DIR("?",1)="This response may be a single number, a list, or a range, e.g. 2 or 1,3 or 2-5."
33 S DIR("?")="The valid numbers are 1 through 6."
34 S DIR("??")=U_"D ECATHELP^PXRRECSC"
35 D ^DIR K DIR
36 I $D(DIROUT) S DTOUT=1
37 I $D(DTOUT) Q
38 I $D(DUOUT) G ECAT
39 S PXRRECAT=Y
40 Q
41 ;
42ECATHELP ;
43 W !!,"Enter the number(s) corresponding to the desired selection attribute(s)."
44 W !,"For example 1,2,4 would cause selection attributes for service category,"
45 W !,"location, and patient sex to be established."
46 Q
47 ;
48 ;
49 ;=======================================================================
50ENTYPE ;Get the list of encounter types.
51 N DIEA,ENTYPE,IC,JC,NENTY,PCEENTY,VALID,X,Y
52 K DIRUT,DTOUT,DUOUT
53 ;Build a list of allowed encounter types.
54 D HELP^DIE(9000010,"",15003,"S","ENTYPE")
55 S NENTY=ENTYPE("DIHELP")
56 S DIR("?")=" "
57 S DIR("?",1)="The possible encounter types for the report are:"
58 S JC=0
59 S PCEENTY=""
60 F IC=2:1:NENTY D
61 . S X=$P(ENTYPE("DIHELP",IC)," ",1)
62 . S PCEENTY=PCEENTY_X
63 . S JC=JC+1
64 . S DIR("?",JC)=ENTYPE("DIHELP",IC)
65 S NENTY=JC
66 S DIR("??")=U_"D ENTYHELP^PXRRECSC"
67ENTTP ;
68 S DIR(0)="FU"_U_"1:"_NENTY
69 S DIR("A")="Select ENCOUNTER TYPES"
70 S DIR("B")="P"
71 W !
72 D ^DIR K DIR
73 I $D(DIROUT) S DTOUT=1
74 I $D(DTOUT)!($D(DUOUT)) Q
75 ;Make sure we have a valid list.
76 S VALID=$$VLIST^PXRRGUT(PCEENTY,Y," is an invalid encounter type!")
77 I 'VALID G ENTTP
78 S PXRRENTY=$$UP^XLFSTR(Y)
79 Q
80 ;
81ENTYHELP ;?? help for encounter types.
82 W !!,"Enter the letter(s) corresponding to the desired encounter type or types."
83 W !,"For example POS would allow only encounters with encounter types of"
84 W !,"primary, occasion of service, and stop code to be included."
85 Q
86 ;
87 ;=======================================================================
88SCAT ;Get the list of service categories.
89 N DIEA,IC,JC,NSC,PCESVC,SCA,VALID,X,Y
90 K DIRUT,DTOUT,DUOUT
91 ;Build a list of allowed service categories. PCE uses a subset of the
92 ;categories in the file. These are stored in PCESVC.
93 S PCESVC="AHITSEDX"
94 D HELP^DIE(9000010,"",.07,"S","SCA")
95 S NSC=SCA("DIHELP")
96 S DIR("?")=" "
97 S DIR("?",1)="The possible service categories for the report are:"
98 S JC=0
99 F IC=2:1:NSC D
100 . S X=$P(SCA("DIHELP",IC)," ",1)
101 . I PCESVC[X D
102 .. S JC=JC+1
103 .. S DIR("?",JC)=SCA("DIHELP",IC)
104 S NSC=JC
105 S DIR("??")=U_"D SCATHELP^PXRRECSC"
106SCATP ;
107 S DIR(0)="FU"_U_"1:"_NSC
108 S DIR("A")="Select SERVICE CATEGORIES"
109 S DIR("B")="AI"
110 W !
111 D ^DIR K DIR
112 I $D(DIROUT) S DTOUT=1
113 I $D(DTOUT)!($D(DUOUT)) Q
114 ;Make sure we have a valid list.
115 S VALID=$$VLIST^PXRRGUT(PCESVC,Y," is an invalid service category!")
116 I 'VALID G SCATP
117 S PXRRSCAT=$$UP^XLFSTR(Y)
118 Q
119 ;
120SCATHELP ;?? help for service categories.
121 W !!,"Enter the letter(s) corresponding to the desired service category or categories."
122 W !,"For example AHTE would allow only encounters with service categories of"
123 W !,"ambulatory, hospitalization, telecommunications, and event (historical) to be included."
124 Q
125 ;
Note: See TracBrowser for help on using the repository browser.