# getStudyResults

**Identifier:** `clinicaltrials_getStudyResults`

**Provider:** [ClinicalTrials](https://kirha.com/providers/clinicaltrials.md)

Get the POSTED RESULTS of a clinical trial by NCT ID: participant flow (started, completed, drop-outs per arm), baseline characteristics (age, sex, race and ethnicity counts per arm, with the denominators needed to compute percentages), outcome measure results with their time frames and statistical analyses (p-values, confidence intervals), and adverse events per arm. Only trials that reported results have this data; use getStudyDetails for the protocol (eligibility, arms, planned outcomes, sites). Pick the sections you need, counts of all outcomes, measures and adverse events are always returned even when the lists themselves are truncated.

## Run it with the CLI

```bash
kirha tools run clinicaltrials_getStudyResults \
  --input '{
    "nctId": "NCT04960202"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "clinicaltrials_getStudyResults",
  "input": {
    "nctId": "NCT04960202"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "adverseEventsOffset": {
      "description": "Skip this many adverse events. Use nextAdverseEventsOffset of a previous response.",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "nctId": {
      "description": "ClinicalTrials.gov identifier (e.g., NCT04960202)",
      "type": "string"
    },
    "outcomeType": {
      "description": "Only return outcome measures of this type",
      "enum": [
        "PRIMARY",
        "SECONDARY",
        "OTHER_PRE_SPECIFIED",
        "POST_HOC"
      ],
      "type": "string"
    },
    "outcomesOffset": {
      "description": "Skip this many outcome measures. Use nextOutcomesOffset of a previous response.",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "sections": {
      "default": [
        "participantFlow",
        "baseline",
        "outcomes",
        "adverseEvents"
      ],
      "description": "Request a single section to get it in full; several sections share the output budget",
      "items": {
        "enum": [
          "participantFlow",
          "baseline",
          "outcomes",
          "adverseEvents"
        ],
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "nctId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "adverseEvents": {
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        },
        "events": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "assessmentType": {
                "type": "string"
              },
              "organSystem": {
                "type": "string"
              },
              "serious": {
                "description": "true for serious adverse events, false for other (non-serious) ones",
                "type": "boolean"
              },
              "stats": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "groupId": {
                      "type": "string"
                    },
                    "numAffected": {
                      "type": "number"
                    },
                    "numAtRisk": {
                      "type": "number"
                    },
                    "numEvents": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "groupId",
                    "numAffected",
                    "numAtRisk"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "term": {
                "type": "string"
              }
            },
            "required": [
              "term",
              "serious",
              "stats"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "frequencyThreshold": {
          "description": "Percentage above which non-serious events had to be reported",
          "type": "string"
        },
        "groups": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "deathsNumAffected": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "id": {
                "description": "Referenced by groupId in every measurement and count below",
                "type": "string"
              },
              "numAtRisk": {
                "type": "number"
              },
              "otherNumAffected": {
                "type": "number"
              },
              "seriousNumAffected": {
                "type": "number"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "nextAdverseEventsOffset": {
          "description": "Pass as adverseEventsOffset to get the remaining events",
          "type": "number"
        },
        "timeFrame": {
          "type": "string"
        },
        "totalEvents": {
          "type": "number"
        },
        "totalOther": {
          "description": "Non-serious events reported above the frequency threshold",
          "type": "number"
        },
        "totalSerious": {
          "type": "number"
        }
      },
      "required": [
        "groups",
        "events",
        "totalEvents",
        "totalSerious",
        "totalOther"
      ],
      "type": "object"
    },
    "baseline": {
      "additionalProperties": false,
      "properties": {
        "denoms": {
          "description": "Participants per group: the denominator for every baseline count",
          "items": {
            "additionalProperties": false,
            "properties": {
              "groupId": {
                "type": "string"
              },
              "units": {
                "type": "string"
              },
              "value": {
                "description": "Denominator: participants analysed in this group",
                "type": "number"
              }
            },
            "required": [
              "groupId",
              "value"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "groups": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "description": "Referenced by groupId in every measurement and count below",
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "measures": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "classes": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "categories": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "measurements": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comment": {
                                  "type": "string"
                                },
                                "groupId": {
                                  "type": "string"
                                },
                                "lowerLimit": {
                                  "type": "string"
                                },
                                "spread": {
                                  "description": "Standard deviation or error, per the measure's dispersion type",
                                  "type": "string"
                                },
                                "upperLimit": {
                                  "type": "string"
                                },
                                "value": {
                                  "description": "Reported value; may be 'NA' when not estimable",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "groupId",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "title": {
                            "description": "e.g. 'Hispanic or Latino', 'Female'",
                            "type": "string"
                          }
                        },
                        "required": [
                          "measurements"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "denoms": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "groupId": {
                            "type": "string"
                          },
                          "units": {
                            "type": "string"
                          },
                          "value": {
                            "description": "Denominator: participants analysed in this group",
                            "type": "number"
                          }
                        },
                        "required": [
                          "groupId",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "title": {
                      "description": "Sub-group or time point the categories belong to",
                      "type": "string"
                    }
                  },
                  "required": [
                    "categories"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "description": {
                "type": "string"
              },
              "paramType": {
                "description": "e.g. COUNT_OF_PARTICIPANTS, MEAN, NUMBER, MEDIAN",
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "unitOfMeasure": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "classes"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "populationDescription": {
          "type": "string"
        },
        "totalMeasures": {
          "type": "number"
        }
      },
      "required": [
        "groups",
        "measures",
        "totalMeasures"
      ],
      "type": "object"
    },
    "context": {
      "type": "string"
    },
    "hasResults": {
      "description": "false when the trial has no results posted on ClinicalTrials.gov",
      "type": "boolean"
    },
    "nctId": {
      "type": "string"
    },
    "outcomes": {
      "additionalProperties": false,
      "properties": {
        "matchingOutcomes": {
          "description": "Outcomes matching outcomeType (equals totalOutcomes without it)",
          "type": "number"
        },
        "measures": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "analyses": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "ciLowerLimit": {
                      "type": "string"
                    },
                    "ciPctValue": {
                      "type": "string"
                    },
                    "ciUpperLimit": {
                      "type": "string"
                    },
                    "groupDescription": {
                      "type": "string"
                    },
                    "groupIds": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "nonInferiorityType": {
                      "type": "string"
                    },
                    "pValue": {
                      "type": "string"
                    },
                    "paramType": {
                      "type": "string"
                    },
                    "paramValue": {
                      "type": "string"
                    },
                    "statisticalMethod": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "groupIds"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "classes": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "categories": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "measurements": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comment": {
                                  "type": "string"
                                },
                                "groupId": {
                                  "type": "string"
                                },
                                "lowerLimit": {
                                  "type": "string"
                                },
                                "spread": {
                                  "description": "Standard deviation or error, per the measure's dispersion type",
                                  "type": "string"
                                },
                                "upperLimit": {
                                  "type": "string"
                                },
                                "value": {
                                  "description": "Reported value; may be 'NA' when not estimable",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "groupId",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "title": {
                            "description": "e.g. 'Hispanic or Latino', 'Female'",
                            "type": "string"
                          }
                        },
                        "required": [
                          "measurements"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "denoms": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "groupId": {
                            "type": "string"
                          },
                          "units": {
                            "type": "string"
                          },
                          "value": {
                            "description": "Denominator: participants analysed in this group",
                            "type": "number"
                          }
                        },
                        "required": [
                          "groupId",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "title": {
                      "description": "Sub-group or time point the categories belong to",
                      "type": "string"
                    }
                  },
                  "required": [
                    "categories"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "denoms": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "groupId": {
                      "type": "string"
                    },
                    "units": {
                      "type": "string"
                    },
                    "value": {
                      "description": "Denominator: participants analysed in this group",
                      "type": "number"
                    }
                  },
                  "required": [
                    "groupId",
                    "value"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "description": {
                "type": "string"
              },
              "groups": {
                "description": "Arms of THIS measure: groupIds are scoped to it, the same id means another arm in another measure",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "id": {
                      "description": "Referenced by groupId in every measurement and count below",
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "paramType": {
                "description": "e.g. COUNT_OF_PARTICIPANTS, MEAN, NUMBER, MEDIAN",
                "type": "string"
              },
              "populationDescription": {
                "type": "string"
              },
              "timeFrame": {
                "description": "When the outcome was measured, e.g. 'Up to approximately 61 weeks'",
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "description": "PRIMARY, SECONDARY, OTHER_PRE_SPECIFIED or POST_HOC",
                "type": "string"
              },
              "unitOfMeasure": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "groups",
              "classes"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "nextOutcomesOffset": {
          "description": "Pass as outcomesOffset to get the remaining outcomes",
          "type": "number"
        },
        "totalOther": {
          "description": "Outcomes that are neither primary nor secondary",
          "type": "number"
        },
        "totalOutcomes": {
          "description": "All outcome measures with posted results, before any type filter",
          "type": "number"
        },
        "totalPrimary": {
          "type": "number"
        },
        "totalSecondary": {
          "type": "number"
        }
      },
      "required": [
        "measures",
        "totalOutcomes",
        "totalPrimary",
        "totalSecondary",
        "totalOther",
        "matchingOutcomes"
      ],
      "type": "object"
    },
    "participantFlow": {
      "additionalProperties": false,
      "properties": {
        "groups": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "description": "Referenced by groupId in every measurement and count below",
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "periods": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "dropWithdraws": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "reasons": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "groupId": {
                            "type": "string"
                          },
                          "numSubjects": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groupId",
                          "numSubjects"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "type": {
                      "description": "Reason, e.g. Adverse Event, Death, Lost to Follow-up",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "reasons"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "milestones": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "achievements": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "comment": {
                            "type": "string"
                          },
                          "groupId": {
                            "type": "string"
                          },
                          "numSubjects": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groupId",
                          "numSubjects"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "type": {
                      "description": "e.g. STARTED, COMPLETED, NOT COMPLETED",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "achievements"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "milestones"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "preAssignmentDetails": {
          "type": "string"
        },
        "recruitmentDetails": {
          "type": "string"
        }
      },
      "required": [
        "groups",
        "periods"
      ],
      "type": "object"
    },
    "title": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "nctId",
    "hasResults"
  ],
  "type": "object"
}
```

## Related tools

Other ClinicalTrials tools that this tool refers to, or that refer to it.

- [`getStudyDetails`](https://kirha.com/providers/clinicaltrials/getStudyDetails.md)

-----

[All ClinicalTrials tools](https://kirha.com/providers/clinicaltrials.md) · [< Back to tools list](https://kirha.com/tools.md)