Aller au contenu

← Tous les contrats

OHN-15 Consent Management and Ledger

Version
1.0.0
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-15/api/openapi.json
Serveurs
https://opeshealthnetwork.com/api/ohn/v1
Authentification
bearer: http bearer

Télécharger le contrat (JSON)

Les contrats sont rédigés en anglais.

Consent grant, revoke, renew, enforcement decision, reports. Default deny. Authentication: bearer token (OHN gateway token (ES256, audience ohn-15, claims role, jurisdiction, organization_id, purpose)). All POSTs require an Idempotency-Key header (8-128 characters).

Opérations

OHN-15

POST/consentsRequest a consent (W001 start)

Identifiant d’opération: requestConsent

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Created
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/patients/{id}/consentsList a patient's consents

Identifiant d’opération: listPatientConsents

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
statusquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Page of consents
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
GET/consents/worklistConsents awaiting action (steward)

Identifiant d’opération: consentWorklist

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
403Typed error
application/json: Error
GET/consents/{id}Consent detail with workflow history

Identifiant d’opération: consentDetail

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
404Typed error
application/json: Error
POST/consents/{id}/transitionsAdvance W001 (informed_choice, granted, denied)

Identifiant d’opération: transitionConsent

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
409Typed error
application/json: Error
422Typed error
application/json: Error
POST/consents/{id}/revokeRevoke (W002)

Identifiant d’opération: revokeConsent

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Revoked or scheduled; downstream delivery is reported as pending until the outbox relay confirms it
application/json: object
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
POST/consents/{id}/representative-reviewRepresentative approval (F003, steward only)

Identifiant d’opération: reviewRepresentative

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
403Typed error
application/json: Error
422Typed error
application/json: Error
503Typed error
application/json: Error
POST/consents/{id}/renewRenewal (F004)

Identifiant d’opération: renewConsent

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
409Typed error
application/json: Error
422Typed error
application/json: Error
POST/consents/decisionsEnforcement decision (service role only)

Identifiant d’opération: decideAccess

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200permit or deny; deny always carries error_code
application/json: object
403Typed error
application/json: Error
503Typed error
application/json: Error
POST/consents/maintenance/sweepApply expiry and scheduled revocation (W003)

Identifiant d’opération: sweepConsents

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Counts of expired, revoked, activated
application/json: object
POST/consents/maintenance/drain-outboxRelay pending events; with no bus configured reports pending only

Identifiant d’opération: drainConsentOutbox

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200delivered / pending counts
application/json: object
POST/consent-policyDraft a policy version (steward)

Identifiant d’opération: draftConsentPolicy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Draft created
application/json: object
422Typed error
application/json: Error
POST/consent-policy/{version}/activateActivate (dual control: not the drafter)

Identifiant d’opération: activateConsentPolicy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
versionpathintegeroui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Active
application/json: object
403Typed error
application/json: Error
409Typed error
application/json: Error
GET/consents/reports/{reportId}Run OHN-15-R001, R002 or R003

Identifiant d’opération: runConsentReport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
period_fromquerystringnon
period_toquerystringnon
purposequerystringnon
recipientquerystringnon
patient_scopequerystringnon
facilityquerystringnon
reasonquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Report
application/json: object
422Typed error
application/json: Error
POST/consents/reports/{reportId}/exportCreate a signed short-lived export (csv|pdf)

Identifiant d’opération: createConsentExport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201download_path valid for five minutes, owner only
application/json: object
GET/consents/exports/{token}Download; 410 when expired or when consent changed after creation

Identifiant d’opération: fetchConsentExport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200File
application/json: object
404Typed error
application/json: Error
410Typed error
application/json: Error

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsobjectnonfield -> code; never contains submitted values

Code

Controlled-vocabulary code from the active jurisdiction policy

string

ConsentGrantCommand

NomTypeObligatoireDescription
patient_idstring (uuid)oui
recipient_orgstring (uuid)oui
data_categoriesanyouiArray of codes (1-64, unique); a comma, semicolon or space separated string is also accepted and normalised
purposeCodeouiControlled-vocabulary code from the active jurisdiction policy
start_atstring (date-time)oui
expires_atstring (date-time)oui
legal_basisCodeouiControlled-vocabulary code from the active jurisdiction policy

