BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26

@rookie21 wrote:

The goal is to in the end to get on record pr patient - but first as you write: one record per patient per operation?

Does it make better sense now ?

Yes it makes better sense now. But I would probably go for one record per patient per operation, rather than a wide record with one patient and multiple operations. Perhaps as you move forward on this project, it will become more clear why we are recommending it this way.

 

To me, the "goal" is really to achieve some sort of meaningful analysis of the data. So, when you say the goal is a particular data layout (one record per patient, or one record per patient per operation), that is really a step along the way, not the goal. And depending on whether or not you take the proper steps along the way, you will have an easy path or a much more difficult path.

--
Paige Miller
rookie21
Obsidian | Level 7

I am keeping it one record pr operation pr patient for now. 

Truthfully thankful for the job u guys are doing. 

Hopefully I'll get a better sense of when to do what with more experience

Each step right now is like a milestone, so thats a goal in itself. Getting to understand that these are just some groundwork before the real analysis starts 

 

Thanks again for all the help ! 

Tom
Super User Tom
Super User

Can each operation have multiple "leads"?  What does "lead" mean?  Are you collecting electrocardiograms during the operation?

rookie21
Obsidian | Level 7

Can each operation have multiple "leads"? 

- Yes, each operation can have up till 3 leads 

 

What does "lead" mean? Are you collecting electrocardiograms during the operation?

No, not electrocardiograms. Its implantation of heart devices. And leads are those wires which are put in the body.

 

So if I divide the variables into 4 levels. I have: 

- a patient identifier: record

- operation information: id (unique for each operation) date (operation date) 

- battery information: record_1 (actually copied from record), id_1 (copied from id above)

- lead/wire information: id_lead (unique for each implanted wire) and type_lead 

 

Now I got the data to include one record pr operation pr patient. As the data was pivoted in three "extra" levels, I got a total of more than 500 variables. 

I've used a datastep to clean it up a bit by using keep and drop statements. 

Im doing some more coding to classify what happens at each operation. 

 

After that I shall present my data with only one record pr patient in the study group. 

Think I can use: 

proc summary data = want;
	by record ;
	output out=one_line_pr_patient (drop=_type_) idgroup(out[1] ( id_1 -- type_lead_3 ) =); 
run;

and then again clean it up a bit, so the variables with same contents is dropped. 

 

Or is there a more "correct"  way of specifing earlyer with variables (the string of lead information) that can get pivoted  ? 

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 18 replies
  • 1158 views
  • 2 likes
  • 3 in conversation