BookmarkSubscribeRSS Feed
Flexluthorella
Obsidian | Level 7

I have an HIV dataset that I need to pull patient records within specific timeframe of their appointment date, within 3 months prior & 14 days after ARV startdate. No Idea how to do this. 

Dates are in DATE9. format. 

 

2 REPLIES 2
Reeza
Super User
Does the ARV start date change between the individual users?

You can start by describing the problem in a bit more detail, explicitly showing what you have and what you want as output. If you can't provide real data, very common, you can make some fake data in Excel to share that looks close enough to your real data. How your data is structured is important to how the solution is derived.

Flexluthorella
Obsidian | Level 7

I need to create a cohort of patients whose CD4 measurement on appointment date is within 3 months prior to ARV start and 14 days. There may be multiple records per patient_ID within that time frame that have a CD4 measurement. Once I have this cohort, I need to select record with the minimum CD4 for those patient_ID who have >1 record. I've attached dataset. Please note this is FAKE DATA. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 331 views
  • 0 likes
  • 2 in conversation