<commit_before>import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import {
    studyDesignOptions,
    exposureAssessmentTypeOptions,
    isCaseControl,
} from './constants';


var requiredCC = function() {
        var isRequired = (isCaseControl(this.field('studyDesign').value)) &&
                (this.value === '');
        if (isRequired) return 'required';
    },
    requiredCohort = function() {
        var isRequired = (!isCaseControl(this.field('studyDesign').value)) &&
                (this.value === '');
        if (isRequired) return 'required';
    };

export default {
    referenceID: {
        label: 'Reference',
        type: SimpleSchema.RegEx.Id,
    },
    studyDesign: {
        label: 'Study design',
        allowedValues: studyDesignOptions,
        type: String,
        forceRequiredSymbol: true,
        popoverText: 'Study-design used for evaluation (Cohort, Case-Control, Nested-Case Control, etc.)',
    },
    location: {
        label: 'Location',
        type: String,
        min: 1,
        popoverText: 'Country; other information (e.g., region, state, province, city) if important',
    },
    enrollmentDates: {
        label: 'Enrollment or follow-up dates',
        type: String,
        min: 1,
        popoverText: 'Enrollment for case-control studies, follow-up for cohort studies',
    },
    eligibilityCriteria: {<commit_msg>revise text for enrollment dates<commit_after>import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import {
    studyDesignOptions,
    exposureAssessmentTypeOptions,
    isCaseControl,
} from './constants';


var requiredCC = function() {
        var isRequired = (isCaseControl(this.field('studyDesign').value)) &&
                (this.value === '');
        if (isRequired) return 'required';
    },
    requiredCohort = function() {
        var isRequired = (!isCaseControl(this.field('studyDesign').value)) &&
                (this.value === '');
        if (isRequired) return 'required';
    };

export default {
    referenceID: {
        label: 'Reference',
        type: SimpleSchema.RegEx.Id,
    },
    studyDesign: {
        label: 'Study design',
        allowedValues: studyDesignOptions,
        type: String,
        forceRequiredSymbol: true,
        popoverText: 'Study-design used for evaluation (Cohort, Case-Control, Nested-Case Control, etc.)',
    },
    location: {
        label: 'Location',
        type: String,
        min: 1,
        popoverText: 'Country; other information (e.g., region, state, province, city) if important',
    },
    enrollmentDates: {
        label: 'Enrollment and follow-up dates',
        type: String,
        min: 1,
        popoverText: 'For case-control studies, enter only enrollment date',
    },
    eligibilityCriteria: {
{'fraction_non_alphanumeric': 0.1255847427132062, 'fraction_numerical': 0.0014393666786613889, 'mean_word_length': 2.5414012738853504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6603820', 'n_tokens_mistral': 798, 'n_tokens_neox': 776, 'n_words': 195}