Exemple #1
0
 def _get_data_rows(self):
     rows = []
     for obj in self.queryset:
         ser = obj.get_json(json_encode=False)
         row = []
         row.extend(
             Study.flat_complete_data_row(ser['study_population']['study']))
         row.extend(
             models.StudyPopulation.flat_complete_data_row(
                 ser['study_population']))
         row.extend(models.Outcome.flat_complete_data_row(ser))
         for res in ser['results']:
             row_copy = list(row)
             row_copy.extend(
                 models.Exposure.flat_complete_data_row(
                     res["comparison_set"]["exposure"]))
             row_copy.extend(
                 models.ComparisonSet.flat_complete_data_row(
                     res["comparison_set"]))
             row_copy.extend(models.Result.flat_complete_data_row(res))
             for rg in res['results']:
                 row_copy2 = list(row_copy)
                 row_copy2.extend(
                     models.Group.flat_complete_data_row(rg["group"]))
                 row_copy2.extend(
                     models.GroupResult.flat_complete_data_row(rg))
                 rows.append(row_copy2)
     return rows
Exemple #2
0
    def _get_data_rows(self):
        rows = []
        for obj in self.queryset:
            ser = obj.get_json(json_encode=False)
            row = []
            row.extend(
                Study.flat_complete_data_row(
                    ser['animal_group']['experiment']['study']))
            row.extend(
                models.Experiment.flat_complete_data_row(
                    ser['animal_group']['experiment']))
            row.extend(
                models.AnimalGroup.flat_complete_data_row(ser['animal_group']))
            row.extend(
                models.DosingRegime.flat_complete_data_row(
                    ser['animal_group']['dosing_regime']))
            row.extend(models.Endpoint.flat_complete_data_row(ser))
            for i, eg in enumerate(ser['endpoint_group']):
                row_copy = copy(row)
                row_copy.extend(
                    models.DoseGroup.flat_complete_data_row(
                        ser['animal_group']['dosing_regime']['doses'],
                        self.doses, i))
                row_copy.extend(
                    models.EndpointGroup.flat_complete_data_row(eg, ser))
                rows.append(row_copy)

        return rows
Exemple #3
0
 def _get_data_rows(self):
     rows = []
     for obj in self.queryset:
         ser = obj.get_json(json_encode=False)
         row = []
         row.extend(Study.flat_complete_data_row(ser['exposure']['study_population']['study']))
         row.extend(models.StudyPopulation.flat_complete_data_row(ser['exposure']['study_population']))
         row.extend(models.Exposure.flat_complete_data_row(ser['exposure']))
         row.extend(models.AssessedOutcome.flat_complete_data_row(ser))
         # build a row for each aog
         for aog in ser['groups']:
             row_copy = list(row)  # clone
             row_copy.extend(models.AssessedOutcomeGroup.flat_complete_data_row(aog))
             rows.append(row_copy)
     return rows
Exemple #4
0
 def _get_data_rows(self):
     rows = []
     for obj in self.queryset:
         ser = obj.get_json(json_encode=False)
         row = []
         row.extend(Study.flat_complete_data_row(ser))
         for rob in ser.get('riskofbiases', []):
             rob_data = models.RiskOfBias.flat_complete_data_row(rob)
             for score in rob['scores']:
                 row_copy = list(row)
                 row_copy.extend(
                     models.RiskOfBiasScore.flat_complete_data_row(score))
                 row_copy.extend(rob_data)
                 rows.append(row_copy)
     return rows
Exemple #5
0
    def _get_data_rows(self):
        rows = []
        for obj in self.queryset:
            ser = obj.get_json(json_encode=False)
            row = []
            row.extend(Study.flat_complete_data_row(ser['animal_group']['experiment']['study']))
            row.extend(models.Experiment.flat_complete_data_row(ser['animal_group']['experiment']))
            row.extend(models.AnimalGroup.flat_complete_data_row(ser['animal_group']))
            row.extend(models.DosingRegime.flat_complete_data_row(ser['animal_group']['dosing_regime']))
            row.extend(models.Endpoint.flat_complete_data_row(ser))
            for i, eg in enumerate(ser['groups']):
                row_copy = copy(row)
                row_copy.extend(models.DoseGroup.flat_complete_data_row(
                    ser['animal_group']['dosing_regime']['doses'],
                    self.doses, i))
                row_copy.extend(models.EndpointGroup.flat_complete_data_row(eg, ser))
                rows.append(row_copy)

        return rows
