Circle V2 API Docs
Preparing search index...
@repo/trpc
client
useTRPCClient
Variable useTRPCClient
useTRPCClient
:
()
=>
TRPCClient
<
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
auditRuns
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createResponseTrail
:
MutationProcedure
<
{
input
:
(...)
|
(...)
;
meta
:
object
;
output
:
{
audit_response_id
:
...
;
comment
:
...
;
created_at
:
...
;
created_by
:
...
;
id
:
...
;
marked_as
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditRun
:
...
;
hasPendingResponses
:
...
;
lastSync
:
...
;
responses
:
...
;
score
:
...
;
statusCounts
:
...
;
templateQuestionCount
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
excludeAuditRunIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
resultStatus
?:
...
;
search
?:
...
;
sortOrder
?:
...
;
templateIds
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRecentForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
;
treatmentEpisodeId
?:
...
;
type
?:
...
}
;
meta
:
object
;
output
:
ListRecentPatientReviewRunsServiceResult
;
}
,
>
;
}
,
>
,
>
;
auditTemplates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
name
:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditTemplate
:
...
;
questions
:
...
;
triggers
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
id
:
...
;
name
?:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chartReview
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
run
:
MutationProcedure
<
{
input
:
{
auditSource
?:
...
;
patientId
:
...
;
sessionId
?:
...
;
templateIds
:
...
;
treatmentEpisodeId
?:
...
;
trigger
?:
...
;
triggeredAt
?:
...
;
}
;
meta
:
object
;
output
:
{
auditRunIds
:
...
}
;
}
,
>
;
syncAndRun
:
MutationProcedure
<
{
input
:
{
episodeId
?:
...
;
patientId
:
...
;
templateIds
:
...
}
;
meta
:
object
;
output
:
SyncAndRunOutput
;
}
,
>
;
}
,
>
,
>
;
chartReviewTriggers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
triggerType
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
triggerId
:
...
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
id
:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chat
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
sendMessage
:
MutationProcedure
<
{
input
:
{
messages
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
RunCaseReviewChatResult
;
}
,
>
;
}
,
>
,
>
;
contacts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
contactTypeId
?:
...
;
fieldValues
?:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
contact_type_id
:
...
;
contact_type_name
:
...
;
created_at
:
...
;
created_by
:
...
;
fieldValues
:
...
;
org_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
contactTypeId
?:
...
;
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
contactId
:
...
;
contactTypeId
?:
...
;
fieldValues
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
contactTypes
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customFields
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
fields
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
;
fieldIdsToRemove
?:
...
;
fieldsToAdd
?:
...
;
name
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
facilities
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
success
:
...
}
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listWithIntegrations
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
listWithLevelsOfCare
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
UpdateFacilityWithIntegrationResult
;
}
,
>
;
}
,
>
,
>
;
integrations
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
fullSync
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
integration_id
:
...
}
;
meta
:
object
;
output
:
{
chart_reviews_enqueued
:
...
;
patients_enqueued
:
...
;
success
:
...
;
}
;
}
,
>
;
getIntegrationLocations
:
QueryProcedure
<
{
input
:
(...)
|
(...)
|
(...)
;
meta
:
object
;
output
:
(...)
|
(...)
|
(...)
;
}
,
>
;
syncAdmissions
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
end_date
?:
...
;
integration_id
:
...
;
start_date
?:
...
;
}
;
meta
:
object
;
output
:
{
error
:
...
;
patients
?:
...
;
stats
?:
...
;
success
:
...
}
;
}
,
>
;
syncEpisode
:
MutationProcedure
<
{
input
:
{
episodeId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
SyncEpisodeServiceResult
;
}
,
>
;
syncFacilityLevelsOfCare
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityLevelsOfCareServiceResult
;
}
,
>
;
syncFacilityPrograms
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityProgramsServiceResult
;
}
,
>
;
syncIntegration
:
MutationProcedure
<
{
input
:
{
dateRange
?:
...
;
integrationId
:
...
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
syncIntegrationEpisodes
:
MutationProcedure
<
{
input
:
{
endDate
:
...
;
integrationId
:
...
;
startDate
:
...
}
;
meta
:
object
;
output
:
SyncIntegrationEpisodesServiceResult
;
}
,
>
;
syncPatient
:
MutationProcedure
<
{
input
:
{
dryRun
?:
...
;
patientId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
syncPatientEpisodes
:
MutationProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
SyncPatientEpisodesServiceResult
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
label
?:
...
;
status
?:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
credentials
:
...
;
entity_id
:
...
;
facility_id
:
...
;
id
:
...
;
label
:
...
;
last_sync
:
...
;
status
:
...
;
type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
metrics
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
criteriaAssistants
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
criteriaDetail
:
QueryProcedure
<
{
input
:
{
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
{
items
:
...
;
nextCursor
:
...
;
providers
:
...
;
total
:
...
}
;
}
,
>
;
criteriaResponses
:
QueryProcedure
<
{
input
:
{
auditQuestionId
:
...
;
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
metricsFacilities
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
metricsGrouped
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
dimension
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
orgMembers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createInvite
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
lastName
:
...
;
roleId
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
InviteUserServiceResult
;
}
,
>
;
getMemberByProfileId
:
QueryProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
listPendingInvites
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRoles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listUsers
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
roleId
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
removeMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
profileId
:
...
}
;
}
,
>
;
resendInvite
:
MutationProcedure
<
{
input
:
{
pendingInviteId
:
...
}
;
meta
:
object
;
output
:
ResendInviteServiceResult
;
}
,
>
;
updateMember
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
isSuperadmin
:
...
;
lastName
:
...
;
profileId
:
...
;
role
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
orgSettings
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
QueryProcedure
<
{
input
:
{
entityId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
entityId
:
...
;
key
:
...
;
value
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
entity_id
:
...
;
id
:
...
;
setting_key
:
...
;
updated_at
:
...
;
updated_by
:
...
;
value
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientCharts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
countForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
count
:
...
}
;
}
,
>
;
createForPatient
:
MutationProcedure
<
{
input
:
{
fileName
:
...
;
patientId
:
...
;
storageKey
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
created_by
:
...
;
embedding_count
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
entity_id
:
...
;
external_document_created_at
:
...
;
external_document_id
:
...
;
external_document_type
:
...
;
external_document_updated_at
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
integration_id
:
...
;
is_ready
:
...
;
patient_id
:
...
;
raw_document
:
...
;
run_id
:
...
;
sources
:
...
;
treatment_episode_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
external_document_type
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
patient_id
:
...
;
raw_document
:
...
;
signed_url
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
fileType
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGeneratedFormsForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
patients
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createPatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
deletePatient
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
id
:
...
}
}
,
>
;
getPatientById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
getPatientDetail
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
admitted_at
:
...
;
created_at
:
...
;
discharged_at
:
...
;
dob
:
...
;
external_source
:
...
;
facility_id
:
...
;
facility_name
:
...
;
first_name
:
...
;
last_name
:
...
;
last_sync
:
...
;
patient_id
:
...
;
primary_provider_id
:
...
;
provider_first_name
:
...
;
provider_last_name
:
...
;
provider_title
:
...
;
}
;
}
,
>
;
getPatientOverview
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patient
:
...
;
recentSessions
:
...
}
;
}
,
>
;
listEpisodes
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
facilityId
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientIds
?:
...
;
patientSearch
?:
...
;
primaryProviderId
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
mergePatients
:
MutationProcedure
<
{
input
:
{
duplicatePatientId
:
...
;
primaryPatientId
:
...
}
;
meta
:
object
;
output
:
ExecutePatientMergeServiceResult
;
}
,
>
;
updatePatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
id
:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientSessions
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
generateNote
:
MutationProcedure
<
{
input
:
{
fileUrl
?:
...
;
manualText
?:
...
;
patientId
:
...
;
templateId
:
...
;
}
;
meta
:
object
;
output
:
ProcessTextNoteResult
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patientSession
:
...
;
sessionAuditRunIds
:
...
}
;
}
,
>
;
getLastTemplateForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
templateId
:
...
}
;
}
,
>
;
getPlaybackUrl
:
QueryProcedure
<
{
input
:
{
sessionId
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
getRecentSessions
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForCurrentUser
:
QueryProcedure
<
{
input
:
{
from
:
...
;
to
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
templateIds
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
modifyAiNote
:
MutationProcedure
<
{
input
:
{
customPrompt
?:
...
;
optionId
:
...
;
sessionId
:
...
}
;
meta
:
object
;
output
:
{
ai_generated_note
:
...
}
;
}
,
>
;
regenerateCodes
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
GenerateSessionCodesResult
;
}
,
>
;
switchTemplate
:
MutationProcedure
<
{
input
:
{
sessionId
:
...
;
templateId
:
...
}
;
meta
:
object
;
output
:
RegenerateNoteResult
;
}
,
>
;
updateAiSummarizedNote
:
MutationProcedure
<
{
input
:
{
aiSummarizedNote
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updateCodes
:
MutationProcedure
<
{
input
:
{
codes
:
...
;
codeType
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updatePrivateNote
:
MutationProcedure
<
{
input
:
{
id
:
...
;
privateNote
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
updateSessionTime
:
MutationProcedure
<
{
input
:
{
endTimestamp
:
...
;
id
:
...
;
startTimestamp
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
profiles
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
listEmrProfiles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
updateProfile
:
MutationProcedure
<
{
input
:
{
firstName
:
...
;
lastName
:
...
;
title
?:
...
}
;
meta
:
object
;
output
:
{
clinic_size
:
...
;
created_at
:
...
;
customer_id
:
...
;
email
:
...
;
expectations
:
...
;
external_system
:
...
;
external_system_id
:
...
;
first_name
:
...
;
hear_about_us
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
last_updated
:
...
;
price_id
:
...
;
profile_type
:
...
;
session_limit
:
...
;
subscription_status
:
...
;
title
:
...
;
user_id
:
...
;
vertical
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
reviewDashboard
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
bulkArchive
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
dateRange
?:
...
;
includeNullTriggers
?:
...
;
patientIds
?:
...
;
preview
?:
...
;
scoreRange
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
BulkArchiveAuditRunsOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGrouped
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
savedFilters
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
columnVisibility
?:
...
;
filters
:
...
;
name
:
...
;
pageKey
:
...
;
viewMode
?:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
DeleteSavedFilterOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
pageKey
:
...
}
;
meta
:
object
;
output
:
ListSavedFiltersOutput
;
}
,
>
;
rename
:
MutationProcedure
<
{
input
:
{
id
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
resolveLabels
:
QueryProcedure
<
{
input
:
{
assistantIds
?:
...
;
facilityIds
?:
...
;
patientIds
?:
...
;
providerIds
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
{
assistantItems
:
...
;
facilityItems
:
...
;
patientItems
:
...
;
providerItems
:
...
;
triggerItems
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
columnVisibility
:
...
;
filters
:
...
;
id
:
...
;
viewMode
:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
}
,
>
,
>
;
storage
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
uploadCredentials
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
{
accessToken
:
...
;
supabaseAnonKey
:
...
;
supabaseProjectRef
:
...
;
supabaseUrl
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
superadmin
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
impersonation
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
endImpersonation
:
...
;
getCurrentImpersonation
:
...
;
startImpersonation
:
...
;
}
,
>
,
>
;
orgs
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
get
:
...
;
list
:
...
;
setArchived
:
...
}
,
>
,
>
;
orgUsers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
...
;
listRoles
:
...
;
updateRole
:
...
}
,
>
,
>
;
}
,
>
,
>
;
teams
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
addTeamMembers
:
MutationProcedure
<
{
input
:
{
profileIds
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
createTeam
:
MutationProcedure
<
{
input
:
{
memberIds
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
entity_id
:
...
;
id
:
...
;
name
:
...
;
}
;
}
,
>
;
listTeams
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
removeTeamMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
profile_id
:
...
;
team_id
:
...
;
user_entity_id
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
templates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
linkedAuditTemplates
:
...
;
sections
:
...
;
template
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
id
:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
userPrompts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
prompt
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
togglePin
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
}
,
>
,
>
,
>
Type Declaration
()
:
TRPCClient
<
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
auditRuns
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createResponseTrail
:
MutationProcedure
<
{
input
:
(...)
|
(...)
;
meta
:
object
;
output
:
{
audit_response_id
:
...
;
comment
:
...
;
created_at
:
...
;
created_by
:
...
;
id
:
...
;
marked_as
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditRun
:
...
;
hasPendingResponses
:
...
;
lastSync
:
...
;
responses
:
...
;
score
:
...
;
statusCounts
:
...
;
templateQuestionCount
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
excludeAuditRunIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
resultStatus
?:
...
;
search
?:
...
;
sortOrder
?:
...
;
templateIds
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRecentForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
;
treatmentEpisodeId
?:
...
;
type
?:
...
}
;
meta
:
object
;
output
:
ListRecentPatientReviewRunsServiceResult
;
}
,
>
;
}
,
>
,
>
;
auditTemplates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
name
:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditTemplate
:
...
;
questions
:
...
;
triggers
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
id
:
...
;
name
?:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chartReview
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
run
:
MutationProcedure
<
{
input
:
{
auditSource
?:
...
;
patientId
:
...
;
sessionId
?:
...
;
templateIds
:
...
;
treatmentEpisodeId
?:
...
;
trigger
?:
...
;
triggeredAt
?:
...
;
}
;
meta
:
object
;
output
:
{
auditRunIds
:
...
}
;
}
,
>
;
syncAndRun
:
MutationProcedure
<
{
input
:
{
episodeId
?:
...
;
patientId
:
...
;
templateIds
:
...
}
;
meta
:
object
;
output
:
SyncAndRunOutput
;
}
,
>
;
}
,
>
,
>
;
chartReviewTriggers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
triggerType
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
triggerId
:
...
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
id
:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chat
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
sendMessage
:
MutationProcedure
<
{
input
:
{
messages
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
RunCaseReviewChatResult
;
}
,
>
;
}
,
>
,
>
;
contacts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
contactTypeId
?:
...
;
fieldValues
?:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
contact_type_id
:
...
;
contact_type_name
:
...
;
created_at
:
...
;
created_by
:
...
;
fieldValues
:
...
;
org_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
contactTypeId
?:
...
;
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
contactId
:
...
;
contactTypeId
?:
...
;
fieldValues
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
contactTypes
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customFields
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
fields
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
;
fieldIdsToRemove
?:
...
;
fieldsToAdd
?:
...
;
name
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
facilities
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
success
:
...
}
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listWithIntegrations
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
listWithLevelsOfCare
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
UpdateFacilityWithIntegrationResult
;
}
,
>
;
}
,
>
,
>
;
integrations
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
fullSync
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
integration_id
:
...
}
;
meta
:
object
;
output
:
{
chart_reviews_enqueued
:
...
;
patients_enqueued
:
...
;
success
:
...
;
}
;
}
,
>
;
getIntegrationLocations
:
QueryProcedure
<
{
input
:
(...)
|
(...)
|
(...)
;
meta
:
object
;
output
:
(...)
|
(...)
|
(...)
;
}
,
>
;
syncAdmissions
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
end_date
?:
...
;
integration_id
:
...
;
start_date
?:
...
;
}
;
meta
:
object
;
output
:
{
error
:
...
;
patients
?:
...
;
stats
?:
...
;
success
:
...
}
;
}
,
>
;
syncEpisode
:
MutationProcedure
<
{
input
:
{
episodeId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
SyncEpisodeServiceResult
;
}
,
>
;
syncFacilityLevelsOfCare
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityLevelsOfCareServiceResult
;
}
,
>
;
syncFacilityPrograms
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityProgramsServiceResult
;
}
,
>
;
syncIntegration
:
MutationProcedure
<
{
input
:
{
dateRange
?:
...
;
integrationId
:
...
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
syncIntegrationEpisodes
:
MutationProcedure
<
{
input
:
{
endDate
:
...
;
integrationId
:
...
;
startDate
:
...
}
;
meta
:
object
;
output
:
SyncIntegrationEpisodesServiceResult
;
}
,
>
;
syncPatient
:
MutationProcedure
<
{
input
:
{
dryRun
?:
...
;
patientId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
syncPatientEpisodes
:
MutationProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
SyncPatientEpisodesServiceResult
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
label
?:
...
;
status
?:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
credentials
:
...
;
entity_id
:
...
;
facility_id
:
...
;
id
:
...
;
label
:
...
;
last_sync
:
...
;
status
:
...
;
type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
metrics
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
criteriaAssistants
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
criteriaDetail
:
QueryProcedure
<
{
input
:
{
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
{
items
:
...
;
nextCursor
:
...
;
providers
:
...
;
total
:
...
}
;
}
,
>
;
criteriaResponses
:
QueryProcedure
<
{
input
:
{
auditQuestionId
:
...
;
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
metricsFacilities
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
metricsGrouped
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
dimension
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
orgMembers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createInvite
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
lastName
:
...
;
roleId
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
InviteUserServiceResult
;
}
,
>
;
getMemberByProfileId
:
QueryProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
listPendingInvites
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRoles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listUsers
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
roleId
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
removeMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
profileId
:
...
}
;
}
,
>
;
resendInvite
:
MutationProcedure
<
{
input
:
{
pendingInviteId
:
...
}
;
meta
:
object
;
output
:
ResendInviteServiceResult
;
}
,
>
;
updateMember
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
isSuperadmin
:
...
;
lastName
:
...
;
profileId
:
...
;
role
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
orgSettings
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
QueryProcedure
<
{
input
:
{
entityId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
entityId
:
...
;
key
:
...
;
value
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
entity_id
:
...
;
id
:
...
;
setting_key
:
...
;
updated_at
:
...
;
updated_by
:
...
;
value
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientCharts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
countForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
count
:
...
}
;
}
,
>
;
createForPatient
:
MutationProcedure
<
{
input
:
{
fileName
:
...
;
patientId
:
...
;
storageKey
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
created_by
:
...
;
embedding_count
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
entity_id
:
...
;
external_document_created_at
:
...
;
external_document_id
:
...
;
external_document_type
:
...
;
external_document_updated_at
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
integration_id
:
...
;
is_ready
:
...
;
patient_id
:
...
;
raw_document
:
...
;
run_id
:
...
;
sources
:
...
;
treatment_episode_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
external_document_type
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
patient_id
:
...
;
raw_document
:
...
;
signed_url
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
fileType
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGeneratedFormsForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
patients
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createPatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
deletePatient
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
id
:
...
}
}
,
>
;
getPatientById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
getPatientDetail
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
admitted_at
:
...
;
created_at
:
...
;
discharged_at
:
...
;
dob
:
...
;
external_source
:
...
;
facility_id
:
...
;
facility_name
:
...
;
first_name
:
...
;
last_name
:
...
;
last_sync
:
...
;
patient_id
:
...
;
primary_provider_id
:
...
;
provider_first_name
:
...
;
provider_last_name
:
...
;
provider_title
:
...
;
}
;
}
,
>
;
getPatientOverview
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patient
:
...
;
recentSessions
:
...
}
;
}
,
>
;
listEpisodes
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
facilityId
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientIds
?:
...
;
patientSearch
?:
...
;
primaryProviderId
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
mergePatients
:
MutationProcedure
<
{
input
:
{
duplicatePatientId
:
...
;
primaryPatientId
:
...
}
;
meta
:
object
;
output
:
ExecutePatientMergeServiceResult
;
}
,
>
;
updatePatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
id
:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientSessions
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
generateNote
:
MutationProcedure
<
{
input
:
{
fileUrl
?:
...
;
manualText
?:
...
;
patientId
:
...
;
templateId
:
...
;
}
;
meta
:
object
;
output
:
ProcessTextNoteResult
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patientSession
:
...
;
sessionAuditRunIds
:
...
}
;
}
,
>
;
getLastTemplateForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
templateId
:
...
}
;
}
,
>
;
getPlaybackUrl
:
QueryProcedure
<
{
input
:
{
sessionId
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
getRecentSessions
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForCurrentUser
:
QueryProcedure
<
{
input
:
{
from
:
...
;
to
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
templateIds
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
modifyAiNote
:
MutationProcedure
<
{
input
:
{
customPrompt
?:
...
;
optionId
:
...
;
sessionId
:
...
}
;
meta
:
object
;
output
:
{
ai_generated_note
:
...
}
;
}
,
>
;
regenerateCodes
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
GenerateSessionCodesResult
;
}
,
>
;
switchTemplate
:
MutationProcedure
<
{
input
:
{
sessionId
:
...
;
templateId
:
...
}
;
meta
:
object
;
output
:
RegenerateNoteResult
;
}
,
>
;
updateAiSummarizedNote
:
MutationProcedure
<
{
input
:
{
aiSummarizedNote
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updateCodes
:
MutationProcedure
<
{
input
:
{
codes
:
...
;
codeType
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updatePrivateNote
:
MutationProcedure
<
{
input
:
{
id
:
...
;
privateNote
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
updateSessionTime
:
MutationProcedure
<
{
input
:
{
endTimestamp
:
...
;
id
:
...
;
startTimestamp
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
profiles
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
listEmrProfiles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
updateProfile
:
MutationProcedure
<
{
input
:
{
firstName
:
...
;
lastName
:
...
;
title
?:
...
}
;
meta
:
object
;
output
:
{
clinic_size
:
...
;
created_at
:
...
;
customer_id
:
...
;
email
:
...
;
expectations
:
...
;
external_system
:
...
;
external_system_id
:
...
;
first_name
:
...
;
hear_about_us
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
last_updated
:
...
;
price_id
:
...
;
profile_type
:
...
;
session_limit
:
...
;
subscription_status
:
...
;
title
:
...
;
user_id
:
...
;
vertical
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
reviewDashboard
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
bulkArchive
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
dateRange
?:
...
;
includeNullTriggers
?:
...
;
patientIds
?:
...
;
preview
?:
...
;
scoreRange
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
BulkArchiveAuditRunsOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGrouped
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
savedFilters
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
columnVisibility
?:
...
;
filters
:
...
;
name
:
...
;
pageKey
:
...
;
viewMode
?:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
DeleteSavedFilterOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
pageKey
:
...
}
;
meta
:
object
;
output
:
ListSavedFiltersOutput
;
}
,
>
;
rename
:
MutationProcedure
<
{
input
:
{
id
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
resolveLabels
:
QueryProcedure
<
{
input
:
{
assistantIds
?:
...
;
facilityIds
?:
...
;
patientIds
?:
...
;
providerIds
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
{
assistantItems
:
...
;
facilityItems
:
...
;
patientItems
:
...
;
providerItems
:
...
;
triggerItems
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
columnVisibility
:
...
;
filters
:
...
;
id
:
...
;
viewMode
:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
}
,
>
,
>
;
storage
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
uploadCredentials
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
{
accessToken
:
...
;
supabaseAnonKey
:
...
;
supabaseProjectRef
:
...
;
supabaseUrl
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
superadmin
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
impersonation
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
endImpersonation
:
...
;
getCurrentImpersonation
:
...
;
startImpersonation
:
...
;
}
,
>
,
>
;
orgs
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
get
:
...
;
list
:
...
;
setArchived
:
...
}
,
>
,
>
;
orgUsers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
...
;
listRoles
:
...
;
updateRole
:
...
}
,
>
,
>
;
}
,
>
,
>
;
teams
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
addTeamMembers
:
MutationProcedure
<
{
input
:
{
profileIds
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
createTeam
:
MutationProcedure
<
{
input
:
{
memberIds
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
entity_id
:
...
;
id
:
...
;
name
:
...
;
}
;
}
,
>
;
listTeams
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
removeTeamMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
profile_id
:
...
;
team_id
:
...
;
user_entity_id
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
templates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
linkedAuditTemplates
:
...
;
sections
:
...
;
template
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
id
:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
userPrompts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
prompt
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
togglePin
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
}
,
>
,
>
,
>
Returns
TRPCClient
<
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
auditRuns
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createResponseTrail
:
MutationProcedure
<
{
input
:
(...)
|
(...)
;
meta
:
object
;
output
:
{
audit_response_id
:
...
;
comment
:
...
;
created_at
:
...
;
created_by
:
...
;
id
:
...
;
marked_as
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditRun
:
...
;
hasPendingResponses
:
...
;
lastSync
:
...
;
responses
:
...
;
score
:
...
;
statusCounts
:
...
;
templateQuestionCount
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
excludeAuditRunIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
resultStatus
?:
...
;
search
?:
...
;
sortOrder
?:
...
;
templateIds
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRecentForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
;
treatmentEpisodeId
?:
...
;
type
?:
...
}
;
meta
:
object
;
output
:
ListRecentPatientReviewRunsServiceResult
;
}
,
>
;
}
,
>
,
>
;
auditTemplates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
name
:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
auditTemplate
:
...
;
questions
:
...
;
triggers
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
customReviewCriteriaPrompt
?:
...
;
customSummaryPrompt
?:
...
;
description
?:
...
;
id
:
...
;
name
?:
...
;
questions
?:
...
;
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
custom_review_criteria_prompt
:
...
;
custom_summary_prompt
:
...
;
description
:
...
;
id
:
...
;
name
:
...
;
org_id
:
...
;
share_with_org
:
...
;
shared_by
:
...
;
shared_with_entity_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chartReview
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
run
:
MutationProcedure
<
{
input
:
{
auditSource
?:
...
;
patientId
:
...
;
sessionId
?:
...
;
templateIds
:
...
;
treatmentEpisodeId
?:
...
;
trigger
?:
...
;
triggeredAt
?:
...
;
}
;
meta
:
object
;
output
:
{
auditRunIds
:
...
}
;
}
,
>
;
syncAndRun
:
MutationProcedure
<
{
input
:
{
episodeId
?:
...
;
patientId
:
...
;
templateIds
:
...
}
;
meta
:
object
;
output
:
SyncAndRunOutput
;
}
,
>
;
}
,
>
,
>
;
chartReviewTriggers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
triggerType
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
triggerId
:
...
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
:
...
;
facilities
?:
...
;
id
:
...
;
intervalSeconds
:
...
;
name
:
...
;
schedule
?:
...
;
timeAfterTriggerSeconds
:
...
;
}
;
meta
:
object
;
output
:
{
audit_template_id
:
...
;
audit_templates
:
...
;
created_at
:
...
;
deleted
:
...
;
enabled
:
...
;
entity_id
:
...
;
filters
:
...
;
id
:
...
;
interval_seconds
:
...
;
last_run_at
:
...
;
name
:
...
;
schedule
:
...
;
time_after_trigger_seconds
:
...
;
trigger_type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
chat
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
sendMessage
:
MutationProcedure
<
{
input
:
{
messages
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
RunCaseReviewChatResult
;
}
,
>
;
}
,
>
,
>
;
contacts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
contactTypeId
?:
...
;
fieldValues
?:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactId
:
...
}
;
meta
:
object
;
output
:
{
contact_id
:
...
;
contact_type
:
...
;
contact_type_id
:
...
;
contact_type_name
:
...
;
created_at
:
...
;
created_by
:
...
;
fieldValues
:
...
;
org_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
contactTypeId
?:
...
;
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
contactId
:
...
;
contactTypeId
?:
...
;
fieldValues
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
contactTypes
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
customFields
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
void
}
,
>
;
get
:
QueryProcedure
<
{
input
:
{
contactTypeId
:
...
}
;
meta
:
object
;
output
:
{
contact_type_id
:
...
;
created_at
:
...
;
created_by
:
...
;
fields
:
...
;
org_id
:
...
;
type
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
update
:
MutationProcedure
<
{
input
:
{
contactTypeId
:
...
;
fieldIdsToRemove
?:
...
;
fieldsToAdd
?:
...
;
name
?:
...
;
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
}
,
>
,
>
;
facilities
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
success
:
...
}
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listWithIntegrations
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
listWithLevelsOfCare
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
name
:
...
}
;
meta
:
object
;
output
:
UpdateFacilityWithIntegrationResult
;
}
,
>
;
}
,
>
,
>
;
integrations
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
fullSync
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
integration_id
:
...
}
;
meta
:
object
;
output
:
{
chart_reviews_enqueued
:
...
;
patients_enqueued
:
...
;
success
:
...
;
}
;
}
,
>
;
getIntegrationLocations
:
QueryProcedure
<
{
input
:
(...)
|
(...)
|
(...)
;
meta
:
object
;
output
:
(...)
|
(...)
|
(...)
;
}
,
>
;
syncAdmissions
:
MutationProcedure
<
{
input
:
{
dry_run
?:
...
;
end_date
?:
...
;
integration_id
:
...
;
start_date
?:
...
;
}
;
meta
:
object
;
output
:
{
error
:
...
;
patients
?:
...
;
stats
?:
...
;
success
:
...
}
;
}
,
>
;
syncEpisode
:
MutationProcedure
<
{
input
:
{
episodeId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
SyncEpisodeServiceResult
;
}
,
>
;
syncFacilityLevelsOfCare
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityLevelsOfCareServiceResult
;
}
,
>
;
syncFacilityPrograms
:
MutationProcedure
<
{
input
:
{
integrationId
:
...
}
;
meta
:
object
;
output
:
SyncFacilityProgramsServiceResult
;
}
,
>
;
syncIntegration
:
MutationProcedure
<
{
input
:
{
dateRange
?:
...
;
integrationId
:
...
}
;
meta
:
object
;
output
:
void
;
}
,
>
;
syncIntegrationEpisodes
:
MutationProcedure
<
{
input
:
{
endDate
:
...
;
integrationId
:
...
;
startDate
:
...
}
;
meta
:
object
;
output
:
SyncIntegrationEpisodesServiceResult
;
}
,
>
;
syncPatient
:
MutationProcedure
<
{
input
:
{
dryRun
?:
...
;
patientId
:
...
;
syncDocuments
?:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
syncPatientEpisodes
:
MutationProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
SyncPatientEpisodesServiceResult
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
id
:
...
;
integration
?:
...
;
label
?:
...
;
status
?:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
credentials
:
...
;
entity_id
:
...
;
facility_id
:
...
;
id
:
...
;
label
:
...
;
last_sync
:
...
;
status
:
...
;
type
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
metrics
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
criteriaAssistants
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
criteriaDetail
:
QueryProcedure
<
{
input
:
{
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
{
items
:
...
;
nextCursor
:
...
;
providers
:
...
;
total
:
...
}
;
}
,
>
;
criteriaResponses
:
QueryProcedure
<
{
input
:
{
auditQuestionId
:
...
;
auditTemplateId
:
...
;
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileId
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
metricsFacilities
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
metricsGrouped
:
QueryProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
cursor
?:
...
;
dateRange
:
...
;
dimension
:
...
;
facilityIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
scoreRange
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
orgMembers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createInvite
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
lastName
:
...
;
roleId
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
InviteUserServiceResult
;
}
,
>
;
getMemberByProfileId
:
QueryProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
listPendingInvites
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listRoles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listUsers
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
roleId
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
removeMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
}
;
meta
:
object
;
output
:
{
profileId
:
...
}
;
}
,
>
;
resendInvite
:
MutationProcedure
<
{
input
:
{
pendingInviteId
:
...
}
;
meta
:
object
;
output
:
ResendInviteServiceResult
;
}
,
>
;
updateMember
:
MutationProcedure
<
{
input
:
{
email
:
...
;
firstName
:
...
;
isSuperadmin
:
...
;
lastName
:
...
;
profileId
:
...
;
role
:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
email
:
...
;
first_name
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
role
:
...
;
role_id
:
...
;
title
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
orgSettings
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
QueryProcedure
<
{
input
:
{
entityId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
entityId
:
...
;
key
:
...
;
value
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
entity_id
:
...
;
id
:
...
;
setting_key
:
...
;
updated_at
:
...
;
updated_by
:
...
;
value
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientCharts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
countForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
count
:
...
}
;
}
,
>
;
createForPatient
:
MutationProcedure
<
{
input
:
{
fileName
:
...
;
patientId
:
...
;
storageKey
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
created_by
:
...
;
embedding_count
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
entity_id
:
...
;
external_document_created_at
:
...
;
external_document_id
:
...
;
external_document_type
:
...
;
external_document_updated_at
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
integration_id
:
...
;
is_ready
:
...
;
patient_id
:
...
;
raw_document
:
...
;
run_id
:
...
;
sources
:
...
;
treatment_episode_id
:
...
;
updated_at
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
;
patientId
:
...
}
;
meta
:
object
;
output
:
{
circle_metadata
:
...
;
created_at
:
...
;
embedding_err_msg
:
...
;
embedding_status
:
...
;
external_document_type
:
...
;
file_name
:
...
;
file_type
:
...
;
file_url
:
...
;
id
:
...
;
patient_id
:
...
;
raw_document
:
...
;
signed_url
:
...
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
fileType
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
treatmentEpisodeId
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGeneratedFormsForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
patients
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
createPatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
deletePatient
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
id
:
...
}
}
,
>
;
getPatientById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
getPatientDetail
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
admitted_at
:
...
;
created_at
:
...
;
discharged_at
:
...
;
dob
:
...
;
external_source
:
...
;
facility_id
:
...
;
facility_name
:
...
;
first_name
:
...
;
last_name
:
...
;
last_sync
:
...
;
patient_id
:
...
;
primary_provider_id
:
...
;
provider_first_name
:
...
;
provider_last_name
:
...
;
provider_title
:
...
;
}
;
}
,
>
;
getPatientOverview
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patient
:
...
;
recentSessions
:
...
}
;
}
,
>
;
listEpisodes
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
facilityId
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientIds
?:
...
;
patientSearch
?:
...
;
primaryProviderId
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
mergePatients
:
MutationProcedure
<
{
input
:
{
duplicatePatientId
:
...
;
primaryPatientId
:
...
}
;
meta
:
object
;
output
:
ExecutePatientMergeServiceResult
;
}
,
>
;
updatePatient
:
MutationProcedure
<
{
input
:
{
addressCity
?:
...
;
addressState
?:
...
;
addressStreet1
?:
...
;
addressStreet2
?:
...
;
addressZipcode
?:
...
;
dob
?:
...
;
email
?:
...
;
facilityId
?:
...
;
firstName
:
...
;
gender
?:
...
;
id
:
...
;
intakeNotes
?:
...
;
lastName
:
...
;
phoneMobile
?:
...
;
}
;
meta
:
object
;
output
:
{
address_city
:
...
;
address_state
:
...
;
address_street1
:
...
;
address_street2
:
...
;
address_zipcode
:
...
;
created_at
:
...
;
created_by
:
...
;
dob
:
...
;
email
:
...
;
entity_id
:
...
;
external_patient_id
:
...
;
external_source
:
...
;
facility_id
:
...
;
first_name
:
...
;
gender
:
...
;
intake_notes
:
...
;
last_name
:
...
;
last_updated_summary
:
...
;
patient_id
:
...
;
phone_mobile
:
...
;
primary_provider_id
:
...
;
status
:
...
;
summary
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
patientSessions
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
generateNote
:
MutationProcedure
<
{
input
:
{
fileUrl
?:
...
;
manualText
?:
...
;
patientId
:
...
;
templateId
:
...
;
}
;
meta
:
object
;
output
:
ProcessTextNoteResult
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
patientSession
:
...
;
sessionAuditRunIds
:
...
}
;
}
,
>
;
getLastTemplateForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
templateId
:
...
}
;
}
,
>
;
getPlaybackUrl
:
QueryProcedure
<
{
input
:
{
sessionId
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
getRecentSessions
:
QueryProcedure
<
{
input
:
{
patientId
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForCurrentUser
:
QueryProcedure
<
{
input
:
{
from
:
...
;
to
:
...
}
;
meta
:
object
;
output
:
{
sessions
:
...
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
dateFrom
?:
...
;
dateTo
?:
...
;
limit
?:
...
;
offset
?:
...
;
patientId
:
...
;
search
?:
...
;
sortOrder
?:
...
;
status
?:
...
;
templateIds
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
modifyAiNote
:
MutationProcedure
<
{
input
:
{
customPrompt
?:
...
;
optionId
:
...
;
sessionId
:
...
}
;
meta
:
object
;
output
:
{
ai_generated_note
:
...
}
;
}
,
>
;
regenerateCodes
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
GenerateSessionCodesResult
;
}
,
>
;
switchTemplate
:
MutationProcedure
<
{
input
:
{
sessionId
:
...
;
templateId
:
...
}
;
meta
:
object
;
output
:
RegenerateNoteResult
;
}
,
>
;
updateAiSummarizedNote
:
MutationProcedure
<
{
input
:
{
aiSummarizedNote
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updateCodes
:
MutationProcedure
<
{
input
:
{
codes
:
...
;
codeType
:
...
;
id
:
...
}
;
meta
:
object
;
output
:
(...)
|
(...)
;
}
,
>
;
updatePrivateNote
:
MutationProcedure
<
{
input
:
{
id
:
...
;
privateNote
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
updateSessionTime
:
MutationProcedure
<
{
input
:
{
endTimestamp
:
...
;
id
:
...
;
startTimestamp
:
...
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
...
;
as_summarized_note_type
:
...
;
audit_run_id
:
...
;
audit_status
:
...
;
case_id
:
...
;
cpt_code
:
...
;
created_at
:
...
;
created_by
:
...
;
dsm_code
:
...
;
end_timestamp
:
...
;
error_msg
:
...
;
file_url
:
...
;
icd_code
:
...
;
id
:
...
;
manual_entry
:
...
;
patient_id
:
...
;
private_note
:
...
;
progress_status
:
...
;
selected_template
:
...
;
start_timestamp
:
...
;
transcript
:
...
;
updated_by
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
profiles
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
listEmrProfiles
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listInOrganization
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
updateProfile
:
MutationProcedure
<
{
input
:
{
firstName
:
...
;
lastName
:
...
;
title
?:
...
}
;
meta
:
object
;
output
:
{
clinic_size
:
...
;
created_at
:
...
;
customer_id
:
...
;
email
:
...
;
expectations
:
...
;
external_system
:
...
;
external_system_id
:
...
;
first_name
:
...
;
hear_about_us
:
...
;
id
:
...
;
is_superadmin
:
...
;
last_name
:
...
;
last_updated
:
...
;
price_id
:
...
;
profile_type
:
...
;
session_limit
:
...
;
subscription_status
:
...
;
title
:
...
;
user_id
:
...
;
vertical
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
reviewDashboard
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
bulkArchive
:
MutationProcedure
<
{
input
:
{
auditTemplateIds
?:
...
;
dateRange
?:
...
;
includeNullTriggers
?:
...
;
patientIds
?:
...
;
preview
?:
...
;
scoreRange
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
BulkArchiveAuditRunsOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
listGrouped
:
QueryProcedure
<
{
input
:
{
admissionDateRange
?:
...
;
admissionStatus
?:
...
;
auditTemplateIds
?:
...
;
authEndDateRange
?:
...
;
authStartDateRange
?:
...
;
clientSearch
?:
...
;
criteriaStatuses
?:
...
;
cursor
?:
...
;
dateRange
?:
...
;
facilityIds
?:
...
;
facilityIdsForLoc
?:
...
;
hasUnansweredManual
?:
...
;
includeNullTriggers
?:
...
;
levelOfCareIds
?:
...
;
limit
?:
...
;
offset
?:
...
;
profileIds
?:
...
;
scoreRange
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
triggerIds
?:
...
;
type
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
}
,
>
,
>
;
savedFilters
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
columnVisibility
?:
...
;
filters
:
...
;
name
:
...
;
pageKey
:
...
;
viewMode
?:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
DeleteSavedFilterOutput
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
pageKey
:
...
}
;
meta
:
object
;
output
:
ListSavedFiltersOutput
;
}
,
>
;
rename
:
MutationProcedure
<
{
input
:
{
id
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
resolveLabels
:
QueryProcedure
<
{
input
:
{
assistantIds
?:
...
;
facilityIds
?:
...
;
patientIds
?:
...
;
providerIds
?:
...
;
triggerIds
?:
...
;
}
;
meta
:
object
;
output
:
{
assistantItems
:
...
;
facilityItems
:
...
;
patientItems
:
...
;
providerItems
:
...
;
triggerItems
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
columnVisibility
:
...
;
filters
:
...
;
id
:
...
;
viewMode
:
...
;
}
;
meta
:
object
;
output
:
SavedViewDto
;
}
,
>
;
}
,
>
,
>
;
storage
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
uploadCredentials
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
{
accessToken
:
...
;
supabaseAnonKey
:
...
;
supabaseProjectRef
:
...
;
supabaseUrl
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
superadmin
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
impersonation
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
endImpersonation
:
...
;
getCurrentImpersonation
:
...
;
startImpersonation
:
...
;
}
,
>
,
>
;
orgs
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
get
:
...
;
list
:
...
;
setArchived
:
...
}
,
>
,
>
;
orgUsers
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
list
:
...
;
listRoles
:
...
;
updateRole
:
...
}
,
>
,
>
;
}
,
>
,
>
;
teams
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
addTeamMembers
:
MutationProcedure
<
{
input
:
{
profileIds
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
(...)
[]
;
}
,
>
;
createTeam
:
MutationProcedure
<
{
input
:
{
memberIds
:
...
;
name
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
created_by
:
...
;
entity_id
:
...
;
id
:
...
;
name
:
...
;
}
;
}
,
>
;
listTeams
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
,
>
;
removeTeamMember
:
MutationProcedure
<
{
input
:
{
profileId
:
...
;
teamId
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
profile_id
:
...
;
team_id
:
...
;
user_entity_id
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
templates
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
duplicate
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
linkedAuditTemplates
:
...
;
sections
:
...
;
template
:
...
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
{
cursor
?:
...
;
limit
?:
...
;
offset
?:
...
;
search
?:
...
;
sortBy
?:
...
;
sortOrder
?:
...
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
(...)
>
;
}
,
>
;
toggleSharing
:
MutationProcedure
<
{
input
:
{
id
:
...
;
shared
:
...
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
update
:
MutationProcedure
<
{
input
:
{
additionalAiInstructions
?:
...
;
checkCpt
?:
...
;
checkDsm5
?:
...
;
checkIcd10
?:
...
;
hiddenInstructions
?:
...
;
id
:
...
;
isAllowBulletPoints
?:
...
;
isUnstructuredNarrative
?:
...
;
linkedAuditTemplateIds
?:
...
;
sections
?:
...
;
title
?:
...
;
}
;
meta
:
object
;
output
:
{
additional_ai_instructions
:
...
;
check_cpt
:
...
;
check_demo
:
...
;
check_dsm_5
:
...
;
check_icd_10
:
...
;
created_by
:
...
;
created_by_circle
:
...
;
hidden_instructions
:
...
;
id
:
...
;
is_allow_bullet_points
:
...
;
is_unstructured_narrative
:
...
;
last_updated
:
...
;
last_used
:
...
;
original_template_id
:
...
;
shared_with_org_id
:
...
;
title
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
userPrompts
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
create
:
MutationProcedure
<
{
input
:
{
prompt
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
delete
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
list
:
QueryProcedure
<
{
input
:
void
;
meta
:
object
;
output
:
(...)
[]
}
>
;
togglePin
:
MutationProcedure
<
{
input
:
{
id
:
...
}
;
meta
:
object
;
output
:
{
created_at
:
...
;
id
:
...
;
is_pinned
:
...
;
prompt
:
...
;
user_id
:
...
;
}
;
}
,
>
;
}
,
>
,
>
;
}
,
>
,
>
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Circle V2 API Docs
Loading...