@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1753128826 → 2.0.0-alpha.0-rc.1753298141

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.
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export declare const VERSION = "2.0.0-alpha.0-rc.1753128826";
4
+ export declare const VERSION = "2.0.0-alpha.0-rc.1753298141";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export const VERSION = "2.0.0-alpha.0-rc.1753128826";
4
+ export const VERSION = "2.0.0-alpha.0-rc.1753298141";
@@ -1,7 +1,10 @@
1
- import type { GetAllergyIntoleranceGroupsQueryResults, GetAllergyIntolerancesQueryResults, GetCarePlanGroupsQueryResults, GetConditionGroupsQueryResults, GetDiagnosticReportLabGroupsQueryResults, GetEncountersGroupQueryResults, GetImmunizationGroupsQueryResults, GetLabGroupsQueryResults, GetMedicationGroupsQueryResults, GetProcedureGroupsQueryResults, GetVitalSignGroupsQueryResults } from "../../../graphql/operations/types.js";
1
+ import type { GetAllergyIntoleranceGroupsQueryResults, GetAllergyIntolerancesQueryResults, GetCarePlanGroupsQueryResults, GetConditionGroupsQueryResults, GetDiagnosticReportLabGroupsQueryResults, GetEncountersGroupQueryResults, GetHealthSummaryQueryResults, GetImmunizationGroupsQueryResults, GetLabGroupsQueryResults, GetMedicationGroupsQueryResults, GetProcedureGroupsQueryResults, GetVitalSignGroupsQueryResults } from "../../../graphql/operations/types.js";
2
2
  import type { BWellQueryResult } from "../../../results/index.js";
3
3
  import type { BaseManagerError } from "../errors.js";
4
4
  import type { AllergyIntoleranceGroupsRequest, CarePlanGroupsRequest, ConditionGroupsRequest, DiagnosticReportLabGroupsRequest, EncounterGroupsRequest, HealthDataRequest, ImmunizationGroupsRequest, LabGroupsRequest, MedicationGroupsRequest, ProcedureGroupsRequest, VitalSignGroupsRequest } from "./health-data-request.js";
5
+ type HealthSummaryResultsType = GetHealthSummaryQueryResults["getHealthSummary"];
6
+ export interface HealthSummaryResults extends HealthSummaryResultsType {
7
+ }
5
8
  export type AllergyIntolerancesResults = GetAllergyIntolerancesQueryResults["allergyIntolerances"];
6
9
  type AllergyIntolerancesGroupsResultsType = GetAllergyIntoleranceGroupsQueryResults["getAllergyIntoleranceGroups"];
