MediScan Public API
Public-facing GraphQL API for MediScan AI.
Getting Started
Base URL
Production: https://the-api.mediscan.ai/api
All API requests should be made to the GraphQL endpoint using POST method.
Quick Start Guide
-
Generate an API Key - Only administrators can create API keys. In your MediScan AI account, click the top-left dropdown menu and navigate to API Management to generate a new API key
-
Make Your First Request - Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY -
Create a Case - Create a case, queue a DOCX export using the existing preset-selection behavior, and receive signed URLs for file upload. To choose a specific preset, see Preset-Aware Exports below:
const response = await fetch('https://the-api.mediscan.ai/api', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: ` mutation CreateCase($fileNames: [String!]!) { createCase(fileNames: $fileNames, exportConfigs: [{ exportType: docx }]) { caseId signedUrl exportId } } `, variables: { fileNames: ['medical-record.pdf', 'lab-results.pdf'] } }) }); const { data } = await response.json(); console.log('Case created:', data.createCase.caseId); console.log('Signed URLs:', data.createCase.signedUrl); -
Upload Files - Upload your files to the signed URLs (one URL per file):
// Get the file to upload const file = document.getElementById('fileInput').files[0]; // Use the signed URL from createCase response const signedUrl = data.createCase.signedUrl[0]; const uploadResponse = await fetch(signedUrl, { method: 'PUT', body: file, headers: { 'Content-Type': file.type || 'application/octet-stream' } }); if (uploadResponse.ok) { console.log('File uploaded successfully'); }Important: Use the signed URL exactly as provided - do not add any additional headers or authentication.
-
Check Processing Status - Monitor case processing progress:
const response = await fetch('https://the-api.mediscan.ai/api', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: ` query GetCaseStatus($caseId: String!) { getCaseStatus(caseId: $caseId) { status filesCount processedCount } } `, variables: { caseId: data.createCase.caseId } }) });
const { data } = await response.json(); console.log(`Status: ${data.getCaseStatus.status}`); console.log(`Processed: ${data.getCaseStatus.processedCount}/${data.getCaseStatus.filesCount}`);
6. **Get Case Details** - Retrieve full case information including exports:
```javascript
const response = await fetch('https://the-api.mediscan.ai/api', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: `
query GetCase($caseId: String!) {
getCase(caseId: $caseId) {
id
patientName
created
exports {
exportId
status
}
}
}
`,
variables: { caseId: data.createCase.caseId }
})
});
const { data } = await response.json();
console.log(\`Patient: ${data.getCase.patientName}\`);
console.log(\`Exports: ${data.getCase.exports.length}\`);
- Get Export by ID - Retrieve a specific export with download URLs:
const response = await fetch('https://the-api.mediscan.ai/api', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: ` query GetExport($exportId: String!) { getExport(exportId: $exportId) { id files { signedUrl filename mimeType } } } `, variables: { exportId: data.createCase.exportId } }) });
const { data } = await response.json(); data.getExport.files.forEach(file => { console.log(`${file.filename}: ${file.signedUrl}`); });
8. **Get Case with Exports** - Retrieve full case details with all exports:
```javascript
const response = await fetch('https://the-api.mediscan.ai/api', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: `
query GetCase($caseId: String!) {
getCase(caseId: $caseId) {
id
patientName
exports {
exportId
status
files {
signedUrl
filename
}
}
}
}
`,
variables: { caseId: data.createCase.caseId }
})
});
const { data } = await response.json();
data.getCase.exports.forEach(exp => {
console.log(\`Export ${exp.exportId} (${exp.status}):\`);
exp.files.forEach(file => console.log(\` ${file.filename}\`));
});
- Update Cases (Optional) - Add new files or modify case properties:
const response = await fetch('https://the-api.mediscan.ai/api', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: ` mutation UpdateCase($caseId: String!, $fileNames: [String!]) { updateCase(caseId: $caseId, fileNames: $fileNames) { caseId signedUrl success message } } `, variables: { caseId: 'your-case-id', fileNames: ['additional-document.pdf'] } }) }); const { data } = await response.json(); console.log('Case updated:', data.updateCase.success); console.log('New signed URLs:', data.updateCase.signedUrl);
Note: The examples above show basic usage with commonly used fields. Many more fields and options are available for each query and mutation. Please refer to the full API schema documentation below for complete details on all available fields, types, and configurations.
Preset-Aware Exports
Query getPresets with the same API key used for your case and export requests. It takes no team ID argument: results belong to the API key's team and exclude case-local presets.
query GetPresets {
getPresets {
id
title
usedBy {
id
name
email
}
}
}
usedBy lists users who selected that preset as their default for this team, not users who previously exported with it. It is empty when no team users have selected it.
Create a case and export with a selected preset
- Choose an
idfromgetPresets. - Call
createCasewithoutexportConfigs, upload PDFs using the returned signed URLs, and wait for processing to complete. OmittingexportConfigsavoids creating an additional automatic export. - Call
createExportwith the case ID and selected preset ID:
mutation CreateExport($caseId: String!, $presetId: String!) {
createExport(
caseId: $caseId
config: { exportType: docx, presetOverride: $presetId }
) {
exportId
status
}
}
Example GraphQL variables:
{ "caseId": "your-case-id", "presetId": "id-returned-by-getPresets" }
- Poll
getExport(exportId: ...)using theexportIdreturned bycreateExport. While pending, it reports no downloadable files in the GraphQLerrorsarray. Once ready, download each file from itssignedUrl. This ID is the public request ID, not an internal export-record ID.
Selection rules and other export entry points
presetOverrideis optional increateExport.configand in each item ofcreateCase.exportConfigsorupdateCase.exportConfigs. Existing requests do not need to change or callgetPresets.- With
createCase.exportConfigs, exports are queued and the returnedexportIdidentifies the batch.updateCasedoes not return an export ID; use a separatecreateExportcall when you need an ID to poll. When adding files, finish uploading and processing them before requesting an export separately. - Omit
presetOverrideor passnullto preserve the previous selection: use the case's preset for the API user when present, otherwise that user's default preset. Existing AccidentMate preset assignment and selection are unchanged when no override is supplied. - Default lookup and export ownership currently use the API user's current team. Keep it aligned with the API key's team; an explicit override does not change export ownership.
- The override applies only to the requested export; it does not change user defaults or case presets. Preset settings are saved when the export is requested.
- Explicit
groupingandsortingoverride the preset's corresponding settings. Without them, the selected preset supplies those settings when available. - Missing, foreign-team, and case-local override IDs are rejected before quota consumption or case changes. Check the GraphQL
errorsarray; production may mask the detailed validation message.
Error Handling
The API uses standard GraphQL error responses. All errors are returned in the errors array of the response.
Common Error Codes
| Code | Status | Description |
|---|---|---|
UNAUTHENTICATED |
401 | Invalid or missing API key |
FORBIDDEN |
403 | Insufficient permissions to access resource |
BAD_USER_INPUT |
400 | Invalid input parameters |
NOT_FOUND |
404 | Requested resource not found |
INTERNAL_SERVER_ERROR |
500 | Server error occurred |
RATE_LIMIT_EXCEEDED |
429 | Too many requests |
Rate Limiting
To ensure fair usage and system stability, API requests are rate limited.
Limits:
- 100 requests per minute per API key
- 1,000 requests per hour per API key
When rate limited, you'll receive a 429 Too Many Requests error. Wait until the reset time before making additional requests.
Best Practices:
- Implement exponential backoff for retries
- Cache responses when appropriate
- Batch operations when possible
API Endpoints
https://the-api.mediscan.ai/api
Version
1.0.0
Queries
getCase
Description
Get a specific case with its exports
Example
Query
query getCase($caseId: String!) {
getCase(caseId: $caseId) {
id
patientName
status
created
modified
createdBy
teamId
injuryBodyParts
injuryDescription
dateOfInjury
insurance
employer
occupation
dob
claimNumber
adjNumber
customDemographics
customColumns
assignees
guestAccess
exports {
...CaseExportFragment
}
sourceFiles {
...SourceFileFragment
}
}
}
Variables
{"caseId": "xyz789"}
Response
{
"data": {
"getCase": {
"id": "xyz789",
"patientName": "abc123",
"status": "IN_PROGRESS",
"created": "abc123",
"modified": "xyz789",
"createdBy": "xyz789",
"teamId": "abc123",
"injuryBodyParts": ["xyz789"],
"injuryDescription": ["abc123"],
"dateOfInjury": ["xyz789"],
"insurance": ["abc123"],
"employer": ["xyz789"],
"occupation": ["abc123"],
"dob": ["abc123"],
"claimNumber": ["abc123"],
"adjNumber": ["xyz789"],
"customDemographics": RecordTypeMap,
"customColumns": RecordTypeMap,
"assignees": ["xyz789"],
"guestAccess": ["xyz789"],
"exports": [CaseExport],
"sourceFiles": [SourceFile]
}
}
}
getCaseStatus
Description
Get the current status of a case
Response
Returns a CaseStatusOutput!
Arguments
| Name | Description |
|---|---|
caseId - String!
|
Case ID to check status for |
Example
Query
query getCaseStatus($caseId: String!) {
getCaseStatus(caseId: $caseId) {
caseId
status
message
filesCount
processedCount
createdAt
updatedAt
}
}
Variables
{"caseId": "xyz789"}
Response
{
"data": {
"getCaseStatus": {
"caseId": "xyz789",
"status": "IN_PROGRESS",
"message": "abc123",
"filesCount": 987,
"processedCount": 123,
"createdAt": "abc123",
"updatedAt": "xyz789"
}
}
}
getCases
Description
Get all cases in your team
Response
Returns [Case!]!
Example
Query
query getCases {
getCases {
id
patientName
status
created
modified
createdBy
teamId
injuryBodyParts
injuryDescription
dateOfInjury
insurance
employer
occupation
dob
claimNumber
adjNumber
customDemographics
customColumns
assignees
guestAccess
exports {
...CaseExportFragment
}
sourceFiles {
...SourceFileFragment
}
}
}
Response
{
"data": {
"getCases": [
{
"id": "abc123",
"patientName": "abc123",
"status": "IN_PROGRESS",
"created": "xyz789",
"modified": "abc123",
"createdBy": "abc123",
"teamId": "xyz789",
"injuryBodyParts": ["abc123"],
"injuryDescription": ["abc123"],
"dateOfInjury": ["xyz789"],
"insurance": ["xyz789"],
"employer": ["abc123"],
"occupation": ["abc123"],
"dob": ["xyz789"],
"claimNumber": ["abc123"],
"adjNumber": ["abc123"],
"customDemographics": RecordTypeMap,
"customColumns": RecordTypeMap,
"assignees": ["abc123"],
"guestAccess": ["xyz789"],
"exports": [CaseExport],
"sourceFiles": [SourceFile]
}
]
}
}
getExport
Description
Get export details including download URLs for export files
Response
Returns an ExportOutput!
Arguments
| Name | Description |
|---|---|
exportId - String!
|
Export ID (requestId) to retrieve |
Example
Query
query getExport($exportId: String!) {
getExport(exportId: $exportId) {
id
files {
...ExportFileFragment
}
createdTime
exportConfig {
...ExportConfigFragment
}
}
}
Variables
{"exportId": "xyz789"}
Response
{
"data": {
"getExport": {
"id": "abc123",
"files": [ExportFile],
"createdTime": "xyz789",
"exportConfig": ExportConfig
}
}
}
getPresets
Description
Get non-local presets belonging to the API key's team and the users who have each preset selected as their default for that team. usedBy is not export history. Use a returned preset ID as ExportConfigInput.presetOverride.
Response
Returns [Preset!]!
Example
Query
query getPresets {
getPresets {
id
title
usedBy {
...PresetUserFragment
}
}
}
Response
{
"data": {
"getPresets": [
{
"id": "abc123",
"title": "abc123",
"usedBy": [PresetUser]
}
]
}
}
getUsers
Description
Get all users in your team
Response
Returns [User!]!
Example
Query
query getUsers {
getUsers {
id
name
email
role
}
}
Response
{
"data": {
"getUsers": [
{
"id": "xyz789",
"name": "xyz789",
"email": "xyz789",
"role": "xyz789"
}
]
}
}
Mutations
createCase
Description
Create a new medical record case and get signed URLs to upload files. Upload your files to the returned URLs using PUT requests.
Response
Returns a CreateCaseOutput!
Arguments
| Name | Description |
|---|---|
fileNames - [String!]!
|
List of PDF filenames to upload. Each filename must be in the format 'name.pdf'. Only PDF files are supported. Example: ['medical-record.pdf', 'lab-results.pdf'] |
exportConfigs - [ExportConfigInput!]
|
Pre-configure exports, optionally selecting a team preset with presetOverride |
demographics - DemographicsInput
|
Case demographics |
assignees - [String!]
|
Assign team members to this case |
guestAccess - [String!]
|
Grant guest access to specific users |
customKey - String
|
Custom key to identify the API source (e.g., 'accidentMate') |
Example
Query
mutation createCase(
$fileNames: [String!]!,
$exportConfigs: [ExportConfigInput!],
$demographics: DemographicsInput,
$assignees: [String!],
$guestAccess: [String!],
$customKey: String
) {
createCase(
fileNames: $fileNames,
exportConfigs: $exportConfigs,
demographics: $demographics,
assignees: $assignees,
guestAccess: $guestAccess,
customKey: $customKey
) {
caseId
signedUrl
exportId
sourceFiles {
...SourceFileFragment
}
}
}
Variables
{
"fileNames": ["xyz789"],
"exportConfigs": [ExportConfigInput],
"demographics": DemographicsInput,
"assignees": ["abc123"],
"guestAccess": ["abc123"],
"customKey": "abc123"
}
Response
{
"data": {
"createCase": {
"caseId": "abc123",
"signedUrl": ["abc123"],
"exportId": "xyz789",
"sourceFiles": [SourceFile]
}
}
}
createExport
Description
Create a new export with an optional team preset and filtering, grouping, and sorting options. Use this to generate custom reports from processed records.
Response
Returns a CreateExportOutput!
Arguments
| Name | Description |
|---|---|
caseId - String!
|
Case ID to export |
config - ExportConfigInput!
|
Export configuration (format, presetOverride, filters, grouping, sorting) |
Example
Query
mutation createExport(
$caseId: String!,
$config: ExportConfigInput!
) {
createExport(
caseId: $caseId,
config: $config
) {
exportId
status
}
}
Variables
{
"caseId": "abc123",
"config": ExportConfigInput
}
Response
{
"data": {
"createExport": {
"exportId": "abc123",
"status": "xyz789"
}
}
}
updateCase
Description
Update an existing case with new files and/or modify case properties. Returns signed URLs for any new files to upload.
Adding new files sets the case status to IN_PROGRESS while the files are being processed. Once processing completes, the status transitions to COMPLETE.
Response
Returns an UpdateCaseOutput!
Arguments
| Name | Description |
|---|---|
caseId - String!
|
Existing case ID to update |
fileNames - [String!]
|
List of new PDF filenames to add. Each filename must be in the format 'name.pdf'. Only PDF files are supported. Example: ['additional-document.pdf'] Adding files sets the case status to IN_PROGRESS until processing completes, then COMPLETE. |
exportConfigs - [ExportConfigInput!]
|
Request exports, optionally selecting a team preset with presetOverride |
demographics - DemographicsInput
|
Update case demographics |
customColumns - RecordTypeMap
|
Update custom columns as Map<String, String> |
assignees - [String!]
|
Update team member assignments |
guestAccess - [String!]
|
Update guest access list |
Example
Query
mutation updateCase(
$caseId: String!,
$fileNames: [String!],
$exportConfigs: [ExportConfigInput!],
$demographics: DemographicsInput,
$customColumns: RecordTypeMap,
$assignees: [String!],
$guestAccess: [String!]
) {
updateCase(
caseId: $caseId,
fileNames: $fileNames,
exportConfigs: $exportConfigs,
demographics: $demographics,
customColumns: $customColumns,
assignees: $assignees,
guestAccess: $guestAccess
) {
caseId
signedUrl
success
message
sourceFiles {
...SourceFileFragment
}
}
}
Variables
{
"caseId": "xyz789",
"fileNames": ["xyz789"],
"exportConfigs": [ExportConfigInput],
"demographics": DemographicsInput,
"customColumns": RecordTypeMap,
"assignees": ["xyz789"],
"guestAccess": ["abc123"]
}
Response
{
"data": {
"updateCase": {
"caseId": "abc123",
"signedUrl": ["xyz789"],
"success": true,
"message": "xyz789",
"sourceFiles": [SourceFile]
}
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
true
Case
Description
Case information
Fields
| Field Name | Description |
|---|---|
id - String!
|
Case identifier |
patientName - String
|
Patient name |
status - CaseStatus
|
Processing status of the case |
created - String
|
ISO 8601 timestamp when the case was created |
modified - String
|
ISO 8601 timestamp when the case was last modified |
createdBy - String!
|
User who created the case |
teamId - String!
|
Team ID |
injuryBodyParts - [String!]
|
Injured body parts |
injuryDescription - [String!]
|
Description of injury |
dateOfInjury - [String!]
|
Date of injury |
insurance - [String!]
|
Insurance provider |
employer - [String!]
|
Employer name |
occupation - [String!]
|
Patient occupation |
dob - [String!]
|
Date of birth |
claimNumber - [String!]
|
Claim number |
adjNumber - [String!]
|
Adjuster number |
customDemographics - RecordTypeMap
|
Custom demographic fields |
customColumns - RecordTypeMap
|
Custom columns |
assignees - [String!]
|
Assignees |
guestAccess - [String!]
|
Guest access list |
exports - [CaseExport!]
|
List of exports for this case |
sourceFiles - [SourceFile!]
|
List of source files uploaded to this case |
Example
{
"id": "abc123",
"patientName": "abc123",
"status": "IN_PROGRESS",
"created": "abc123",
"modified": "abc123",
"createdBy": "xyz789",
"teamId": "xyz789",
"injuryBodyParts": ["abc123"],
"injuryDescription": ["abc123"],
"dateOfInjury": ["xyz789"],
"insurance": ["xyz789"],
"employer": ["abc123"],
"occupation": ["abc123"],
"dob": ["xyz789"],
"claimNumber": ["abc123"],
"adjNumber": ["xyz789"],
"customDemographics": RecordTypeMap,
"customColumns": RecordTypeMap,
"assignees": ["abc123"],
"guestAccess": ["abc123"],
"exports": [CaseExport],
"sourceFiles": [SourceFile]
}
CaseExport
Description
Export information for a case
Fields
| Field Name | Description |
|---|---|
exportId - String!
|
Export identifier |
status - String!
|
Export status |
files - [ExportFile!]!
|
List of downloadable files for this export |
createdAt - String!
|
ISO 8601 timestamp when export was created |
exportConfig - ExportConfig!
|
Export configuration used for this export |
Example
{
"exportId": "xyz789",
"status": "xyz789",
"files": [ExportFile],
"createdAt": "abc123",
"exportConfig": ExportConfig
}
CaseStatus
Description
Case processing status
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"IN_PROGRESS"
CaseStatusOutput
Description
Case status output
Fields
| Field Name | Description |
|---|---|
caseId - String!
|
Case identifier |
status - CaseStatus!
|
Current status of the case |
message - String
|
Detailed message about the current status |
filesCount - Int
|
Number of files uploaded |
processedCount - Int
|
Number of files processed |
createdAt - String!
|
ISO 8601 timestamp when the case was created |
updatedAt - String!
|
ISO 8601 timestamp when the case was last updated |
Example
{
"caseId": "abc123",
"status": "IN_PROGRESS",
"message": "abc123",
"filesCount": 123,
"processedCount": 123,
"createdAt": "abc123",
"updatedAt": "xyz789"
}
CreateCaseOutput
Fields
| Field Name | Description |
|---|---|
caseId - String!
|
|
signedUrl - [String!]!
|
|
exportId - String
|
|
sourceFiles - [SourceFile!]
|
Example
{
"caseId": "abc123",
"signedUrl": ["xyz789"],
"exportId": "abc123",
"sourceFiles": [SourceFile]
}
CreateExportOutput
DemographicsInput
Fields
| Input Field | Description |
|---|---|
patientName - String
|
Patient name (sets the primary patient name for the case) |
injuryBodyParts - [String!]
|
Injured body parts |
injuryDescription - [String!]
|
Description of injury |
dateOfInjury - [String!]
|
Date of injury |
insurance - [String!]
|
Insurance provider |
employer - [String!]
|
Employer name |
occupation - [String!]
|
Patient occupation |
dob - [String!]
|
Date of birth |
claimNumber - [String!]
|
Claim number |
adjNumber - [String!]
|
Adjuster number |
customDemographics - RecordTypeMap
|
Custom demographic fields (key-value pairs) |
accidentMateCustomInfo - RecordTypeMap
|
AccidentMate custom fields (e.g., accidentMatePatientId) |
Example
{
"patientName": "xyz789",
"injuryBodyParts": ["abc123"],
"injuryDescription": ["abc123"],
"dateOfInjury": ["abc123"],
"insurance": ["xyz789"],
"employer": ["abc123"],
"occupation": ["abc123"],
"dob": ["xyz789"],
"claimNumber": ["xyz789"],
"adjNumber": ["abc123"],
"customDemographics": RecordTypeMap,
"accidentMateCustomInfo": RecordTypeMap
}
DuplicatePage
Description
Information about a duplicate page
Example
{
"pageNumber": 123,
"fromFileId": "xyz789",
"fromPageNumber": 987
}
ExportConfig
Description
Export configuration details
Fields
| Field Name | Description |
|---|---|
exportType - ExportType!
|
|
filter - FilterCriteria
|
|
grouping - GroupCriteria
|
|
sorting - SortCriteria
|
|
appendCharts - Boolean
|
If true, append extracted charts to the export |
appendMediStamps - Boolean
|
If true, append MediStamps to PDF exports (PDF exports only) |
includeDeclarationAttestation - Boolean
|
If true, include Declaration & Attestation in export |
summaryPageNumberOrientation - PageNumberOrientation
|
Summary page number orientation configuration (PDF exports only) |
appendedSourcePageNumberOrientation - PageNumberOrientation
|
Appended source files page number orientation configuration (PDF exports only) |
Example
{
"exportType": "docx",
"filter": FilterCriteria,
"grouping": GroupCriteria,
"sorting": SortCriteria,
"appendCharts": true,
"appendMediStamps": true,
"includeDeclarationAttestation": true,
"summaryPageNumberOrientation": PageNumberOrientation,
"appendedSourcePageNumberOrientation": PageNumberOrientation
}
ExportConfigInput
Fields
| Input Field | Description |
|---|---|
exportType - ExportType!
|
Export format type |
presetOverride - String
|
Non-local preset ID returned by getPresets for the API key's team. Applies to this export only; does not change user defaults or case presets. Omit or pass null to preserve existing behavior: use the case's preset for the API user when present, otherwise that user's default for their current team. Existing AccidentMate preset assignment and selection are unchanged when omitted. Explicit grouping and sorting take precedence over the selected preset. |
arrangeByRecordOrder - Boolean
|
If true, arrange export by record order |
appendCharts - Boolean
|
If true, append extracted charts to the export |
appendMediStamps - Boolean
|
If true, append MediStamps to PDF exports (PDF exports only) |
includeDeclarationAttestation - Boolean
|
If true, include Declaration & Attestation in export |
summaryPageNumberOrientation - PageNumberOrientationInput
|
Summary page number orientation configuration (PDF exports only) |
appendedSourcePageNumberOrientation - PageNumberOrientationInput
|
Appended source files page number orientation configuration (PDF exports only) |
filter - FilterCriteriaInput
|
Filter criteria for the export. If not provided, all records are included. |
grouping - GroupCriteriaInput
|
Group criteria for the export. Overrides preset grouping when provided; otherwise uses preset grouping if available. |
sorting - SortCriteriaInput
|
Sort criteria for the export. Overrides preset sorting when provided; otherwise uses preset sorting or the default chronological order. |
Example
{
"exportType": "docx",
"presetOverride": "abc123",
"arrangeByRecordOrder": true,
"appendCharts": true,
"appendMediStamps": true,
"includeDeclarationAttestation": true,
"summaryPageNumberOrientation": PageNumberOrientationInput,
"appendedSourcePageNumberOrientation": PageNumberOrientationInput,
"filter": FilterCriteriaInput,
"grouping": GroupCriteriaInput,
"sorting": SortCriteriaInput
}
ExportFile
Description
Downloadable export file
Fields
| Field Name | Description |
|---|---|
signedUrl - String!
|
Signed URL to download the file |
filename - String!
|
Filename for download |
mimeType - String!
|
MIME type of the file |
fileType - FileType!
|
Type of file - matches export type for main files, or 'dupes_only' for duplicates-only file (only present for pdf_without_dupes exports) |
createdAt - String!
|
ISO 8601 timestamp when the export file was created |
Example
{
"signedUrl": "xyz789",
"filename": "abc123",
"mimeType": "abc123",
"fileType": "docx",
"createdAt": "xyz789"
}
ExportOutput
Description
Export output with files and configuration
Fields
| Field Name | Description |
|---|---|
id - String!
|
Unique export identifier |
files - [ExportFile!]!
|
List of downloadable export files |
createdTime - String!
|
ISO 8601 timestamp when export was created |
exportConfig - ExportConfig!
|
Export configuration used for this export |
Example
{
"id": "xyz789",
"files": [ExportFile],
"createdTime": "xyz789",
"exportConfig": ExportConfig
}
ExportType
Description
Export format type
Values
| Enum Value | Description |
|---|---|
|
|
Word document |
|
|
Word document with hyperlinks to source pages |
|
|
PDF excluding duplicate pages |
|
|
PDF including all pages |
|
|
PDF excluding duplicate pages, blank pages, and manually excluded pages |
Example
"docx"
FileType
Description
File type for export files
Values
| Enum Value | Description |
|---|---|
|
|
Word document |
|
|
Word document with hyperlinks to source pages |
|
|
PDF excluding duplicate pages |
|
|
PDF including all pages |
|
|
PDF excluding duplicate pages, blank pages, and manually excluded pages |
|
|
Duplicates-only PDF file (only present for pdf_without_dupes exports) |
|
|
Excluded pages-only PDF file (only present for pdf_without_excluded exports) |
Example
"docx"
FilterCriteria
Fields
| Field Name | Description |
|---|---|
tableOfContentsOnly - Boolean
|
|
showHiddenSummaries - Boolean
|
|
includeRecordTypes - RecordTypeMap
|
|
includeAuthors - [String!]
|
|
includeFacilities - [String!]
|
|
includeSpecialties - [String!]
|
|
fileDateFilter - [UtcDateRange!]
|
Restrict export to summaries whose source file upload falls in these UTC ranges (ISO8601 start/end per range) |
selectedFlaggedTypes - [String!]
|
Flagged record filter, e.g. illegible, duplicate-pages, or all |
selectedExcludedTypes - [String!]
|
Which excluded-record categories to include, e.g. duplicate, excluded-by-user, all |
Example
{
"tableOfContentsOnly": false,
"showHiddenSummaries": false,
"includeRecordTypes": RecordTypeMap,
"includeAuthors": ["abc123"],
"includeFacilities": ["xyz789"],
"includeSpecialties": ["abc123"],
"fileDateFilter": [UtcDateRange],
"selectedFlaggedTypes": ["abc123"],
"selectedExcludedTypes": ["xyz789"]
}
FilterCriteriaInput
Fields
| Input Field | Description |
|---|---|
tableOfContentsOnly - Boolean
|
If true, only include table of contents in export |
showHiddenSummaries - Boolean
|
If true, include hidden summaries in export |
includeRecordTypes - RecordTypeMap
|
Filter by record types. Map of record type groups to specific fields. Record type groups: 'COMPREHENSIVE', 'GENERAL', 'DIAGNOSTIC', 'OPERATIVES', 'DEPOSITION', 'LABS', 'NON_MEDICAL' Available fields by record type:
Example: { "COMPREHENSIVE": ["diagnoses", "treatmentHistory"], "DIAGNOSTIC": ["findings"] } |
includeAuthors - [String!]
|
Filter by author names. Values vary depending on the medical records in the case. Example: ['Dr. Smith', 'Dr. Johnson'] |
includeFacilities - [String!]
|
Filter by facility names. Values vary depending on the medical records in the case. Example: ['General Hospital', 'City Medical Center'] |
includeSpecialties - [String!]
|
Filter by medical specialties. Values vary depending on the medical records in the case. Example: ['Orthopaedics', 'Internal Medicine', 'Psychiatry'] |
fileDateFilter - [UtcDateRangeInput!]
|
Restrict export to summaries whose source file upload falls in these UTC ranges |
selectedFlaggedTypes - [String!]
|
|
selectedExcludedTypes - [String!]
|
Example
{
"tableOfContentsOnly": false,
"showHiddenSummaries": false,
"includeRecordTypes": RecordTypeMap,
"includeAuthors": ["xyz789"],
"includeFacilities": ["xyz789"],
"includeSpecialties": ["xyz789"],
"fileDateFilter": [UtcDateRangeInput],
"selectedFlaggedTypes": ["xyz789"],
"selectedExcludedTypes": ["abc123"]
}
GroupCriteria
Example
{
"author": true,
"recordTypeGroup": false,
"facilityName": false,
"specialty": true,
"fileUploadDate": false,
"includeGroupSummary": false
}
GroupCriteriaInput
Example
{
"author": false,
"recordTypeGroup": false,
"facilityName": true,
"specialty": true,
"fileUploadDate": true,
"includeGroupSummary": true
}
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
PageNumberFormat
Values
| Enum Value | Description |
|---|---|
|
|
Arabic numerals (1, 2, 3, ...) |
|
|
Roman numerals (I, II, III, ...) |
Example
"arabic"
PageNumberLocation
Values
| Enum Value | Description |
|---|---|
|
|
Top left corner |
|
|
Top right corner |
|
|
Bottom left corner |
|
|
Bottom right corner |
Example
"top_left"
PageNumberOrientation
Description
Page number orientation configuration
Fields
| Field Name | Description |
|---|---|
location - PageNumberLocation
|
Location of page numbers on the page |
prefix - String
|
Prefix text before page number, e.g., 'Page ' |
color - String
|
Color of page numbers - hex color code, e.g., '#000000' |
format - PageNumberFormat
|
Format of numerals |
numberOfDigits - Int
|
Number of digits for padding, e.g., 6 for '000001' |
Example
{
"location": "top_left",
"prefix": "abc123",
"color": "abc123",
"format": "arabic",
"numberOfDigits": 123
}
PageNumberOrientationInput
Description
Page number orientation input configuration
Fields
| Input Field | Description |
|---|---|
location - PageNumberLocation
|
Location of page numbers on the page |
prefix - String
|
Prefix text before page number, e.g., 'Page ' |
color - String
|
Color of page numbers - hex color code, e.g., '#000000' |
format - PageNumberFormat
|
Format of numerals |
numberOfDigits - Int
|
Number of digits for padding, e.g., 6 for '000001' |
Example
{
"location": "top_left",
"prefix": "abc123",
"color": "xyz789",
"format": "arabic",
"numberOfDigits": 987
}
Preset
Description
A team preset available for public API exports
Fields
| Field Name | Description |
|---|---|
id - String!
|
Preset identifier; pass this as ExportConfigInput.presetOverride |
title - String!
|
Human-readable preset name |
usedBy - [PresetUser!]!
|
Users with this preset selected as their default for this team; not export history |
Example
{
"id": "xyz789",
"title": "abc123",
"usedBy": [PresetUser]
}
PresetUser
RecordTypeMap
Description
Maps record type categories to an array of specific record types. Example: { "Lab Results": ["Blood Work", "Urinalysis"], "Imaging": ["X-Ray", "MRI"] }
Example
RecordTypeMap
SortCriteria
SortCriteriaInput
Fields
| Input Field | Description |
|---|---|
primary - SortFieldInput
|
|
secondary - SortFieldInput
|
|
tertiary - SortFieldInput
|
Example
{
"primary": SortFieldInput,
"secondary": SortFieldInput,
"tertiary": SortFieldInput
}
SortField
SortFieldInput
SourceFile
Description
Source file metadata
Fields
| Field Name | Description |
|---|---|
id - String!
|
File identifier |
filename - String!
|
Original filename |
filetype - String!
|
File MIME type |
pageCount - Int
|
Number of pages in the file |
duplicatePages - [DuplicatePage!]
|
Pages identified as duplicates of other pages |
createdAt - String
|
ISO 8601 timestamp when the file was uploaded |
modifiedAt - String
|
ISO 8601 timestamp when the file was last modified |
Example
{
"id": "abc123",
"filename": "xyz789",
"filetype": "abc123",
"pageCount": 987,
"duplicatePages": [DuplicatePage],
"createdAt": "abc123",
"modifiedAt": "xyz789"
}
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"
UpdateCaseOutput
Fields
| Field Name | Description |
|---|---|
caseId - String!
|
|
signedUrl - [String!]
|
|
success - Boolean!
|
|
message - String
|
|
sourceFiles - [SourceFile!]
|
Example
{
"caseId": "abc123",
"signedUrl": ["abc123"],
"success": false,
"message": "xyz789",
"sourceFiles": [SourceFile]
}