Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new HealthRiskAssessmentService(baseURL: string, tokenFactory?: undefined | (() => Promise<string | null>)): HealthRiskAssessmentService
  • Sets the [[controllerName]] to 'Reports'.

    Parameters

    • baseURL: string

      The service's [[baseURL]]

    • Optional tokenFactory: undefined | (() => Promise<string | null>)

      Optional factory to set axios instance's token before http calls.

    Returns HealthRiskAssessmentService

Properties

Protected axios

axios: AxiosInstance

The axios instance used by this service.

Methods

getComparison

  • getComparison(traversalId: string, compareTraversalId: string, riskAtAge: number): Promise<AxiosResponse<any>>

getHealthRisk

  • getHealthRisk(traversalId: string, ages: number[], conclusions: number[]): Promise<AxiosResponse<any>>

getSnapShot

  • getSnapShot(traversalId: string): Promise<AxiosResponse<any>>

getWellness

  • getWellness(traversalId: string, conclusions: number[]): Promise<AxiosResponse<any>>

setBaseUrl

  • setBaseUrl(baseURL: string): void

setToken

  • setToken(token: string | null): void
  • Set the token to use in the service's axios instance

    Parameters

    • token: string | null

      Bearer token or null.

    Returns void