Exemple #6
0
    def _get_data_rows(self):
        rows = []
        for obj in self.queryset:
            ser = obj.get_json(json_encode=False)
            row = []
            row.extend(Study.flat_complete_data_row(ser['protocol']['study']))
            row.extend(models.MetaProtocol.flat_complete_data_row(ser['protocol']))
            row.extend(models.MetaResult.flat_complete_data_row(ser))

            if len(ser['single_results'])==0:
                # print one-row with no single-results
                rows.append(row)
            else:
                # print each single-result as a new row
                for sr in ser['single_results']:
                    row_copy = list(row)  # clone
                    row_copy.extend(models.SingleResult.flat_complete_data_row(sr))
                    rows.append(row_copy)
        return rows
Exemple #7
0
 def _get_data_rows(self):
     rows = []
     for obj in self.queryset:
         ser = obj.get_json(json_encode=False)
         row = []
         row.extend(Study.flat_complete_data_row(ser['study_population']['study']))
         row.extend(models.StudyPopulation.flat_complete_data_row(ser['study_population']))
         row.extend(models.Outcome.flat_complete_data_row(ser))
         for res in ser['results']:
             row_copy = list(row)
             row_copy.extend(models.Exposure.flat_complete_data_row(res["comparison_set"]["exposure"]))
             row_copy.extend(models.ComparisonSet.flat_complete_data_row(res["comparison_set"]))
             row_copy.extend(models.Result.flat_complete_data_row(res))
             for rg in res['results']:
                 row_copy2 = list(row_copy)
                 row_copy2.extend(models.Group.flat_complete_data_row(rg["group"]))
                 row_copy2.extend(models.GroupResult.flat_complete_data_row(rg))
                 rows.append(row_copy2)
     return rows
Exemple #8
0
 def _get_data_rows(self):
     rows = []
     for obj in self.queryset:
         ser = obj.get_json(json_encode=False)
         row = []
         row.extend(
             Study.flat_complete_data_row(
                 ser['exposure']['study_population']['study']))
         row.extend(
             models.StudyPopulation.flat_complete_data_row(
                 ser['exposure']['study_population']))
         row.extend(models.Exposure.flat_complete_data_row(ser['exposure']))
         row.extend(models.AssessedOutcome.flat_complete_data_row(ser))
         # build a row for each aog
         for aog in ser['groups']:
             row_copy = list(row)  # clone
             row_copy.extend(
                 models.AssessedOutcomeGroup.flat_complete_data_row(aog))
             rows.append(row_copy)
     return rows
Exemple #9
0
    def _get_data_rows(self):
        rows = []
        for obj in self.queryset:
            ser = obj.get_json(json_encode=False)
            row = []
            row.extend(Study.flat_complete_data_row(ser['protocol']['study']))
            row.extend(
                models.MetaProtocol.flat_complete_data_row(ser['protocol']))
            row.extend(models.MetaResult.flat_complete_data_row(ser))

            if len(ser['single_results']) == 0:
                # print one-row with no single-results
                rows.append(row)
            else:
                # print each single-result as a new row
                for sr in ser['single_results']:
                    row_copy = list(row)  # clone
                    row_copy.extend(
                        models.SingleResult.flat_complete_data_row(sr))
                    rows.append(row_copy)
        return rows
Exemple #10
0
    def _get_data_rows(self):
        rows = []
        for obj in self.queryset:
            ser = obj.get_json(json_encode=False)
            row = []
            row.extend(Study.flat_complete_data_row(ser))

            try:
                scores = [
                    rob['scores'] for rob in ser.get('riskofbiases', [])
                    if rob['final'] and rob['active']
                ][0]
            except IndexError:
                scores = []

            for score in scores:
                row_copy = list(row)  # clone
                row_copy.extend(
                    models.RiskOfBiasScore.flat_complete_data_row(score))
                rows.append(row_copy)
        return rows