HealthManager

Health Manager for patient health records and clinical data access.
Provides methods for retrieving health care records including conditions, medications,
labs, procedures, and other clinical data organized by groups.

See

https://build.fhir.org/patient.html

Methods

getHealthSummary()

getHealthSummary((): Promise<BWellQueryResult<HealthSummary, BaseManagerError>>

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.

Returns

Promise<BWellQueryResult<HealthSummary, BaseManagerError>>

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.


getAllergyIntolerances()

getAllergyIntolerances((request?): Promise<BWellQueryResult<AllergyIntoleranceResponse, BaseManagerError>>

Retrieves a list of allergy intolerance resources.
Gets individual allergy intolerance records for the authenticated user.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<AllergyIntoleranceResponse, BaseManagerError>>

A promise resolving to an object representing the list of allergy intolerances retrieved.

Example

// Without filtering
const allergies = await sdk.health.getAllergyIntolerances();

// With filtering
const recentAllergies = await sdk.health.getAllergyIntolerances(
  new HealthDataRequest({
    lastUpdated: { value: '2024-01-01', prefix: 'ge' }
  })
);

getAllergyIntoleranceGroups()

getAllergyIntoleranceGroups((request?): Promise<BWellQueryResult<AllergyIntoleranceGroupsResponse, BaseManagerError>>

Retrieves a list of AllergyIntoleranceGroup resources.
The method accepts a AllergyIntoleranceGroupsRequest object to specify the search criteria.

Parameters

request?

AllergyIntoleranceGroupsRequest

Request class instance for specifying the search criteria for retrieving AllergyIntoleranceGroup resources

Returns

Promise<BWellQueryResult<AllergyIntoleranceGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of Allergy Intolerance Groups retrieved, along with potential validation or GraphQL errors.

Example

// Without filtering
const allergyGroups = await sdk.health.getAllergyIntoleranceGroups();

// With pagination
const pagedAllergyGroups = await sdk.health.getAllergyIntoleranceGroups(
  new AllergyIntoleranceGroupsRequest({
    page: 1,
    pageSize: 20
  })
);

getConditions()

getConditions((request?): Promise<BWellQueryResult<ConditionResponse, BaseManagerError>>

Retrieves a list of condition resources.
Gets individual condition records for the authenticated user.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<ConditionResponse, BaseManagerError>>

A promise resolving to an object representing the list of conditions retrieved.

Example

const conditions = await sdk.health.getConditions();

getConditionGroups()

getConditionGroups((request?): Promise<BWellQueryResult<ConditionGroupsResponse, BaseManagerError>>

Retrieves a list of condition groups resources.

Parameters

request?

ConditionGroupsRequest

Optional request class instance for specifying the search criteria for retrieving condition groups resources

Returns

Promise<BWellQueryResult<ConditionGroupsResponse, BaseManagerError>>

A promise resolving to an object representing he list of condition groups retrieved.

Example

const conditions = await sdk.health.getConditionGroups();

getLabGroups()

getLabGroups((request?): Promise<BWellQueryResult<LabGroupsResponse, BaseManagerError>>

Retrieves a list of laboratory groups results.

Parameters

request?

LabGroupsRequest

Optional request class instance for specifying the search criteria for accessing lab groups resources

Returns

Promise<BWellQueryResult<LabGroupsResponse, BaseManagerError>>

A promise resolving to an object representing a list of laboratory groups, along with potential errors.

Example

const labGroups = await sdk.health.getLabGroups();

getCarePlans()

getCarePlans((request?): Promise<BWellQueryResult<CarePlanResponse, BaseManagerError>>

Retrieves a list of care plan resources.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<CarePlanResponse, BaseManagerError>>

A promise resolving to an object representing the list of care plans retrieved.

Example

const carePlans = await sdk.health.getCarePlans();

getCarePlanGroups()

getCarePlanGroups((request?): Promise<BWellQueryResult<CarePlanGroupsResponse, BaseManagerError>>

Retrieves a list of care plan groups resources.

Parameters

request?

CarePlanGroupsRequest

Optional request class instance for specifying the search criteria for retrieving care plan groups resources

Returns

Promise<BWellQueryResult<CarePlanGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of care plan groups retrieved.

Example

const carePlanGroups = await sdk.health.getCarePlanGroups();

getEncounters()

getEncounters((request?): Promise<BWellQueryResult<EncounterResponse, BaseManagerError>>

Retrieves a list of encounter resources.
Gets individual encounter records for the authenticated user.

Parameters

request?

HealthDataRequest

An optional request class for specifying the search criteria.

Returns

Promise<BWellQueryResult<EncounterResponse, BaseManagerError>>

A promise resolving to an object representing the list of encounters retrieved.

Examples

const encounters = await sdk.health.getEncounters();
const encounters = await sdk.health.getEncounters(
  new HealthDataRequest({
    page: 0,
    pageSize: 20,
);
const encounters = await sdk.health.getEncounters(
  new HealthDataRequest({
    page: 0,
    pageSize: 20,
    groupCode: {
      value: {
         value: group.coding.code,
         system: group.coding.system
      }
    }
  })
);

getEncounterGroups()

getEncounterGroups((request?): Promise<BWellQueryResult<EncounterGroupsResponse, BaseManagerError>>

Retrieves a list of encounter groups resources.

Parameters

request?

EncounterGroupsRequest

Optional request class instance for specifying the search criteria for retrieving encounter groups resources

Returns

Promise<BWellQueryResult<EncounterGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of encounter groups retrieved.

Example

const encounterGroups = await sdk.health.getEncounterGroups();

getImmunizations()

getImmunizations((request?): Promise<BWellQueryResult<ImmunizationResponse, BaseManagerError>>

Retrieves a list of immunization resources.
Gets individual immunization records for the authenticated user.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<ImmunizationResponse, BaseManagerError>>

A promise resolving to an object representing the list of immunizations retrieved.

Example

const immunizations = await sdk.health.getImmunizations();

getImmunizationGroups()

getImmunizationGroups((request?): Promise<BWellQueryResult<ImmunizationGroupsResponse, BaseManagerError>>

Retrieves a list of immunization groups resources.

Parameters

request?

ImmunizationGroupsRequest

Optional request class instance for specifying the search criteria for retrieving immunization groups resources

Returns

Promise<BWellQueryResult<ImmunizationGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of immunization groups retrieved.

Example

const immunizationGroups = await sdk.health.getImmunizationGroups();

getProcedures()

getProcedures((request?): Promise<BWellQueryResult<ProcedureResponse, BaseManagerError>>

Retrieves a list of procedure resources.
Gets individual procedures for the authenticated user.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<ProcedureResponse, BaseManagerError>>

A promise resolving to an object representing the list of procedures.

Example

const procedures = await sdk.health.getProcedures();

getProcedureGroups()

getProcedureGroups((request?): Promise<BWellQueryResult<ProcedureGroupsResponse, BaseManagerError>>

Retrieves a list of procedure groups resources.

Parameters

request?

ProcedureGroupsRequest

Optional request class instance for specifying the search criteria for retrieving procedure groups resources.

Returns

Promise<BWellQueryResult<ProcedureGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of procedure groups retrieved.

Example

const procedureGroups = await sdk.health.getProcedureGroups();

getVitalSigns()

getVitalSigns((request?): Promise<BWellQueryResult<VitalSignResponse, BaseManagerError>>

Retrieves a list of vital sign resources.
Gets individual vital sign records for the authenticated user.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<VitalSignResponse, BaseManagerError>>

A promise resolving to an object representing the list of vital signs retrieved.

Example

const vitalSigns = await sdk.health.getVitalSigns();

getLabs()

getLabs((request?): Promise<BWellQueryResult<LabResponse, BaseManagerError>>

Retrieves a list of lab resources (observations with 'laboratory' category).

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<LabResponse, BaseManagerError>>

A promise resolving to an object representing the list of labs retrieved.

Example

const labs = await sdk.health.getLabs();

getVitalSignGroups()

getVitalSignGroups((request?): Promise<BWellQueryResult<VitalSignGroupsResponse, BaseManagerError>>

Retrieves a list of vital sign groups resources.

Parameters

request?

VitalSignGroupsRequest

Optional request class instance for specifying the search criteria for retrieving vital sign groups resources.

Returns

Promise<BWellQueryResult<VitalSignGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of vital sign groups retrieved.

Example

const vitalSignGroups = await sdk.health.getVitalSignGroups();

getMedicationGroups()

getMedicationGroups((request): Promise<BWellQueryResult<MedicationGroupsResponse, BaseManagerError>>

Retrieves a list of medication groups resources.

Parameters

request

MedicationGroupsRequest

Request class instance for specifying the search criteria for retrieving medication groups resources.

Returns

Promise<BWellQueryResult<MedicationGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of medication groups retrieved.

Example

const medications = await sdk.health.getMedicationGroups(
  new MedicationGroupsRequest({
    page: 1,
    pageSize: 10
  })
);

getDiagnosticReports()

getDiagnosticReports((request?): Promise<BWellQueryResult<DiagnosticReportResponse, BaseManagerError>>

Retrieves a list of diagnostic report resources.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<DiagnosticReportResponse, BaseManagerError>>

A promise resolving to an object representing the list of diagnostic reports retrieved.

Example

const diagnosticReports = await sdk.health.getDiagnosticReports();

getDiagnosticReportLabGroups()

getDiagnosticReportLabGroups((request): Promise<BWellQueryResult<DiagnosticReportLabGroupsResponse, BaseManagerError>>

Retrieves a list of diagnostic report lab groups resources.

Parameters

request

DiagnosticReportLabGroupsRequest

Request class instance for specifying the search criteria for retrieving diagnostic report lab groups resources.

Returns

Promise<BWellQueryResult<DiagnosticReportLabGroupsResponse, BaseManagerError>>

A promise resolving to an object representing the list of diagnostic report lab groups retrieved.

Example

const diagnosticReportLabGroups = await sdk.health.getDiagnosticReportLabGroups(
  new DiagnosticReportLabGroupsRequest({
    page: 1,
    pageSize: 10
  })
);

getCareTeams()

getCareTeams((request?): Promise<BWellQueryResult<CareTeamResponse, BaseManagerError>>

Retrieves a list of care team resources.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<CareTeamResponse, BaseManagerError>>

A promise resolving to an object representing the list of care teams.

Example

const careTeams = await sdk.health.getCareTeams();

getMedicationDispenses()

getMedicationDispenses((request?): Promise<BWellQueryResult<MedicationDispenseResponse, BaseManagerError>>

Retrieves a list of medication dispense resources.

Parameters

request?

MedicationDispenseRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<MedicationDispenseResponse, BaseManagerError>>

A promise resolving to an object representing the list of medication dispenses.

Example

const medicationDispenses = await sdk.health.getMedicationDispenses();

getMedicationRequests()

getMedicationRequests((request?): Promise<BWellQueryResult<MedicationRequestResponse, BaseManagerError>>

Retrieves a list of medication request resources.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<MedicationRequestResponse, BaseManagerError>>

A promise resolving to an object representing the list of medication requests retrieved.

Example

const medicationRequests = await sdk.health.getMedicationRequests();

getMedicationStatements()

getMedicationStatements((request?): Promise<BWellQueryResult<MedicationStatementResponse, BaseManagerError>>

Retrieves a list of medication statement resources.

Parameters

request?

HealthDataRequest

Optional request class instance for specifying the search criteria

Returns

Promise<BWellQueryResult<MedicationStatementResponse, BaseManagerError>>

A promise resolving to an object representing the list of medication statements retrieved.

Example

const medicationStatements = await sdk.health.getMedicationStatements();

getMedicationKnowledge()

getMedicationKnowledge((request): Promise<BWellQueryResult<MedicationKnowledgeResponse, BaseManagerError>>

Retrieves a list of medication knowledge resources.

Parameters

request

MedicationKnowledgeRequest

MedicationKnowledgeRequest - Request class instance for specifying medication knowledge parameters.

Returns

Promise<BWellQueryResult<MedicationKnowledgeResponse, BaseManagerError>>

A promise resolving to an object representing the list of medication knowledge.

Example

const medicationKnowledge = await sdk.health.getMedicationKnowledge({
 medicationStatementId: '123',
 page: 0
});

getLabKnowledge()

getLabKnowledge((request?): Promise<BWellQueryResult<LabKnowledgeResponse, BaseManagerError>>

Retrieves a list of lab knowledge resources.

Parameters

request?

LabKnowledgeRequest

LabKnowledgeRequest - Request class instance for specifying the lab id.

Returns

Promise<BWellQueryResult<LabKnowledgeResponse, BaseManagerError>>

A promise resolving to an object representing the list of lab knowledge.

Example

const labKnowledge = await sdk.health.getLabKnowledge({
 labId: '123',
 page: 0
});