Circle V2 API Docs
Preparing search index...
@repo/db
patientAdmissionsRepo
Variable patientAdmissionsRepo
Const
patientAdmissionsRepo
:
DbRepo
<
{
getAllForIntegration
:
(
integrationId
:
IntegrationId
,
)
=>
Promise
<
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
level_of_care_name
:
string
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
[]
,
>
;
getByExternalAdmissionId
:
(
patientId
:
PatientId
,
integrationId
:
IntegrationId
,
externalAdmissionId
:
string
,
)
=>
Promise
<
|
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
|
undefined
,
>
;
getByPatientId
:
(
patientId
:
PatientId
,
)
=>
Promise
<
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
[]
,
>
;
getLatestByPatientId
:
(
patientId
:
PatientId
,
)
=>
Promise
<
|
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
|
null
,
>
;
getLatestSync
:
(
patientId
:
PatientId
)
=>
Promise
<
string
|
null
>
;
latestActiveForPatient
:
(
patientId
:
PatientId
,
)
=>
Promise
<
|
{
admitted_at
:
string
;
discharged_at
:
string
|
null
;
entity_id
:
number
&
{
__brand
:
"EntityId"
}
|
null
;
external_admission_id
:
string
|
null
;
facility_id
:
string
&
{
__brand
:
"FacilityId"
}
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
utilization_reviews
:
{
end_date
:
string
|
null
;
id
:
PatientUtilizationReviewId
;
start_date
:
string
|
null
;
}
[]
;
}
|
undefined
,
>
;
listActiveForIntegration
:
(
integrationId
:
IntegrationId
,
)
=>
Promise
<
{
admitted_at
:
string
;
discharged_at
:
string
|
null
;
entity_id
:
number
&
{
__brand
:
"EntityId"
}
|
null
;
external_admission_id
:
string
|
null
;
facility_id
:
string
&
{
__brand
:
"FacilityId"
}
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
utilization_reviews
:
{
end_date
:
string
|
null
;
id
:
PatientUtilizationReviewId
;
start_date
:
string
|
null
;
}
[]
;
}
[]
,
>
;
listForPatientByIntegration
:
(
patientId
:
PatientId
,
integrationId
:
IntegrationId
,
)
=>
Promise
<
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
level_of_care_name
:
string
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
[]
,
>
;
patientHasEmrAdmission
:
(
patientId
:
PatientId
)
=>
Promise
<
boolean
>
;
update
:
(
id
:
PatientAdmissionId
,
params
:
{
admitted_at
?:
string
;
created_at
?:
DbDate
;
discharged_at
?:
string
|
null
;
external_admission_id
?:
string
|
null
;
id
?:
PatientAdmissionId
;
integration_id
?:
string
|
null
;
last_sync
?:
string
|
null
;
level_of_care_id
?:
number
|
null
;
patient_id
?:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
?:
DbDate
;
}
,
)
=>
Promise
<
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
,
>
;
upsert
:
(
rows
:
(
{
admitted_at
:
string
}
&
{
created_at
?:
DbDate
;
discharged_at
?:
string
|
null
;
external_admission_id
?:
string
|
null
;
id
?:
PatientAdmissionId
;
integration_id
?:
string
|
null
;
last_sync
?:
string
|
null
;
level_of_care_id
?:
number
|
null
;
patient_id
?:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
?:
DbDate
;
}
)
[]
,
)
=>
Promise
<
{
admitted_at
:
string
;
created_at
:
DbDate
;
discharged_at
:
string
|
null
;
external_admission_id
:
string
|
null
;
id
:
PatientAdmissionId
;
integration_id
:
string
|
null
;
last_sync
:
string
|
null
;
level_of_care_id
:
number
|
null
;
patient_id
:
string
&
{
__brand
:
"PatientId"
}
|
null
;
updated_at
:
DbDate
;
}
[]
,
>
;
}
,
>
= ...
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Circle V2 API Docs
Loading...