TransitionCommand

NomTypeObligatoireDescription
expected_versionintegeroui
to_state"informed_choice" | "granted" | "denied"oui
evidence_refstring (uuid)non
reasonstringoui

RevocationCommand

NomTypeObligatoireDescription
consent_idstring (uuid)oui
revocation_scope"full" | "data_categories"oui
revoked_data_categoriesanynonArray of codes; required exactly when revocation_scope is data_categories; a separated string is also accepted
reasonstringoui
requested_bystring (uuid)ouiMust equal the authenticated principal
effective_atstring (date-time)oui
expected_versionintegeroui

RepresentativeReviewCommand

NomTypeObligatoireDescription
consent_idstring (uuid)oui
representative_refstring (uuid)oui
authority_evidencestring (uuid)oui
decision"approve" | "reject"oui
reasonstringoui
expected_versionintegeroui

RenewalCommand

NomTypeObligatoireDescription
consent_idstring (uuid)oui
new_expirystring (date-time)oui
scope_changesstringnon
patient_confirmationstring (uuid)oui
expected_versionintegeroui

DecisionCommand

NomTypeObligatoireDescription
patient_idstring (uuid)oui
recipient_orgstring (uuid)oui
resource_classCodeouiControlled-vocabulary code from the active jurisdiction policy
purposeCodeouiControlled-vocabulary code from the active jurisdiction policy
facility_idstring (uuid)oui
channel"online" | "cache_revalidation" | "async_export"non
cached_decision_epochintegernon

DecisionResult

NomTypeObligatoireDescription
decision"permit" | "deny"oui
error_codenull | "no_consent" | "scope_mismatch" | "consent_revoked" | "consent_expired" | "consent_not_yet_effective" | "consent_pending" | "consent_denied"non
consent_idstring | nullnon
decision_epochintegeroui
stale_cache_rejectedbooleannon
cacheDecisionResult.cacheoui

PolicyDraftCommand

NomTypeObligatoireDescription
configobjectouiSee schema PolicyConfig; validated server-side (codes, no duplicates, strict keys).
reasonstringoui

ConsentView

NomTypeObligatoireDescription
idstring (uuid)oui
status"requested" | "identity_authorized" | "informed_choice" | "granted" | "effective" | "denied" | "revocation_requested" | "revoked" | "expired"ouiComputed from time, so expiry and revocation apply even before a sweep runs
stored_statusstringnon
versionintegeroui
patient_idstringnon
recipient_orgstringnon
data_categoriesarray of stringnon
purposestringnon
legal_basisstringnon
start_atstringnon
expires_atstringnon
receiptobjectnon

ConsentPage

NomTypeObligatoireDescription
itemsarray of ConsentViewnon
next_cursorstring | nullnon
epochintegernon

Report

NomTypeObligatoireDescription
report_idstringoui
columnsarray of stringoui
rowsarray of objectoui
summaryobjectnon
next_cursorstring | nullnon
state"rendered" | "no_authorized_data"oui
suppressionReport.suppressionnon

PolicyConfig

NomTypeObligatoireDescription
purposesarray of Codeoui
legal_basesarray of PolicyConfig.legal_bases.itemoui
data_categoriesarray of Codeoui
max_consent_duration_daysinteger | nullouinull is an explicit jurisdiction decision that no maximum applies
min_aggregate_cell_sizeintegeroui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersobjectnonSame filters as the report (period_from, period_to, purpose, recipient, patient_scope, facility, reason); strict

ActivateCommand

NomTypeObligatoireDescription
reasonstringoui

DecisionResult.cache défini sur place

NomTypeObligatoireDescription
ttl_secondsintegernon
valid_untilstring | nullnon

Report.suppression défini sur place

NomTypeObligatoireDescription
min_cell_sizeinteger | nullnon
appliedbooleannon

PolicyConfig.legal_bases.item défini sur place

NomTypeObligatoireDescription
codeCodeouiControlled-vocabulary code from the active jurisdiction policy
requires_affirmative_consentbooleanoui