7
10
  export interface AllergyIntolerancesGroupsResults extends AllergyIntolerancesGroupsResultsType {
@@ -37,6 +40,12 @@ export interface MedicationGroupsResults extends MedicationGroupsResultsType {
37
40
  * The HealthManager interface provides methods for retrieving health care records.
38
41
  */
39
42
  export interface HealthManager {
43
+ /**
44
+ * Retrieve a summary view of current health care records by category. This view includes counts for AllergyIntolerance, CarePlan, Condition, Encounter, Immunization, Procedure, Vital Sign, Medication Statement, and Lab resources.
45
+ *
46
+ * @returns {Promise<BWellQueryResult<HealthSummaryResults>>} A promise resolving to An object which based off of generated ResourceGroups representing an aggregation of AllergyIntolerance, CarePlan, Condition, Encounter, Immunization, Procedure, MedicationStatement, Observation (Vital Sign and Lab) resources.
47
+ */
48
+ getHealthSummary(): Promise<BWellQueryResult<HealthSummaryResults, BaseManagerError>>;
40
49
  getAllergyIntolerances(request?: HealthDataRequest): Promise<BWellQueryResult<AllergyIntolerancesResults, BaseManagerError>>;
41
50
  /**
42
51
  * Retrieves a list of AllergyIntoleranceGroup resources.
@@ -2,4 +2,4 @@ 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 { AllergyIntolerancesResults, AllergyIntolerancesGroupsResults, ConditionGroupsResults, LabGroupsResults, CarePlanGroupsResults, EncounterGroupsResults, ImmunizationGroupsResults, ProcedureGroupsResults, VitalSignGroupsResults, MedicationGroupsResults, HealthManager, DiagnosticReportLabGroupsResults, } from "./health-manager.js";
5
+ export { HealthSummaryResults, AllergyIntolerancesResults, AllergyIntolerancesGroupsResults, ConditionGroupsResults, LabGroupsResults, CarePlanGroupsResults, EncounterGroupsResults, ImmunizationGroupsResults, ProcedureGroupsResults, VitalSignGroupsResults, MedicationGroupsResults, HealthManager, DiagnosticReportLabGroupsResults, } from "./health-manager.js";
@@ -9,6 +9,7 @@ import type { GraphQLSdk } from "../graphql-sdk/index.js";
9
9
  export declare class GraphQLHealthManager extends GraphQLManager implements HealthManager {
10
10
  #private;
11
11
  constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
12
+ getHealthSummary(): Promise<BWellQueryResult<health.HealthSummaryResults, BaseManagerError>>;
12
13
  getAllergyIntolerances(request?: health.HealthDataRequest): Promise<BWellQueryResult<health.AllergyIntolerancesResults>>;
13
14
  getAllergyIntoleranceGroups(request?: health.AllergyIntoleranceGroupsRequest): Promise<BWellQueryResult<health.AllergyIntolerancesGroupsResults, ValidationError | BaseManagerError>>;
14
15
  getConditionGroups(request?: health.ConditionGroupsRequest): Promise<BWellQueryResult<health.ConditionGroupsResults, ValidationError | BaseManagerError>>;
@@ -32,19 +32,21 @@ export class GraphQLHealthManager extends GraphQLManager {
32
32
  __classPrivateFieldSet(this, _GraphQLHealthManager_sdk, sdk, "f");
33
33
  __classPrivateFieldSet(this, _GraphQLHealthManager_logger, loggerProvider.getLogger("GraphQLHealthManager"), "f");
34
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
- // }
35
+ getHealthSummary() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ var _a;
38
+ __classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getHealthSummary...");
39
+ const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").GetHealthSummary());
40
+ __classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getHealthSummary complete");
41
+ if (result.hasError()) {
42
+ __classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getHealthSummary failed", result.error);
43
+ }
44
+ else {
45
+ __classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").info("successfully called getHealthSummary");
46
+ }
47
+ return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getHealthSummary, result.error);
48
+ });
49
+ }
48
50
  getAllergyIntolerances(request) {
49
51
  return __awaiter(this, void 0, void 0, function* () {
50
52
  var _a;
@@ -48,6 +48,7 @@ export declare const GetCarePlanGroupsDocument = "\n query getCarePlanGroups(
48
48
  export declare const GetConditionGroupsDocument = "\n query getConditionGroups($request: ConditionGroupQueryRequest) {\n getConditionGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n coding {\n ...CodingFields\n }\n references\n recordedDate\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
49
49
  export declare const GetDiagnosticReportLabGroupsDocument = "\n query getDiagnosticReportLabGroups($request: DiagnosticReportLabGroupQueryRequest) {\n getDiagnosticReportLabGroups(request: $request) {\n resources {\n id\n effectiveDateTime\n issued\n name\n performer\n references\n source\n sourceDisplay\n coding {\n ...CodingFields\n }\n }\n paging_info {\n ...PagingFields\n }\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n ";
50
50
  export declare const GetEncountersGroupDocument = "\n query getEncountersGroup($request: EncounterGroupQueryRequest) {\n getEncounterGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n references\n class {\n ...CodingFields\n }\n type {\n ...CodingFields\n }\n participant\n coding {\n ...CodingFields\n }\n date\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
51
+ export declare const GetHealthSummaryDocument = "\n query GetHealthSummary {\n getHealthSummary {\n resources {\n category\n total\n }\n }\n}\n ";
51
52
  export declare const GetImmunizationGroupsDocument = "\n query getImmunizationGroups($request: ImmunizationGroupQueryRequest) {\n getImmunizationGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n references\n coding {\n ...CodingFields\n }\n occurrenceDateTime\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
52
53
  export declare const GetProcedureGroupsDocument = "\n query getProcedureGroups($request: ProcedureGroupQueryRequest) {\n getProcedureGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n references\n coding {\n ...CodingFields\n }\n performer\n performedDate\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
53
54
  export declare const GetVitalSignGroupsDocument = "\n query getVitalSignGroups($request: VitalSignGroupQueryRequest) {\n getVitalSignGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n source\n sourceDisplay\n category {\n ...CodeableConceptFields\n }\n coding {\n ...CodingFields\n }\n effectiveDateTime\n interpretation {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n component {\n ...ComponentFields\n }\n references\n effectiveDateTime\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment ComponentFields on Component {\n code {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
@@ -148,6 +149,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
148
149
  headers: Headers;
149
150
  status: number;
150
151
  }>;
152
+ GetHealthSummary(variables?: Types.GetHealthSummaryQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
153
+ data: Types.GetHealthSummaryQueryResults;
154
+ errors?: GraphQLError[];
155
+ extensions?: any;
156
+ headers: Headers;
157
+ status: number;
158
+ }>;
151
159
  getImmunizationGroups(variables?: Types.GetImmunizationGroupsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
152
160
  data: Types.GetImmunizationGroupsQueryResults;
153
161
  errors?: GraphQLError[];
@@ -744,6 +744,16 @@ export const GetEncountersGroupDocument = `
744
744
  }
745
745
  ${PagingFieldsFragmentDoc}
746
746
  ${CodingFieldsFragmentDoc}`;
747
+ export const GetHealthSummaryDocument = `
748
+ query GetHealthSummary {
749
+ getHealthSummary {
750
+ resources {
751
+ category
752
+ total
753
+ }
754
+ }
755
+ }
756
+ `;
747
757
  export const GetImmunizationGroupsDocument = `
748
758
  query getImmunizationGroups($request: ImmunizationGroupQueryRequest) {
749
759
  getImmunizationGroups(request: $request) {
@@ -1310,6 +1320,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
1310
1320
  getEncountersGroup(variables, requestHeaders) {
1311
1321
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetEncountersGroupDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEncountersGroup', 'query', variables);
1312
1322
  },
1323
+ GetHealthSummary(variables, requestHeaders) {
1324
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetHealthSummaryDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'GetHealthSummary', 'query', variables);
1325
+ },
1313
1326
  getImmunizationGroups(variables, requestHeaders) {
1314
1327
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetImmunizationGroupsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getImmunizationGroups', 'query', variables);
1315
1328
  },
@@ -2462,6 +2462,17 @@ export type GetEncountersGroupQueryResults = {
2462
2462
  }>;
2463
2463
  };
2464
2464
  };
2465
+ export type GetHealthSummaryQueryVariables = Types.Exact<{
2466
+ [key: string]: never;
2467
+ }>;
2468
+ export type GetHealthSummaryQueryResults = {
2469
+ getHealthSummary: {
2470
+ resources: Array<{
2471
+ category: Types.HealthSummaryCategory | null;
2472
+ total: number | null;
2473
+ }>;
2474
+ };
2475
+ };
2465
2476
  export type GetImmunizationGroupsQueryVariables = Types.Exact<{
2466
2477
  request: Types.InputMaybe<Types.ImmunizationGroupQueryRequest>;
2467
2478
  }>;
@@ -43672,7 +43672,7 @@ export type Mutation = {
43672
43672
  * Returns an OperationOutcome for the delete operation.
43673
43673
  */
43674
43674
  deleteCondition: OperationOutcome;
43675
- /** Disconnection a connection */
43675
+ /** Delete a connection */
43676
43676
  deleteConnection: ConnectionStatusUpdate;
43677
43677
  /**
43678
43678
  * Initiates deletion of a DiagnosticReport resource by its ID.
@@ -43824,7 +43824,7 @@ export type Mutation = {
43824
43824
  * Returns an OperationOutcome for the delete operation.
43825
43825
  */
43826
43826
  deleteSpecimen: OperationOutcome;
43827
- /** Disconnect a connection */
43827
+ /** Disconnection a connection */
43828
43828
  disconnectConnection: DisconnectConnection;
43829
43829
  exchangeAuthCode: AuthTokens;
43830
43830
  getTokenFromDemographics: AuthTokens;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "2.0.0-alpha.0-rc.1753128826",
3
+ "version": "2.0.0-alpha.0-rc.1753298141",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",