← All contracts
OHN-57 Research, Insurance Analytics and Workforce Statistics
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-57/api/openapi.yaml- Servers
https://opeshealthnetwork.com
- Authentication
bearer: http bearer (JWT)
Download the contract (YAML)
Contracts are written in English.
Module key `research`. Every route except `GET /health/ohn-57` needs a gateway-issued Bearer token (ES256, issuer `ohn-platform-gateway`, audience `ohn-57`; subject, `jurisdiction` and `organization_id` are UUIDs) whose role uses its
purpose of use (researcher/research, dac_member/research_governance, research_admin/research_administration,
treating_clinician/treatment, insurer_analyst/insurance_analytics, fraud_reviewer/fraud_review,
employer_analyst/workforce_statistics). Default deny: unknown route 404 (after authentication), role not listed 403 (audited), role used with another purpose 403. Every disclosure threshold (k, minimum cell, minimum group, maximum suppression) is configuration (`/config`, deployment defaults); nothing in the contract fixes one. Every write needs an
`Idempotency-Key` header. Synthetic data only.
Operations
Other operations
GET/health/ohn-57Public liveness: status, module, dependencies (OHN-15, OHN-24, OHN-51: live or unconfigured), keys (pseudonym_key, link_key, export_signing_key: configured or not), writes_enabled, auth_configured, synthetic_auth (always false in Java), data (synthetic_only, or governed_release_only in production)
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
503 | Database unavailable | — |
GET/api/ohn/v1/research/contextRole
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
GET/api/ohn/v1/research/configDisclosure configuration
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | |
PUT/api/ohn/v1/research/configUpdate disclosure configuration (research_admin)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Saved | — |
409 | Error | |
422 | Error | |
GET/api/ohn/v1/research/studiesStudies (own organisation; committee sees all)
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/studiesRegister a study with ethics evidence (researcher)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Registered | — |
409 | Error | |
422 | Invalid or ethics not current | — |
GET/api/ohn/v1/research/studies/{id}Study detail with requests
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
404 | Error | |
POST/api/ohn/v1/research/studies/{id}/stateSuspend, reinstate or close (dac_member, research_admin)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Changed | — |
409 | Error | |
POST/api/ohn/v1/research/studies/{id}/access-requestsAsk the data access committee (researcher)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Submitted | — |
409 | Study not active or ethics not current | — |
GET/api/ohn/v1/research/access-requestsAccess requests with votes
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | "submitted" | "approved" | "rejected" | "withdrawn" | no | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
POST/api/ohn/v1/research/access-requests/{id}/withdrawWithdraw a waiting request (researcher)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Withdrawn | — |
409 | Error | |
POST/api/ohn/v1/research/access-requests/{id}/decisionsCommittee vote (dac_member). N distinct approvals approve; one rejection rejects; requester cannot vote.
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Recorded | — |
403 | Conflict of interest | — |
409 | Already decided or not waiting | — |
GET/api/ohn/v1/research/studies/{id}/workspace/queriesQuery log (append-only)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/studies/{id}/workspace/queriesAggregate-only workspace query over approved variables; logged
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Suppressed aggregates | |
403 | Not approved or variable not approved | — |
POST/api/ohn/v1/research/cohort-countsSuppressed feasibility count (researcher); logged
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Count | |
GET/api/ohn/v1/research/trialsTrials
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/trialsConfigure a trial (researcher, study registered with current approval)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Draft created | — |
GET/api/ohn/v1/research/trials/{id}Trial with suppressed outcome counts
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
POST/api/ohn/v1/research/trials/{id}/statedraft -> recruiting -> closed (researcher)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Changed | — |
409 | Error | |
GET/api/ohn/v1/research/trials/{id}/eligibilityEligibility counts only (suppressed)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
POST/api/ohn/v1/research/trials/{id}/contact-requestsRoute contact requests to treating clinicians for patients with OHN-15 research_contact permit (researcher)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Suppressed counts | |
409 | Trial not recruiting | — |
503 | OHN-15 unavailable; nothing stored | — |
GET/api/ohn/v1/research/contact-requestsThe treating clinician's own contact requests (only place a patient is named)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | "awaiting_clinician" | "contacted" | "patient_interested" | "patient_declined" | "not_appropriate" | "consent_withdrawn" | no | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
POST/api/ohn/v1/research/contact-requests/{id}/outcomeRecord contact outcome (treating_clinician); consent rechecked before 'contacted'
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Recorded | — |
409 | invalid_transition | — |
503 | OHN-15 unavailable | — |
GET/api/ohn/v1/research/fraud/rulesInsurer fraud rules
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
PUT/api/ohn/v1/research/fraud/rulesCreate or update one rule (insurer_analyst)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Saved | — |
409 | Error | |
422 | Error | |
GET/api/ohn/v1/research/fraud/scansRecent scans
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/fraud/scansScan the insurer's OHN-51 claims with enabled rules (insurer_analyst). Never changes a claim.
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Scan result | — |
409 | No rules configured | — |
503 | OHN-51 unavailable | — |
GET/api/ohn/v1/research/fraud/flagsReviewer queue
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | "open" | "under_review" | "cleared" | "referred_for_investigation" | no | |
rule_type | query | "duplicate_claim" | "impossible_volume" | "outlier_provider" | no | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
GET/api/ohn/v1/research/fraud/flags/{id}Flag with history
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/fraud/flags/{id}/transitionReview a flag (fraud_reviewer)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Changed | — |
409 | Error | |
GET/api/ohn/v1/research/insights/population-riskAnonymous aggregates of the insurer's own members (insurer_analyst)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
dimension | query | "age_band" | "sex" | "region" | no | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
GET/api/ohn/v1/research/insights/workforceAnonymous workforce statistics for the employer's own workforce (employer_analyst)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
dimension | query | "age_band" | "sex" | "region" | no | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
POST/api/ohn/v1/research/mart/subjectsIngest synthetic subject records (research_admin)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Upserted | — |
POST/api/ohn/v1/research/admin/synthetic-loadGenerate synthetic subjects (research_admin, non-production only)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Loaded | — |
404 | Not available in production or unless ohn.m57.synthetic-load-enabled is true | — |
GET/api/ohn/v1/research/mart/summaryData mart counts (dac_member
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
GET/api/ohn/v1/research/auditAudit records (research_admin
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | — |
POST/api/ohn/v1/research/admin/outbox/relayRelay pending events to OHN-24 (research_admin)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Relay result | — |
Schemas
Error
| Name | Type | Required | Description |
|---|
type | string | no | |
title | string | no | |
status | integer | no | |
detail | string | no | |
error | string | yes | |
message | string | no | |
trace_id | string | no | |
setting | string | no | |
dependency | string | no | |
current_version | integer | no | |
k_required | integer | no | |
receipt_id | string (uuid) | no | |
details | any | no | For a 422: the first failing check per top-level field as a zod issue code (invalid_type, too_small, too_big, invalid_string, invalid_enum_value, invalid_literal); unknown keys under _ as unrecognized_keys. |
Receipt
| Name | Type | Required | Description |
|---|
receipt_id | string (uuid) | no | |
committed_at | string (date-time) | no | |
aggregate_id | string | null | no | |
aggregate_type | string | no | |
status | "committed" | "denied" | "refused" | no | |
Published
| Name | Type | Required | Description |
|---|
count | integer | null | yes | |
suppressed | boolean | yes | |
below | integer | no | |
Cell
| Name | Type | Required | Description |
|---|
key | object | yes | |
count | integer | null | yes | |
suppressed | boolean | yes | |
Criteria
| Name | Type | Required | Description |
|---|
sex | "female" | "male" | "other" | "unknown" | no | |
age_min | integer | no | |
age_max | integer | no | |
regions | array of string | no | |
conditions_any | array of string | no | |
conditions_all | array of string | no | |
conditions_none | array of string | no | |
SubjectRecord
| Name | Type | Required | Description |
|---|
patient_id | string (uuid) | yes | |
birth_year | integer | yes | |
sex | "female" | "male" | "other" | "unknown" | yes | |
region | string | yes | |
conditions | array of string | yes | |
treating_clinician_id | string | null (uuid) | yes | |
treating_org_id | string | null (uuid) | yes | |
employer_org_id | string | null (uuid) | yes | |
insurer_org_id | string | null (uuid) | yes | |
Config
Disclosure thresholds of the jurisdiction. Until an administrator configures them (version 0, source default) the deployment defaults apply; if a default is not configured the answer is 503 not_configured and nothing is disclosed.
| Name | Type | Required | Description |
|---|
k_anonymity | integer | yes | |
min_cell | integer | yes | |
insurer_min_cell | integer | yes | |
employer_min_group | integer | yes | |
max_suppression_pct | integer | yes | |
version | integer | no | |
source | "configured" | "default" | no | |
Study
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
title | string | no | |
summary | string | no | |
state | "registered" | "suspended" | "closed" | no | |
ethics_committee | string | no | |
ethics_reference | string | no | |
ethics_approved_on | string (date) | no | |
ethics_expires_on | string (date) | no | |
ethics_evidence_ref | string | no | |
ethics_evidence_sha256 | string | no | |
ethics_current | boolean | no | |
version | integer | no | |
AccessRequest
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
study_id | string (uuid) | no | |
kind | "extract" | "workspace" | no | |
variables | array of "age_band" | "sex" | "region" | "conditions" | no | |
justification | string | no | |
state | "submitted" | "approved" | "rejected" | "withdrawn" | no | |
approvals | integer | no | |
approvals_required | integer | no | |
Trial
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
study_id | string (uuid) | no | |
title | string | no | |
registry_ref | string | null | no | |
criteria | Criteria | no | |
state | "draft" | "recruiting" | "closed" | no | |
version | integer | no | |
FraudFlag
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
rule_type | "duplicate_claim" | "impossible_volume" | "outlier_provider" | no | |
claim_id | string | null (uuid) | no | |
claim_number | string | null | no | |
provider_org_id | string (uuid) | no | |
summary | string | no | |
evidence | object | no | |
score | number | no | |
state | "open" | "under_review" | "cleared" | "referred_for_investigation" | no | |
version | integer | no | |
Aggregates
| Name | Type | Required | Description |
|---|
group_too_small | boolean | no | |
dimension | "age_band" | "sex" | "region" | no | |
members | Published | no | |
employees | Published | no | |
groups | array of Cell | no | |
conditions | array of Cell | no | |
cells | array of Cell | no | |
min_cell | integer | no | |
min_group | integer | no | |
put-api-ohn-v1-research-config.request defined inline
| Name | Type | Required | Description |
|---|
k_anonymity | integer | yes | |
min_cell | integer | yes | |
insurer_min_cell | integer | yes | |
employer_min_group | integer | yes | |
max_suppression_pct | integer | yes | |
version | integer | no | |
source | "configured" | "default" | no | |
expected_version | integer | yes | |
post-api-ohn-v1-research-studies.request defined inline
post-api-ohn-v1-research-studies.request.ethics defined inline
| Name | Type | Required | Description |
|---|
committee | string | yes | |
reference | string | yes | |
approved_on | string (date) | yes | |
expires_on | string (date) | yes | |
evidence_ref | string | yes | |
evidence_sha256 | string | yes | |
post-api-ohn-v1-research-studies-id-state.request defined inline
| Name | Type | Required | Description |
|---|
state | "registered" | "suspended" | "closed" | yes | |
reason | string | yes | |
expected_version | integer | yes | |
post-api-ohn-v1-research-studies-id-access-requests.request defined inline
| Name | Type | Required | Description |
|---|
kind | "extract" | "workspace" | yes | |
variables | array of "age_band" | "sex" | "region" | "conditions" | yes | |
justification | string | yes | |
get-api-ohn-v1-research-access-requests.response-200 defined inline
post-api-ohn-v1-research-access-requests-id-decisions.request defined inline
| Name | Type | Required | Description |
|---|
decision | "approve" | "reject" | yes | |
reason | string | yes | |
post-api-ohn-v1-research-studies-id-workspace-queries.request defined inline
| Name | Type | Required | Description |
|---|
request_id | string (uuid) | yes | |
criteria | Criteria | no | |
dimensions | array of "age_band" | "sex" | "region" | "condition" | no | |
post-api-ohn-v1-research-studies-id-workspace-queries.response-200 defined inline
| Name | Type | Required | Description |
|---|
total | Published | no | |
cells | array of Cell | no | |
min_cell | integer | no | |
post-api-ohn-v1-research-cohort-counts.request defined inline
| Name | Type | Required | Description |
|---|
criteria | Criteria | no | |
post-api-ohn-v1-research-trials.request defined inline
| Name | Type | Required | Description |
|---|
study_id | string (uuid) | yes | |
title | string | yes | |
registry_ref | string | no | |
criteria | Criteria | yes | |
post-api-ohn-v1-research-trials-id-state.request defined inline
| Name | Type | Required | Description |
|---|
state | "recruiting" | "closed" | yes | |
expected_version | integer | yes | |
get-api-ohn-v1-research-trials-id-eligibility.response-200 defined inline
post-api-ohn-v1-research-trials-id-contact-requests.response-200 defined inline
post-api-ohn-v1-research-contact-requests-id-outcome.request defined inline
| Name | Type | Required | Description |
|---|
outcome | "contacted" | "patient_interested" | "patient_declined" | "not_appropriate" | yes | |
note | string | no | |
expected_version | integer | yes | |
get-api-ohn-v1-research-fraud-flags.response-200 defined inline
| Name | Type | Required | Description |
|---|
items | array of FraudFlag | no | |
note | string | no | |
post-api-ohn-v1-research-fraud-flags-id-transition.request defined inline
| Name | Type | Required | Description |
|---|
to | "under_review" | "cleared" | "referred_for_investigation" | yes | |
note | string | yes | |
expected_version | integer | yes | |
post-api-ohn-v1-research-mart-subjects.request defined inline
| Name | Type | Required | Description |
|---|
source | string | yes | |
synthetic | true | yes | |
records | array of SubjectRecord | yes | |
post-api-ohn-v1-research-admin-synthetic-load.request defined inline
post-api-ohn-v1-research-admin-synthetic-load.request.treating.item defined inline
| Name | Type | Required | Description |
|---|
clinician_id | string (uuid) | yes | |
org_id | string (uuid) | yes | |
FraudRule.params.option-1 defined inline
| Name | Type | Required | Description |
|---|
window_days | integer | yes | |
FraudRule.params.option-2 defined inline
| Name | Type | Required | Description |
|---|
max_units_per_provider_day | integer | yes | |
service_codes | array of string | no | |
FraudRule.params.option-3 defined inline
| Name | Type | Required | Description |
|---|
z_threshold | number | yes | |
min_providers | integer | yes | |
min_claims_per_provider | integer | yes | |