Skip to content

Commit

Permalink
Merge pull request #1117 from ctti-clinicaltrials/feat/AACT-603-creat…
Browse files Browse the repository at this point in the history
…e_design_groups_data_method_in_v2_processor

AACT-603: Create design_groups_data method in v2 processor
  • Loading branch information
micronix authored Dec 21, 2023
2 parents 819903a + 3521ab4 commit cb71a49
Show file tree
Hide file tree
Showing 6 changed files with 1,786 additions and 592 deletions.
18 changes: 18 additions & 0 deletions app/models/study_json_record/processor_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,24 @@ def study_data
end

def design_groups_data
return unless protocol_section

ident = protocol_section['identificationModule']
nct_id = ident['nctId']
arms_intervention = key_check(protocol_section['armsInterventionsModule'])
arms_groups = key_check(arms_intervention['armGroups'])
return unless arms_groups

collection = []
arms_groups.each do |group|
collection << {
nct_id: nct_id,
group_type: group['type'],
title: group['label'],
description: group['description']
}
end
collection
end

def interventions_data
Expand Down
Loading

0 comments on commit cb71a49

Please sign in to comment.