Circle V2 API Docs
Preparing search index...
@repo/trpc
routers/patient-charts/index
patientChartsRouter
Variable patientChartsRouter
Const
patientChartsRouter
:
BuiltRouter
<
{
ctx
:
TRPCContext
;
errorShape
:
DefaultErrorShape
;
meta
:
object
;
transformer
:
false
;
}
,
DecorateCreateRouterOptions
<
{
countForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
string
}
;
meta
:
object
;
output
:
{
count
:
number
}
;
}
,
>
;
createForPatient
:
MutationProcedure
<
{
input
:
{
fileName
:
string
;
patientId
:
string
;
storageKey
:
string
}
;
meta
:
object
;
output
:
{
circle_metadata
:
|
{
admittedAt
:
string
|
null
;
capturedAt
:
string
;
dischargedAt
:
string
|
null
;
entityId
:
number
;
episodeEnd
?:
string
|
null
;
episodeStart
?:
string
|
null
;
levelOfCareName
?:
string
|
null
;
patientId
:
PatientId
;
patientName
:
string
;
programEnd
?:
string
|
null
;
programName
?:
string
|
null
;
programStart
?:
string
|
null
;
urLevelOfCareName
?:
string
|
null
;
}
|
null
;
created_at
:
DbDate
;
created_by
:
string
&
{
__brand
:
"UserId"
}
|
null
;
embedding_count
:
string
|
null
;
embedding_err_msg
:
string
|
null
;
embedding_status
:
|
"processing"
|
"failed"
|
"pending"
|
"parse"
|
"extract"
|
"completed"
|
null
;
entity_id
:
number
&
{
__brand
:
"EntityId"
}
|
null
;
external_document_created_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
external_document_id
:
string
|
null
;
external_document_type
:
|
"kipu_evaluation"
|
"kipu_consent_form"
|
"kipu_ciwa_ar"
|
"kipu_ciwa_b"
|
"kipu_group_session"
|
"lightningstep_formdata"
|
"lightningstep_txplan"
|
"kipu_vital_signs"
|
"kipu_orthostatic_vital_signs"
|
"kipu_patient_orders"
|
"kipu_glucose_logs"
|
"kipu_program_history"
|
"kipu_diagnosis_history"
|
"kipu_appointment"
|
"lightningstep_admissions"
|
"kipu_episode_outcome"
|
"sunwave_form"
|
"sunwave_diagnosis"
|
"sunwave_group_note"
|
"sunwave_program"
|
"sunwave_lab_result"
|
"sunwave_assessment"
|
"emr_insurance_information"
|
"insync_episode_summary"
|
"insync_condition"
|
"insync_vital_signs"
|
"insync_lab_result"
|
"insync_observation"
|
"insync_allergy"
|
"insync_immunization"
|
"insync_medication_request"
|
"insync_diagnostic_report"
|
"insync_procedure"
|
"insync_rpa_locadtr"
|
"insync_rpa_treatment_plan"
|
"insync_rpa_biopsychosocial"
|
"synthetic_biopsychosocial"
|
"synthetic_asam"
|
"synthetic_consent"
|
"synthetic_nursing_intake"
|
"synthetic_diagnosis"
|
"synthetic_treatment_plan"
|
"synthetic_group_note"
|
"synthetic_progress_note"
|
"synthetic_ur_review"
|
"synthetic_discharge_summary"
|
"insync_rpa_encounter_note"
|
"insync_rpa_consent_form"
|
"insync_rpa_lab_result"
|
"insync_rpa_insurance"
|
"insync_rpa_document"
|
null
;
external_document_updated_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
file_name
:
string
|
null
;
file_type
:
"patient_chart"
|
"generated_form"
|
"emr_document"
|
null
;
file_url
:
string
|
null
;
id
:
PatientChartId
;
integration_id
:
string
&
{
__brand
:
"IntegrationId"
}
|
null
;
is_ready
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
raw_document
:
unknown
;
run_id
:
string
|
null
;
sources
:
unknown
;
treatment_episode_id
:
|
string
&
{
__brand
:
"TreatmentEpisodeId"
}
|
null
;
updated_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
}
;
}
,
>
;
documentTypesForPatient
:
QueryProcedure
<
{
input
:
{
patientId
:
string
;
treatmentEpisodeId
?:
string
}
;
meta
:
object
;
output
:
(
|
"kipu_evaluation"
|
"kipu_consent_form"
|
"kipu_ciwa_ar"
|
"kipu_ciwa_b"
|
"kipu_group_session"
|
"lightningstep_formdata"
|
"lightningstep_txplan"
|
"kipu_vital_signs"
|
"kipu_orthostatic_vital_signs"
|
"kipu_patient_orders"
|
"kipu_glucose_logs"
|
"kipu_program_history"
|
"kipu_diagnosis_history"
|
"kipu_appointment"
|
"lightningstep_admissions"
|
"kipu_episode_outcome"
|
"sunwave_form"
|
"sunwave_diagnosis"
|
"sunwave_group_note"
|
"sunwave_program"
|
"sunwave_lab_result"
|
"sunwave_assessment"
|
"emr_insurance_information"
|
"insync_episode_summary"
|
"insync_condition"
|
"insync_vital_signs"
|
"insync_lab_result"
|
"insync_observation"
|
"insync_allergy"
|
"insync_immunization"
|
"insync_medication_request"
|
"insync_diagnostic_report"
|
"insync_procedure"
|
"insync_rpa_locadtr"
|
"insync_rpa_treatment_plan"
|
"insync_rpa_biopsychosocial"
|
"synthetic_biopsychosocial"
|
"synthetic_asam"
|
"synthetic_consent"
|
"synthetic_nursing_intake"
|
"synthetic_diagnosis"
|
"synthetic_treatment_plan"
|
"synthetic_group_note"
|
"synthetic_progress_note"
|
"synthetic_ur_review"
|
"synthetic_discharge_summary"
|
"insync_rpa_encounter_note"
|
"insync_rpa_consent_form"
|
"insync_rpa_lab_result"
|
"insync_rpa_insurance"
|
"insync_rpa_document"
)
[]
;
}
,
>
;
getById
:
QueryProcedure
<
{
input
:
{
id
:
string
;
patientId
:
string
}
;
meta
:
object
;
output
:
{
circle_metadata
:
|
{
admittedAt
:
string
|
null
;
capturedAt
:
string
;
dischargedAt
:
string
|
null
;
entityId
:
number
;
episodeEnd
?:
string
|
null
;
episodeStart
?:
string
|
null
;
levelOfCareName
?:
string
|
null
;
patientId
:
PatientId
;
patientName
:
string
;
programEnd
?:
string
|
null
;
programName
?:
string
|
null
;
programStart
?:
string
|
null
;
urLevelOfCareName
?:
string
|
null
;
}
|
null
;
created_at
:
DbDate
;
embedding_err_msg
:
string
|
null
;
embedding_status
:
|
"processing"
|
"failed"
|
"pending"
|
"parse"
|
"extract"
|
"completed"
|
null
;
external_document_type
:
|
"kipu_evaluation"
|
"kipu_consent_form"
|
"kipu_ciwa_ar"
|
"kipu_ciwa_b"
|
"kipu_group_session"
|
"lightningstep_formdata"
|
"lightningstep_txplan"
|
"kipu_vital_signs"
|
"kipu_orthostatic_vital_signs"
|
"kipu_patient_orders"
|
"kipu_glucose_logs"
|
"kipu_program_history"
|
"kipu_diagnosis_history"
|
"kipu_appointment"
|
"lightningstep_admissions"
|
"kipu_episode_outcome"
|
"sunwave_form"
|
"sunwave_diagnosis"
|
"sunwave_group_note"
|
"sunwave_program"
|
"sunwave_lab_result"
|
"sunwave_assessment"
|
"emr_insurance_information"
|
"insync_episode_summary"
|
"insync_condition"
|
"insync_vital_signs"
|
"insync_lab_result"
|
"insync_observation"
|
"insync_allergy"
|
"insync_immunization"
|
"insync_medication_request"
|
"insync_diagnostic_report"
|
"insync_procedure"
|
"insync_rpa_locadtr"
|
"insync_rpa_treatment_plan"
|
"insync_rpa_biopsychosocial"
|
"synthetic_biopsychosocial"
|
"synthetic_asam"
|
"synthetic_consent"
|
"synthetic_nursing_intake"
|
"synthetic_diagnosis"
|
"synthetic_treatment_plan"
|
"synthetic_group_note"
|
"synthetic_progress_note"
|
"synthetic_ur_review"
|
"synthetic_discharge_summary"
|
"insync_rpa_encounter_note"
|
"insync_rpa_consent_form"
|
"insync_rpa_lab_result"
|
"insync_rpa_insurance"
|
"insync_rpa_document"
|
null
;
facility_timezone
:
string
|
null
;
file_name
:
string
|
null
;
file_type
:
"patient_chart"
|
"generated_form"
|
"emr_document"
|
null
;
file_url
:
string
|
null
;
id
:
PatientChartId
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
raw_document
:
unknown
;
signed_url
:
string
|
null
;
}
;
}
,
>
;
getTraceLinks
:
QueryProcedure
<
{
input
:
{
patientChartId
:
string
}
;
meta
:
object
;
output
:
|
{
cloudcruiseSessionId
:
string
|
null
;
extendRunId
:
string
|
null
;
extendWorkflowId
:
string
|
null
;
}
|
null
;
}
,
>
;
listAllIdsForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
number
;
dateFrom
?:
string
;
dateTo
?:
string
;
externalDocumentType
?:
unknown
;
fileType
?:
unknown
;
patientId
:
string
;
search
?:
string
;
sortOrder
?:
"asc"
|
"desc"
;
treatmentEpisodeId
?:
string
;
}
;
meta
:
object
;
output
:
PatientChartId
[]
;
}
,
>
;
listByIds
:
QueryProcedure
<
{
input
:
{
ids
:
string
[]
;
patientId
:
string
}
;
meta
:
object
;
output
:
Pick
<
{
circle_metadata
:
|
{
admittedAt
:
(...)
|
(...)
;
capturedAt
:
string
;
dischargedAt
:
(...)
|
(...)
;
entityId
:
number
;
episodeEnd
?:
(...)
|
(...)
|
(...)
;
episodeStart
?:
(...)
|
(...)
|
(...)
;
levelOfCareName
?:
(...)
|
(...)
|
(...)
;
patientId
:
PatientId
;
patientName
:
string
;
programEnd
?:
(...)
|
(...)
|
(...)
;
programName
?:
(...)
|
(...)
|
(...)
;
programStart
?:
(...)
|
(...)
|
(...)
;
urLevelOfCareName
?:
(...)
|
(...)
|
(...)
;
}
|
null
;
created_at
:
DbDate
;
created_by
:
string
&
{
__brand
:
...
}
|
null
;
embedding_count
:
string
|
null
;
embedding_err_msg
:
string
|
null
;
embedding_status
:
|
"processing"
|
"failed"
|
"pending"
|
"parse"
|
"extract"
|
"completed"
|
null
;
entity_id
:
number
&
{
__brand
:
...
}
|
null
;
external_document_created_at
:
string
&
{
__brand
:
...
}
|
null
;
external_document_id
:
string
|
null
;
external_document_type
:
|
"kipu_evaluation"
|
"kipu_consent_form"
|
"kipu_ciwa_ar"
|
"kipu_ciwa_b"
|
"kipu_group_session"
|
"lightningstep_formdata"
|
"lightningstep_txplan"
|
"kipu_vital_signs"
|
"kipu_orthostatic_vital_signs"
|
"kipu_patient_orders"
|
"kipu_glucose_logs"
|
"kipu_program_history"
|
"kipu_diagnosis_history"
|
"kipu_appointment"
|
"lightningstep_admissions"
|
"kipu_episode_outcome"
|
"sunwave_form"
|
"sunwave_diagnosis"
|
"sunwave_group_note"
|
"sunwave_program"
|
"sunwave_lab_result"
|
"sunwave_assessment"
|
"emr_insurance_information"
|
"insync_episode_summary"
|
"insync_condition"
|
"insync_vital_signs"
|
"insync_lab_result"
|
"insync_observation"
|
"insync_allergy"
|
"insync_immunization"
|
"insync_medication_request"
|
"insync_diagnostic_report"
|
"insync_procedure"
|
"insync_rpa_locadtr"
|
"insync_rpa_treatment_plan"
|
"insync_rpa_biopsychosocial"
|
"synthetic_biopsychosocial"
|
"synthetic_asam"
|
"synthetic_consent"
|
"synthetic_nursing_intake"
|
"synthetic_diagnosis"
|
"synthetic_treatment_plan"
|
"synthetic_group_note"
|
"synthetic_progress_note"
|
"synthetic_ur_review"
|
"synthetic_discharge_summary"
|
"insync_rpa_encounter_note"
|
"insync_rpa_consent_form"
|
"insync_rpa_lab_result"
|
"insync_rpa_insurance"
|
"insync_rpa_document"
|
null
;
external_document_updated_at
:
string
&
{
__brand
:
...
}
|
null
;
file_name
:
string
|
null
;
file_type
:
"patient_chart"
|
"generated_form"
|
"emr_document"
|
null
;
file_url
:
string
|
null
;
id
:
PatientChartId
;
integration_id
:
string
&
{
__brand
:
...
}
|
null
;
is_ready
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
...
}
|
null
;
raw_document
:
unknown
;
run_id
:
string
|
null
;
sources
:
unknown
;
treatment_episode_id
:
string
&
{
__brand
:
...
}
|
null
;
updated_at
:
string
&
{
__brand
:
...
}
|
null
;
}
,
"id"
|
"file_name"
|
"embedding_status"
,
>
[]
;
}
,
>
;
listForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
number
;
dateFrom
?:
string
;
dateTo
?:
string
;
externalDocumentType
?:
unknown
;
fileType
?:
unknown
;
limit
?:
number
;
offset
?:
number
;
patientId
:
string
;
search
?:
string
;
sortOrder
?:
"asc"
|
"desc"
;
treatmentEpisodeId
?:
string
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
{
created_at
:
DbDate
;
embedding_status
:
|
"processing"
|
"failed"
|
"pending"
|
"parse"
|
"extract"
|
"completed"
|
null
;
external_document_created_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
external_document_type
:
|
"kipu_evaluation"
|
"kipu_consent_form"
|
"kipu_ciwa_ar"
|
"kipu_ciwa_b"
|
"kipu_group_session"
|
"lightningstep_formdata"
|
"lightningstep_txplan"
|
"kipu_vital_signs"
|
"kipu_orthostatic_vital_signs"
|
"kipu_patient_orders"
|
"kipu_glucose_logs"
|
"kipu_program_history"
|
"kipu_diagnosis_history"
|
"kipu_appointment"
|
"lightningstep_admissions"
|
"kipu_episode_outcome"
|
"sunwave_form"
|
"sunwave_diagnosis"
|
"sunwave_group_note"
|
"sunwave_program"
|
"sunwave_lab_result"
|
"sunwave_assessment"
|
"emr_insurance_information"
|
"insync_episode_summary"
|
"insync_condition"
|
"insync_vital_signs"
|
"insync_lab_result"
|
"insync_observation"
|
"insync_allergy"
|
"insync_immunization"
|
"insync_medication_request"
|
"insync_diagnostic_report"
|
"insync_procedure"
|
"insync_rpa_locadtr"
|
"insync_rpa_treatment_plan"
|
"insync_rpa_biopsychosocial"
|
"synthetic_biopsychosocial"
|
"synthetic_asam"
|
"synthetic_consent"
|
"synthetic_nursing_intake"
|
"synthetic_diagnosis"
|
"synthetic_treatment_plan"
|
"synthetic_group_note"
|
"synthetic_progress_note"
|
"synthetic_ur_review"
|
"synthetic_discharge_summary"
|
"insync_rpa_encounter_note"
|
"insync_rpa_consent_form"
|
"insync_rpa_lab_result"
|
"insync_rpa_insurance"
|
"insync_rpa_document"
|
null
;
file_name
:
string
|
null
;
file_type
:
"patient_chart"
|
"generated_form"
|
"emr_document"
|
null
;
file_url
:
string
|
null
;
id
:
PatientChartId
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
treatment_episode_id
:
|
string
&
{
__brand
:
"TreatmentEpisodeId"
}
|
null
;
updated_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
}
,
>
;
}
,
>
;
listGeneratedFormsForPatient
:
QueryProcedure
<
{
input
:
{
cursor
?:
number
;
dateFrom
?:
string
;
dateTo
?:
string
;
limit
?:
number
;
offset
?:
number
;
patientId
:
string
;
search
?:
string
;
sortOrder
?:
"asc"
|
"desc"
;
}
;
meta
:
object
;
output
:
PaginatedResponse
<
{
created_at
:
DbDate
;
embedding_err_msg
:
string
|
null
;
embedding_status
:
|
"processing"
|
"failed"
|
"pending"
|
"parse"
|
"extract"
|
"completed"
|
null
;
file_name
:
string
|
null
;
file_type
:
"patient_chart"
|
"generated_form"
|
"emr_document"
|
null
;
file_url
:
string
|
null
;
form_id
:
string
&
{
__brand
:
"FormId"
}
|
null
;
form_run_error_msg
:
string
|
null
;
form_run_finished_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
form_run_status
:
string
|
null
;
id
:
PatientChartId
;
is_ready
:
boolean
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
run_id
:
string
|
null
;
sources
:
unknown
;
updated_at
:
string
&
{
__brand
:
"DbDate"
}
|
null
;
}
,
>
;
}
,
>
;
reprocess
:
MutationProcedure
<
{
input
:
{
patientChartId
:
string
;
patientId
:
string
}
;
meta
:
object
;
output
:
{
newRunIds
:
ExtendRunId
[]
}
;
}
,
>
;
}
,
>
,
>
= ...
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Circle V2 API Docs
Loading...