Good morning,
I am trying to code for a situation I have never seen before.
I am trying to display a frequency table of different facilities and the amount of physical restraints used divided by types. IE>
(Facility ID) (Restr 1) (Restr 2)
1 42 35
2 342 32
3 23423 343
Each row is considered an admission to the facility, having a patient SSN attached to it. I also need to determine how many patients per restraint per facility. This would be determined by how many different social security numbers per restraint per facility ID , and somehow doing a count function.
The data is similar to this….
(Facility ID) ( SSN) ( Restr 1) (Restr 2)
1 1233 1 0
1 1233 1 0
1 1554 0 1
2 1111 1 0
2 1224 0 1
2 1224 0 1
Legend: restraint1=0, no restraint used, restraint 1=1, restraint used
I want a table to be generated from the above sample data to look like this…
(Facility ID) (Restr1) (# of Patients used restr1) (Restr 2) (# of Patients used restr2)
1 2 1 1 1
2 1 1 2 1
I am using enterprise as well. I suppose it has something to do with DupOUT but I am not as familiar with that function. Any help would be greatly appreciated!