Exemple #1
0
        void _repository_ParticipantAdded(object sender, ParticipantEventArgs e)
        {
            var newPos = _participantData.AddParticipant(e.Participant.Id, e.Participant.TrialArm, ParticipantBaseModel.DataRequiredFunc(e.Participant));

            if (_participantData.ColHeaders.Count > ParticipantData.ColHeaders.Count) //1st patient randomised to new arm
            {
                int newColIndex = _participantData.ColHeaders.Count - 1;
                for (var i = 0; i < _participantData.Participants.Length; i++)
                {
                    ParticipantData.Row[i].SummaryCells.Add(new ParticipantSummaryItemViewModel(_participantData.Participants[i][newColIndex]));
                }
                ParticipantData.ColHeaders.Add(ParticipantBaseModel.GetTrialArmDescription(_participantData.ColHeaders[newColIndex]));
            }
            ParticipantData.Row[newPos.x].SummaryCells[newPos.y].ParticipantIds = _participantData.Participants[newPos.x][newPos.y];
        }
Exemple #2
0
 public ParticipantSummaryViewModel(ParticipantsSummary summary)
 {
     ColHeaders = new ObservableCollection <string>(summary.ColHeaders.Select(c => ParticipantBaseModel.GetTrialArmDescription(c)));
     Row        = new ParticipantSummaryRowViewModel[summary.RowHeaders.Length];
     for (var i = 0; i < Row.Length; i++)
     {
         Row[i] = new ParticipantSummaryRowViewModel
         {
             RowHeader    = DataRequiredStrings.GetDetails(summary.RowHeaders[i]),
             SummaryCells = summary.Participants[i].Select(p => new ParticipantSummaryItemViewModel(p)).ToList()
         };
     }
 }