@ovok/core 0.4.33 → 0.4.34
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/README.md +3 -7
- package/dist/client/patient/methods.d.ts +1 -3
- package/dist/client/patient/methods.js +0 -9
- package/dist/client/patient/types.d.ts +0 -13
- package/dist/client/platform/methods.d.ts +1 -6
- package/dist/client/platform/methods.js +0 -12
- package/dist/client/platform/types.d.ts +0 -8
- package/dist/conformance/api-requirements.js +0 -5
- package/dist/conformance/capability-requirements.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +2 -4
- package/dist/hooks/patient-hooks.d.ts +1 -3
- package/dist/hooks/patient-hooks.js +1 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -157,12 +157,7 @@ const latest = await client.getPatientLatestObservations({
|
|
|
157
157
|
code: ["8867-4", "9279-1"],
|
|
158
158
|
max: 5,
|
|
159
159
|
});
|
|
160
|
-
const currentTelemetry = await client.
|
|
161
|
-
const history = await client.getPatientDeviceTelemetryHistory(deviceId, {
|
|
162
|
-
from: "2026-09-25T00:00:00.000Z",
|
|
163
|
-
to: "2026-09-26T00:00:00.000Z",
|
|
164
|
-
pageSize: 50,
|
|
165
|
-
});
|
|
160
|
+
const currentTelemetry = await client.getSlimDeviceTelemetry(deviceId);
|
|
166
161
|
const measurements = await client.listPatientMeasurementHistory({
|
|
167
162
|
patient: `Patient/${me.profile.id}`,
|
|
168
163
|
_sort: "-date",
|
|
@@ -179,7 +174,8 @@ const notifications = await client.listPatientNotifications({
|
|
|
179
174
|
```
|
|
180
175
|
|
|
181
176
|
These helpers use bearer-authenticated `/auth/me` and `/fhir/*` contracts and are additive to the
|
|
182
|
-
native observation and offline-measurement APIs.
|
|
177
|
+
native observation and offline-measurement APIs. Live device telemetry comes from the Slim routes
|
|
178
|
+
(`getSlimDeviceTelemetry`, `listSlimLiveTelemetry`). The returned resource lists are subject to the
|
|
183
179
|
patient's backend AccessPolicy. Device pairing/claiming and notification acknowledgement are not
|
|
184
180
|
invented here because `../ovok-core` does not currently expose patient-scoped contracts for them.
|
|
185
181
|
The exported `OVOK_CORE_API_REQUIREMENTS` lists ordinary HTTP routes, while
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
2
|
import { OvokClient } from "../ovok-client";
|
|
3
|
-
import { OvokCurrentPatientProfile, OvokPatientLatestObservationsQuery, OvokPatientObservationBundle, OvokPatientAppointment, OvokPatientCarePlan, OvokPatientDashboard, OvokPatientDashboardQuery, OvokPatientDevice, OvokPatientMeasurement, OvokPatientNotification, OvokPatientQuestionnaire, OvokPatientQuestionnaireResponse, OvokPatientResourceQuery, OvokPatientSchedule, OvokPatientSchedulingQuery, OvokPatientSlot
|
|
3
|
+
import { OvokCurrentPatientProfile, OvokPatientLatestObservationsQuery, OvokPatientObservationBundle, OvokPatientAppointment, OvokPatientCarePlan, OvokPatientDashboard, OvokPatientDashboardQuery, OvokPatientDevice, OvokPatientMeasurement, OvokPatientNotification, OvokPatientQuestionnaire, OvokPatientQuestionnaireResponse, OvokPatientResourceQuery, OvokPatientSchedule, OvokPatientSchedulingQuery, OvokPatientSlot } from "./types";
|
|
4
4
|
export declare function getCurrentPatientProfile(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokCurrentPatientProfile>;
|
|
5
5
|
export declare function getPatientLatestObservations(this: OvokClient, params?: OvokPatientLatestObservationsQuery, requestOptions?: MedplumRequestOptions): Promise<OvokPatientObservationBundle>;
|
|
6
|
-
export declare function getPatientDeviceTelemetry(this: OvokClient, deviceId: string, requestOptions?: MedplumRequestOptions): Promise<OvokPatientObservationBundle>;
|
|
7
|
-
export declare function getPatientDeviceTelemetryHistory(this: OvokClient, deviceId: string, params?: OvokPatientTelemetryHistoryQuery, requestOptions?: MedplumRequestOptions): Promise<OvokPatientTelemetryHistory>;
|
|
8
6
|
export declare function listPatientAppointments(this: OvokClient, params?: OvokPatientSchedulingQuery, requestOptions?: MedplumRequestOptions): Promise<OvokPatientAppointment[]>;
|
|
9
7
|
export declare function getPatientAppointment(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<OvokPatientAppointment>;
|
|
10
8
|
export declare function createPatientAppointment(this: OvokClient, appointment: OvokPatientAppointment, requestOptions?: MedplumRequestOptions): Promise<OvokPatientAppointment>;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCurrentPatientProfile = getCurrentPatientProfile;
|
|
4
4
|
exports.getPatientLatestObservations = getPatientLatestObservations;
|
|
5
|
-
exports.getPatientDeviceTelemetry = getPatientDeviceTelemetry;
|
|
6
|
-
exports.getPatientDeviceTelemetryHistory = getPatientDeviceTelemetryHistory;
|
|
7
5
|
exports.listPatientAppointments = listPatientAppointments;
|
|
8
6
|
exports.getPatientAppointment = getPatientAppointment;
|
|
9
7
|
exports.createPatientAppointment = createPatientAppointment;
|
|
@@ -23,7 +21,6 @@ exports.getPatientDevice = getPatientDevice;
|
|
|
23
21
|
exports.listPatientNotifications = listPatientNotifications;
|
|
24
22
|
exports.getPatientNotification = getPatientNotification;
|
|
25
23
|
exports.getPatientDashboard = getPatientDashboard;
|
|
26
|
-
const segment = (value) => encodeURIComponent(value);
|
|
27
24
|
const query = (params) => {
|
|
28
25
|
const values = new URLSearchParams();
|
|
29
26
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -45,12 +42,6 @@ async function getPatientLatestObservations(params = {}, requestOptions) {
|
|
|
45
42
|
code,
|
|
46
43
|
})}`, { ...{ cache: "no-cache" }, ...requestOptions });
|
|
47
44
|
}
|
|
48
|
-
async function getPatientDeviceTelemetry(deviceId, requestOptions) {
|
|
49
|
-
return this.get(`/fhir/Device/${segment(deviceId)}/telemetry`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
50
|
-
}
|
|
51
|
-
async function getPatientDeviceTelemetryHistory(deviceId, params = {}, requestOptions) {
|
|
52
|
-
return this.get(`/fhir/Device/${segment(deviceId)}/telemetry/history${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
53
|
-
}
|
|
54
45
|
async function listPatientAppointments(params = {}, requestOptions) {
|
|
55
46
|
return this.searchResources("Appointment", params, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
56
47
|
}
|
|
@@ -61,13 +61,6 @@ export type OvokPatientLatestObservationsQuery = {
|
|
|
61
61
|
max?: number;
|
|
62
62
|
code?: string | string[];
|
|
63
63
|
};
|
|
64
|
-
export type OvokPatientTelemetryHistoryQuery = {
|
|
65
|
-
from?: string;
|
|
66
|
-
to?: string;
|
|
67
|
-
code?: string;
|
|
68
|
-
page?: number;
|
|
69
|
-
pageSize?: number;
|
|
70
|
-
};
|
|
71
64
|
export type OvokPatientSchedulingQuery = Record<string, string | number | boolean | undefined>;
|
|
72
65
|
export type OvokPatientResourceQuery = OvokPatientSchedulingQuery;
|
|
73
66
|
export type OvokPatientDashboardQuery = {
|
|
@@ -91,9 +84,3 @@ export type OvokPatientDashboard = {
|
|
|
91
84
|
carePlans: OvokPatientCarePlan[];
|
|
92
85
|
};
|
|
93
86
|
export type OvokPatientObservationBundle = Bundle<Observation>;
|
|
94
|
-
export type OvokPatientTelemetryHistory = {
|
|
95
|
-
deviceId: string;
|
|
96
|
-
patientId: string;
|
|
97
|
-
signalsPatientId: string;
|
|
98
|
-
[key: string]: unknown;
|
|
99
|
-
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
2
|
import { OvokClient } from "../ovok-client";
|
|
3
|
-
import { OvokAccount, OvokAdministeredProject,
|
|
3
|
+
import { OvokAccount, OvokAdministeredProject, OvokI18nDocument, OvokI18nValue, OvokInviteProjectMember, OvokLocalization, OvokLocalizationQuery, OvokLocalizationUpdate, OvokLocales, OvokPage, OvokPatientObservations, OvokProjectFeature, OvokProjectFeatures, OvokProjectMember, OvokProjectMemberResponse, OvokProjectSettings, OvokProjectSettingKey, OvokProjectTextSettingKey, OvokRemoveProjectMemberResponse, OvokUpdateProjectMember } from "./types";
|
|
4
4
|
export declare function getAccounts(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokAccount[]>;
|
|
5
5
|
export declare function listAdministeredProjects(this: OvokClient, params?: {
|
|
6
6
|
page?: number;
|
|
7
7
|
count?: number;
|
|
8
8
|
}, requestOptions?: MedplumRequestOptions): Promise<OvokPage<OvokAdministeredProject>>;
|
|
9
|
-
export declare function createProject(this: OvokClient, body: OvokCreateProject, requestOptions?: MedplumRequestOptions): Promise<OvokCreatedProject>;
|
|
10
|
-
export declare function bootstrapProject(this: OvokClient, body: OvokCreateProject, requestOptions?: MedplumRequestOptions): Promise<OvokCreatedProject>;
|
|
11
|
-
export declare function getProjectTenantCode(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<{
|
|
12
|
-
tenantCode: string;
|
|
13
|
-
}>;
|
|
14
9
|
export declare function listProjectMembers(this: OvokClient, params?: {
|
|
15
10
|
accessPolicyId?: string;
|
|
16
11
|
profileId?: string;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAccounts = getAccounts;
|
|
4
4
|
exports.listAdministeredProjects = listAdministeredProjects;
|
|
5
|
-
exports.createProject = createProject;
|
|
6
|
-
exports.bootstrapProject = bootstrapProject;
|
|
7
|
-
exports.getProjectTenantCode = getProjectTenantCode;
|
|
8
5
|
exports.listProjectMembers = listProjectMembers;
|
|
9
6
|
exports.inviteProjectMember = inviteProjectMember;
|
|
10
7
|
exports.updateProjectMember = updateProjectMember;
|
|
@@ -40,15 +37,6 @@ async function getAccounts(requestOptions) {
|
|
|
40
37
|
async function listAdministeredProjects(params = {}, requestOptions) {
|
|
41
38
|
return this.get(`/v1/projects${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
42
39
|
}
|
|
43
|
-
async function createProject(body, requestOptions) {
|
|
44
|
-
return this.post("/v1/projects", body, undefined, requestOptions);
|
|
45
|
-
}
|
|
46
|
-
async function bootstrapProject(body, requestOptions) {
|
|
47
|
-
return this.post("/v1/projects/bootstrap", body, undefined, requestOptions);
|
|
48
|
-
}
|
|
49
|
-
async function getProjectTenantCode(requestOptions) {
|
|
50
|
-
return this.get("/v1/projects/me/tenant-code", ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
51
|
-
}
|
|
52
40
|
async function listProjectMembers(params = {}, requestOptions) {
|
|
53
41
|
return this.get(`/v1/projects/me/members${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
54
42
|
}
|
|
@@ -16,14 +16,6 @@ export type OvokAdministeredProject = {
|
|
|
16
16
|
isMainProject: boolean | null;
|
|
17
17
|
parentProjectId: string | null;
|
|
18
18
|
};
|
|
19
|
-
export type OvokCreateProject = {
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
export type OvokCreatedProject = {
|
|
23
|
-
projectId: string;
|
|
24
|
-
tenantCode: string;
|
|
25
|
-
name: string;
|
|
26
|
-
};
|
|
27
19
|
export type OvokProjectMemberReference = {
|
|
28
20
|
reference?: string;
|
|
29
21
|
display?: string;
|
|
@@ -75,9 +75,6 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
|
75
75
|
{ method: "POST", path: "/video-call/livekit/notification/active-call/:appointmentId", group: "Video" },
|
|
76
76
|
{ method: "GET", path: "/accounts", group: "Accounts" },
|
|
77
77
|
{ method: "GET", path: "/v1/projects", group: "Projects" },
|
|
78
|
-
{ method: "POST", path: "/v1/projects", group: "Projects" },
|
|
79
|
-
{ method: "POST", path: "/v1/projects/bootstrap", group: "Projects" },
|
|
80
|
-
{ method: "GET", path: "/v1/projects/me/tenant-code", group: "Projects" },
|
|
81
78
|
{ method: "GET", path: "/v1/projects/me/members", group: "Projects" },
|
|
82
79
|
{ method: "POST", path: "/v1/projects/me/members", group: "Projects" },
|
|
83
80
|
{ method: "PATCH", path: "/v1/projects/me/members/:membershipId", group: "Projects" },
|
|
@@ -108,8 +105,6 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
|
108
105
|
{ method: "PATCH", path: "/localization/i18next/:language", group: "Localization" },
|
|
109
106
|
{ method: "GET", path: "/patient/:id/observation", group: "Patient" },
|
|
110
107
|
{ method: "GET", path: "/fhir/Observation/$lastn", group: "Patient" },
|
|
111
|
-
{ method: "GET", path: "/fhir/Device/:id/telemetry", group: "Patient" },
|
|
112
|
-
{ method: "GET", path: "/fhir/Device/:id/telemetry/history", group: "Patient" },
|
|
113
108
|
{ method: "POST", path: "/fhir/Questionnaire/:id/$populate", group: "Questionnaire" },
|
|
114
109
|
{ method: "POST", path: "/fhir/QuestionnaireResponse/:id/$extract", group: "Questionnaire" },
|
|
115
110
|
{ method: "GET", path: "/v1/slim/patient", group: "Slim/Patient" },
|
|
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
|
|
|
48
48
|
description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
|
|
49
49
|
software: {
|
|
50
50
|
name: "@ovok/core",
|
|
51
|
-
version: "0.4.
|
|
51
|
+
version: "0.4.34",
|
|
52
52
|
},
|
|
53
53
|
fhirVersion: "4.0.1",
|
|
54
54
|
format: ["json"],
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export { useCreateNotificationNote, useCreateSignalsAlertNote, useCreateSignalsR
|
|
|
19
19
|
export { useAcknowledgeSlimAlarm, useAcknowledgeSlimMedicalNotification, } from "./notification-ack-hooks";
|
|
20
20
|
export { useCmsDocument, useCmsDocuments, useLegalPage, useReleaseNotes, useTranslations, } from "./cms-hooks";
|
|
21
21
|
export { useAcceptInvite, useInvitePatient, useInvitePractitioner, } from "./invites-hooks";
|
|
22
|
-
export { useCurrentPatientProfile, useExtractQuestionnaireObservations, usePatientAppointments, usePatientCarePlans, usePatientDevices,
|
|
22
|
+
export { useCurrentPatientProfile, useExtractQuestionnaireObservations, usePatientAppointments, usePatientCarePlans, usePatientDevices, usePatientMeasurement, usePatientMeasurementHistory, usePatientDashboard, usePatientLatestObservations, usePatientNotifications, usePatientQuestionnaireResponses, usePatientQuestionnaires, usePatientSchedules, usePatientSlots, usePopulateQuestionnaire, useSubmitQuestionnaireResponse, } from "./patient-hooks";
|
|
23
23
|
export { useCreatePatientSharingInvite, usePatientSharing, usePatientSharingSettings, useRedeemPatientSharingInvite, useRevokePatientSharing, useUpdatePatientSharingSettings, } from "./patient-sharing-hooks";
|
|
24
24
|
export { useAcknowledgeSignalsAlert, useEnableSignalsForPatient, useRemoveSignalsThreshold, useSetSignalsThreshold, useSignalsAlert, useSignalsAlerts, useSignalsSettings, useSignalsThresholds, useUpdateSignalsSettings, } from "./signals-hooks";
|
package/dist/hooks/index.js
CHANGED
|
@@ -35,8 +35,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.useSetLegalConsent = exports.useRepushUnconfirmedLimits = exports.useMedicalConsent = exports.useLegalConsent = exports.useChangeHistory = exports.useEmailTemplates = exports.useUpdateProjectTextSetting = exports.useUpdateLocalization = exports.useUpdateI18nextDocument = exports.useLocalizations = exports.useLocales = exports.useI18nextDocument = exports.useVideoCallAppointments = exports.useVideoCallAccess = exports.useDocuments = exports.useCreateVideoCallUserAccess = exports.useCreateVideoCallAppointment = exports.useContent = exports.useConsentSignature = exports.useOvokPoll = exports.useRecentSlimNotifications = exports.usePublicApiEndpoints = exports.useProjectSettings = exports.useProjectFeatures = exports.useOvokRequest = exports.useOvokMutation = exports.useCapabilityStatement = exports.useSlimPatients = exports.useSlimNotifications = exports.useSlimDevices = exports.useSlimDeviceTelemetry = exports.useAdministeredProjects = exports.useUrineTests = exports.useSaveMeasurement = exports.useObservations = exports.useEcgRecording = exports.observationsToMeasurements = exports.OvokProvider = exports.useClient = exports.useCachedBinaryUrl = exports.reactContext = exports.useSubscription = exports.useSearchResources = exports.useSearchOne = exports.useSearch = exports.useResource = exports.usePrevious = exports.useMedplumProfile = exports.useMedplumNavigate = exports.useMedplumContext = void 0;
|
|
38
|
-
exports.useCreatePatientSharingInvite = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientQuestionnaires = exports.usePatientQuestionnaireResponses = exports.usePatientNotifications = exports.usePatientLatestObservations = exports.usePatientDashboard = exports.usePatientMeasurementHistory = exports.usePatientMeasurement = exports.
|
|
39
|
-
exports.useUpdateSignalsSettings = exports.useSignalsThresholds = exports.useSignalsSettings = exports.useSignalsAlerts = exports.useSignalsAlert = exports.useSetSignalsThreshold = exports.useRemoveSignalsThreshold = exports.useEnableSignalsForPatient = exports.useAcknowledgeSignalsAlert = exports.useUpdatePatientSharingSettings = exports.useRevokePatientSharing = exports.useRedeemPatientSharingInvite =
|
|
38
|
+
exports.usePatientSharingSettings = exports.usePatientSharing = exports.useCreatePatientSharingInvite = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientQuestionnaires = exports.usePatientQuestionnaireResponses = exports.usePatientNotifications = exports.usePatientLatestObservations = exports.usePatientDashboard = exports.usePatientMeasurementHistory = exports.usePatientMeasurement = exports.usePatientDevices = exports.usePatientCarePlans = exports.usePatientAppointments = exports.useExtractQuestionnaireObservations = exports.useCurrentPatientProfile = exports.useInvitePractitioner = exports.useInvitePatient = exports.useAcceptInvite = exports.useTranslations = exports.useReleaseNotes = exports.useLegalPage = exports.useCmsDocuments = exports.useCmsDocument = exports.useAcknowledgeSlimMedicalNotification = exports.useAcknowledgeSlimAlarm = exports.useUpdateSignalsNote = exports.useUpdateNotificationNote = exports.useSignalsRawAlertNotes = exports.useSignalsAlertNotes = exports.useNotificationNotes = exports.useDeleteSignalsNote = exports.useDeleteNotificationNote = exports.useCreateSignalsRawAlertNote = exports.useCreateSignalsAlertNote = exports.useCreateNotificationNote = exports.useSlimOutOfBedNotifications = exports.useSlimMedicalNotifications = exports.useSlimAlarms = exports.useRecentOutOfBed = exports.useRecentAlarms = exports.useUpdateSlimThresholdV2 = exports.useUpdateSlimPatientThresholdV2 = exports.useUnconfirmedLimits = exports.useSlimThresholdV2 = exports.useSlimPatientThresholdV2 = exports.useSetMedicalConsent = void 0;
|
|
39
|
+
exports.useUpdateSignalsSettings = exports.useSignalsThresholds = exports.useSignalsSettings = exports.useSignalsAlerts = exports.useSignalsAlert = exports.useSetSignalsThreshold = exports.useRemoveSignalsThreshold = exports.useEnableSignalsForPatient = exports.useAcknowledgeSignalsAlert = exports.useUpdatePatientSharingSettings = exports.useRevokePatientSharing = exports.useRedeemPatientSharingInvite = void 0;
|
|
40
40
|
/*
|
|
41
41
|
* The only React-dependent module in the package.
|
|
42
42
|
*
|
|
@@ -158,8 +158,6 @@ Object.defineProperty(exports, "useExtractQuestionnaireObservations", { enumerab
|
|
|
158
158
|
Object.defineProperty(exports, "usePatientAppointments", { enumerable: true, get: function () { return patient_hooks_1.usePatientAppointments; } });
|
|
159
159
|
Object.defineProperty(exports, "usePatientCarePlans", { enumerable: true, get: function () { return patient_hooks_1.usePatientCarePlans; } });
|
|
160
160
|
Object.defineProperty(exports, "usePatientDevices", { enumerable: true, get: function () { return patient_hooks_1.usePatientDevices; } });
|
|
161
|
-
Object.defineProperty(exports, "usePatientDeviceTelemetry", { enumerable: true, get: function () { return patient_hooks_1.usePatientDeviceTelemetry; } });
|
|
162
|
-
Object.defineProperty(exports, "usePatientDeviceTelemetryHistory", { enumerable: true, get: function () { return patient_hooks_1.usePatientDeviceTelemetryHistory; } });
|
|
163
161
|
Object.defineProperty(exports, "usePatientMeasurement", { enumerable: true, get: function () { return patient_hooks_1.usePatientMeasurement; } });
|
|
164
162
|
Object.defineProperty(exports, "usePatientMeasurementHistory", { enumerable: true, get: function () { return patient_hooks_1.usePatientMeasurementHistory; } });
|
|
165
163
|
Object.defineProperty(exports, "usePatientDashboard", { enumerable: true, get: function () { return patient_hooks_1.usePatientDashboard; } });
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Bundle, Observation, Parameters, QuestionnaireResponse } from "@medplum/fhirtypes";
|
|
2
|
-
import { OvokCurrentPatientProfile, OvokPatientAppointment, OvokPatientCarePlan, OvokPatientDashboard, OvokPatientDashboardQuery, OvokPatientDevice, OvokPatientLatestObservationsQuery, OvokPatientMeasurement, OvokPatientNotification, OvokPatientObservationBundle, OvokPatientQuestionnaire, OvokPatientQuestionnaireResponse, OvokPatientResourceQuery, OvokPatientSchedule, OvokPatientSchedulingQuery, OvokPatientSlot
|
|
2
|
+
import { OvokCurrentPatientProfile, OvokPatientAppointment, OvokPatientCarePlan, OvokPatientDashboard, OvokPatientDashboardQuery, OvokPatientDevice, OvokPatientLatestObservationsQuery, OvokPatientMeasurement, OvokPatientNotification, OvokPatientObservationBundle, OvokPatientQuestionnaire, OvokPatientQuestionnaireResponse, OvokPatientResourceQuery, OvokPatientSchedule, OvokPatientSchedulingQuery, OvokPatientSlot } from "../client/patient/types";
|
|
3
3
|
import { OvokQuestionnaireOperationResponse } from "../client/questionnaire-response/types";
|
|
4
4
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
5
5
|
export declare const useCurrentPatientProfile: () => OvokRequestState<OvokCurrentPatientProfile>;
|
|
6
6
|
export declare const usePatientDashboard: (params?: OvokPatientDashboardQuery) => OvokRequestState<OvokPatientDashboard>;
|
|
7
7
|
export declare const usePatientLatestObservations: (params?: OvokPatientLatestObservationsQuery) => OvokRequestState<OvokPatientObservationBundle>;
|
|
8
|
-
export declare const usePatientDeviceTelemetry: (deviceId?: string) => OvokRequestState<OvokPatientObservationBundle>;
|
|
9
|
-
export declare const usePatientDeviceTelemetryHistory: (deviceId: string | undefined, params?: OvokPatientTelemetryHistoryQuery) => OvokRequestState<OvokPatientTelemetryHistory>;
|
|
10
8
|
export declare const usePatientAppointments: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientAppointment[]>;
|
|
11
9
|
export declare const usePatientSchedules: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientSchedule[]>;
|
|
12
10
|
export declare const usePatientSlots: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientSlot[]>;
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.useExtractQuestionnaireObservations = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientNotifications = exports.usePatientDevices = exports.usePatientQuestionnaireResponses = exports.usePatientQuestionnaires = exports.usePatientCarePlans = exports.usePatientMeasurement = exports.usePatientMeasurementHistory = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientAppointments = exports.
|
|
37
|
+
exports.useExtractQuestionnaireObservations = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientNotifications = exports.usePatientDevices = exports.usePatientQuestionnaireResponses = exports.usePatientQuestionnaires = exports.usePatientCarePlans = exports.usePatientMeasurement = exports.usePatientMeasurementHistory = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientAppointments = exports.usePatientLatestObservations = exports.usePatientDashboard = exports.useCurrentPatientProfile = void 0;
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const api_hooks_1 = require("./api-hooks");
|
|
40
40
|
const index_1 = require("./index");
|
|
@@ -58,23 +58,6 @@ const usePatientLatestObservations = (params = {}) => {
|
|
|
58
58
|
return (0, api_hooks_1.useOvokRequest)(load);
|
|
59
59
|
};
|
|
60
60
|
exports.usePatientLatestObservations = usePatientLatestObservations;
|
|
61
|
-
const usePatientDeviceTelemetry = (deviceId) => {
|
|
62
|
-
const client = (0, index_1.useClient)();
|
|
63
|
-
const load = React.useCallback((signal) => deviceId
|
|
64
|
-
? client.getPatientDeviceTelemetry(deviceId, { signal })
|
|
65
|
-
: Promise.reject(new Error("deviceId is required")), [client, deviceId]);
|
|
66
|
-
return (0, api_hooks_1.useOvokRequest)(load, deviceId !== undefined);
|
|
67
|
-
};
|
|
68
|
-
exports.usePatientDeviceTelemetry = usePatientDeviceTelemetry;
|
|
69
|
-
const usePatientDeviceTelemetryHistory = (deviceId, params = {}) => {
|
|
70
|
-
const client = (0, index_1.useClient)();
|
|
71
|
-
const serialized = JSON.stringify(params);
|
|
72
|
-
const load = React.useCallback((signal) => deviceId
|
|
73
|
-
? client.getPatientDeviceTelemetryHistory(deviceId, params, { signal })
|
|
74
|
-
: Promise.reject(new Error("deviceId is required")), [client, deviceId, serialized]);
|
|
75
|
-
return (0, api_hooks_1.useOvokRequest)(load, deviceId !== undefined);
|
|
76
|
-
};
|
|
77
|
-
exports.usePatientDeviceTelemetryHistory = usePatientDeviceTelemetryHistory;
|
|
78
61
|
const usePatientAppointments = (params = {}) => {
|
|
79
62
|
const client = (0, index_1.useClient)();
|
|
80
63
|
const serialized = JSON.stringify(params);
|