Circle V2 API Docs
Preparing search index...
@repo/trpc
routers/patient-sessions/index
patientSessionsRouter
Variable patientSessionsRouter
Const
patientSessionsRouter
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
delete
:
MutationProcedure
<
{
input
:
{
id
:
string
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
string
|
null
;
as_summarized_note_type
:
string
|
null
;
audit_run_id
:
string
&
{
__brand
:
"AuditRunId"
}
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
string
&
{
__brand
:
"CaseId"
}
|
null
;
cpt_code
:
unknown
[]
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
end_timestamp
:
DbDate
;
error_msg
:
string
|
null
;
file_url
:
string
|
null
;
icd_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
string
;
bullet_format
?:
(...)
|
(...)
|
(...)
;
id
:
SectionId
;
name
:
string
;
optional
:
boolean
;
order
:
number
;
}
[]
;
selected_audit_template_ids
?:
number
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
updated_by
:
number
|
null
;
}
;
}
,
>
;
generateNote
:
MutationProcedure
<
{
input
:
{
fileUrl
?:
string
;
manualText
?:
string
;
patientId
:
string
;
templateId
:
string
;
}
;
meta
:
object
;
output
:
ProcessTextNoteResult
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
string
}
;
meta
:
object
;
output
:
{
patientSession
:
{
ai_summarized_note
:
string
|
null
;
audit_run_id
:
string
&
{
__brand
:
"AuditRunId"
}
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
string
&
{
__brand
:
"CaseId"
}
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
;
end_timestamp
:
DbDate
;
file_url
:
string
|
null
;
icd_code
:
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
...
;
bullet_format
?:
...
;
id
:
...
;
name
:
...
;
optional
:
...
;
order
:
...
;
}
[]
;
selected_audit_template_ids
?:
(...)
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
}
;
sessionAuditRunIds
:
AuditRunId
[]
;
}
;
}
,
>
;
getLastTemplateForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
string
}
;
meta
:
object
;
output
:
{
templateId
:
TemplateId
|
null
}
;
}
,
>
;
getPlaybackUrl
:
QueryProcedure
<
{
input
:
{
sessionId
:
string
}
;
meta
:
object
;
output
:
{
signedUrl
:
null
}
|
{
signedUrl
:
string
}
;
}
,
>
;
getRecentSessions
:
QueryProcedure
<
{
input
:
{
patientId
:
string
}
;
meta
:
object
;
output
:
{
sessions
:
Safe
<
{
ai_summarized_note
:
string
|
null
;
as_summarized_note_type
:
string
|
null
;
audit_run_id
:
(...)
&
(...)
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
(...)
&
(...)
|
null
;
cpt_code
:
(...)
[]
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
(...)
[]
|
null
;
end_timestamp
:
DbDate
;
error_msg
:
string
|
null
;
file_url
:
string
|
null
;
icd_code
:
(...)
[]
|
null
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
(...)
&
(...)
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
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
?:
...
;
name
?:
...
;
original_template_id
?:
...
;
sections
:
...
;
selected_audit_template_ids
?:
...
;
shared_with_org_id
?:
...
;
title
:
...
;
[
key
:
...
]:
...
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
updated_by
:
number
|
null
;
}
[]
,
>
;
}
;
}
,
>
;
listForCurrentUser
:
QueryProcedure
<
{
input
:
{
from
:
string
;
to
:
string
}
;
meta
:
object
;
output
:
{
sessions
:
{
end_timestamp
:
DbDate
;
id
:
SessionId
;
patient_first_name
:
string
|
null
;
patient_id
:
string
&
{
__brand
:
...
}
|
null
;
patient_last_name
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
(...)
|
(...)
;
check_cpt
?:
(...)
|
(...)
|
(...)
;
check_demo
?:
(...)
|
(...)
|
(...)
;
check_dsm_5
?:
(...)
|
(...)
|
(...)
;
check_icd_10
?:
(...)
|
(...)
|
(...)
;
created_by
?:
(...)
|
(...)
|
(...)
;
created_by_circle
?:
(...)
|
(...)
|
(...)
;
hidden_instructions
?:
(...)
|
(...)
|
(...)
;
id
:
TemplateId
;
is_allow_bullet_points
?:
(...)
|
(...)
|
(...)
;
is_unstructured_narrative
?:
(...)
|
(...)
|
(...)
;
last_updated
?:
(...)
|
(...)
|
(...)
;
last_used
?:
(...)
|
(...)
|
(...)
;
name
?:
(...)
|
(...)
;
original_template_id
?:
(...)
|
(...)
;
sections
:
(...)
[]
;
selected_audit_template_ids
?:
(...)
|
(...)
;
shared_with_org_id
?:
(...)
|
(...)
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
}
[]
;
}
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
number
;
dateFrom
?:
string
;
dateTo
?:
string
;
limit
?:
number
;
offset
?:
number
;
patientId
:
string
;
search
?:
string
;
sortOrder
?:
"asc"
|
"desc"
;
status
?:
unknown
;
templateIds
?:
string
[]
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
{
ai_summarized_note
:
string
|
null
;
created_at
:
DbDate
;
end_timestamp
:
DbDate
;
id
:
SessionId
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
...
;
bullet_format
?:
...
;
id
:
...
;
name
:
...
;
optional
:
...
;
order
:
...
;
}
[]
;
selected_audit_template_ids
?:
(...)
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
}
,
>
;
}
,
>
;
modifyAiNote
:
MutationProcedure
<
{
input
:
{
customPrompt
?:
string
;
optionId
:
|
"custom"
|
"shorten"
|
"lengthen"
|
"remove_name"
|
"remove_sensitive"
|
"regenerate"
;
sessionId
:
string
;
}
;
meta
:
object
;
output
:
{
ai_generated_note
:
string
}
;
}
,
>
;
regenerateCodes
:
MutationProcedure
<
{
input
:
{
id
:
string
}
;
meta
:
object
;
output
:
GenerateSessionCodesResult
;
}
,
>
;
switchTemplate
:
MutationProcedure
<
{
input
:
{
sessionId
:
string
;
templateId
:
string
}
;
meta
:
object
;
output
:
RegenerateNoteResult
;
}
,
>
;
updateAiSummarizedNote
:
MutationProcedure
<
{
input
:
{
aiSummarizedNote
:
string
;
id
:
string
}
;
meta
:
object
;
output
:
|
{
ai_summarized_note
:
string
|
null
;
as_summarized_note_type
:
string
|
null
;
audit_run_id
:
string
&
{
__brand
:
"AuditRunId"
}
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
string
&
{
__brand
:
"CaseId"
}
|
null
;
cpt_code
:
unknown
[]
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
|
{
code
:
string
;
description
:
string
;
status
:
(...)
|
(...)
|
(...)
;
}
[]
|
null
;
end_timestamp
:
DbDate
;
error_msg
:
string
|
null
;
file_url
:
string
|
null
;
icd_code
:
|
{
code
:
string
;
description
:
string
;
status
:
(...)
|
(...)
|
(...)
;
}
[]
|
null
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
...
;
bullet_format
?:
...
;
id
:
...
;
name
:
...
;
optional
:
...
;
order
:
...
;
}
[]
;
selected_audit_template_ids
?:
(...)
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
updated_by
:
number
|
null
;
}
|
null
;
}
,
>
;
updateCodes
:
MutationProcedure
<
{
input
:
{
codes
:
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
;
codeType
:
"icd"
|
"dsm"
;
id
:
string
;
}
;
meta
:
object
;
output
:
|
{
icd_code
:
|
{
code
:
string
;
description
:
string
;
status
:
(...)
|
(...)
|
(...)
;
}
[]
|
null
;
id
:
SessionId
;
}
|
{
dsm_code
:
|
{
code
:
string
;
description
:
string
;
status
:
(...)
|
(...)
|
(...)
;
}
[]
|
null
;
id
:
SessionId
;
}
;
}
,
>
;
updatePrivateNote
:
MutationProcedure
<
{
input
:
{
id
:
string
;
privateNote
:
string
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
string
|
null
;
as_summarized_note_type
:
string
|
null
;
audit_run_id
:
string
&
{
__brand
:
"AuditRunId"
}
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
string
&
{
__brand
:
"CaseId"
}
|
null
;
cpt_code
:
unknown
[]
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
end_timestamp
:
DbDate
;
error_msg
:
string
|
null
;
file_url
:
string
|
null
;
icd_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
string
;
bullet_format
?:
(...)
|
(...)
|
(...)
;
id
:
SectionId
;
name
:
string
;
optional
:
boolean
;
order
:
number
;
}
[]
;
selected_audit_template_ids
?:
number
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
updated_by
:
number
|
null
;
}
;
}
,
>
;
updateSessionTime
:
MutationProcedure
<
{
input
:
{
endTimestamp
:
string
;
id
:
string
;
startTimestamp
:
string
}
;
meta
:
object
;
output
:
{
ai_summarized_note
:
string
|
null
;
as_summarized_note_type
:
string
|
null
;
audit_run_id
:
string
&
{
__brand
:
"AuditRunId"
}
|
null
;
audit_status
:
|
"error"
|
"pass"
|
"fail"
|
"needs_review"
|
"pending"
|
"in_progress"
|
"not_started"
|
null
;
case_id
:
string
&
{
__brand
:
"CaseId"
}
|
null
;
cpt_code
:
unknown
[]
|
null
;
created_at
:
DbDate
;
created_by
:
string
|
null
;
dsm_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
end_timestamp
:
DbDate
;
error_msg
:
string
|
null
;
file_url
:
string
|
null
;
icd_code
:
|
{
code
:
string
;
description
:
string
;
status
:
"suggested"
|
"accepted"
|
"rejected"
;
}
[]
|
null
;
id
:
SessionId
;
manual_entry
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
private_note
:
string
|
null
;
progress_status
:
|
"initialized"
|
"processing"
|
"transcribing"
|
"complete"
|
"failed"
|
null
;
selected_template
:
|
{
additional_ai_instructions
?:
string
;
check_cpt
?:
boolean
;
check_demo
?:
boolean
;
check_dsm_5
?:
boolean
;
check_icd_10
?:
boolean
;
created_by
?:
UserId
|
null
;
created_by_circle
?:
boolean
;
hidden_instructions
?:
string
|
null
;
id
:
TemplateId
;
is_allow_bullet_points
?:
boolean
;
is_unstructured_narrative
?:
boolean
;
last_updated
?:
string
|
null
;
last_used
?:
string
|
null
;
name
?:
string
;
original_template_id
?:
string
;
sections
:
{
body
:
string
;
bullet_format
?:
(...)
|
(...)
|
(...)
;
id
:
SectionId
;
name
:
string
;
optional
:
boolean
;
order
:
number
;
}
[]
;
selected_audit_template_ids
?:
number
[]
;
shared_with_org_id
?:
string
;
title
:
string
;
[
key
:
string
]:
unknown
;
}
|
null
;
start_timestamp
:
DbDate
;
transcript
:
string
|
null
;
updated_by
:
number
|
null
;
}
;
}
,
>
;
}
,
>
,
>
= ...
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Circle V2 API Docs
Loading...