@icanbwell/bwell-sdk-ts 1.35.0 → 1.36.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/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/api-provider-factory.d.ts +1 -1
- package/dist/api/api-provider-factory.js +2 -1
- package/dist/api/base/api-provider.d.ts +8 -14
- package/dist/api/base/connection/connection-manager.d.ts +0 -2
- package/dist/api/base/health-data/health-manager.d.ts +4 -227
- package/dist/api/base/health-data/index.d.ts +1 -1
- package/dist/api/base/index.d.ts +0 -4
- package/dist/api/base/index.js +4 -4
- package/dist/api/base/user/index.d.ts +1 -2
- package/dist/api/base/user/index.js +4 -1
- package/dist/api/base/user/user-manager.d.ts +1 -7
- package/dist/api/graphql-api/connection/graphql-connection-manager.d.ts +1 -3
- package/dist/api/graphql-api/connection/graphql-connection-manager.js +23 -21
- package/dist/api/graphql-api/connection/index.d.ts +0 -1
- package/dist/api/graphql-api/connection/index.js +1 -1
- package/dist/api/graphql-api/graphql-api-provider.d.ts +4 -13
- package/dist/api/graphql-api/graphql-api-provider.js +10 -9
- package/dist/api/graphql-api/graphql-sdk/graphql-sdk.js +1 -1
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +3 -27
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +26 -328
- package/dist/api/graphql-api/healthdata/health-data-request-factory.d.ts +12 -0
- package/dist/api/graphql-api/healthdata/health-data-request-factory.js +12 -0
- package/dist/api/graphql-api/user/graphql-user-manager.d.ts +3 -6
- package/dist/api/graphql-api/user/graphql-user-manager.js +68 -46
- package/dist/bwell-sdk/bwell-sdk.d.ts +2 -13
- package/dist/bwell-sdk/bwell-sdk.js +27 -27
- package/dist/config/sdk-config.js +3 -3
- package/dist/graphql/operations/index.d.ts +11 -282
- package/dist/graphql/operations/index.js +227 -2410
- package/dist/graphql/operations/types.d.ts +2349 -15206
- package/dist/graphql/schema.d.ts +68178 -4822
- package/dist/graphql/schema.js +7 -63
- package/package.json +4 -2
- package/dist/api/base/activity/activity-manager.d.ts +0 -35
- package/dist/api/base/activity/activity-manager.js +0 -1
- package/dist/api/base/activity/get-tasks-request.d.ts +0 -49
- package/dist/api/base/activity/get-tasks-request.js +0 -35
- package/dist/api/base/activity/index.d.ts +0 -4
- package/dist/api/base/activity/index.js +0 -2
- package/dist/api/base/activity/types.d.ts +0 -3
- package/dist/api/base/activity/types.js +0 -5
- package/dist/api/base/activity/update-task-status-request.d.ts +0 -18
- package/dist/api/base/activity/update-task-status-request.js +0 -15
- package/dist/api/base/device/device-manager.d.ts +0 -22
- package/dist/api/base/device/device-manager.js +0 -5
- package/dist/api/base/device/device-request.d.ts +0 -62
- package/dist/api/base/device/device-request.js +0 -71
- package/dist/api/base/device/index.d.ts +0 -2
- package/dist/api/base/device/index.js +0 -2
- package/dist/api/base/event/event-manager.d.ts +0 -16
- package/dist/api/base/event/event-manager.js +0 -1
- package/dist/api/base/event/event-request.d.ts +0 -35
- package/dist/api/base/event/event-request.js +0 -64
- package/dist/api/base/event/index.d.ts +0 -2
- package/dist/api/base/event/index.js +0 -1
- package/dist/api/base/search/index.d.ts +0 -4
- package/dist/api/base/search/index.js +0 -3
- package/dist/api/base/search/request-connection-request.d.ts +0 -24
- package/dist/api/base/search/request-connection-request.js +0 -3
- package/dist/api/base/search/search-health-resources-request.d.ts +0 -87
- package/dist/api/base/search/search-health-resources-request.js +0 -20
- package/dist/api/base/search/search-manager.d.ts +0 -58
- package/dist/api/base/search/search-manager.js +0 -1
- package/dist/api/base/search/search-request.d.ts +0 -84
- package/dist/api/base/search/search-request.js +0 -78
- package/dist/api/base/user/create-data-export-direct-download-url-request.d.ts +0 -14
- package/dist/api/base/user/create-data-export-direct-download-url-request.js +0 -21
- package/dist/api/graphql-api/activity/activity-request-factories.d.ts +0 -13
- package/dist/api/graphql-api/activity/activity-request-factories.js +0 -66
- package/dist/api/graphql-api/activity/graphql-activity-manager.d.ts +0 -14
- package/dist/api/graphql-api/activity/graphql-activity-manager.js +0 -72
- package/dist/api/graphql-api/activity/index.d.ts +0 -1
- package/dist/api/graphql-api/activity/index.js +0 -1
- package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.d.ts +0 -18
- package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.js +0 -40
- package/dist/api/graphql-api/device/device-request-factory.d.ts +0 -9
- package/dist/api/graphql-api/device/device-request-factory.js +0 -15
- package/dist/api/graphql-api/device/graphql-device-manager.d.ts +0 -13
- package/dist/api/graphql-api/device/graphql-device-manager.js +0 -73
- package/dist/api/graphql-api/device/index.d.ts +0 -1
- package/dist/api/graphql-api/device/index.js +0 -1
- package/dist/api/graphql-api/event/event-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/event/event-request-factory.js +0 -11
- package/dist/api/graphql-api/event/graphql-event-manager.d.ts +0 -15
- package/dist/api/graphql-api/event/graphql-event-manager.js +0 -65
- package/dist/api/graphql-api/event/index.d.ts +0 -1
- package/dist/api/graphql-api/event/index.js +0 -1
- package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.d.ts +0 -10
- package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.js +0 -35
- package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.d.ts +0 -10
- package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.js +0 -35
- package/dist/api/graphql-api/search/connection-search-request-factory.d.ts +0 -7
- package/dist/api/graphql-api/search/connection-search-request-factory.js +0 -21
- package/dist/api/graphql-api/search/graphql-search-manager.d.ts +0 -17
- package/dist/api/graphql-api/search/graphql-search-manager.js +0 -133
- package/dist/api/graphql-api/search/index.d.ts +0 -1
- package/dist/api/graphql-api/search/index.js +0 -1
- package/dist/api/graphql-api/search/provider-search-request-factory.d.ts +0 -7
- package/dist/api/graphql-api/search/provider-search-request-factory.js +0 -21
- package/dist/api/graphql-api/search/request-connection-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/search/request-connection-request-factory.js +0 -12
- package/dist/api/graphql-api/search/search-health-resources-request-factory.d.ts +0 -14
- package/dist/api/graphql-api/search/search-health-resources-request-factory.js +0 -28
- package/dist/api/graphql-api/search/search-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/search/search-request-factory.js +0 -44
- package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.js +0 -9
- package/dist/api/graphql-api/user/get-consent-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/user/get-consent-request-factory.js +0 -8
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import type { GraphQLClient } from "graphql-request";
|
|
2
2
|
import { LanguageManager } from "../../language/language-manager.js";
|
|
3
3
|
import type { LoggerProvider } from "../../logger/index.js";
|
|
4
|
-
import type { ActivityManager } from "../base/activity/activity-manager.js";
|
|
5
4
|
import type { ApiProvider } from "../base/api-provider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import type { HealthManager } from "../base/health-data/health-manager.js";
|
|
10
|
-
import { HealthSpaceManager } from "../base/health-space/health-space-manager.js";
|
|
11
|
-
import { QuestionnaireManager } from "../base/questionnaire/questionnaire-manager.js";
|
|
12
|
-
import type { SearchManager } from "../base/search/search-manager.js";
|
|
13
|
-
import type { UserManager } from "../base/user/user-manager.js";
|
|
5
|
+
import { HealthManager } from "../base/health-data/index.js";
|
|
6
|
+
import { IdentityManager } from "../base/identity/index.js";
|
|
7
|
+
import { ConnectionManager, HealthSpaceManager, QuestionnaireManager, UserManager } from "../base/index.js";
|
|
14
8
|
import type { GraphQLSdk } from "./graphql-sdk/index.js";
|
|
15
9
|
export declare class GraphQLApiProvider implements ApiProvider {
|
|
16
10
|
#private;
|
|
17
11
|
readonly health: HealthManager;
|
|
18
12
|
readonly healthSpace: HealthSpaceManager;
|
|
19
13
|
readonly user: UserManager;
|
|
20
|
-
readonly device: DeviceManager;
|
|
21
14
|
readonly connection: ConnectionManager;
|
|
22
|
-
readonly activity: ActivityManager;
|
|
23
|
-
readonly event: EventManager;
|
|
24
|
-
readonly search: SearchManager;
|
|
25
15
|
readonly questionnaire: QuestionnaireManager;
|
|
26
16
|
readonly language: LanguageManager;
|
|
17
|
+
readonly identity: IdentityManager;
|
|
27
18
|
constructor(graphqlSDK: GraphQLSdk, loggerProvider: LoggerProvider, graphqlClient: GraphQLClient);
|
|
28
19
|
}
|
|
@@ -11,15 +11,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _GraphQLApiProvider_logger, _GraphQLApiProvider_graphqlSDK;
|
|
13
13
|
import { BwellSdkLanguageManager, } from "../../language/language-manager.js";
|
|
14
|
-
import { GraphQLActivityManager } from "./activity/index.js";
|
|
15
14
|
import { GraphQLConnectionManager } from "./connection/index.js";
|
|
16
|
-
import { GraphQLDeviceManager } from "./device/index.js";
|
|
17
|
-
import { GraphQLEventManager } from "./event/index.js";
|
|
18
15
|
import { GraphQLHealthSpaceManager } from "./health-space/index.js";
|
|
19
16
|
import { GraphQLHealthManager } from "./healthdata/index.js";
|
|
17
|
+
import { GraphQLIdentityManager } from "./identity/index.js";
|
|
18
|
+
import { GraphQLUserManager } from "./user/graphql-user-manager.js";
|
|
20
19
|
import { GraphQLQuestionnaireManager } from "./questionnaire/index.js";
|
|
21
|
-
import { GraphQLSearchManager } from "./search/index.js";
|
|
22
|
-
import { GraphQLUserManager } from "./user/index.js";
|
|
23
20
|
export class GraphQLApiProvider {
|
|
24
21
|
constructor(graphqlSDK, loggerProvider, graphqlClient) {
|
|
25
22
|
_GraphQLApiProvider_logger.set(this, void 0);
|
|
@@ -27,15 +24,19 @@ export class GraphQLApiProvider {
|
|
|
27
24
|
__classPrivateFieldSet(this, _GraphQLApiProvider_logger, loggerProvider.getLogger("GraphQLAPIProvider"), "f");
|
|
28
25
|
__classPrivateFieldSet(this, _GraphQLApiProvider_graphqlSDK, graphqlSDK, "f");
|
|
29
26
|
__classPrivateFieldGet(this, _GraphQLApiProvider_logger, "f").verbose("initializing GraphQLClient");
|
|
30
|
-
this.activity = new GraphQLActivityManager(
|
|
27
|
+
// this.activity = new GraphQLActivityManager(
|
|
28
|
+
// this.#graphqlSDK,
|
|
29
|
+
// loggerProvider,
|
|
30
|
+
// );
|
|
31
31
|
this.connection = new GraphQLConnectionManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
32
|
-
this.device = new GraphQLDeviceManager(
|
|
33
|
-
this.event = new GraphQLEventManager(
|
|
32
|
+
// this.device = new GraphQLDeviceManager(this.#graphqlSDK, loggerProvider);
|
|
33
|
+
// this.event = new GraphQLEventManager(this.#graphqlSDK, loggerProvider);
|
|
34
34
|
this.health = new GraphQLHealthManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
35
35
|
this.healthSpace = new GraphQLHealthSpaceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
36
36
|
this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
37
|
-
this.search = new GraphQLSearchManager(
|
|
37
|
+
// this.search = new GraphQLSearchManager(this.#graphqlSDK, loggerProvider);
|
|
38
38
|
this.questionnaire = new GraphQLQuestionnaireManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
39
|
+
this.identity = new GraphQLIdentityManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
39
40
|
this.language = new BwellSdkLanguageManager(graphqlClient);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -11,7 +11,7 @@ import { GraphQLClient } from "graphql-request";
|
|
|
11
11
|
import { getSdk } from "../../../graphql/index.js";
|
|
12
12
|
export function graphQLSDKFactory(endpoint, tokenManager, language) {
|
|
13
13
|
let requestMiddleware = undefined;
|
|
14
|
-
if (tokenManager
|
|
14
|
+
if (tokenManager) {
|
|
15
15
|
requestMiddleware = createAuthMiddleware(tokenManager);
|
|
16
16
|
}
|
|
17
17
|
const headers = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
2
2
|
import { LoggerProvider } from "../../../logger/index.js";
|
|
3
3
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../../base/errors.js";
|
|
@@ -6,42 +6,18 @@ import * as health from "../../base/health-data/index.js";
|
|
|
6
6
|
import { HealthManager } from "../../base/index.js";
|
|
7
7
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
8
8
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
9
|
-
import { GraphQLGetMedicationDispenseBWellResponseFactory } from "./graphql-get-medication-dispense-bwell-response-factory.js";
|
|
10
|
-
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
11
|
-
export type RenameKey<T, OldKey extends string, NewKey extends string> = T extends unknown[] ? RenameKeyInArray<T, OldKey, NewKey> : T extends object ? {
|
|
12
|
-
[K in keyof T as K extends OldKey ? NewKey : K]: RenameKey<T[K], OldKey, NewKey>;
|
|
13
|
-
} : T;
|
|
14
|
-
export type RenameKeyInArray<T extends unknown[], OldKey extends string, NewKey extends string> = Array<RenameKey<T[number], OldKey, NewKey>>;
|
|
15
9
|
export declare class GraphQLHealthManager extends GraphQLManager implements HealthManager {
|
|
16
10
|
#private;
|
|
17
|
-
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider
|
|
18
|
-
|
|
19
|
-
getAllergyIntolerances(request?: health.AllergyIntolerancesRequest): Promise<BWellQueryResult<health.AllergyIntolerancesResults, ValidationError | BaseManagerError>>;
|
|
11
|
+
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
|
|
12
|
+
getAllergyIntolerances(request?: health.HealthDataRequest): Promise<BWellQueryResult<health.AllergyIntolerancesResults>>;
|
|
20
13
|
getAllergyIntoleranceGroups(request?: health.AllergyIntoleranceGroupsRequest): Promise<BWellQueryResult<health.AllergyIntolerancesGroupsResults, ValidationError | BaseManagerError>>;
|
|
21
|
-
getConditions(request?: health.ConditionsRequest): Promise<BWellQueryResult<health.ConditionsResults, ValidationError | BaseManagerError>>;
|
|
22
14
|
getConditionGroups(request?: health.ConditionGroupsRequest): Promise<BWellQueryResult<health.ConditionGroupsResults, ValidationError | BaseManagerError>>;
|
|
23
|
-
getDiagnosticReports(request?: health.DiagnosticReportsRequest): Promise<BWellQueryResult<health.DiagnosticReportsResults, ValidationError | BaseManagerError>>;
|
|
24
|
-
getDocumentReferences(request?: health.DocumentReferencesRequest): Promise<BWellQueryResult<health.DocumentReferencesResults, ValidationError | BaseManagerError>>;
|
|
25
|
-
getBinary(request: health.BinaryRequest): Promise<BWellQueryResult<health.BinaryResults, ValidationError | BaseManagerError>>;
|
|
26
|
-
getLabs(request?: health.LabsRequest): Promise<BWellQueryResult<health.LabsResults, ValidationError | BaseManagerError>>;
|
|
27
15
|
getLabGroups(request?: health.LabGroupsRequest): Promise<BWellQueryResult<health.LabGroupsResults, ValidationError | BaseManagerError>>;
|
|
28
|
-
getCarePlans(request?: health.CarePlansRequest): Promise<BWellQueryResult<health.CarePlansResults, ValidationError | BaseManagerError>>;
|
|
29
16
|
getCarePlanGroups(request?: health.CarePlanGroupsRequest): Promise<BWellQueryResult<health.CarePlanGroupsResults, ValidationError | BaseManagerError>>;
|
|
30
|
-
getCareTeams(request?: health.CareTeamsRequest | undefined): Promise<BWellQueryResult<health.CareTeamsResults, BWellError>>;
|
|
31
|
-
getEncounters(request?: health.EncountersRequest): Promise<BWellQueryResult<health.EncountersResults, ValidationError | BaseManagerError>>;
|
|
32
17
|
getEncounterGroups(request?: health.EncounterGroupsRequest): Promise<BWellQueryResult<health.EncounterGroupsResults, ValidationError | BaseManagerError>>;
|
|
33
|
-
getImmunizations(request?: health.ImmunizationsRequest): Promise<BWellQueryResult<health.ImmunizationsResults, ValidationError | BaseManagerError>>;
|
|
34
18
|
getImmunizationGroups(request?: health.ImmunizationGroupsRequest): Promise<BWellQueryResult<health.ImmunizationGroupsResults, ValidationError | BaseManagerError>>;
|
|
35
|
-
getProcedures(request?: health.ProceduresRequest): Promise<BWellQueryResult<health.ProceduresResults, ValidationError | BaseManagerError>>;
|
|
36
19
|
getProcedureGroups(request?: health.ProcedureGroupsRequest): Promise<BWellQueryResult<health.ProcedureGroupsResults, ValidationError | BaseManagerError>>;
|
|
37
|
-
getVitalSigns(request?: health.VitalSignsRequest): Promise<BWellQueryResult<health.VitalSignsResults, ValidationError | BaseManagerError>>;
|
|
38
20
|
getVitalSignGroups(request?: health.VitalSignGroupsRequest): Promise<BWellQueryResult<health.VitalSignGroupsResults, ValidationError | BaseManagerError>>;
|
|
39
|
-
getMedicationDispense(request?: health.MedicationDispenseRequest): Promise<BWellQueryResult<health.MedicationDispenseResults, ValidationError | BaseManagerError>>;
|
|
40
|
-
getMedicationRequest(request?: health.MedicationRequestRequest): Promise<BWellQueryResult<health.MedicationRequestResults, ValidationError | BaseManagerError>>;
|
|
41
|
-
getMedicationStatements(request?: health.MedicationStatementsRequest): Promise<BWellQueryResult<health.MedicationStatementsResults, ValidationError | BaseManagerError>>;
|
|
42
21
|
getMedicationGroups(request?: health.MedicationGroupsRequest): Promise<BWellQueryResult<health.MedicationGroupsResults, ValidationError | BaseManagerError>>;
|
|
43
|
-
getMedicationKnowledge(request: health.MedicationKnowledgeRequest): Promise<BWellQueryResult<health.MedicationKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
44
|
-
getLabKnowledge(request: health.LabKnowledgeRequest): Promise<BWellQueryResult<health.LabKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
45
|
-
getMedicationPricing(request: health.MedicationPricingRequest): Promise<BWellQueryResult<health.MedicationPricingResults, ValidationError | BaseManagerError>>;
|
|
46
22
|
getDiagnosticReportLabGroups(request?: health.DiagnosticReportLabGroupsRequest): Promise<BWellQueryResult<health.DiagnosticReportLabGroupsResults, ValidationError | BaseManagerError>>;
|
|
47
23
|
}
|
|
@@ -18,53 +18,49 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
18
18
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
19
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
20
|
};
|
|
21
|
-
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger,
|
|
21
|
+
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger, _GraphQLHealthManager_healthDataRequestFactory;
|
|
22
22
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
23
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
24
24
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
25
|
-
import {
|
|
26
|
-
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
25
|
+
import { HealthDataRequestFactory, } from "./health-data-request-factory.js";
|
|
27
26
|
export class GraphQLHealthManager extends GraphQLManager {
|
|
28
|
-
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()
|
|
27
|
+
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
29
28
|
super();
|
|
30
29
|
_GraphQLHealthManager_sdk.set(this, void 0);
|
|
31
30
|
_GraphQLHealthManager_logger.set(this, void 0);
|
|
32
|
-
|
|
33
|
-
_GraphQLHealthManager_medicationDispenseResponseFactory.set(this, void 0);
|
|
31
|
+
_GraphQLHealthManager_healthDataRequestFactory.set(this, new HealthDataRequestFactory());
|
|
34
32
|
__classPrivateFieldSet(this, _GraphQLHealthManager_sdk, sdk, "f");
|
|
35
33
|
__classPrivateFieldSet(this, _GraphQLHealthManager_logger, loggerProvider.getLogger("GraphQLHealthManager"), "f");
|
|
36
|
-
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationRequestResponseFactory, medicationRequestResponseFactory, "f");
|
|
37
|
-
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationDispenseResponseFactory, medicationDispenseResponseFactory, "f");
|
|
38
|
-
}
|
|
39
|
-
getHealthSummary() {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
var _a;
|
|
42
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getHealthSummary...");
|
|
43
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").GetHealthSummary());
|
|
44
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getHealthSummary complete");
|
|
45
|
-
if (result.hasError()) {
|
|
46
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getHealthSummary failed", result.error);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").info("successfully called getHealthSummary");
|
|
50
|
-
}
|
|
51
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getHealthSummary, result.error);
|
|
52
|
-
});
|
|
53
34
|
}
|
|
35
|
+
// public async getHealthSummary(): Promise<
|
|
36
|
+
// BWellQueryResult<health.HealthSummaryResults, BaseManagerError>
|
|
37
|
+
// > {
|
|
38
|
+
// this.#logger.verbose("calling getHealthSummary...");
|
|
39
|
+
// const result = await this.handleQuery(this.#sdk.GetHealthSummary());
|
|
40
|
+
// this.#logger.verbose("getHealthSummary complete");
|
|
41
|
+
// if (result.hasError()) {
|
|
42
|
+
// this.#logger.error("getHealthSummary failed", result.error);
|
|
43
|
+
// } else {
|
|
44
|
+
// this.#logger.info("successfully called getHealthSummary");
|
|
45
|
+
// }
|
|
46
|
+
// return new BWellQueryResult(result.data?.getHealthSummary, result.error);
|
|
47
|
+
// }
|
|
54
48
|
getAllergyIntolerances(request) {
|
|
55
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
var _a
|
|
50
|
+
var _a;
|
|
57
51
|
const validationResult = this.validateRequest(request);
|
|
58
52
|
if (validationResult.failure()) {
|
|
59
53
|
return validationResult.toQueryResult();
|
|
60
54
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
let gqlRequest;
|
|
56
|
+
if (request !== undefined) {
|
|
57
|
+
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
58
|
+
}
|
|
59
|
+
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getAllergyIntolerances(gqlRequest));
|
|
64
60
|
if (result.hasError()) {
|
|
65
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getAllergyIntolerances
|
|
61
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getAllergyIntolerances error", result.error);
|
|
66
62
|
}
|
|
67
|
-
return new BWellQueryResult((
|
|
63
|
+
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.allergyIntolerances, result.error);
|
|
68
64
|
});
|
|
69
65
|
}
|
|
70
66
|
getAllergyIntoleranceGroups(request) {
|
|
@@ -85,22 +81,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
85
81
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getAllergyIntoleranceGroups, result.error);
|
|
86
82
|
});
|
|
87
83
|
}
|
|
88
|
-
getConditions(request) {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
var _a, _b;
|
|
91
|
-
const validationResult = this.validateRequest(request);
|
|
92
|
-
if (validationResult.failure()) {
|
|
93
|
-
return validationResult.toQueryResult();
|
|
94
|
-
}
|
|
95
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getConditions...");
|
|
96
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getConditions({ request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null }));
|
|
97
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getConditions complete");
|
|
98
|
-
if (result.hasError()) {
|
|
99
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getConditions errors", result.error);
|
|
100
|
-
}
|
|
101
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getConditions, result.error);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
84
|
getConditionGroups(request) {
|
|
105
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
86
|
var _a, _b;
|
|
@@ -119,72 +99,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
119
99
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getConditionGroups, result.error);
|
|
120
100
|
});
|
|
121
101
|
}
|
|
122
|
-
getDiagnosticReports(request) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
var _a;
|
|
125
|
-
const validationResult = this.validateRequest(request);
|
|
126
|
-
if (validationResult.failure()) {
|
|
127
|
-
return validationResult.toQueryResult();
|
|
128
|
-
}
|
|
129
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getDiagnosticReports...");
|
|
130
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getDiagnosticReports());
|
|
131
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getDiagnosticReports complete");
|
|
132
|
-
if (result.hasError()) {
|
|
133
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getDiagnosticReports errors", result.error);
|
|
134
|
-
}
|
|
135
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.diagnosticReports, result.error);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
getDocumentReferences(request) {
|
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
var _a, _b;
|
|
141
|
-
const validationResult = this.validateRequest(request);
|
|
142
|
-
if (validationResult.failure()) {
|
|
143
|
-
return validationResult.toQueryResult();
|
|
144
|
-
}
|
|
145
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getDocumentReferences...");
|
|
146
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getDocumentReferences({ request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null }));
|
|
147
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getDocumentReferences complete");
|
|
148
|
-
if (result.hasError()) {
|
|
149
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getDocumentReferences errors", result.error);
|
|
150
|
-
}
|
|
151
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getDocumentReferences, result.error);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
getBinary(request) {
|
|
155
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
var _a;
|
|
157
|
-
const validationResult = this.validateRequest(request);
|
|
158
|
-
if (validationResult.failure()) {
|
|
159
|
-
return validationResult.toQueryResult();
|
|
160
|
-
}
|
|
161
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getBinary...");
|
|
162
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getBinary({ request: request.data() }));
|
|
163
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getBinary complete");
|
|
164
|
-
if (result.hasError()) {
|
|
165
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getBinary errors", result.error);
|
|
166
|
-
}
|
|
167
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getBinary, result.error);
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
getLabs(request) {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
var _a, _b;
|
|
173
|
-
const validationResult = this.validateRequest(request);
|
|
174
|
-
if (validationResult.failure()) {
|
|
175
|
-
return validationResult.toQueryResult();
|
|
176
|
-
}
|
|
177
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getLabs...");
|
|
178
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getLabs({
|
|
179
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
180
|
-
}));
|
|
181
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getLabs complete");
|
|
182
|
-
if (result.hasError()) {
|
|
183
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getLabs errors", result.error);
|
|
184
|
-
}
|
|
185
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getLabs, result.error);
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
102
|
getLabGroups(request) {
|
|
189
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
190
104
|
var _a, _b;
|
|
@@ -203,24 +117,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
203
117
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getLabGroups, result.error);
|
|
204
118
|
});
|
|
205
119
|
}
|
|
206
|
-
getCarePlans(request) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
var _a, _b;
|
|
209
|
-
const validationResult = this.validateRequest(request);
|
|
210
|
-
if (validationResult.failure()) {
|
|
211
|
-
return validationResult.toQueryResult();
|
|
212
|
-
}
|
|
213
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getCarePlans...");
|
|
214
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getCarePlans({
|
|
215
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
216
|
-
}));
|
|
217
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getCarePlans complete");
|
|
218
|
-
if (result.hasError()) {
|
|
219
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getCarePlans errors", result.error);
|
|
220
|
-
}
|
|
221
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getCarePlans, result.error);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
120
|
getCarePlanGroups(request) {
|
|
225
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
226
122
|
var _a, _b;
|
|
@@ -239,42 +135,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
239
135
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getCarePlanGroups, result.error);
|
|
240
136
|
});
|
|
241
137
|
}
|
|
242
|
-
getCareTeams(request) {
|
|
243
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
-
var _a, _b;
|
|
245
|
-
const validationResult = this.validateRequest(request);
|
|
246
|
-
if (validationResult.failure()) {
|
|
247
|
-
return validationResult.toQueryResult();
|
|
248
|
-
}
|
|
249
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getCareTeams");
|
|
250
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getCareTeams({
|
|
251
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
252
|
-
}));
|
|
253
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getCareTeams complete");
|
|
254
|
-
if (result.hasError()) {
|
|
255
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getCareTeams errors", result.error);
|
|
256
|
-
}
|
|
257
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getCareTeams, result.error);
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
getEncounters(request) {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
var _a, _b;
|
|
263
|
-
const validationResult = this.validateRequest(request);
|
|
264
|
-
if (validationResult.failure()) {
|
|
265
|
-
return validationResult.toQueryResult();
|
|
266
|
-
}
|
|
267
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getEncounters...");
|
|
268
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getEncounterQuery({
|
|
269
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
270
|
-
}));
|
|
271
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getEncounters complete");
|
|
272
|
-
if (result.hasError()) {
|
|
273
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getEncounters errors", result.error);
|
|
274
|
-
}
|
|
275
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getEncounters, result.error);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
138
|
getEncounterGroups(request) {
|
|
279
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
140
|
var _a, _b;
|
|
@@ -293,24 +153,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
293
153
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getEncounterGroups, result.error);
|
|
294
154
|
});
|
|
295
155
|
}
|
|
296
|
-
getImmunizations(request) {
|
|
297
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
var _a, _b;
|
|
299
|
-
const validationResult = this.validateRequest(request);
|
|
300
|
-
if (validationResult.failure()) {
|
|
301
|
-
return validationResult.toQueryResult();
|
|
302
|
-
}
|
|
303
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getImmunizations...");
|
|
304
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getImmunizations({
|
|
305
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
306
|
-
}));
|
|
307
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getImmunizations complete");
|
|
308
|
-
if (result.hasError()) {
|
|
309
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getImmunizations errors", result.error);
|
|
310
|
-
}
|
|
311
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getImmunizations, result.error);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
156
|
getImmunizationGroups(request) {
|
|
315
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
316
158
|
var _a, _b;
|
|
@@ -329,24 +171,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
329
171
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getImmunizationGroups, result.error);
|
|
330
172
|
});
|
|
331
173
|
}
|
|
332
|
-
getProcedures(request) {
|
|
333
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
-
var _a, _b;
|
|
335
|
-
const validationResult = this.validateRequest(request);
|
|
336
|
-
if (validationResult.failure()) {
|
|
337
|
-
return validationResult.toQueryResult();
|
|
338
|
-
}
|
|
339
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getProcedures...");
|
|
340
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").GetProcedures({
|
|
341
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
342
|
-
}));
|
|
343
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getProcedures complete");
|
|
344
|
-
if (result.hasError()) {
|
|
345
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getProcedures errors", result.error);
|
|
346
|
-
}
|
|
347
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getProcedures, result.error);
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
174
|
getProcedureGroups(request) {
|
|
351
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
352
176
|
var _a, _b;
|
|
@@ -365,24 +189,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
365
189
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getProcedureGroups, result.error);
|
|
366
190
|
});
|
|
367
191
|
}
|
|
368
|
-
getVitalSigns(request) {
|
|
369
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
370
|
-
var _a, _b;
|
|
371
|
-
const validationResult = this.validateRequest(request);
|
|
372
|
-
if (validationResult.failure()) {
|
|
373
|
-
return validationResult.toQueryResult();
|
|
374
|
-
}
|
|
375
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getVitalSigns...");
|
|
376
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getVitalSigns({
|
|
377
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
378
|
-
}));
|
|
379
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getVitalSigns complete");
|
|
380
|
-
if (result.hasError()) {
|
|
381
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getVitalSigns errors", result.error);
|
|
382
|
-
}
|
|
383
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getVitalSigns, result.error);
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
192
|
getVitalSignGroups(request) {
|
|
387
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
388
194
|
var _a, _b;
|
|
@@ -401,60 +207,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
401
207
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getVitalSignGroups, result.error);
|
|
402
208
|
});
|
|
403
209
|
}
|
|
404
|
-
getMedicationDispense(request) {
|
|
405
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
406
|
-
var _a;
|
|
407
|
-
const validationResult = this.validateRequest(request);
|
|
408
|
-
if (validationResult.failure()) {
|
|
409
|
-
return validationResult.toQueryResult();
|
|
410
|
-
}
|
|
411
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationDispense...");
|
|
412
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationDispense({
|
|
413
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
414
|
-
}));
|
|
415
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationDispense complete");
|
|
416
|
-
if (result.hasError()) {
|
|
417
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationDispense errors", result.error);
|
|
418
|
-
}
|
|
419
|
-
return __classPrivateFieldGet(this, _GraphQLHealthManager_medicationDispenseResponseFactory, "f").create(result);
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
getMedicationRequest(request) {
|
|
423
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
424
|
-
var _a;
|
|
425
|
-
const validationResult = this.validateRequest(request);
|
|
426
|
-
if (validationResult.failure()) {
|
|
427
|
-
return validationResult.toQueryResult();
|
|
428
|
-
}
|
|
429
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationRequest...");
|
|
430
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationRequest({
|
|
431
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
432
|
-
}));
|
|
433
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationRequest complete");
|
|
434
|
-
if (result.hasError()) {
|
|
435
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationRequest errors", result.error);
|
|
436
|
-
}
|
|
437
|
-
return __classPrivateFieldGet(this, _GraphQLHealthManager_medicationRequestResponseFactory, "f").create(result);
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
getMedicationStatements(request) {
|
|
441
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
442
|
-
var _a, _b;
|
|
443
|
-
const validationResult = this.validateRequest(request);
|
|
444
|
-
if (validationResult.failure()) {
|
|
445
|
-
return validationResult.toQueryResult();
|
|
446
|
-
}
|
|
447
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationStatements...");
|
|
448
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationStatements({
|
|
449
|
-
request: (_a = request === null || request === void 0 ? void 0 : request.data()) !== null && _a !== void 0 ? _a : null,
|
|
450
|
-
}));
|
|
451
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationStatements complete");
|
|
452
|
-
if (result.hasError()) {
|
|
453
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationStatements errors", result.error);
|
|
454
|
-
}
|
|
455
|
-
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getMedicationStatements, result.error);
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
210
|
getMedicationGroups(request) {
|
|
459
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
460
212
|
var _a, _b;
|
|
@@ -473,60 +225,6 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
473
225
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getMedicationGroups, result.error);
|
|
474
226
|
});
|
|
475
227
|
}
|
|
476
|
-
getMedicationKnowledge(request) {
|
|
477
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
-
var _a;
|
|
479
|
-
const validationResult = this.validateRequest(request);
|
|
480
|
-
if (validationResult.failure()) {
|
|
481
|
-
return validationResult.toQueryResult();
|
|
482
|
-
}
|
|
483
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationKnowledge...");
|
|
484
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationKnowledge({
|
|
485
|
-
request: request.data(),
|
|
486
|
-
}));
|
|
487
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationKnowledge complete");
|
|
488
|
-
if (result.hasError()) {
|
|
489
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationKnowledge errors", result.error);
|
|
490
|
-
}
|
|
491
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getMedicationKnowledge, result.error);
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
getLabKnowledge(request) {
|
|
495
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
-
var _a;
|
|
497
|
-
const validationResult = this.validateRequest(request);
|
|
498
|
-
if (validationResult.failure()) {
|
|
499
|
-
return validationResult.toQueryResult();
|
|
500
|
-
}
|
|
501
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getLabKnowledge...");
|
|
502
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getLabKnowledge({
|
|
503
|
-
request: request.data(),
|
|
504
|
-
}));
|
|
505
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getLabKnowledge complete");
|
|
506
|
-
if (result.hasError()) {
|
|
507
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getLabKnowledge errors", result.error);
|
|
508
|
-
}
|
|
509
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getLabKnowledge, result.error);
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
getMedicationPricing(request) {
|
|
513
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
514
|
-
var _a;
|
|
515
|
-
const validationResult = this.validateRequest(request);
|
|
516
|
-
if (validationResult.failure()) {
|
|
517
|
-
return validationResult.toQueryResult();
|
|
518
|
-
}
|
|
519
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationPricing...");
|
|
520
|
-
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationPricing({
|
|
521
|
-
request: request.data(),
|
|
522
|
-
}));
|
|
523
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationPricing complete");
|
|
524
|
-
if (result.hasError()) {
|
|
525
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationPricing errors", result.error);
|
|
526
|
-
}
|
|
527
|
-
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getMedicationPricing, result.error);
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
228
|
getDiagnosticReportLabGroups(request) {
|
|
531
229
|
return __awaiter(this, void 0, void 0, function* () {
|
|
532
230
|
var _a, _b;
|
|
@@ -546,4 +244,4 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
546
244
|
});
|
|
547
245
|
}
|
|
548
246
|
}
|
|
549
|
-
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(),
|
|
247
|
+
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(), _GraphQLHealthManager_healthDataRequestFactory = new WeakMap();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GetAllergyIntolerancesQueryVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { HealthDataRequest } from "../../base/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* @note All health data request queries (non group resource queries) should take
|
|
6
|
+
* the same variables so this aliases GetAllergyIntolerancesQueryVariables as a
|
|
7
|
+
* generic placeholder type
|
|
8
|
+
*/
|
|
9
|
+
export type HealthDataRequestVariables = GetAllergyIntolerancesQueryVariables;
|
|
10
|
+
export declare class HealthDataRequestFactory implements RequestFactory<HealthDataRequest, HealthDataRequestVariables> {
|
|
11
|
+
create(request: HealthDataRequest): GetAllergyIntolerancesQueryVariables;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class HealthDataRequestFactory {
|
|
2
|
+
create(request) {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
const input = request.data();
|
|
5
|
+
return {
|
|
6
|
+
page: input.page,
|
|
7
|
+
pageSize: input.pageSize,
|
|
8
|
+
code: (_a = input.groupCode) !== null && _a !== void 0 ? _a : null,
|
|
9
|
+
lastUpdated: (_b = input.lastUpdated) !== null && _b !== void 0 ? _b : null,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -2,10 +2,9 @@ import { ValidationError } from "../../../errors/validation-error.js";
|
|
|
2
2
|
import { LoggerProvider } from "../../../logger/index.js";
|
|
3
3
|
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../../base/errors.js";
|
|
5
|
-
import { CreateConsentResults,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import type { CreateDataExportDirectDownloadUrlResults, CreateVerificationUrlResults, GetVerificationStatusResults, UserManager } from "../../base/user/user-manager.js";
|
|
5
|
+
import { CreateConsentResults, ProfileResults, UpdateProfileResults } from "../../base/index.js";
|
|
6
|
+
import { CreateConsentRequest, CreateVerificationUrlRequest, UpdateProfileRequest } from "../../base/user/index.js";
|
|
7
|
+
import type { CreateVerificationUrlResults, GetVerificationStatusResults, UserManager } from "../../base/user/user-manager.js";
|
|
9
8
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
10
9
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
11
10
|
export declare class GraphQLUserManager extends GraphQLManager implements UserManager {
|
|
@@ -14,9 +13,7 @@ export declare class GraphQLUserManager extends GraphQLManager implements UserMa
|
|
|
14
13
|
getProfile(): Promise<BWellQueryResult<ProfileResults, BaseManagerError>>;
|
|
15
14
|
delete(): Promise<BWellTransactionResult<null, BaseManagerError>>;
|
|
16
15
|
updateProfile(request: UpdateProfileRequest): Promise<BWellTransactionResult<UpdateProfileResults, BaseManagerError>>;
|
|
17
|
-
getConsents(request?: GetConsentsRequest): Promise<BWellQueryResult<GetConsentsResults, BaseManagerError | ValidationError>>;
|
|
18
16
|
createConsent(request: CreateConsentRequest): Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError | ValidationError>>;
|
|
19
|
-
createDataExportDirectDownloadUrl(request: CreateDataExportDirectDownloadUrlRequest): Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>;
|
|
20
17
|
createVerificationUrl(request: CreateVerificationUrlRequest): Promise<BWellTransactionResult<CreateVerificationUrlResults, BaseManagerError>>;
|
|
21
18
|
getVerificationStatus(): Promise<BWellTransactionResult<GetVerificationStatusResults, BaseManagerError>>;
|
|
22
19
|
}
|