I am looking for an efficient way to do the following:
I have a day matrix: patient_id day1 - day 365
with a code (long term care facility id) for each day.
I have another dataset: long_term_care_id cost_per_day
I want to put the cost for each day in the matrix.
patient_id day1 - day 365 cost_day1-cost_day365
It's like merging 365 times, or doing a IF long_term_care_id = i then cost =
x... with an ARRAY statement.
I have over 100 different long term care facilities id.
I don't want to do the IF THEN list because I may need to change costs in
the future, so I would like to relate facility_id to cost for each day
I thought of SQL but I do not see how to repeat the 365 times.
Jean-Pierre Le Cruguel
Groupe de recherche en Services Integres aux Personnes Agees (SIPA)
Centre D'Epidemiologie Clinique et de Recherche en Sante Publique
Hopital General Juif
CANADA H3T 1E2
Tel: (514) 340 8222 ext: 3878
Fax: (514) 340 7564