-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add subject disposition #2004
add subject disposition #2004
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,9 @@ spec: | |
type: character | ||
protocol_title: | ||
type: character | ||
status: | ||
Status: | ||
type: character | ||
source_col: status | ||
num_plan_site: | ||
type: integer | ||
num_plan_subj: | ||
|
@@ -41,6 +42,8 @@ spec: | |
type: character | ||
subjid: | ||
type: character | ||
Status: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another duplicate Status as far as i can tell There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wait, |
||
type: character | ||
steps: | ||
- output: Temp_CTMSStudyWide | ||
name: RunQuery | ||
|
@@ -61,7 +64,14 @@ steps: | |
name: RunQuery | ||
params: | ||
df: Mapped_SUBJ | ||
strQuery: "SELECT studyid as GroupID, COUNT(DISTINCT subjid) as ParticipantCount, COUNT(DISTINCT invid) as SiteCount FROM df GROUP BY studyid" | ||
strQuery: | | ||
SELECT | ||
studyid as GroupID, | ||
COUNT(DISTINCT subjid) as ParticipantCount, | ||
SUM(CASE WHEN Status == 'Active' THEN 1 ELSE 0 END) as ActiveParticipantCount, | ||
COUNT(DISTINCT invid) as SiteCount | ||
FROM df | ||
GROUP BY studyid | ||
- output: Temp_CountTargetsWide | ||
name: left_join | ||
params: | ||
|
@@ -84,13 +94,22 @@ steps: | |
strTargetCol: ParticipantTarget | ||
strPercVal: PercentParticipantsEnrolled | ||
strPercStrVal: ParticipantEnrollment | ||
- output: Temp_CountTargetsWide_ActiveParticipants | ||
name: CalculatePercentage | ||
params: | ||
data: Temp_CountTargetsWide_addsitepts | ||
strCurrentCol: ActiveParticipantCount | ||
strTargetCol: ParticipantCount | ||
strPercVal: PercentParticipantsActive | ||
strPercStrVal: ActiveParticipants | ||
- output: Temp_CountTargetsPercs | ||
name: MakeLongMeta | ||
params: | ||
data: Temp_CountTargetsWide_addsitepts | ||
data: Temp_CountTargetsWide_ActiveParticipants | ||
strGroupLevel: "Study" | ||
- output: Mapped_STUDY | ||
name: bind_rows | ||
params: | ||
Temp_CTMSStudy: Temp_CTMSStudy | ||
Temp_CountTargetsPercs: Temp_CountTargetsPercs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this Status, right? looks like a duplicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one captures subject status, to count the number of active subjects at the site.