Skip to content

Moving the web app onto the .NET API ​

The web app (apps/web) was written against the Python services. Most of its API calls target endpoints that no .NET service serves, so most screens fail against the real backend. This page lists what works, what doesn't, and how a screen moves over. The plan is epic #4833.

Current state (2026-09-29) ​

Each route was traced through every store, client and component it imports, and each API path it can call was matched against the specs the .NET services serve (docs/openapi/*.json). A "real" match means the path exists, not that the request and response shapes match.

What the .NET services serve ​

ServiceReal endpoints (besides /healthz)
Executionsubjects: list by study (site/status filters, paged), create, get, consent, state, demographics; forms: create, get, update, list by subject, complete, approve, unlock; observations: create, get, list by subject, SDV, SDV flag; sites: activate, compliance-status (with persistent is_activated, activated_at, activated_by); eTMF completeness webhook (POST /api/v1/execution/webhooks/etmf); randomization schemes; RTSM IP kit inventory, seeding, scan validation, batch return reconciliation, and autologous CGT chain-of-custody
Kernel API hostread only (ADR-2540, kernelApi.ts): node summary, zoom path, children, command catalogue with dry-run decisions, CanI, search, a study's protocol versions and one version, Trace, dependents and amendment impact; decisions from the caller's grants (ADR-2455); objects the caller's grants don't cover come back masked (ADR-2457)
CTMS (Core: true, ctmsApi.ts)site startup greenlight evaluation & certification (GET/POST .../startup/sites/{siteId}/greenlight, GET .../startup/matrix, POST .../startup/matrix/batch-certify), site milestones (GET/POST/PUT /api/v1/ctms/site-milestones), monitoring visits (GET/POST /api/v1/ctms/monitoring-visits, /complete, /sign-off), visit letters (GET .../letters, POST /api/v1/ctms/letters/render, POST /api/v1/ctms/letters/compile, GET /api/v1/ctms/letters/{letterId}/pdf), Delegation of Authority (GET .../doa/sites/{site_id}/log, POST .../doa/delegate, /revoke, /sign-off, GET .../export-pdf) (study/site scope-isolated via CallerScope, ADR-2642, ADR-2643)
eTMF (Core: true, etmf.ts)document metadata vault (GET /api/v1/etmf/documents, GET /api/v1/etmf/documents/{documentId}), intelligence classification (POST /api/v1/etmf/intelligence/classify), QC staging & clinical QC review (POST /api/v1/etmf/intelligence/stage-qc, GET /api/v1/etmf/intelligence/qc-queue, POST /api/v1/etmf/intelligence/qc-review/{docId} — signs and posts completeness updates to Execution, ADR-2643)
Knowledge (Core: true, knowledgeApi.ts, training.ts)contextual SOP resolution (GET /api/v1/knowledge/contextual-help), published SOP search & detail (GET /api/v1/knowledge/articles, GET /api/v1/knowledge/articles/{article_id}), categories (GET /api/v1/knowledge/categories), training curricula (GET /api/v1/training/curricula, GET /api/v1/training/curricula/{curriculumId}), assignments & batch assignments (GET /api/v1/training/assignments, GET /api/v1/training/assignments/{assignmentId}, POST /api/v1/training/curricula/batch-assign), PI delegation log & bulk sign-off (GET /api/v1/training/delegations, POST /api/v1/training/delegations/bulk-signoff) (ADR-2813, ADR-2641, ADR-2643)
Ticketssupport ticket creation (POST /api/v1/tickets with X-Change-Reason, 6-queue routing, Dual-Target SLAs, PII rejection) and study/site-scoped listing (GET /api/v1/tickets, GET /api/v1/tickets/{ticket_id}) (ADR-2641)
DesignerGET /studies (always empty), POST /protocols/compile (not routed by the gateway yet)
Notifications, Safetyone render endpoint each (notification, ICSR)
Everything else (ai, econsent, eisf, fileshare, imaging, interop, org, payments, quality)GET /status only

Missing for any EDC screen to work end to end: study/visit schedule and form definitions (Designer), and the current user's notifications (the app shell fetched them on every screen).

Screens ​

Calls = distinct API paths reachable from the screen. Missing = paths no .NET service serves.

Screen (route)CallsMissingMissing by areaVerdict
eCRF Data Capture (/ecrf)7167interop 38, studies 15, execution 8, notifications 4, terminology 2Needs client change (Execution forms/observations/queries/subjects exist) + missing endpoints (visit schedule, form definitions)
Study Rules & Queries (/rules)1915execution 6, studies 4, notifications 4, dictionaries 1Query panel: client change; rules/edit checks: missing
CTMS Operations, SSU (/ctms, /ssu)5021ctms financials/CRA/recruitment 17, notifications 4Site activation, startup greenlight, milestones, monitoring, compiled visit letters, delegation & RTSM supply live; financials, CRA allocation, recruitment updates & adaptive dose escalation gated (#4829)
Data Lock Console (/data-lock)33execution 3Missing (lock endpoints)
Lab Governance (/labs)99execution 9Missing
Medical Coding (/coding)1111execution 5, dictionaries 2, notifications 4Missing
Protocol & SoA Designer (/mdr)1410execution 6, notifications 4 (+ SoA via Designer)Missing (Designer is a stub)
Protocol AI Digitizer (/digitization)55designer 1, notifications 4Missing
Amendments & Migration (/amendment-diff)2521execution 10, designer 3, studies 3, mdr 1, notifications 4Missing
eConsent authoring, ICF builder (/econsent-authoring, /icf-builder)33 / 1929 / 19econsent, etmf, executionMissing (subject consent POST exists; authoring does not)
eTMF Document Vault (/etmf)40noneLive on etmf.ts (generated/etmf.ts): document listing, AI classification, QC staging, and clinical QC review (ADR-2643)
Part 11 Audit Ledger, Auditor (/audit, /auditor)22 / 722 / 7etmf, execution, qualityMissing (no audit read API)
Quality & RBQM Cockpit (/quality)77quality 7Missing
Safety & DSUR (/safety)44safety 4Missing
Sensors, Telehealth/DTP, Lakehouse (/sensors, /dct, /lakehouse)42 / 42 / 16allinteropMissing
Documents Hub (/documents)2121fileshare 17Missing
Study Training (/training)70noneLive on trainingApi (generated/knowledge.ts): curricula, assignments, batch assignment, and PI delegation bulk sign-off (ADR-2643)
Knowledge & SOP Hub (/knowledge)44notifications 4 (articles are hardcoded)Missing
Tickets (/tickets)55tickets 1Missing
Notifications (/notifications)44notifications 4Missing
Participant Wallet, Lay Summaries (/participant-wallet, /lay-summaries)11 / 3allpaymentsMissing
DICOM viewer, Device & IVD, CEC adjudication, Export Wizard (/imaging, /devices, /cec, /exports)00noneNo API at all: hardcoded demo data

Result: no screen works end to end against the .NET backend. The eCRF, query, SDV and site activation parts are the only ones with a real backend behind them.

Moved so far ​

ScreenPartClient callNotes
eCRF (/ecrf)Subject list & kernel form instances (ADR-2622, #4828)executionApi.listSubjects, findKernelEnrollmentRef, ecrfFormsApi, ecrfQueriesApi, kernelApi.verifyObservation, kernelApi.retractAssertionOutside a demo build the screen is only the role badge, the study bar (?studyId= or typed study code), the participant selector (showing the first 200 subjects in enrollment order, resolving the chosen participant's kernel enrollment via src/canvas/kernelStudy.ts, and linking staff with canManageParticipants to Clinical Canvas), and EcrfFormPanel (opening/loading kernel form instances, saving pages of values, source verification, field queries, and investigator e-signatures). Legacy enrolment, sample vitals, CDASH rules, protocol ingestion, EHR reconciliation, and the role switcher have no backend and appear only in a demo build.
CTMS, SSU (/ctms, /ssu)Site activation, Startup readiness, Milestones, Monitoring, Delegation, SupplyexecutionApi.getSiteComplianceStatus, executionApi.activateSite, ctmsApi.*, executionApi.* (RTSM & schemes), etmfService.stageQcDocumentPromoted ctms, etmf, and knowledge to Core: true in ServiceTopology / AppHost and generated src/api/generated/ctms.ts, etmf.ts, and knowledge.ts (ADR-2610, ADR-2642, ADR-2643). Outside a demo build, /ctms and /ssu expose tabbed workspaces for Site activation, Startup readiness, Site milestones, Monitoring visits (with structured findings, GxP PDF letter compilation via POST /api/v1/ctms/letters/compile, and supervisory sign-off), Delegation log, and Investigational supply, while admitting data_manager (ROLE_SPONSOR_DM). SiteActivationPanel persists is_activated, activated_at, and activated_by, gates Activate site via canActivateSite, populates scoped pickers from token claims (study_ids, site_id), and renders UX-9 scope-assignment guidance on HTTP 403 (FORBIDDEN_SCOPE). Grant financials, CRA allocation, recruitment target updates, and adaptive dose escalation remain gated behind demoBuild / allowUnbackedAction (#4829).
eTMF (/etmf)Document vault, AI classification & clinical QC review (ADR-2643)etmfService.getDocuments, etmfService.classifyIntelligence, etmfService.stageQcDocument, etmfService.getQcQueue, etmfService.submitQcReviewDocumentManagerView.vue lists eTMF documents, runs TMF Reference Model classification, and dispatches live clinical QC approvals (POST /api/v1/etmf/intelligence/qc-review/{docId}). eTMF signs and forwards site document completeness snapshots to Execution (POST /api/v1/execution/webhooks/etmf) as etmf_service, keeping SITE_ACTIVATION compliance synchronized end-to-end.
Study Training (/training)Curricula, staff assignments & PI delegation bulk sign-off (ADR-2643)trainingApi.listCurricula, getCurriculum, batchAssignCurriculum, listAssignments, getAssignmentDetail, listDelegations, bulkSignOffDelegationstraining.ts is generated over docs/openapi/knowledge_openapi.json (generated/knowledge.ts), passing protocol_version on curriculum queries and dropping unmounted Python-era progress/quiz/sign-off/certificate endpoints.
Clinical Canvas (/studies/:studyCode)Start & Conduct operational sections (ADR-2642, ADR-2643)ctmsApi.*, etmfService.*, trainingApi.*, executionApi.*Start exposes Site activation, Documents (documents), Startup readiness (startup-greenlight), Site milestones (site-milestones), Training (training), and Delegation log (delegation). Conduct exposes Participants, Monitoring visits (monitoring-visits), and Investigational supply (supply). Role-gated actions check canonical backend roles (src/canvas/authority.ts) so cra vs monitor vs sponsor_dm vs investigator vs pharmacist boundaries match PermissionMatrix.
Clinical Canvas (/studies/:studyCode)Study home, Participants, Site activationexecutionApi.listSubjects, executionApi.getSubjectDetail, executionApi.getSiteComplianceStatus, executionApi.activateSiteThe study-centric shell from CLINICAL_CANVAS.md UX-1: AppShell.vue wraps every authenticated screen (StudyCanvasView.vue, EcrfView.vue, CtmsView.vue, OverviewView.vue) in one persistent header with Studies, Data collection and Site readiness primary navigation, a single global ⌘K command palette, the persona view switcher (UX-6), Orientation checklist/tour controls and Help & SOPs, with no legacy product sidebar, sandbox banner or telemetry footer. Study home counts participants by state (one list call per state, limit=1, reading total); each count opens the participants it counts. Participants pages 50 at a time with subject code search (?q=), state (?status=) and study site (?site=) filters; selecting one fills the inspector and puts its NodeRef (participant:<uuid>, ADR-2481) in the URL, and cold links resolve participant details by surrogate UUID or subject code. Participant simulation stays disabled naming #4888. Stages and sections with no service are empty, not mocked.
Clinical Canvas (/studies/:studyCode)Participant data (#4828)executionApi.listObservations, listFormSubmissions, verifyObservationSdv, flagObservationSdv; queries through ecrfQueriesApi.listForEnrollment and transition (#5461)"Open participant's data" in the inspector opens ?participant=<NodeRef>. It shows the participant's observations by visit, queries and form submissions (read-only). Selecting an observation fills the inspector, with source data verification (verify, sent with a fixed reason for change; flag with a reason, sent as the reason for change too) and raising a query for a CRA or data manager. Execution refuses SDV (403) to anyone else (#4920). Queries are the Execution module's (#5461): the record finds the participant's kernel enrollment and lists its queries from /api/v1/execution/forms/queries?enrollment_id=; it offers the steps the query's status allows, one request per query, with the typed text as X-Change-Reason, and the kernel authorizes each against the caller's grants. Queries are raised on the eCRF form panel, which knows the value's current revision. The client never sends a responder or resolver (#4920). Observations have no kernel NodeRef yet, so they are addressed by Execution id (?observation=). Forms cannot be opened until form definitions are served (#4727).
Clinical Canvas (/studies/:studyCode)Adding participants, changing stateexecutionApi.addSubject, executionApi.changeSubjectStateAdd participant in Participants creates the participant in screening with its code, an optional site (the site filter in view by default) and a reason sent as X-Change-Reason; no demographics or arm are sent. The new participant is selected once the list can place it (the last in enrollment order). Change state in the inspector offers the transitions Execution's graph allows from the participant's state (SubjectTransitionGraph.cs; tests/canvas/contracts.spec.ts fails if the copy drifts), less unblinding, which needs its own workflow; the reason is sent as X-Change-Reason. Execution refuses enrolment at a site whose activation documents are incomplete, and the canvas shows its refusal. Both are offered only to the roles Execution accepts for them (investigators and coordinators, canManageParticipants in src/canvas/authority.ts, checked against SubjectAuthority.cs by tests/canvas/contracts.spec.ts); a data manager, monitor, auditor or sponsor admin sees neither, since Execution answers them 403 (#4943, #4981). Recording consent waits until protocol versions are served over HTTP: the request needs the version's index.
Clinical Canvas (/studies/:studyCode)Trace, Impact, Act, Explain and study search (ADR-2540)kernelApi.trace, kernelApi.dependents, kernelApi.getCommands, kernelApi.searchTrace in the inspector lists the kernel's lineage walk back from the selected participant, edge by edge in plain words; Impact counts what depends on it by kind, expandable to objects, and says when the count is a lower bound. Objects the reader may not see stay in place as hidden, with their kind and reason, and are counted, so the numbers are the same for everyone (ADR-2471). Act in the inspector lists the kernel commands offered on the selected participant, each with the reader's dry-run decision and the kernel's reason; nothing is sent. Explain beside a command renders the kernel's explanation of that decision (claim, steps, every condition met or not, what would change it) as the kernel produced it (K-EXP-1). A refusal from the kernel host is shown as it is. Observations have no kernel NodeRef yet, so all four stay disabled on an observation. Each decision is the kernel authority evaluator's, from the reader's grants (ADR-2455). The ⌘K palette also lists studies found by kernel search (code or title, studies only, once typing pauses), each opening by its code; hidden studies are left out, and a failed search says so while opening by code still works.
Clinical Canvas (/studies/:studyCode)Protocol versions, simulation and amendment impact (ADR-2540)kernelApi.search, kernelApi.listProtocolVersions, kernelApi.getProtocolVersion, kernelApi.amendmentImpact, kernelApi.simulateProtocol versions in the design stage finds the study by its exact code with kernel search and lists its versions newest first (number, status, the version it amends, the amendment's intent); a version the reader may not see keeps its place as hidden, and the count says how many are hidden. Selecting a version puts its NodeRef in the URL and fills the inspector with its status, content hash, approval and withdrawal. Impact on an amendment is K-PROT-2 by element: the elements it adds, changes or removes, with the changed properties as JSON Pointers, then what depends on the version it amends; on a first version it is the plain dependents read. Trace works on a version as on a participant, and Simulate runs evaluate-only simulation and schedule matrix gap checks on the selected version.
Clinical Canvas (/studies/:studyCode)Study activity (PX-11, ADR-2485)kernelApi.search, kernelApi.activityRecent activity on study home lists what happened under the study, newest first, 25 at a time with Show older activity passing back the kernel's next cursor, and a family filter (Knowledge, Execution, Evidence, Trust, Quality, Intelligence). Each entry shows when, the event in plain words, its object and who did it; a protocol version opens in Protocol versions. An entry about something the reader may not see stays in place as hidden with the reason. A study the reader may not see is refused by the kernel, and the refusal is shown as it is. Entries appear a few seconds after the event (the kernel host's projector).
Help & SOPs drawer (all live screens)Contextual SOP lookup, search & ticket escalation (ADR-2641)knowledgeApi.resolveContextualHelp, knowledgeApi.listArticles, knowledgeApi.getArticle, knowledgeApi.listCategories, ticketsApi.createTicketLoads published, locked SOP guidance (SOP-STD-101, SOP-STD-102, SOP-ECRF-201, SOP-CTMS-302, SOP-SSU-205) across /studies, /studies/:studyCode, /ecrf (including initial mount), /ctms, and /ssu for all 6 staff personas via Hierarchical Specificity Scoring. Failed lookups or searches render an accessible role="alert" banner with #btn-contextual-help-retry instead of empty-state copy. Escalations post to POST /api/v1/tickets with X-Change-Reason, show a confirmation toast with the returned ticket reference ID (TKT-...), and retain simulated SIM-... tickets in sessionStorage during isolated demo builds.

Hidden screens ​

Screens with no .NET backend are hidden until their module serves the endpoints they need:

  • They are left out of primary navigation, the global ⌘K command palette, onboarding checklists/launchers and guided tours.
  • Guided tours stay opt-in on sign-in (isActive = false until started from Orientation or the command palette) and visit only live, role-authorized routes.
  • Opening a hidden route shows the "not available yet" page (/unavailable), which links to #4829 and always offers Open study workspace (/studies) alongside Go to an available screen (/).
  • / lands each role on /overview by default, or when bypassOverview is enabled on its primary live workflow screen (/ecrf, /ctms) and falls back to /studies when the role has no dedicated non-canvas screen (sponsor_designer, auditor).
  • The shell doesn't fetch notifications, because no .NET service serves them yet.

The list of available screens is AVAILABLE_SCREENS in apps/web/src/router/availability.js. The hidden screens' code stays in the repo as a reference for the UI, the way the Python services are the reference for the .NET port.

The missing endpoints are tracked by module, not one issue per Python path:

  • #4828: what the eCRF needs from Execution, Designer and Notifications (listing subjects, served and used by the eCRF, the visit schedule and form definitions, the user's notifications).
  • #4829: every hidden screen, with the module and kernel roadmap phase (docs/kernel/CLINICAL_KERNEL_SPECIFICATION.md §15) that will give it a backend. #4787 decides which scaffold service becomes which module.

Actions with no backend ​

Some regulated actions never called an API. They recorded the action in the browser and reported success in every build (#4827). They now start with allowUnbackedAction(...) (apps/web/src/utils/unbackedActions.js). Outside a demo build the action is refused with a "not available yet, nothing was saved" alert and no state changes; a demo build still runs it on sample data. The same change stopped the wallet, lay summary, tickets, data lock, quality and safety screens from showing sample data, or closing a dialog as if it worked, when their API call fails.

ActionWhere
Enrol a subjectstores/clinical.ts enrollSubject (eCRF, CRC form)
Submit the eCRF form (sample form until #4727)views/EcrfView.vue submitEcrf
Record re-consent from the eCRFcomposables/useConsentGating.js
Record SDVviews/EcrfView.vue saveChange
Raise, answer, close or reopen a query in the eCRFviews/EcrfView.vue (the close prompt's re-authentication verified nothing)
Move a query in the rules screenviews/RulesView.vue
Ticket status transitions, comments, attachments, signature, audit exportviews/TicketsView.vue, components/tickets/TicketSignModal.vue (TicketCreateModal.vue and ContextualHelpDrawer.vue now submit to ticketsApi.createTicket)
Verify the safety snapshot seal, physician sign-offcomponents/clinical/AggregateSafetyConsole.vue
CEC reader assessment, chair sign-offcomponents/clinical/CecAdjudicationConsole.vue
Consent signature, publish an ICF versionstores/econsent.js, views/ICFBuilderView.vue
Export study dataviews/ExportWizardView.vue
Commit a digitized protocolviews/ProtocolDigitizationView.vue
MedDRA/WHODrug code suggestionscomponents/crf/widgets/MedicalAutocodeWidget.vue (no suggestions; the verbatim term is still captured)
RCA, CAPA, breach, KRI, QTL and dossier actionsviews/QualityCockpitView.vue
Investigator grant financials (templates, fee grids, amendments, adjustments), CRA allocation, recruitment target updatesviews/CtmsView.vue (#4829)
Adaptive oncology dose escalation cohort transitions (BOIN / CRM / RAR)components/clinical/AdaptiveDoseEscalationConsole.vue (#4829)

When a screen moves onto the real API, replace its allowUnbackedAction calls with calls to the real endpoints.

Some actions produce an outcome only a service can compute, so not even a demo build can run them on sample data. They call refuseUnbackedAction(...), which refuses in every build:

  • subject screening (stores/clinical.ts screenSubject, from the eCRF);
  • the cross-domain anomaly scan and candidate query adjudication (views/RulesView.vue).

Their Python-era client (src/api/execution.ts) is deleted, together with the query ledger sync and lab alert calls, which no service serves and nothing displayed. Every Execution call now goes through executionApi.ts. Adding a participant is in the Clinical Canvas; the eCRF's enrolment form still enrols sample subjects only in a demo build.

Moving a screen onto the real API ​

  1. Make sure every endpoint the screen needs is in docs/openapi/*.json and routed by the gateway. If one is missing, add it to the module's issue rather than stubbing it or adding a mock fallback. Check that its request and response schemas are complete too. A type with a custom JSON converter (a value object or a status) comes out as an empty schema unless the service describes it; Execution does this in apps/execution/src/Infrastructure/OpenApi/ExecutionWireTypesOpenApiTransformer.cs, so its IDs and codes are strings and its statuses are string enums.
  2. Call it through the typed client generated from those specs, and delete the screen's Python-era client functions and their types. The types come from apps/web/scripts/generate-api-types.js: add the service to GENERATED_SERVICES and run pnpm --filter web generate:api, which writes apps/web/src/api/generated/<service>.ts. Put the calls in apps/web/src/api/<service>Api.ts (see executionApi.ts). When a checked-in file no longer matches its spec, the api-clients quality gate (run by pre-commit and pnpm cadence check) and tests/api/generated_types.test.js fail, so regenerate after pnpm cadence sync-openapi-spec changes a listed service's spec.
  3. Give the screen a view test in apps/web/tests/ that mounts it and covers its main flow against a mocked client. tests/available_screen_tests.test.js fails when a route in AVAILABLE_SCREENS has no test file that imports its view (#4529).
  4. Add the route name to AVAILABLE_SCREENS and update this page and #4829.