@hipnation-truth/sdk 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +30 -1
- package/dist/react.d.ts +30 -1
- package/dist/react.js +18 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +16 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -447,6 +447,37 @@ declare class PatientDetailsResource {
|
|
|
447
447
|
getMedical(elationId: string): Promise<PatientMedicalDetailsResult>;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
/**
|
|
451
|
+
* PhysiciansResource — Convex-backed physician lookups.
|
|
452
|
+
*
|
|
453
|
+
* Populated from Elation by Truth's daily PhysiciansBackfillCron. Replaces
|
|
454
|
+
* per-physician Elation HTTP hops with a single Convex batch query.
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
interface Physician {
|
|
458
|
+
_id: string;
|
|
459
|
+
elationId: number;
|
|
460
|
+
firstName?: string;
|
|
461
|
+
lastName?: string;
|
|
462
|
+
npi?: string;
|
|
463
|
+
credentials?: string;
|
|
464
|
+
specialties?: string[];
|
|
465
|
+
practice?: number;
|
|
466
|
+
email?: string;
|
|
467
|
+
phone?: string;
|
|
468
|
+
lastSyncedAt: string;
|
|
469
|
+
}
|
|
470
|
+
declare class PhysiciansResource {
|
|
471
|
+
private readonly convex;
|
|
472
|
+
constructor(convex: ConvexHttpClient);
|
|
473
|
+
/**
|
|
474
|
+
* Resolve a batch of physicians by Elation IDs. Missing ids are dropped.
|
|
475
|
+
*/
|
|
476
|
+
getByElationIds(ids: number[]): Promise<Physician[]>;
|
|
477
|
+
getByElationId(id: number): Promise<Physician | null>;
|
|
478
|
+
listByPractice(practice: number, limit?: number): Promise<Physician[]>;
|
|
479
|
+
}
|
|
480
|
+
|
|
450
481
|
/**
|
|
451
482
|
* Patient interfaces for the Truth SDK.
|
|
452
483
|
*/
|
|
@@ -1067,6 +1098,8 @@ declare class TruthClient {
|
|
|
1067
1098
|
readonly attachments: AttachmentsResource;
|
|
1068
1099
|
/** Notes — push formatted notes to Elation */
|
|
1069
1100
|
readonly notes: NotesResource;
|
|
1101
|
+
/** Physicians (Convex-backed cache from Elation) */
|
|
1102
|
+
readonly physicians: PhysiciansResource;
|
|
1070
1103
|
private readonly convex;
|
|
1071
1104
|
private readonly tracker;
|
|
1072
1105
|
constructor(config: TruthClientConfig);
|
|
@@ -1194,4 +1227,4 @@ declare class Tracker {
|
|
|
1194
1227
|
private registerShutdownHooks;
|
|
1195
1228
|
}
|
|
1196
1229
|
|
|
1197
|
-
export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationSentPayload, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, SECURITY_EVENTS, type ScheduleReminderInput, type ScheduleReminderResult, type SecurityAccessDeniedPayload, type SecurityEventType, type SendSmsParams, type SendSmsResponse, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UpdateTaskStatusInput, type VoicemailAuthResponse, generateUuidV7 };
|
|
1230
|
+
export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationSentPayload, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, SECURITY_EVENTS, type ScheduleReminderInput, type ScheduleReminderResult, type SecurityAccessDeniedPayload, type SecurityEventType, type SendSmsParams, type SendSmsResponse, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UpdateTaskStatusInput, type VoicemailAuthResponse, generateUuidV7 };
|
package/dist/index.d.ts
CHANGED
|
@@ -447,6 +447,37 @@ declare class PatientDetailsResource {
|
|
|
447
447
|
getMedical(elationId: string): Promise<PatientMedicalDetailsResult>;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
/**
|
|
451
|
+
* PhysiciansResource — Convex-backed physician lookups.
|
|
452
|
+
*
|
|
453
|
+
* Populated from Elation by Truth's daily PhysiciansBackfillCron. Replaces
|
|
454
|
+
* per-physician Elation HTTP hops with a single Convex batch query.
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
interface Physician {
|
|
458
|
+
_id: string;
|
|
459
|
+
elationId: number;
|
|
460
|
+
firstName?: string;
|
|
461
|
+
lastName?: string;
|
|
462
|
+
npi?: string;
|
|
463
|
+
credentials?: string;
|
|
464
|
+
specialties?: string[];
|
|
465
|
+
practice?: number;
|
|
466
|
+
email?: string;
|
|
467
|
+
phone?: string;
|
|
468
|
+
lastSyncedAt: string;
|
|
469
|
+
}
|
|
470
|
+
declare class PhysiciansResource {
|
|
471
|
+
private readonly convex;
|
|
472
|
+
constructor(convex: ConvexHttpClient);
|
|
473
|
+
/**
|
|
474
|
+
* Resolve a batch of physicians by Elation IDs. Missing ids are dropped.
|
|
475
|
+
*/
|
|
476
|
+
getByElationIds(ids: number[]): Promise<Physician[]>;
|
|
477
|
+
getByElationId(id: number): Promise<Physician | null>;
|
|
478
|
+
listByPractice(practice: number, limit?: number): Promise<Physician[]>;
|
|
479
|
+
}
|
|
480
|
+
|
|
450
481
|
/**
|
|
451
482
|
* Patient interfaces for the Truth SDK.
|
|
452
483
|
*/
|
|
@@ -1067,6 +1098,8 @@ declare class TruthClient {
|
|
|
1067
1098
|
readonly attachments: AttachmentsResource;
|
|
1068
1099
|
/** Notes — push formatted notes to Elation */
|
|
1069
1100
|
readonly notes: NotesResource;
|
|
1101
|
+
/** Physicians (Convex-backed cache from Elation) */
|
|
1102
|
+
readonly physicians: PhysiciansResource;
|
|
1070
1103
|
private readonly convex;
|
|
1071
1104
|
private readonly tracker;
|
|
1072
1105
|
constructor(config: TruthClientConfig);
|
|
@@ -1194,4 +1227,4 @@ declare class Tracker {
|
|
|
1194
1227
|
private registerShutdownHooks;
|
|
1195
1228
|
}
|
|
1196
1229
|
|
|
1197
|
-
export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationSentPayload, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, SECURITY_EVENTS, type ScheduleReminderInput, type ScheduleReminderResult, type SecurityAccessDeniedPayload, type SecurityEventType, type SendSmsParams, type SendSmsResponse, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UpdateTaskStatusInput, type VoicemailAuthResponse, generateUuidV7 };
|
|
1230
|
+
export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationSentPayload, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, SECURITY_EVENTS, type ScheduleReminderInput, type ScheduleReminderResult, type SecurityAccessDeniedPayload, type SecurityEventType, type SendSmsParams, type SendSmsResponse, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UpdateTaskStatusInput, type VoicemailAuthResponse, generateUuidV7 };
|
package/dist/index.js
CHANGED
|
@@ -76,6 +76,7 @@ __export(src_exports, {
|
|
|
76
76
|
PatientDetailsError: () => PatientDetailsError,
|
|
77
77
|
PatientDetailsResource: () => PatientDetailsResource,
|
|
78
78
|
PatientResource: () => PatientResource,
|
|
79
|
+
PhysiciansResource: () => PhysiciansResource,
|
|
79
80
|
REMINDER_EVENTS: () => REMINDER_EVENTS,
|
|
80
81
|
RemindersResource: () => RemindersResource,
|
|
81
82
|
SECURITY_EVENTS: () => SECURITY_EVENTS,
|
|
@@ -680,6 +681,58 @@ var PatientDetailsResource = class {
|
|
|
680
681
|
}
|
|
681
682
|
};
|
|
682
683
|
|
|
684
|
+
// src/resources/physicians.ts
|
|
685
|
+
var PhysiciansResource = class {
|
|
686
|
+
constructor(convex) {
|
|
687
|
+
this.convex = convex;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Resolve a batch of physicians by Elation IDs. Missing ids are dropped.
|
|
691
|
+
*/
|
|
692
|
+
getByElationIds(ids) {
|
|
693
|
+
return __async(this, null, function* () {
|
|
694
|
+
if (ids.length === 0) {
|
|
695
|
+
return [];
|
|
696
|
+
}
|
|
697
|
+
try {
|
|
698
|
+
const rows = yield this.convex.query(
|
|
699
|
+
"physicians:getByElationIds",
|
|
700
|
+
{ ids }
|
|
701
|
+
);
|
|
702
|
+
return rows != null ? rows : [];
|
|
703
|
+
} catch (e) {
|
|
704
|
+
return [];
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
getByElationId(id) {
|
|
709
|
+
return __async(this, null, function* () {
|
|
710
|
+
try {
|
|
711
|
+
const row = yield this.convex.query(
|
|
712
|
+
"physicians:getByElationId",
|
|
713
|
+
{ id }
|
|
714
|
+
);
|
|
715
|
+
return row != null ? row : null;
|
|
716
|
+
} catch (e) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
listByPractice(practice, limit) {
|
|
722
|
+
return __async(this, null, function* () {
|
|
723
|
+
try {
|
|
724
|
+
const rows = yield this.convex.query(
|
|
725
|
+
"physicians:listByPractice",
|
|
726
|
+
{ practice, limit }
|
|
727
|
+
);
|
|
728
|
+
return rows != null ? rows : [];
|
|
729
|
+
} catch (e) {
|
|
730
|
+
return [];
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
|
|
683
736
|
// src/resources/patients.ts
|
|
684
737
|
var PatientResource = class {
|
|
685
738
|
constructor(convexClient) {
|
|
@@ -1167,6 +1220,7 @@ var TruthClient = class {
|
|
|
1167
1220
|
this.convex
|
|
1168
1221
|
);
|
|
1169
1222
|
this.notes = new NotesResource(apiUrl, config.apiKey);
|
|
1223
|
+
this.physicians = new PhysiciansResource(this.convex);
|
|
1170
1224
|
}
|
|
1171
1225
|
/**
|
|
1172
1226
|
* The resolved Truth API base URL for this environment.
|
|
@@ -1328,6 +1382,7 @@ var ENVIRONMENTS = {
|
|
|
1328
1382
|
PatientDetailsError,
|
|
1329
1383
|
PatientDetailsResource,
|
|
1330
1384
|
PatientResource,
|
|
1385
|
+
PhysiciansResource,
|
|
1331
1386
|
REMINDER_EVENTS,
|
|
1332
1387
|
RemindersResource,
|
|
1333
1388
|
SECURITY_EVENTS,
|