Skip to content

Action of new DPdash filters #773

@tashrifbillah

Description

@tashrifbillah
Image

Individual filters seem to work well provided that there is a file in the backend for that filter. There are three files in the backend for three filters:

export const INCLUSION_EXCLUSION_CRITERIA_FORM =
'form_inclusionexclusion_criteria_review'
export const SOCIODEMOGRAPHICS_FORM = 'form_sociodemographics'
// form_filters_status has all of the filters for participants
export const FILTERS_FORM = 'form_filters'

Sex At Brith: chrdemo_sexassigned
Cohort: chrcrit_part
Recruitment Status: recruitment_status

const CHRCRIT_KEY = 'chrcrit_part'
const DAY_DATA_KEY = 'dayData'
const SEX_AT_BIRTH_FILTER_KEY = 'sex_at_birth'
const SEX_AT_BIRTH_DOCUMENT_KEY = 'chrdemo_sexassigned'
const RECRUITMENT_STATUS_KEY = 'recruitment_status'

The CSV file values are mapped in MongoDB as:

export const FILTER_TO_MONGO_VALUE_MAP = {
HC: 2,
CHR: 1,
Missing: null,
Recruited: 'recruited',
'Not recruited': 'not recruited',
Excluded: 0,
Male: 1,
Female: 2,
}


But the filter counts deviate from expectation when there is no file for a subject. Apparently, DPdash logic expects to find a file for every subject. That subject is included in Missing category of the filters if the variable of that filter is null. But as of 10/17/2026, @dheshanm does not generate the above form_inclusionexclusion_criteria_review, form_sociodemographics files for all subjects. These two files are generated for the subjects that have this REDCap form appropriately filled out.


For filters to meet our expectation, Dheshan and I talked about two strategies:

  1. Change this two files to one file form_filters:

    export const INCLUSION_EXCLUSION_CRITERIA_FORM =
    'form_inclusionexclusion_criteria_review'
    export const SOCIODEMOGRAPHICS_FORM = 'form_sociodemographics'

    And include the chrdemo_sexassigned, chrcrit_part variables in form_filters file. Since form_filters is generated for all subjects, this can resolve the issue.

  2. Do not modify the code but generate form_inclusionexclusion_criteria_review, form_sociodemographics with mostly null values, particularly for chrdemo_sexassigned, chrcrit_part. This will fit DPdash count algorithm.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions