Skip to content

Test mode

Until your organization accepts the Business Associate Agreement (BAA), the API runs in test mode: you can analyze synthetic notes, and the results expire after 30 days.

Organization status

Every analysis response includes organization_status, which is one of the following:

StatusWhat it means for the API
pendingNo owner has accepted the BAA yet. Requests that analyze notes must send "test_data": true.
activeThe BAA is accepted. You can send patient notes, and test_data is ignored.
pausedThe organization is past its due date to sign an updated version of the BAA. Requests that analyze notes get 403 until an owner signs it.

An owner accepts the BAA in the app. There's no API endpoint for it.

Send test data

While the organization is pending, add "test_data": true to the body of POST /v1/analyses and POST /v1/batches. By sending it, you confirm that the notes are test data with no protected health information (PHI).

curl -s https://api.medchartscan.io/v1/analyses \
  --max-time 300 \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "document_text": "New patient with acute low back pain after lifting, no red flags. Exam: paraspinal tenderness, normal strength and reflexes. Plan: NSAIDs, activity as tolerated, return if worse.",
    "test_data": true
  }'

Without it, a pending organization gets 422, and nothing is analyzed or charged:

422 Unprocessable Entity
{"error": {"code": "test_data_required", "message": "This organization has not accepted the BAA yet: send test data only, with \"test_data\": true."}}
Caution:

"test_data": true is your statement that the note contains no PHI. Use synthetic notes, like the examples in these docs, until your organization's status is active.

Test results

A result created in test mode has "is_test": true and an expires_at time 30 days after it was created. After that time, the result and its note are deleted, and GET /v1/analyses/{id} returns 404. Batches created in test mode have "is_test": true, and their notes expire the same way.

Test analyses cost credits like any other analysis.

After the BAA is accepted

When an owner accepts the BAA, the organization becomes active:

  • New results have "is_test": false and "expires_at": null. They stay until you delete them.
  • The API ignores test_data, so you can leave it in your requests or remove it.
  • Results created in test mode keep their expiry time.

Paused organizations

When MedChartScan publishes a new version of the BAA, an organization that signed an earlier version has until a due date to sign the new one. Until then nothing changes for the API. From the due date on, the organization is paused: requests that analyze notes, create batches, or retry batch notes get 403 until an owner signs the updated BAA in the app:

403 Forbidden
{"error": {"code": "baa_resign_required", "message": "Processing is paused until an owner signs the updated Business Associate Agreement in Settings > BAA."}}

Notes that were still queued at the due date fail without charge; you can retry them after the BAA is signed.

You can still read, list, search, and delete results, and read the credit balance.

Test mode · MedChartScan E/M