Run trial operations off one study spine — sync study, site, and investigator master data across CTMS, eTMF, and EDC, file documents as milestones complete instead of before an inspection, and give operations enrollment and data-cleaning status without a weekly spreadsheet.
Clinical Trial Management: CTMS, eTMF, and EDC
Objective: Connect the three systems trial operations actually runs on — CTMS for study and site management, eTMF for the document record, and EDC for subject data — so study teams stop reconciling them by hand. The prize is not a dashboard: it is a trial master file that is inspection-ready continuously, and a study team that sees enrollment and data-cleaning status while there is still time to act on it.
What's Getting Built
- Veeva CTMS (System API) — surfaces study, site, and investigator master data and milestone changes from Vault CTMS ·
SPARK NOTIFY study.change, GET /studies/{id}, GET /sites, VQL query sites/investigators
- EDC / CDMS (System API) — pulls read-only subject counts, visit progress, and query status at study and site granularity ·
GET /studies/{id}/subjects, GET /sites/{id}/queries, GET /visits/status
- eTMF (System API) — files documents with TMF Reference Model classification and reports completeness per artifact and site ·
POST /documents, GET /completeness?study={id}&site={id}
- Study master and events (Process API) — builds the canonical study/site/investigator spine, drives milestone eTMF filing, and joins EDC status ·
POST /milestones/reached, GET /studies/{id}/status, POST /reconcile
- Milestone event stream (Anypoint MQ) — durable queue publishing milestone-reached, site-activated, and subject-enrolled events for downstream consumers to subscribe and replay ·
PUBLISH milestone.reached, PUBLISH site.activated, SUBSCRIBE / REPLAY
- Trial operations status view (target) — gives study and site teams enrollment, screening, and data-cleaning status without manual collection ·
GET /studies/{id}/enrollment, GET /sites/status
Value chain phase
Phase 02 — Clinical Development. Phases I–III testing on human subjects to ensure safety and efficacy.
- Scope of this plan: Operational integration of study, site, and investigator master data, milestone-driven eTMF filing, and enrollment and data status visibility across CTMS, eTMF, and EDC.
- Data in this phase: Electronic Data Capture (EDC), Clinical Trial Management Systems (CTMS), and EHR.
- Receives from: Phase 01 — Research & Discovery.
- Hands off to: Phase 03 — Regulatory & Compliance.
Prerequisites
- Anypoint Platform org with API Manager and a non-production deployment target.
- Secrets Manager or secure properties configured for every system credential.
- Named owner for each source system — integration stalls on access, not on code.
- Veeva Vault CTMS and eTMF access with an API integration user, or the equivalent in the CTMS in use.
- EDC or CDMS access — Veeva CDMS, Medidata Rave, or equivalent — with study metadata and subject status available.
- The TMF Reference Model version in use, with the artifact and milestone mapping agreed with clinical operations.
- Data transfer agreements with CROs covering what flows, in which direction, and who owns reconciliation.
Choose your path
- Study spine first — Choose when study, site, and investigator records disagree across systems — fix identity before automating anything that depends on it.
- TMF completeness first — Choose when inspection readiness is the driver — milestone-triggered filing and completeness monitoring, with the spine handled as it goes.
Platform notes
Veeva Vault (CTMS and eTMF)
- The Anypoint connector covers documents, renditions, Vault objects, picklists, audit trail, and VQL queries over the REST, bulk, and streaming APIs.
- Use Spark messages for change notification instead of polling VQL on a timer — polling a large Vault on a short interval is how integrations get throttled.
- Bulk operations exist for a reason; migrate history through them and keep the record-at-a-time path for steady-state change.
EDC and CDMS
- Study build changes mid-trial — bind to stable study and site identifiers rather than to form or field names.
- Subject-level data is pseudonymized by design; keep it that way and never enrich it with anything that re-identifies.
CRO exchange
- CROs often own CTMS or EDC for a study — agree the direction of truth per object before writing a single map.
- Reconcile site and subject counts against the CRO on a fixed cadence; silent divergence surfaces at database lock, which is the worst possible time.
Architecture
1. Business requirements
- One agreed study, site, and investigator record across CTMS, eTMF, EDC, and payments.
- TMF completeness visible continuously rather than assembled ahead of an inspection.
- Enrollment, screening, and data-cleaning status available to study teams without manual collection.
- Milestone events published once, so payments, analytics, and document filing all react to the same trigger.
2. Study and site master
- Establish canonical identifiers for study, site, and investigator, and map every system's local key to them.
- Resolve investigators against the HCP master so the same person is not three records across three studies.
- Propagate site status changes — activated, enrolling, closed — as events rather than nightly extracts.
- Keep country and regulatory attributes on the site record, because they drive both filing and payment rules.
3. Milestone-driven eTMF filing
- Trigger expected-document generation from CTMS milestones, so the TMF knows what it is waiting for.
- File documents with TMF Reference Model artifact classification and study, site, and country metadata applied at upload.
- Track completeness per artifact and per site, and expose the gap list rather than an aggregate percentage.
- Preserve document version and audit trail through the integration; a filed copy without provenance is not the record.
4. EDC and operational status
- Pull subject counts, visit progress, and query status at study and site granularity on an agreed cadence.
- Join EDC status to CTMS site status so under-enrolling sites are visible next to their activation history.
- Surface open query aging and outstanding data clarification as an operational metric, not a database-lock surprise.
- Keep the pull read-only into EDC unless a formal path and validation exist for writing back.
5. Events for downstream consumers
- Publish milestone-reached, site-activated, and subject-enrolled events on a durable queue.
- Let payments, analytics, and document filing subscribe rather than each polling CTMS independently.
- Version the event contract, and replay from the queue rather than re-extracting when a consumer falls behind.
- Correlate every event to the study, site, and milestone identifiers so consumers never need a lookup to act.
6. Security and GxP compliance
- Validate the integration under GAMP 5 — requirements, design, IQ/OQ/PQ evidence, and a traceability matrix retained for inspection.
- Meet 21 CFR Part 11 and EU Annex 11 for electronic records and signatures on every GxP-relevant flow.
- Preserve ALCOA+ data integrity — attributable, legible, contemporaneous, original, and accurate — with audit trails no operator can edit.
- Encrypt regulated data in transit and at rest, and keep production payload visibility to validated support roles only.
- Treat a mapping change on a GxP flow as a controlled change under change management, never as a hotfix.
- The TMF is an inspection record under ICH GCP — completeness, timeliness, and provenance are all inspectable, and an integration that files quickly but loses version history makes things worse.
- Keep subject data pseudonymized end to end, and hold the key outside the integration layer.
- Any write path into EDC affects clinical data and inherits the full validation burden; read-only is a legitimate architectural choice.
For pre-built API specifications, implementation templates, and reference architecture, see the MuleSoft Accelerator for Life Sciences on Anypoint Exchange.
Sample payload — Milestone event with expected documents
{
"eventType": "milestone.reached",
"studyId": "STU-2026-114",
"siteId": "SITE-00842",
"countryCode": "DE",
"milestone": { "code": "SITE_ACTIVATION", "name": "Site activated", "actualDate": "2026-07-29" },
"investigator": { "masterId": "HCP-000482913", "role": "principal_investigator" },
"expectedDocuments": [
{ "artifactCode": "05.02.01", "name": "Site activation letter", "dueByDate": "2026-08-05" },
{ "artifactCode": "05.04.02", "name": "Regulatory approval", "dueByDate": "2026-08-05" }
],
"sourceSystem": "veeva-ctms",
"emittedAt": "2026-07-29T18:03:11Z"
}
Testing and validation
- Activate a site in CTMS and confirm the milestone event triggers the expected-document list in eTMF with the right artifact codes.
- File a document and verify classification, study and site metadata, version, and audit trail all survive the upload.
- Change an investigator in CTMS and confirm the HCP master resolution keeps one canonical person across studies.
- Replay a milestone event to a consumer that was offline and confirm no duplicate payment or filing results.
- Compare EDC subject counts against CTMS enrollment for one study and confirm reconciliation reports the difference rather than hiding it.
Phased rollout
Phase 1 — Connect
- Connect CTMS and eTMF read-only and publish the study, site, and investigator spine for one active study.
- Prove Spark-based change notification and confirm throughput against the Vault's real change volume.
Phase 2 — Map and validate
- Implement milestone events and expected-document generation for one country, with clinical operations reviewing output weekly.
- Add EDC status pull and reconcile against CTMS for a full enrollment cycle.
Phase 3 — Production
- Extend study by study, keeping CRO reconciliation cadence fixed from the start.
- Move payments and analytics onto the shared event stream and retire their direct CTMS polling.
Success metrics
- TMF completeness sustained above the agreed threshold continuously, not just before an inspection.
- Time from milestone to document filed, measured at the slowest country rather than the mean.
- Manual reconciliation hours per study eliminated across operations, payments, and analytics.
- Study and site records agreeing across systems, measured by reconciliation exceptions per cycle.
Troubleshooting
- Vault API calls throttled during business hours — Likely cause: polling VQL on a short interval instead of subscribing to change notifications. Fix: Move to Spark messages for change and reserve queries for reconciliation windows.
- Documents filed without correct classification — Likely cause: metadata applied after upload in a second call that sometimes fails. Fix: Apply classification and study metadata as part of the upload, and fail the operation if either is missing.
- Duplicate site records across studies — Likely cause: sites keyed by CTMS local identifier rather than resolved against the canonical spine. Fix: Resolve site and investigator to master identifiers at the System API before any downstream use.
- Counts diverge from the CRO at database lock — Likely cause: reconciliation deferred until the end of the study. Fix: Reconcile subject and site counts on a fixed cadence from first enrollment and raise variance as an exception.
Deliverable: A shared study, site, and investigator spine across CTMS, eTMF, and EDC, with milestone-driven document filing, continuous completeness monitoring, and a durable event stream that payments and analytics consume instead of polling.