Skip to main content

Clinical reports — createdAt and updatedAt

Summary

The Public API ClinicalReport and ClinicalReportSummary types now expose document timestamps, and clinicalReports accepts inclusive DateRange filters on those fields — the same idea as QueryOptions.createdAt / QueryOptions.updatedAt on invoices and bookings.

Use this to pick the latest report of a given type on a pathway (for example the most recent RFAT) or to sync only reports created or updated in a timeframe, without paging the full historical set for a status such as Approved.

completedAt is not a substitute. It is set when a clinician submits the report (Complete / PendingApproval) and is overwritten on resubmit after rejection. Governance status changes (for example Approved) do not update it.

This change is additive. Existing filters and omitting the new fields behave as before. Draft reports are still never returned.

Fields

FieldMeaning
createdAtWhen the report document was created
updatedAtWhen the report was last updated, including governance status changes
completedAtWhen the clinician last submitted the report. Overwritten on resubmit. Not set by later governance statuses such as Approved

Filters

ArgumentDescription
filters.createdAtInclusive DateRange on the document createdAt
filters.updatedAtInclusive DateRange on the document updatedAt

These compose with existing patientId, clinicalPathwayId, reportType, and status filters using AND semantics. DateRange bounds are optional; supply start, end, or both. No time-zone adjustment is applied to the supplied dates.

Date-only strings such as "2026-09-06" are interpreted as midnight UTC (2026-09-06T00:00:00.000Z) for both start and end.

Example

query RecentApprovedRfats($pathwayId: ID!) {
clinicalReports(
pagination: { page: 1, pageSize: 30 }
filters: {
clinicalPathwayId: $pathwayId
reportType: RFATReport
status: Approved
updatedAt: { start: "2026-08-01", end: "2026-09-06" }
}
) {
data {
id
reportType
status
createdAt
updatedAt
completedAt
}
pageInfo {
page
pageSize
hasMore
}
}
}

Integration guidance

  • Sort or pick the latest report of a type using createdAt or updatedAt on each row. List results remain newest-created first.
  • Use filters.updatedAt for incremental sync after governance changes. completedAt will not move when a report is approved.
  • clinicalReport(id:) returns the same timestamp fields on ClinicalReport, plus the PDF download URL.
  • Drafts are never returned. filters.status: Draft is rejected (BAD_USER_INPUT).

See also