-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path14 rapport_d actieven.sas
60 lines (44 loc) · 965 Bytes
/
14 rapport_d actieven.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
proc sql;
create table stop_act_data as
select distinct
stopdatums.*,
patienten.*
from
hiz.stopdatums left join hiz.patienten
on stopdatums.ecpid= patienten.ecpid
order by klant;
quit;
proc sql;
create table stop_act as
select distinct
stopdatums.ecpid,
stopdatums.klant,
case
when stopdatums.stopdatum_final ge &op_therapie_min_datum - 1
then 1
else 0
end as opTherapie,
patienten.patientStatus
from
hiz.stopdatums left join hiz.patienten
on stopdatums.ecpid= patienten.ecpid;
quit;
%nodub(stop_Act, ecpid);
%nodub(stop_act, klant);
proc freq data=stop_act noprint;
tables opTherapie * patientStatus / out = rapport_d;
quit;
proc sql;
create table rapport_d_Export as
select
*
from
stop_Act
where
opTherapie = 1 and patientStatus ne 'actief'
or opTherapie = 0 and patientStatus ne 'inactief';
quit;
proc datasets lib = work nolist;
modify rapport_d;
format percent commax10.1;
quit;