#
Read registration identity and correction history
GET
/api/v1/patients/{id}/identity
Access
OAuth 2.0 access tokenclinical.read
Parameters
| Name |
In |
Type |
Details |
id
required
|
path |
string (uuid) |
|
Responses
-
200
Success
application/json
-
Fields PatientIdentity · 21
| Field |
Type |
Details |
can_edit
required
|
boolean |
|
history
required
|
array of object |
items ≤ 100
|
actor_id
|
string (uuid) or null |
|
actor_label
|
string or null |
|
created_at
|
string (date-time) |
|
reason
|
string |
|
snapshot
|
PatientIdentitySnapshot |
|
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
id
required
|
string (uuid) |
|
mrn
required
|
string |
Stable system-assigned or preserved imported identifier. Read-only during identity corrections.
length 1–64
|
version
|
integer |
|
history_truncated
required
|
boolean |
|
patient
required
|
PatientIdentitySnapshot |
|
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
id
required
|
string (uuid) |
|
mrn
required
|
string |
Stable system-assigned or preserved imported identifier. Read-only during identity corrections.
length 1–64
|
version
required
|
integer |
value ≥ 1
|
Example response placeholder values
{
"can_edit": true,
"history": [
{
"actor_id": "00000000-0000-4000-8000-000000000000",
"actor_label": "string",
"created_at": "2026-01-15T15:30:00Z",
"reason": "string",
"snapshot": {
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"mrn": "string"
},
"version": 1
}
],
"history_truncated": true,
"patient": {
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"mrn": "string"
},
"version": 1
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl "$EHR_URL/api/v1/patients/{id}/identity" -H "Authorization: Bearer $ACCESS_TOKEN"
#
Correct registration identity with attributed history
PUT
/api/v1/patients/{id}/identity
Correct registered names and birth date with current If-Match and attributed history. Omit mrn; an unchanged legacy echo is accepted but changing an MRN is rejected.
Access
OAuth 2.0 access tokenclinical.write
Parameters
| Name |
In |
Type |
Details |
id
required
|
path |
string (uuid) |
|
If-Match
required
|
header |
string |
|
Request body
application/json · required
Fields PatientIdentityChange · 5
| Field |
Type |
Details |
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
reason
required
|
string |
length 1–1000
|
mrn
|
string |
Optional compatibility echo of the exact existing MRN. Any different value is rejected; omit this field for identity corrections.
length 1–64
|
Example request body placeholder values
{
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"reason": "string",
"mrn": "string"
}
Responses
-
200
Success
application/json
-
Fields PatientIdentity · 21
| Field |
Type |
Details |
can_edit
required
|
boolean |
|
history
required
|
array of object |
items ≤ 100
|
actor_id
|
string (uuid) or null |
|
actor_label
|
string or null |
|
created_at
|
string (date-time) |
|
reason
|
string |
|
snapshot
|
PatientIdentitySnapshot |
|
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
id
required
|
string (uuid) |
|
mrn
required
|
string |
Stable system-assigned or preserved imported identifier. Read-only during identity corrections.
length 1–64
|
version
|
integer |
|
history_truncated
required
|
boolean |
|
patient
required
|
PatientIdentitySnapshot |
|
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
id
required
|
string (uuid) |
|
mrn
required
|
string |
Stable system-assigned or preserved imported identifier. Read-only during identity corrections.
length 1–64
|
version
required
|
integer |
value ≥ 1
|
Example response placeholder values
{
"can_edit": true,
"history": [
{
"actor_id": "00000000-0000-4000-8000-000000000000",
"actor_label": "string",
"created_at": "2026-01-15T15:30:00Z",
"reason": "string",
"snapshot": {
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"mrn": "string"
},
"version": 1
}
],
"history_truncated": true,
"patient": {
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"mrn": "string"
},
"version": 1
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
428
Current quoted version required
-
500
Atomic operation failed
Example call
curl -X PUT "$EHR_URL/api/v1/patients/{id}/identity" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json
#
Read immutable registration identity revisions
GET
/api/v1/patients/{id}/identity/revisions
Access
OAuth 2.0 access tokenclinical.read
Parameters
| Name |
In |
Type |
Details |
id
required
|
path |
string (uuid) |
|
Responses
-
200
Success
application/json
-
Fields object · 13
| Field |
Type |
Details |
items
required
|
array of object |
items ≤ 100
|
actor_id
|
string (uuid) or null |
|
actor_label
|
string or null |
|
created_at
|
string (date-time) |
|
reason
|
string |
|
snapshot
|
PatientIdentitySnapshot |
|
birth_date
required
|
string (date) |
|
family_name
required
|
string |
length 1–100
|
given_name
required
|
string |
length 1–100
|
id
required
|
string (uuid) |
|
mrn
required
|
string |
Stable system-assigned or preserved imported identifier. Read-only during identity corrections.
length 1–64
|
version
|
integer |
|
truncated
required
|
boolean |
|
Example response placeholder values
{
"items": [
{
"actor_id": "00000000-0000-4000-8000-000000000000",
"actor_label": "string",
"created_at": "2026-01-15T15:30:00Z",
"reason": "string",
"snapshot": {
"birth_date": "2026-01-15",
"family_name": "string",
"given_name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"mrn": "string"
},
"version": 1
}
],
"truncated": true
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl "$EHR_URL/api/v1/patients/{id}/identity/revisions" -H "Authorization: Bearer $ACCESS_TOKEN"
#
Read referral delivery status/history
GET
/api/v1/patients/{patient}/referrals/{id}/deliveries
Access
OAuth 2.0 access tokenclinical.read
Parameters
| Name |
In |
Type |
Details |
patient
required
|
path |
string (uuid) |
|
id
required
|
path |
string (uuid) |
|
Responses
-
200
Success
application/json
-
Fields object · 17
| Field |
Type |
Details |
items
required
|
array of ReferralDeliveryJob |
|
created_at
required
|
string (date-time) |
|
destination_id
required
|
string (uuid) |
|
destination_name
required
|
string |
|
destination_version
required
|
integer |
|
endpoint
required
|
string |
|
id
required
|
string (uuid) |
|
manifest
required
|
object |
|
outcome_reason
required
|
string |
|
patient_id
required
|
string (uuid) |
|
receipt
required
|
string or null |
|
referral_id
required
|
string (uuid) |
|
referral_version
required
|
integer |
|
status
required
|
string |
one of queued, sending, sent, uncertain, not_sent, cancelled
|
updated_at
required
|
string (date-time) |
|
version
required
|
integer |
|
truncated
required
|
boolean |
|
Example response placeholder values
{
"items": [
{
"created_at": "2026-01-15T15:30:00Z",
"destination_id": "00000000-0000-4000-8000-000000000000",
"destination_name": "string",
"destination_version": 1,
"endpoint": "string",
"id": "00000000-0000-4000-8000-000000000000",
"manifest": {},
"outcome_reason": "string",
"patient_id": "00000000-0000-4000-8000-000000000000",
"receipt": "string",
"referral_id": "00000000-0000-4000-8000-000000000000",
"referral_version": 1,
"status": "queued",
"updated_at": "2026-01-15T15:30:00Z",
"version": 1
}
],
"truncated": true
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl "$EHR_URL/api/v1/patients/{patient}/referrals/{id}/deliveries" -H "Authorization: Bearer $ACCESS_TOKEN"
#
Queue an explicitly reviewed referral delivery
POST
/api/v1/patients/{patient}/referrals/{id}/delivery
RequestUUID idempotent against identical review and reason. Locks exactreferral/destination versions and activeunchangeddocuments. Worker sends immutablepayload via receivinggateway with Idempotency-Key; acceptance requires verifiedreceiverreceipt. Clinicalacceptance is separate. Queued/sending/uncertain jobs reserve referral againstmanualedits.
Access
OAuth 2.0 access tokenclinical.write
Parameters
| Name |
In |
Type |
Details |
patient
required
|
path |
string (uuid) |
|
id
required
|
path |
string (uuid) |
|
If-Match
required
|
header |
string |
|
Request body
application/json · required
Fields ReferralDeliveryQueue · 5
| Field |
Type |
Details |
destination_id
required
|
string (uuid) |
|
destination_version
required
|
integer |
value ≥ 1
|
reason
required
|
string |
length 1–1000
|
request_id
required
|
string (uuid) |
|
review_digest
required
|
string |
|
Example request body placeholder values
{
"destination_id": "00000000-0000-4000-8000-000000000000",
"destination_version": 1,
"reason": "string",
"request_id": "00000000-0000-4000-8000-000000000000",
"review_digest": "string"
}
Responses
-
200
Success
application/json
-
Fields ReferralDeliveryJob · 15
| Field |
Type |
Details |
created_at
required
|
string (date-time) |
|
destination_id
required
|
string (uuid) |
|
destination_name
required
|
string |
|
destination_version
required
|
integer |
|
endpoint
required
|
string |
|
id
required
|
string (uuid) |
|
manifest
required
|
object |
|
outcome_reason
required
|
string |
|
patient_id
required
|
string (uuid) |
|
receipt
required
|
string or null |
|
referral_id
required
|
string (uuid) |
|
referral_version
required
|
integer |
|
status
required
|
string |
one of queued, sending, sent, uncertain, not_sent, cancelled
|
updated_at
required
|
string (date-time) |
|
version
required
|
integer |
|
Example response placeholder values
{
"created_at": "2026-01-15T15:30:00Z",
"destination_id": "00000000-0000-4000-8000-000000000000",
"destination_name": "string",
"destination_version": 1,
"endpoint": "string",
"id": "00000000-0000-4000-8000-000000000000",
"manifest": {},
"outcome_reason": "string",
"patient_id": "00000000-0000-4000-8000-000000000000",
"receipt": "string",
"referral_id": "00000000-0000-4000-8000-000000000000",
"referral_version": 1,
"status": "queued",
"updated_at": "2026-01-15T15:30:00Z",
"version": 1
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
428
Current quoted version required
-
500
Atomic operation failed
Example call
curl -X POST "$EHR_URL/api/v1/patients/{patient}/referrals/{id}/delivery" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json
#
Review the exact referral package and destination
POST
/api/v1/patients/{patient}/referrals/{id}/delivery/preview
Readyreferrals only. Validates documentversions, includes filemetadata/hash/bytescount inmanifest but no filebytes inpreview. Reviewexpiresafter10minutes; no networksend.
Access
OAuth 2.0 access tokenclinical.write
Parameters
| Name |
In |
Type |
Details |
patient
required
|
path |
string (uuid) |
|
id
required
|
path |
string (uuid) |
|
Request body
application/json · required
Fields object · 1
| Field |
Type |
Details |
destination_id
required
|
string (uuid) |
|
Example request body placeholder values
{
"destination_id": "00000000-0000-4000-8000-000000000000"
}
Responses
-
200
Success
application/json
-
Body: object
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl -X POST "$EHR_URL/api/v1/patients/{patient}/referrals/{id}/delivery/preview" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json
#
Read configured referral receiving destinations
GET
/api/v1/referral-delivery/destinations
Access
OAuth 2.0 access tokenclinical.read
Responses
-
200
Success
application/json
-
Fields object · 8
| Field |
Type |
Details |
items
required
|
array of ReferralDestination |
items ≤ 100
|
credential_configured
required
|
boolean |
|
enabled
required
|
boolean |
|
endpoint
required
|
string |
|
id
required
|
string (uuid) |
|
loopback_test
required
|
boolean |
|
name
required
|
string |
|
version
required
|
integer |
|
Example response placeholder values
{
"items": [
{
"credential_configured": true,
"enabled": true,
"endpoint": "string",
"id": "00000000-0000-4000-8000-000000000000",
"loopback_test": true,
"name": "string",
"version": 1
}
]
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl "$EHR_URL/api/v1/referral-delivery/destinations" -H "Authorization: Bearer $ACCESS_TOKEN"
#
Read delivery status and audit events
GET
/api/v1/referral-delivery/jobs/{id}
Access
OAuth 2.0 access tokenclinical.read
Parameters
| Name |
In |
Type |
Details |
id
required
|
path |
string (uuid) |
|
Responses
-
200
Success
application/json
-
Body: object
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
500
Atomic operation failed
Example call
curl "$EHR_URL/api/v1/referral-delivery/jobs/{id}" -H "Authorization: Bearer $ACCESS_TOKEN"
#
Cancel queued delivery or reconcile uncertain transport
POST
/api/v1/referral-delivery/jobs/{id}/actions
Clinician/owner only. No blindretry. Reconciliation requires explicit boundedreceiverreceipt/evidence; sent retains clinicalacceptance unrecorded. If-Match checks job version.
Access
OAuth 2.0 access tokenclinical.write
Parameters
| Name |
In |
Type |
Details |
id
required
|
path |
string (uuid) |
|
If-Match
required
|
header |
string |
|
Request body
application/json · required
Fields ReferralDeliveryAction · 3
| Field |
Type |
Details |
action
required
|
string |
one of cancel, reconcile_sent, reconcile_not_sent
|
reason
required
|
string |
length 1–1000
|
receipt
|
string |
default length ≤ 200
|
Example request body placeholder values
{
"action": "cancel",
"reason": "string",
"receipt": ""
}
Responses
-
200
Success
application/json
-
Fields ReferralDeliveryJob · 15
| Field |
Type |
Details |
created_at
required
|
string (date-time) |
|
destination_id
required
|
string (uuid) |
|
destination_name
required
|
string |
|
destination_version
required
|
integer |
|
endpoint
required
|
string |
|
id
required
|
string (uuid) |
|
manifest
required
|
object |
|
outcome_reason
required
|
string |
|
patient_id
required
|
string (uuid) |
|
receipt
required
|
string or null |
|
referral_id
required
|
string (uuid) |
|
referral_version
required
|
integer |
|
status
required
|
string |
one of queued, sending, sent, uncertain, not_sent, cancelled
|
updated_at
required
|
string (date-time) |
|
version
required
|
integer |
|
Example response placeholder values
{
"created_at": "2026-01-15T15:30:00Z",
"destination_id": "00000000-0000-4000-8000-000000000000",
"destination_name": "string",
"destination_version": 1,
"endpoint": "string",
"id": "00000000-0000-4000-8000-000000000000",
"manifest": {},
"outcome_reason": "string",
"patient_id": "00000000-0000-4000-8000-000000000000",
"receipt": "string",
"referral_id": "00000000-0000-4000-8000-000000000000",
"referral_version": 1,
"status": "queued",
"updated_at": "2026-01-15T15:30:00Z",
"version": 1
}
-
400
Invalid input
-
401
Authentication required
-
403
Role or scope denied
-
404
Record not found in tenant
-
409
Stale version or invalid state
-
428
Current quoted version required
-
500
Atomic operation failed
Example call
curl -X POST "$EHR_URL/api/v1/referral-delivery/jobs/{id}/actions" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json
No endpoint matches that filter.