Skip to content

Commit

Permalink
Merge pull request #20 from Sage-Bionetworks/main
Browse files Browse the repository at this point in the history
Assign startdate values for device summaries
  • Loading branch information
pranavanba authored Mar 20, 2024
2 parents a4cb98e + 83e8a3e commit fa2b3b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/write-output/final-output-concepts.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ valid_participants <-

combined_output_concepts <-
combined_output_concepts %>%
filter(participantidentifier %in% valid_participants)
filter(participantidentifier %in% valid_participants) %>%
group_by(participantidentifier) %>%
mutate(startdate = ifelse(concept=="mhp:device", min(startdate[concept != "mhp:device"], na.rm = TRUE), startdate)) %>%
ungroup()

combined_output_concepts %>%
write.csv(file.path(outputConceptsDir, "output_concepts.csv"), row.names = F)
Expand Down

0 comments on commit fa2b3b1

Please sign in to comment.