processor.participant_flow_data
=> {:nct_id=>"NCT02299791",
:recruitment_details=>
"Recruitment was done at the clinic level. All patients seen in the clinics were potentially eligible for the intervention based on clinic visit and clinical criteria.",
:pre_assignment_details=>
"There were two additional nested substudy randomizations after initial trial enrolment (see inclusion/exclusion criteria for eligibility). From 8/2009 to 6/2010, eligible children were randomized to once vs twice daily abacavir+lamivudine. From 9/2009 to 2/2011, eligible children were randomized to stop vs continue cotrimoxazole prophylaxis.",
:units_analyzed=>"Clinics"}
Go to rails console: run commands in order:
hash = JSON.parse(File.read('spec/support/json_data/initialize_participant_flow_data.json'))
processor = StudyJsonRecord::ProcessorV2.new(hash)
processor.participant_flow_data
Output:
Or run command:
bundle exec rspec /Users/ievgendotsenko/ctd/aact/spec/models/study_json_record/processor_v2_spec.rb