Medsenger.AI API
Records by originating contract (0.1.107)
# Existing calls keep returning the patient's history across contracts.
history = api.get_records(contract_id=123, category_name="pulse")
# Only records created under contract 123; historical NULL records are excluded.
records = api.get_records(contract_id=123, category_name="pulse", record_contract_id=123)
count = api.get_records(contract_id=123, category_name="pulse", record_contract_id=123, return_count=True)
categories = api.get_available_categories(contract_id=123, record_contract_id=123)
answers = api.get_multiple_records([
dict(contract_id=123, category_name="pulse", record_contract_id=123),
dict(contract_id=123, category_name="weight", record_contract_id=123),
])
# For agents with global patient access:
records = api.get_records(user_id=456, record_contract_id=123)
contract_id continues to select the patient's access context. The optional
record_contract_id filters records by their originating contract and works with
both REST and gRPC, including REST fallback, grouped reads, counts, and batch queries.
The selected contract must belong to the same patient and be accessible to the agent.
Omitting the filter (or passing None) preserves the previous behavior.
Returned records include contract_id as an integer or None. Older records and
user-level Health imports have no originating contract. Existing add_record and
add_records calls already send the contract; the updated server persists it for
every new record, including batched writes. No changes to writer agents are needed.
Deploy the database migration and all REST/gRPC servers before enabling the filter in clients. Old servers silently ignore the new field. Old clients continue to work with the new servers; updating the SDK is only necessary to use the new filter or receive the new field through gRPC. The new parameters are appended to existing signatures and existing positional arguments remain valid.
Compliance events
event = api.create_compliance_event(
contract_id=contract_id,
external_id="forms-action-request:42",
code="form_7",
)
api.complete_compliance_event(
contract_id,
event_id=event["event"]["id"],
)
# An event can also be addressed by the agent's stable external identifier.
api.cancel_compliance_event(
contract_id,
external_id="forms-action-request:42",
)
history = api.get_compliance_events(
"2026-08-01",
"2026-08-17",
user_id=user_id,
limit=100,
)
Exactly one of event_id or external_id is required when completing or
cancelling an event. History queries similarly require exactly one of
contract_id or user_id.
Metadata
Release files for medsenger-api 0.1.107
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medsenger_api-0.1.107.tar.gz | 24.6 kB | Without provenance | Details for medsenger_api-0.1.107.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medsenger_api-0.1.107-py3-none-any.whl | Python 3 | none | any | Details for medsenger_api-0.1.107-py3-none-any.whl |
Total release size: 44.4 kB
Release files / medsenger_api-0.1.107.tar.gz
| Download URL | medsenger_api-0.1.107.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1badc901e0eb1b3fe42d3de4bf44f66e219724986b9d7133c20fa3fc47cf4f0f
|
|
BLAKE2b-256 checksum How to use checksums |
0a913a62a1025856bfe8efe83edacdbd19459c67b58116374adeb32534bd44ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / medsenger_api-0.1.107-py3-none-any.whl
| Download URL | medsenger_api-0.1.107-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2394b9afd163642de74a1450ad402da5be418e21b033091989742d8cc06853fb
|
|
BLAKE2b-256 checksum How to use checksums |
ce4be0c3b86871df1bfca64f9d236e7a7afb809ecebd89d9753a7502a3871b03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Security for medsenger-api 0.1.107
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.