@icanbwell/bwell-sdk-ts 1.46.0 → 1.47.0-rc.1764872852
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/base/api-provider.d.ts +2 -0
- package/dist/api/base/financial/explanation-of-benefit.d.ts +32 -0
- package/dist/api/base/financial/explanation-of-benefit.js +66 -0
- package/dist/api/base/financial/financial-manager.d.ts +4 -1
- package/dist/api/base/health-data/health-manager.d.ts +13 -2
- package/dist/api/base/health-data/index.d.ts +2 -1
- package/dist/api/base/health-data/index.js +1 -0
- package/dist/api/base/health-data/medication-statement-request.d.ts +29 -0
- package/dist/api/base/health-data/medication-statement-request.js +35 -0
- package/dist/api/base/index.d.ts +1 -0
- package/dist/api/base/index.js +1 -0
- package/dist/api/base/support/get-support-requests-request.d.ts +16 -0
- package/dist/api/base/support/get-support-requests-request.js +14 -0
- package/dist/api/base/support/index.d.ts +2 -0
- package/dist/api/base/support/index.js +2 -0
- package/dist/api/base/support/support-manager.d.ts +16 -0
- package/dist/api/base/support/support-manager.js +1 -0
- package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.d.ts +9 -0
- package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.js +23 -0
- package/dist/api/graphql-api/financial/graphql-financial-manager.d.ts +3 -1
- package/dist/api/graphql-api/financial/graphql-financial-manager.js +20 -2
- package/dist/api/graphql-api/graphql-api-provider.d.ts +2 -0
- package/dist/api/graphql-api/graphql-api-provider.js +2 -0
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +4 -2
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +23 -4
- package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.js +11 -0
- package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.js +16 -0
- package/dist/api/graphql-api/support/graphql-support-manager.d.ts +15 -0
- package/dist/api/graphql-api/support/graphql-support-manager.js +54 -0
- package/dist/api/graphql-api/support/index.d.ts +1 -0
- package/dist/api/graphql-api/support/index.js +1 -0
- package/dist/bwell-sdk/bwell-sdk.d.ts +2 -0
- package/dist/bwell-sdk/bwell-sdk.js +3 -0
- package/dist/graphql/operations/index.d.ts +27 -1
- package/dist/graphql/operations/index.js +290 -6
- package/dist/graphql/operations/types.d.ts +475 -11
- package/dist/graphql/schema.d.ts +199 -5
- package/dist/graphql/schema.js +17 -0
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -8,6 +8,7 @@ import type { HealthManager } from "./health-data/health-manager.js";
|
|
|
8
8
|
import type { HealthSpaceManager } from "./health-space/health-space-manager.js";
|
|
9
9
|
import type { QuestionnaireManager } from "./questionnaire/questionnaire-manager.js";
|
|
10
10
|
import type { SearchManager } from "./search/search-manager.js";
|
|
11
|
+
import type { SupportManager } from "./support/support-manager.js";
|
|
11
12
|
import type { UserManager } from "./user/user-manager.js";
|
|
12
13
|
export interface ApiProvider {
|
|
13
14
|
readonly health: HealthManager;
|
|
@@ -21,4 +22,5 @@ export interface ApiProvider {
|
|
|
21
22
|
readonly search: SearchManager;
|
|
22
23
|
readonly language: LanguageManager;
|
|
23
24
|
readonly questionnaire: QuestionnaireManager;
|
|
25
|
+
readonly support: SupportManager;
|
|
24
26
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SearchDate, SearchReference, SearchString, SearchToken } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export type ExplanationOfBenefitRequestInput = PagedRequestInput & {
|
|
5
|
+
id?: SearchString;
|
|
6
|
+
lastUpdated?: SearchDate;
|
|
7
|
+
sort?: Array<string | null> | string;
|
|
8
|
+
patient?: SearchReference;
|
|
9
|
+
provider?: SearchReference;
|
|
10
|
+
coverage?: SearchReference;
|
|
11
|
+
status?: SearchToken;
|
|
12
|
+
created?: SearchDate;
|
|
13
|
+
};
|
|
14
|
+
declare class ExplanationOfBenefitRequestValidator extends PagedRequestValidator<ExplanationOfBenefitRequestInput> {
|
|
15
|
+
#private;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the paged request properties as well as ExplanationOfBenefit-specific search parameters.
|
|
18
|
+
* @param data ExplanationOfBenefitRequestInput to validate
|
|
19
|
+
* @param errors ErrorsCollector to collect validation errors
|
|
20
|
+
*/
|
|
21
|
+
validate(data: ExplanationOfBenefitRequestInput, errors: ErrorsCollector): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Request object for fetching ExplanationOfBenefit FHIR resources.
|
|
25
|
+
* @category Requests
|
|
26
|
+
* @title ExplanationOfBenefitsRequest
|
|
27
|
+
* @excerpt Request object for fetching ExplanationOfBenefit FHIR resources with validation
|
|
28
|
+
*/
|
|
29
|
+
export declare class ExplanationOfBenefitsRequest extends PagedRequest<ExplanationOfBenefitRequestInput> {
|
|
30
|
+
protected validator: ExplanationOfBenefitRequestValidator;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _ExplanationOfBenefitRequestValidator_searchStringValidator, _ExplanationOfBenefitRequestValidator_searchDateValidator, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, _ExplanationOfBenefitRequestValidator_searchTokenValidator;
|
|
7
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
8
|
+
import { isNotUndefined } from "../../../utils/type-utils.js";
|
|
9
|
+
import { SearchDateValidator } from "../requests/search-date.js";
|
|
10
|
+
import { SearchReferenceValidator } from "../requests/search-reference.js";
|
|
11
|
+
import { SearchStringValidator } from "../requests/search-string.js";
|
|
12
|
+
import { SearchTokenValidator } from "../requests/search-token.js";
|
|
13
|
+
class ExplanationOfBenefitRequestValidator extends PagedRequestValidator {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
_ExplanationOfBenefitRequestValidator_searchStringValidator.set(this, new SearchStringValidator());
|
|
17
|
+
_ExplanationOfBenefitRequestValidator_searchDateValidator.set(this, new SearchDateValidator());
|
|
18
|
+
_ExplanationOfBenefitRequestValidator_searchReferenceValidator.set(this, new SearchReferenceValidator());
|
|
19
|
+
_ExplanationOfBenefitRequestValidator_searchTokenValidator.set(this, new SearchTokenValidator());
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validates the paged request properties as well as ExplanationOfBenefit-specific search parameters.
|
|
23
|
+
* @param data ExplanationOfBenefitRequestInput to validate
|
|
24
|
+
* @param errors ErrorsCollector to collect validation errors
|
|
25
|
+
*/
|
|
26
|
+
validate(data, errors) {
|
|
27
|
+
super.validate(data, errors);
|
|
28
|
+
// Validate SearchString fields
|
|
29
|
+
if (isNotUndefined(data.id)) {
|
|
30
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchStringValidator, "f").validate(data.id, errors);
|
|
31
|
+
}
|
|
32
|
+
// Validate SearchDate fields
|
|
33
|
+
if (isNotUndefined(data.lastUpdated)) {
|
|
34
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchDateValidator, "f").validate(data.lastUpdated, errors);
|
|
35
|
+
}
|
|
36
|
+
if (isNotUndefined(data.created)) {
|
|
37
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchDateValidator, "f").validate(data.created, errors);
|
|
38
|
+
}
|
|
39
|
+
// Validate SearchReference fields
|
|
40
|
+
if (isNotUndefined(data.patient)) {
|
|
41
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.patient, errors);
|
|
42
|
+
}
|
|
43
|
+
if (isNotUndefined(data.provider)) {
|
|
44
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.provider, errors);
|
|
45
|
+
}
|
|
46
|
+
if (isNotUndefined(data.coverage)) {
|
|
47
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.coverage, errors);
|
|
48
|
+
}
|
|
49
|
+
if (isNotUndefined(data.status)) {
|
|
50
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchTokenValidator, "f").validate(data.status, errors);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_ExplanationOfBenefitRequestValidator_searchStringValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchDateValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchReferenceValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchTokenValidator = new WeakMap();
|
|
55
|
+
/**
|
|
56
|
+
* Request object for fetching ExplanationOfBenefit FHIR resources.
|
|
57
|
+
* @category Requests
|
|
58
|
+
* @title ExplanationOfBenefitsRequest
|
|
59
|
+
* @excerpt Request object for fetching ExplanationOfBenefit FHIR resources with validation
|
|
60
|
+
*/
|
|
61
|
+
export class ExplanationOfBenefitsRequest extends PagedRequest {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments);
|
|
64
|
+
this.validator = new ExplanationOfBenefitRequestValidator();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
-
import { GetCoveragesQueryResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { GetCoveragesQueryResults, GetExplanationOfBenefitsQueryResults } from "../../../graphql/operations/types.js";
|
|
3
3
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../errors.js";
|
|
5
5
|
import { CoveragesRequest } from "./coverage-request.js";
|
|
6
|
+
import { ExplanationOfBenefitsRequest } from "./explanation-of-benefit.js";
|
|
6
7
|
export type CoveragesResults = GetCoveragesQueryResults["coverages"];
|
|
8
|
+
export type ExplanationOfBenefitsResults = GetExplanationOfBenefitsQueryResults["explanationOfBenefits"];
|
|
7
9
|
/**
|
|
8
10
|
* Interface representing a manager for handling operations related to financial resources.
|
|
9
11
|
*/
|
|
@@ -16,4 +18,5 @@ export interface FinancialManager {
|
|
|
16
18
|
* or an error of type `ValidationError` or `BaseManagerError`.
|
|
17
19
|
*/
|
|
18
20
|
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
21
|
+
getExplanationOfBenefits(request: ExplanationOfBenefitsRequest): Promise<BWellQueryResult<ExplanationOfBenefitsResults, ValidationError | BaseManagerError>>;
|
|
19
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetAllergyIntoleranceGroupsQueryResults, GetAllergyIntolerancesQueryResults, GetBinaryQueryResults, GetCarePlanGroupsQueryResults, GetCarePlansQueryResults, GetCareTeamsQueryResults, GetConditionGroupsQueryResults, GetConditionsQueryResults, GetDiagnosticReportLabGroupsQueryResults, GetDiagnosticReportsQueryResults, GetDocumentReferencesQueryResults, GetEncounterQueryResults, GetEncountersGroupQueryResults, GetHealthSummaryQueryResults, GetImmunizationGroupsQueryResults, GetImmunizationsQueryResults, GetLabGroupsQueryResults, GetLabKnowledgeQueryResults, GetLabsQueryResults, GetMedicationGroupsQueryResults, GetMedicationKnowledgeQueryResults, GetMedicationPricingQueryResults, GetMedicationStatementsQueryResults, GetProcedureGroupsQueryResults, GetProceduresQueryResults, GetVitalSignGroupsQueryResults, GetVitalSignsQueryResults } from "../../../graphql/operations/types.js";
|
|
2
|
-
import
|
|
1
|
+
import { GetAllergyIntoleranceGroupsQueryResults, GetAllergyIntolerancesQueryResults, GetBinaryQueryResults, GetCarePlanGroupsQueryResults, GetCarePlansQueryResults, GetCareTeamsQueryResults, GetConditionGroupsQueryResults, GetConditionsQueryResults, GetDiagnosticReportLabGroupsQueryResults, GetDiagnosticReportsQueryResults, GetDocumentReferencesQueryResults, GetEncounterQueryResults, GetEncountersGroupQueryResults, GetHealthSummaryQueryResults, GetImmunizationGroupsQueryResults, GetImmunizationsQueryResults, GetLabGroupsQueryResults, GetLabKnowledgeQueryResults, GetLabsQueryResults, GetMedicationGroupsQueryResults, GetMedicationKnowledgeQueryResults, GetMedicationPricingQueryResults, GetMedicationStatementsQueryResults, GetProcedureGroupsQueryResults, GetProceduresQueryResults, GetVitalSignGroupsQueryResults, GetVitalSignsQueryResults, UpdateMedicationStatementMutationResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
3
3
|
import { MedicationDispenseResultsType } from "../../graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.js";
|
|
4
4
|
import { MedicationRequestResultsType } from "../../graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.js";
|
|
5
5
|
import type { BaseManagerError } from "../errors.js";
|
|
@@ -7,6 +7,7 @@ import { AllergyIntoleranceGroupsRequest, AllergyIntolerancesRequest, BinaryRequ
|
|
|
7
7
|
import { LabKnowledgeRequest } from "./lab-knowledge-request.js";
|
|
8
8
|
import { MedicationKnowledgeRequest } from "./medication-knowledge-request.js";
|
|
9
9
|
import { MedicationPricingRequest } from "./medication-pricing-request.js";
|
|
10
|
+
import { UpdateMedicationStatementRequest } from "./medication-statement-request.js";
|
|
10
11
|
type HealthSummaryResultsType = GetHealthSummaryQueryResults["getHealthSummary"];
|
|
11
12
|
export interface HealthSummaryResults extends HealthSummaryResultsType {
|
|
12
13
|
}
|
|
@@ -79,6 +80,9 @@ export interface MedicationRequestResults extends MedicationRequestResultsType {
|
|
|
79
80
|
type MedicationStatementsResultsType = GetMedicationStatementsQueryResults["getMedicationStatements"];
|
|
80
81
|
export interface MedicationStatementsResults extends MedicationStatementsResultsType {
|
|
81
82
|
}
|
|
83
|
+
type UpdateMedicationStatementMutationResultsType = UpdateMedicationStatementMutationResults["updateMedicationStatement"];
|
|
84
|
+
export interface UpdateMedicationStatementResult extends UpdateMedicationStatementMutationResultsType {
|
|
85
|
+
}
|
|
82
86
|
type MedicationKnowledgeResultsType = GetMedicationKnowledgeQueryResults["getMedicationKnowledge"];
|
|
83
87
|
export interface MedicationKnowledgeResults extends MedicationKnowledgeResultsType {
|
|
84
88
|
}
|
|
@@ -299,6 +303,13 @@ export interface HealthManager {
|
|
|
299
303
|
* @returns {Promise<BWellQueryResult<MedicationStatementsResults>>} A promise resolving to an object representing the list of medication statements retrieved.
|
|
300
304
|
*/
|
|
301
305
|
getMedicationStatements(request?: MedicationStatementsRequest): Promise<BWellQueryResult<MedicationStatementsResults>>;
|
|
306
|
+
/**
|
|
307
|
+
* Updates a medication statement resource.
|
|
308
|
+
*
|
|
309
|
+
* @param {UpdateMedicationStatementRequest} request The request object specifying the medication statement to update and the fields to update.
|
|
310
|
+
* @returns {Promise<BWellQueryResult<UpdateMedicationStatementResult>>} A promise resolving to the result of the update operation.
|
|
311
|
+
*/
|
|
312
|
+
updateMedicationStatement(request: UpdateMedicationStatementRequest): Promise<BWellTransactionResult<UpdateMedicationStatementResult, BaseManagerError>>;
|
|
302
313
|
/**
|
|
303
314
|
* Retrieves a list of medication groups resources.
|
|
304
315
|
*
|
|
@@ -2,4 +2,5 @@ export { HealthDataRequestInput, AllergyIntolerancesRequest, AllergyIntoleranceG
|
|
|
2
2
|
export { MedicationPricingRequest, MedicationPricingRequestInput, } from "./medication-pricing-request.js";
|
|
3
3
|
export { MedicationKnowledgeRequest, MedicationKnowledgeRequestInput, } from "./medication-knowledge-request.js";
|
|
4
4
|
export { LabKnowledgeRequest, LabKnowledgeRequestInput, } from "./lab-knowledge-request.js";
|
|
5
|
-
export {
|
|
5
|
+
export { UpdateMedicationStatementRequest, UpdateMedicationStatementInput, UpdateMedicationStatementStatus, } from "./medication-statement-request.js";
|
|
6
|
+
export { HealthSummaryResults, AllergyIntolerancesResults, AllergyIntolerancesGroupsResults, BinaryResults, ConditionsResults, ConditionGroupsResults, DiagnosticReportsResults, DocumentReferencesResults, LabsResults, LabGroupsResults, CarePlansResults, CarePlanGroupsResults, CareTeamsResults, EncountersResults, EncounterGroupsResults, ImmunizationsResults, ImmunizationGroupsResults, ProceduresResults, ProcedureGroupsResults, VitalSignsResults, VitalSignGroupsResults, MedicationDispenseResults, MedicationRequestResults, MedicationStatementsResults, MedicationKnowledgeResults, MedicationGroupsResults, LabKnowledgeResults, HealthManager, MedicationPricingResults, DiagnosticReportLabGroupsResults, UpdateMedicationStatementResult, } from "./health-manager.js";
|
|
@@ -2,3 +2,4 @@ export { AllergyIntolerancesRequest, AllergyIntoleranceGroupsRequest, BinaryRequ
|
|
|
2
2
|
export { MedicationPricingRequest, } from "./medication-pricing-request.js";
|
|
3
3
|
export { MedicationKnowledgeRequest, } from "./medication-knowledge-request.js";
|
|
4
4
|
export { LabKnowledgeRequest, } from "./lab-knowledge-request.js";
|
|
5
|
+
export { UpdateMedicationStatementRequest, UpdateMedicationStatementStatus, } from "./medication-statement-request.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Enum representing possible statuses for updating a medication statement.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum UpdateMedicationStatementStatus {
|
|
6
|
+
Active = "ACTIVE",
|
|
7
|
+
Completed = "COMPLETED"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Input type for updating a medication statement.
|
|
11
|
+
* - `id`: The unique identifier of the medication statement.
|
|
12
|
+
* - `status`: The new status to set for the medication statement.
|
|
13
|
+
*/
|
|
14
|
+
export type UpdateMedicationStatementInput = {
|
|
15
|
+
id: string;
|
|
16
|
+
status?: UpdateMedicationStatementStatus;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Validator for update medication statement requests.
|
|
20
|
+
*/
|
|
21
|
+
export declare class UpdateMedicationStatementRequestValidator implements Validator<UpdateMedicationStatementInput> {
|
|
22
|
+
validate(data: UpdateMedicationStatementInput, errors: ErrorsCollector): void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Request object for updating medication statement.
|
|
26
|
+
*/
|
|
27
|
+
export declare class UpdateMedicationStatementRequest extends ValidationRequest<UpdateMedicationStatementInput> {
|
|
28
|
+
protected validator: UpdateMedicationStatementRequestValidator;
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
import { isNullOrUndefined, isNullOrUndefinedOrEmptyString, } from "../../../utils/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Enum representing possible statuses for updating a medication statement.
|
|
5
|
+
*/
|
|
6
|
+
export var UpdateMedicationStatementStatus;
|
|
7
|
+
(function (UpdateMedicationStatementStatus) {
|
|
8
|
+
UpdateMedicationStatementStatus["Active"] = "ACTIVE";
|
|
9
|
+
UpdateMedicationStatementStatus["Completed"] = "COMPLETED";
|
|
10
|
+
})(UpdateMedicationStatementStatus || (UpdateMedicationStatementStatus = {}));
|
|
11
|
+
/**
|
|
12
|
+
* Validator for update medication statement requests.
|
|
13
|
+
*/
|
|
14
|
+
export class UpdateMedicationStatementRequestValidator {
|
|
15
|
+
validate(data, errors) {
|
|
16
|
+
if (isNullOrUndefined(data)) {
|
|
17
|
+
errors.add("input must be provided.");
|
|
18
|
+
}
|
|
19
|
+
if (isNullOrUndefinedOrEmptyString(data.id)) {
|
|
20
|
+
errors.add("id must be a non-empty string.");
|
|
21
|
+
}
|
|
22
|
+
if (isNullOrUndefined(data.status)) {
|
|
23
|
+
errors.add("status is required.");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Request object for updating medication statement.
|
|
29
|
+
*/
|
|
30
|
+
export class UpdateMedicationStatementRequest extends ValidationRequest {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.validator = new UpdateMedicationStatementRequestValidator();
|
|
34
|
+
}
|
|
35
|
+
}
|
package/dist/api/base/index.d.ts
CHANGED
package/dist/api/base/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
5
|
+
export type GetSupportRequestsRequestInput = PagedRequestInput & {
|
|
6
|
+
search?: string;
|
|
7
|
+
sortBy?: SortBy;
|
|
8
|
+
sortOrder?: SortOrderEnum;
|
|
9
|
+
status?: RequestStatus[];
|
|
10
|
+
};
|
|
11
|
+
declare class GetSupportRequestsRequestValidator extends PagedRequestValidator<GetSupportRequestsRequestInput> {
|
|
12
|
+
validate(data: GetSupportRequestsRequestInput, errors: ErrorsCollector): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class GetSupportRequestsRequest extends PagedRequest<GetSupportRequestsRequestInput> {
|
|
15
|
+
protected validator: GetSupportRequestsRequestValidator;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum, } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
3
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
4
|
+
class GetSupportRequestsRequestValidator extends PagedRequestValidator {
|
|
5
|
+
validate(data, errors) {
|
|
6
|
+
super.validate(data, errors);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class GetSupportRequestsRequest extends PagedRequest {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.validator = new GetSupportRequestsRequestValidator();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GetSupportRequestsQueryResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import type { BWellQueryResult } from "../../../results/index.js";
|
|
3
|
+
import type { BaseManagerError } from "../errors.js";
|
|
4
|
+
import { GetSupportRequestsRequest } from "./get-support-requests-request.js";
|
|
5
|
+
export type GetSupportRequestsResults = GetSupportRequestsQueryResults["getSupportRequests"];
|
|
6
|
+
/**
|
|
7
|
+
* The SupportManager interface provides methods for managing support requests.
|
|
8
|
+
*/
|
|
9
|
+
export interface SupportManager {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves support requests based on the provided filters.
|
|
12
|
+
* @param request The request containing pagination, search, and filter parameters.
|
|
13
|
+
* @returns A promise that resolves to a query result with the support requests data.
|
|
14
|
+
*/
|
|
15
|
+
getSupportRequests(request: GetSupportRequestsRequest): Promise<BWellQueryResult<GetSupportRequestsResults, BaseManagerError>>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetExplanationOfBenefitsQueryVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import type { RequestFactory } from "../../../requests/request.js";
|
|
3
|
+
import { ExplanationOfBenefitsRequest } from "../../base/financial/explanation-of-benefit.js";
|
|
4
|
+
/**
|
|
5
|
+
* Factory to create ExplanationOfBenefit GraphQL variables from ExplanationOfBenefitsRequest.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExplanationOfBenefitsRequestFactory implements RequestFactory<ExplanationOfBenefitsRequest, GetExplanationOfBenefitsQueryVariables> {
|
|
8
|
+
create(request?: ExplanationOfBenefitsRequest): GetExplanationOfBenefitsQueryVariables;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TotalType } from "../../../graphql/schema.js";
|
|
2
|
+
/**
|
|
3
|
+
* Factory to create ExplanationOfBenefit GraphQL variables from ExplanationOfBenefitsRequest.
|
|
4
|
+
*/
|
|
5
|
+
export class ExplanationOfBenefitsRequestFactory {
|
|
6
|
+
create(request) {
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
|
+
const input = request === null || request === void 0 ? void 0 : request.data();
|
|
9
|
+
return {
|
|
10
|
+
page: (_a = input === null || input === void 0 ? void 0 : input.page) !== null && _a !== void 0 ? _a : null,
|
|
11
|
+
pageSize: (_b = input === null || input === void 0 ? void 0 : input.pageSize) !== null && _b !== void 0 ? _b : null,
|
|
12
|
+
id: (_c = input === null || input === void 0 ? void 0 : input.id) !== null && _c !== void 0 ? _c : null,
|
|
13
|
+
lastUpdated: (_d = input === null || input === void 0 ? void 0 : input.lastUpdated) !== null && _d !== void 0 ? _d : null,
|
|
14
|
+
patient: (_e = input === null || input === void 0 ? void 0 : input.patient) !== null && _e !== void 0 ? _e : null,
|
|
15
|
+
provider: (_f = input === null || input === void 0 ? void 0 : input.provider) !== null && _f !== void 0 ? _f : null,
|
|
16
|
+
coverage: (_g = input === null || input === void 0 ? void 0 : input.coverage) !== null && _g !== void 0 ? _g : null,
|
|
17
|
+
status: (_h = input === null || input === void 0 ? void 0 : input.status) !== null && _h !== void 0 ? _h : null,
|
|
18
|
+
created: (_j = input === null || input === void 0 ? void 0 : input.created) !== null && _j !== void 0 ? _j : null,
|
|
19
|
+
sort: (_k = input === null || input === void 0 ? void 0 : input.sort) !== null && _k !== void 0 ? _k : null,
|
|
20
|
+
total: TotalType.Accurate,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -3,7 +3,8 @@ import { LoggerProvider } from "../../../logger/index.js";
|
|
|
3
3
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../../base/errors.js";
|
|
5
5
|
import { CoveragesRequest } from "../../base/financial/coverage-request.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ExplanationOfBenefitsRequest } from "../../base/financial/explanation-of-benefit.js";
|
|
7
|
+
import { CoveragesResults, ExplanationOfBenefitsResults, FinancialManager } from "../../base/financial/financial-manager.js";
|
|
7
8
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
8
9
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
9
10
|
export declare class GraphQLFinancialManager extends GraphQLManager implements FinancialManager {
|
|
@@ -16,4 +17,5 @@ export declare class GraphQLFinancialManager extends GraphQLManager implements F
|
|
|
16
17
|
* @returns Promise resolving to coverage resources results or an error
|
|
17
18
|
*/
|
|
18
19
|
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
20
|
+
getExplanationOfBenefits(request: ExplanationOfBenefitsRequest): Promise<BWellQueryResult<ExplanationOfBenefitsResults, ValidationError | BaseManagerError>>;
|
|
19
21
|
}
|
|
@@ -18,17 +18,19 @@ 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 _GraphQLFinancialManager_logger, _GraphQLFinancialManager_sdk, _GraphQLFinancialManager_coveragesRequestFactory;
|
|
21
|
+
var _GraphQLFinancialManager_logger, _GraphQLFinancialManager_sdk, _GraphQLFinancialManager_coveragesRequestFactory, _GraphQLFinancialManager_explanationOfBenefitsRequestFactory;
|
|
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
25
|
import { GraphQLGetCoveragesRequestFactory } from "./graphql-coverages-bwell-request-factory.js";
|
|
26
|
+
import { ExplanationOfBenefitsRequestFactory } from "./graphql-explanation-of-benefits-factory.js";
|
|
26
27
|
export class GraphQLFinancialManager extends GraphQLManager {
|
|
27
28
|
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
28
29
|
super();
|
|
29
30
|
_GraphQLFinancialManager_logger.set(this, void 0);
|
|
30
31
|
_GraphQLFinancialManager_sdk.set(this, void 0);
|
|
31
32
|
_GraphQLFinancialManager_coveragesRequestFactory.set(this, new GraphQLGetCoveragesRequestFactory());
|
|
33
|
+
_GraphQLFinancialManager_explanationOfBenefitsRequestFactory.set(this, new ExplanationOfBenefitsRequestFactory());
|
|
32
34
|
__classPrivateFieldSet(this, _GraphQLFinancialManager_sdk, sdk, "f");
|
|
33
35
|
__classPrivateFieldSet(this, _GraphQLFinancialManager_logger, loggerProvider.getLogger("GraphQLFinancialManager"), "f");
|
|
34
36
|
}
|
|
@@ -54,5 +56,21 @@ export class GraphQLFinancialManager extends GraphQLManager {
|
|
|
54
56
|
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.coverages, result.error);
|
|
55
57
|
});
|
|
56
58
|
}
|
|
59
|
+
getExplanationOfBenefits(request) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
var _a;
|
|
62
|
+
const validationResult = this.validateRequest(request);
|
|
63
|
+
if (validationResult.failure()) {
|
|
64
|
+
return validationResult.toQueryResult();
|
|
65
|
+
}
|
|
66
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("calling getExplanationOfBenefits...");
|
|
67
|
+
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLFinancialManager_sdk, "f").getExplanationOfBenefits(__classPrivateFieldGet(this, _GraphQLFinancialManager_explanationOfBenefitsRequestFactory, "f").create(request)));
|
|
68
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("getExplanationOfBenefits complete");
|
|
69
|
+
if (result.hasError()) {
|
|
70
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").error("getExplanationOfBenefits errors", result.error);
|
|
71
|
+
}
|
|
72
|
+
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.explanationOfBenefits, result.error);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
57
75
|
}
|
|
58
|
-
_GraphQLFinancialManager_logger = new WeakMap(), _GraphQLFinancialManager_sdk = new WeakMap(), _GraphQLFinancialManager_coveragesRequestFactory = new WeakMap();
|
|
76
|
+
_GraphQLFinancialManager_logger = new WeakMap(), _GraphQLFinancialManager_sdk = new WeakMap(), _GraphQLFinancialManager_coveragesRequestFactory = new WeakMap(), _GraphQLFinancialManager_explanationOfBenefitsRequestFactory = new WeakMap();
|
|
@@ -11,6 +11,7 @@ import type { HealthManager } from "../base/health-data/health-manager.js";
|
|
|
11
11
|
import { HealthSpaceManager } from "../base/health-space/health-space-manager.js";
|
|
12
12
|
import { QuestionnaireManager } from "../base/questionnaire/questionnaire-manager.js";
|
|
13
13
|
import type { SearchManager } from "../base/search/search-manager.js";
|
|
14
|
+
import type { SupportManager } from "../base/support/support-manager.js";
|
|
14
15
|
import type { UserManager } from "../base/user/user-manager.js";
|
|
15
16
|
import type { GraphQLSdk } from "./graphql-sdk/index.js";
|
|
16
17
|
export declare class GraphQLApiProvider implements ApiProvider {
|
|
@@ -26,5 +27,6 @@ export declare class GraphQLApiProvider implements ApiProvider {
|
|
|
26
27
|
readonly search: SearchManager;
|
|
27
28
|
readonly questionnaire: QuestionnaireManager;
|
|
28
29
|
readonly language: LanguageManager;
|
|
30
|
+
readonly support: SupportManager;
|
|
29
31
|
constructor(graphqlSDK: GraphQLSdk, loggerProvider: LoggerProvider, graphqlClient: GraphQLClient);
|
|
30
32
|
}
|
|
@@ -20,6 +20,7 @@ import { GraphQLHealthSpaceManager } from "./health-space/index.js";
|
|
|
20
20
|
import { GraphQLHealthManager } from "./healthdata/index.js";
|
|
21
21
|
import { GraphQLQuestionnaireManager } from "./questionnaire/index.js";
|
|
22
22
|
import { GraphQLSearchManager } from "./search/index.js";
|
|
23
|
+
import { GraphQLSupportManager } from "./support/index.js";
|
|
23
24
|
import { GraphQLUserManager } from "./user/index.js";
|
|
24
25
|
export class GraphQLApiProvider {
|
|
25
26
|
constructor(graphqlSDK, loggerProvider, graphqlClient) {
|
|
@@ -38,6 +39,7 @@ export class GraphQLApiProvider {
|
|
|
38
39
|
this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
39
40
|
this.search = new GraphQLSearchManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
40
41
|
this.questionnaire = new GraphQLQuestionnaireManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
42
|
+
this.support = new GraphQLSupportManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
41
43
|
this.language = new BwellSdkLanguageManager(graphqlClient);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BWellError, ValidationError } from "../../../errors/index.js";
|
|
2
2
|
import { LoggerProvider } from "../../../logger/index.js";
|
|
3
|
-
import { BWellQueryResult } from "../../../results/index.js";
|
|
3
|
+
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../../base/errors.js";
|
|
5
5
|
import * as health from "../../base/health-data/index.js";
|
|
6
6
|
import { HealthManager } from "../../base/index.js";
|
|
@@ -9,13 +9,14 @@ import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
|
9
9
|
import { GraphQLGetDiagnosticReportRequestFactory } from "./graphql-diagnostic-reports-bwell-request-factory.js";
|
|
10
10
|
import { GraphQLGetMedicationDispenseBWellResponseFactory } from "./graphql-get-medication-dispense-bwell-response-factory.js";
|
|
11
11
|
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
12
|
+
import { GraphqlUpdateMedicationStatementRequestFactory } from "./graphql-update-medication-statement-request-factory.js";
|
|
12
13
|
export type RenameKey<T, OldKey extends string, NewKey extends string> = T extends unknown[] ? RenameKeyInArray<T, OldKey, NewKey> : T extends object ? {
|
|
13
14
|
[K in keyof T as K extends OldKey ? NewKey : K]: RenameKey<T[K], OldKey, NewKey>;
|
|
14
15
|
} : T;
|
|
15
16
|
export type RenameKeyInArray<T extends unknown[], OldKey extends string, NewKey extends string> = Array<RenameKey<T[number], OldKey, NewKey>>;
|
|
16
17
|
export declare class GraphQLHealthManager extends GraphQLManager implements HealthManager {
|
|
17
18
|
#private;
|
|
18
|
-
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, medicationRequestResponseFactory?: GraphQLGetMedicationRequestBWellResponseFactory, medicationDispenseResponseFactory?: GraphQLGetMedicationDispenseBWellResponseFactory, diagnosticReportRequestFactory?: GraphQLGetDiagnosticReportRequestFactory);
|
|
19
|
+
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, medicationRequestResponseFactory?: GraphQLGetMedicationRequestBWellResponseFactory, medicationDispenseResponseFactory?: GraphQLGetMedicationDispenseBWellResponseFactory, diagnosticReportRequestFactory?: GraphQLGetDiagnosticReportRequestFactory, updateMedicationStatementRequestFactory?: GraphqlUpdateMedicationStatementRequestFactory);
|
|
19
20
|
getHealthSummary(): Promise<BWellQueryResult<health.HealthSummaryResults, BaseManagerError>>;
|
|
20
21
|
getAllergyIntolerances(request?: health.AllergyIntolerancesRequest): Promise<BWellQueryResult<health.AllergyIntolerancesResults, ValidationError | BaseManagerError>>;
|
|
21
22
|
getAllergyIntoleranceGroups(request?: health.AllergyIntoleranceGroupsRequest): Promise<BWellQueryResult<health.AllergyIntolerancesGroupsResults, ValidationError | BaseManagerError>>;
|
|
@@ -40,6 +41,7 @@ export declare class GraphQLHealthManager extends GraphQLManager implements Heal
|
|
|
40
41
|
getMedicationDispense(request?: health.MedicationDispenseRequest): Promise<BWellQueryResult<health.MedicationDispenseResults, ValidationError | BaseManagerError>>;
|
|
41
42
|
getMedicationRequest(request?: health.MedicationRequestRequest): Promise<BWellQueryResult<health.MedicationRequestResults, ValidationError | BaseManagerError>>;
|
|
42
43
|
getMedicationStatements(request?: health.MedicationStatementsRequest): Promise<BWellQueryResult<health.MedicationStatementsResults, ValidationError | BaseManagerError>>;
|
|
44
|
+
updateMedicationStatement(request: health.UpdateMedicationStatementRequest): Promise<BWellTransactionResult<health.UpdateMedicationStatementResult, ValidationError | BaseManagerError>>;
|
|
43
45
|
getMedicationGroups(request?: health.MedicationGroupsRequest): Promise<BWellQueryResult<health.MedicationGroupsResults, ValidationError | BaseManagerError>>;
|
|
44
46
|
getMedicationKnowledge(request: health.MedicationKnowledgeRequest): Promise<BWellQueryResult<health.MedicationKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
45
47
|
getLabKnowledge(request: health.LabKnowledgeRequest): Promise<BWellQueryResult<health.LabKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
@@ -18,26 +18,29 @@ 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, _GraphQLHealthManager_medicationRequestResponseFactory, _GraphQLHealthManager_medicationDispenseResponseFactory, _GraphQLHealthManager_diagnosticReportRequestFactory;
|
|
21
|
+
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger, _GraphQLHealthManager_medicationRequestResponseFactory, _GraphQLHealthManager_medicationDispenseResponseFactory, _GraphQLHealthManager_diagnosticReportRequestFactory, _GraphQLHealthManager_updateMedicationStatementRequestFactory;
|
|
22
22
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
|
-
import { BWellQueryResult } from "../../../results/index.js";
|
|
23
|
+
import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
|
|
24
24
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
25
25
|
import { GraphQLGetDiagnosticReportRequestFactory } from "./graphql-diagnostic-reports-bwell-request-factory.js";
|
|
26
26
|
import { GraphQLGetMedicationDispenseBWellResponseFactory } from "./graphql-get-medication-dispense-bwell-response-factory.js";
|
|
27
27
|
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
28
|
+
import { GraphqlUpdateMedicationStatementRequestFactory } from "./graphql-update-medication-statement-request-factory.js";
|
|
28
29
|
export class GraphQLHealthManager extends GraphQLManager {
|
|
29
|
-
constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), medicationRequestResponseFactory = new GraphQLGetMedicationRequestBWellResponseFactory(), medicationDispenseResponseFactory = new GraphQLGetMedicationDispenseBWellResponseFactory(), diagnosticReportRequestFactory = new GraphQLGetDiagnosticReportRequestFactory()) {
|
|
30
|
+
constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), medicationRequestResponseFactory = new GraphQLGetMedicationRequestBWellResponseFactory(), medicationDispenseResponseFactory = new GraphQLGetMedicationDispenseBWellResponseFactory(), diagnosticReportRequestFactory = new GraphQLGetDiagnosticReportRequestFactory(), updateMedicationStatementRequestFactory = new GraphqlUpdateMedicationStatementRequestFactory()) {
|
|
30
31
|
super();
|
|
31
32
|
_GraphQLHealthManager_sdk.set(this, void 0);
|
|
32
33
|
_GraphQLHealthManager_logger.set(this, void 0);
|
|
33
34
|
_GraphQLHealthManager_medicationRequestResponseFactory.set(this, void 0);
|
|
34
35
|
_GraphQLHealthManager_medicationDispenseResponseFactory.set(this, void 0);
|
|
35
36
|
_GraphQLHealthManager_diagnosticReportRequestFactory.set(this, void 0);
|
|
37
|
+
_GraphQLHealthManager_updateMedicationStatementRequestFactory.set(this, void 0);
|
|
36
38
|
__classPrivateFieldSet(this, _GraphQLHealthManager_sdk, sdk, "f");
|
|
37
39
|
__classPrivateFieldSet(this, _GraphQLHealthManager_logger, loggerProvider.getLogger("GraphQLHealthManager"), "f");
|
|
38
40
|
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationRequestResponseFactory, medicationRequestResponseFactory, "f");
|
|
39
41
|
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationDispenseResponseFactory, medicationDispenseResponseFactory, "f");
|
|
40
42
|
__classPrivateFieldSet(this, _GraphQLHealthManager_diagnosticReportRequestFactory, diagnosticReportRequestFactory, "f");
|
|
43
|
+
__classPrivateFieldSet(this, _GraphQLHealthManager_updateMedicationStatementRequestFactory, updateMedicationStatementRequestFactory, "f");
|
|
41
44
|
}
|
|
42
45
|
getHealthSummary() {
|
|
43
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -458,6 +461,22 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
458
461
|
return new BWellQueryResult((_b = result.data) === null || _b === void 0 ? void 0 : _b.getMedicationStatements, result.error);
|
|
459
462
|
});
|
|
460
463
|
}
|
|
464
|
+
updateMedicationStatement(request) {
|
|
465
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
466
|
+
const validationResult = this.validateRequest(request);
|
|
467
|
+
if (validationResult.failure()) {
|
|
468
|
+
return validationResult.intoFailure();
|
|
469
|
+
}
|
|
470
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling updateMedicationStatement...");
|
|
471
|
+
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").updateMedicationStatement(__classPrivateFieldGet(this, _GraphQLHealthManager_updateMedicationStatementRequestFactory, "f").create(request)));
|
|
472
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("updateMedicationStatement complete");
|
|
473
|
+
if (result.failure()) {
|
|
474
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("updateMedicationStatement failed", result.error);
|
|
475
|
+
return result.intoFailure();
|
|
476
|
+
}
|
|
477
|
+
return BWellTransactionResult.success(result.data().updateMedicationStatement);
|
|
478
|
+
});
|
|
479
|
+
}
|
|
461
480
|
getMedicationGroups(request) {
|
|
462
481
|
return __awaiter(this, void 0, void 0, function* () {
|
|
463
482
|
var _a, _b;
|
|
@@ -549,4 +568,4 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
549
568
|
});
|
|
550
569
|
}
|
|
551
570
|
}
|
|
552
|
-
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(), _GraphQLHealthManager_medicationRequestResponseFactory = new WeakMap(), _GraphQLHealthManager_medicationDispenseResponseFactory = new WeakMap(), _GraphQLHealthManager_diagnosticReportRequestFactory = new WeakMap();
|
|
571
|
+
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(), _GraphQLHealthManager_medicationRequestResponseFactory = new WeakMap(), _GraphQLHealthManager_medicationDispenseResponseFactory = new WeakMap(), _GraphQLHealthManager_diagnosticReportRequestFactory = new WeakMap(), _GraphQLHealthManager_updateMedicationStatementRequestFactory = new WeakMap();
|
package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Types from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { UpdateMedicationStatementRequest } from "../../base/index.js";
|
|
4
|
+
export declare class GraphqlUpdateMedicationStatementRequestFactory implements RequestFactory<UpdateMedicationStatementRequest, Types.UpdateMedicationStatementMutationVariables> {
|
|
5
|
+
create(request: UpdateMedicationStatementRequest): Types.UpdateMedicationStatementMutationVariables;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Types from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { GetSupportRequestsRequest } from "../../base/support/get-support-requests-request.js";
|
|
4
|
+
export declare class GraphQLGetSupportRequestsBwellRequestFactory implements RequestFactory<GetSupportRequestsRequest, Types.GetSupportRequestsQueryVariables> {
|
|
5
|
+
create(request?: GetSupportRequestsRequest): Types.GetSupportRequestsQueryVariables;
|
|
6
|
+
}
|