Top Level Namespace
Defined Under Namespace
Modules: AbstractValidations, Ccls, EnrollmentValidations, PatientValidations, StudySubjectAbstracts, StudySubjectAddresses, StudySubjectAssociations, StudySubjectDuplicates, StudySubjectEnrollments, StudySubjectHomexOutcome, StudySubjectIdentifier, StudySubjectInterviews, StudySubjectLanguages, StudySubjectOperationalEvents, StudySubjectPatient, StudySubjectPii, StudySubjectRaces, StudySubjectValidations, SurveyParser
Classes: ADNA, Abstract, AbstractSearch, ActiveRecordShared, Address, AddressType, Addressing, Aliquot, AliquotSampleFormat, Analysis, BcRequest, CandidateControl, Context, ContextDataSource, County, DataSource, Diagnosis, DocumentType, DocumentVersion, Enrollment, FollowUp, FollowUpType, GiftCard, GiftCardSearch, HomeExposureResponse, HomexOutcome, Hospital, IcfMasterId, IcfMasterTracker, IcfMasterTrackerChange, IcfMasterTrackerUpdate, IneligibleReason, Instrument, InstrumentType, InstrumentVersion, Interview, InterviewMethod, InterviewOutcome, Language, OperationalEvent, OperationalEventType, Organization, Patient, Person, PhoneNumber, PhoneType, Project, ProjectOutcome, Race, RefusalReason, Sample, SampleKit, SampleOutcome, SampleTemperature, SampleType, Search, Section, SharedMigration, State, StudySubject, StudySubjectSearch, SubjectLanguage, SubjectRace, SubjectRelationship, SubjectType, TracingStatus, Transfer, TranslationTable, Unit, VitalStatus, YNDK, YNODK, YNRDK, ZipCode
Constant Summary
collapse
- USE_DB_CONFIG =
File.join(File.dirname(__FILE__),'..','..','config','shared_use_db.yml')
- OTHER_DB_FILES =
[shared_db_file]
Instance Method Summary
collapse
#class_exists?
Instance Method Details
#random_date ⇒ Object
10
11
12
|
# File 'lib/ccls_engine/factories.rb', line 10
def random_date
Date.jd(2440000+rand(15000))
end
|
#random_float ⇒ Object
13
14
15
|
# File 'lib/ccls_engine/factories.rb', line 13
def random_float
rand * 100
end
|
#random_pos_neg ⇒ Object
1
2
3
|
# File 'lib/ccls_engine/factories.rb', line 1
def random_pos_neg
[nil,1,2][rand(3)]
end
|
#random_sex ⇒ Object
16
17
18
|
# File 'lib/ccls_engine/factories.rb', line 16
def random_sex
%w( M F )[rand(2)]
end
|
#random_true_or_false ⇒ Object
4
5
6
|
# File 'lib/ccls_engine/factories.rb', line 4
def random_true_or_false
[true,false][rand(2)]
end
|
#random_yndk ⇒ Object
7
8
9
|
# File 'lib/ccls_engine/factories.rb', line 7
def random_yndk
[nil,1,2,999][rand(4)]
end
|
#valid_sex_values ⇒ Object
133
134
135
|
# File 'lib/ccls_engine.rb', line 133
def valid_sex_values
%w( M F DK )
end
|