Metadata-Version: 2.4
Name: medsenger_api
Version: 0.1.105
Summary: Python SDK for Medsenger.AI
Home-page: https://github.com/roctbb/medsenger_api
Author: Rostislav Borodin
Author-email: borodin@medsenger.ru
License: BSD 2-clause
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: python-magic
Requires-Dist: grpcio
Requires-Dist: grpcio-tools
Requires-Dist: sentry-sdk
Requires-Dist: PyJWT
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# Medsenger.AI API

## Compliance events

```python
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`.
