Skip to main content

MedicalBillingApi

@gravity-rail/sdk


@gravity-rail/sdk / MedicalBillingApi

Class: MedicalBillingApi

Native clinical billing resources. These endpoints never read generic Forms.

Extends​

Constructors​

Constructor​

new MedicalBillingApi(apiKey, baseUrl, customFetch?): MedicalBillingApi

Parameters​

apiKey​

string | undefined

baseUrl​

string

customFetch?​

{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Returns​

MedicalBillingApi

Inherited from​

BaseApiClient.constructor

Methods​

createMedicalCharge()​

createMedicalCharge(wid, body): Promise<MedicalChargeResponse>

Parameters​

wid​

string

body​

CreateMedicalChargeRequest

Returns​

Promise<MedicalChargeResponse>


createMedicalCoverage()​

createMedicalCoverage(wid, body): Promise<MedicalCoverageResponse>

Parameters​

wid​

string

body​

CreateMedicalCoverageRequest

Returns​

Promise<MedicalCoverageResponse>


getMedicalClaim()​

getMedicalClaim(wid, id): Promise<MedicalClaimDetailResponse>

Parameters​

wid​

string

id​

string

Returns​

Promise<MedicalClaimDetailResponse>


getMedicalRemittance()​

getMedicalRemittance(wid, id): Promise<MedicalRemittanceDetailResponse>

Parameters​

wid​

string

id​

number

Returns​

Promise<MedicalRemittanceDetailResponse>


listMedicalBillingConnections()​

listMedicalBillingConnections(wid): Promise<MedicalBillingConnectionResponse[]>

Parameters​

wid​

string

Returns​

Promise<MedicalBillingConnectionResponse[]>


listMedicalBillingProviders()​

listMedicalBillingProviders(wid, params?): Promise<MedicalBillingProviderPage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalBillingProviderPage>


listMedicalCharges()​

listMedicalCharges(wid, params?): Promise<MedicalChargePage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalChargePage>


listMedicalClaims()​

listMedicalClaims(wid, params?): Promise<MedicalClaimPage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalClaimPage>


listMedicalCoverages()​

listMedicalCoverages(wid, params?): Promise<MedicalCoveragePage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalCoveragePage>


listMedicalEligibilityChecks()​

listMedicalEligibilityChecks(wid, params?): Promise<MedicalEligibilityCheckPage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalEligibilityCheckPage>


listMedicalRemittances()​

listMedicalRemittances(wid, params?): Promise<MedicalRemittancePage>

Parameters​

wid​

string

params?​

MedicalBillingListParams

Returns​

Promise<MedicalRemittancePage>


setEnhancedAuthHandler()​

setEnhancedAuthHandler(handler): void

Set the handler for enhanced authentication requirements (RFC 9470 Step-Up Auth). This handler is called when a 401 response includes WWW-Authenticate header with error="insufficient_user_authentication".

Parameters​

handler​

EnhancedAuthHandler | undefined

Returns​

void

Inherited from​

BaseApiClient.setEnhancedAuthHandler


setMedicalPayerRoute()​

setMedicalPayerRoute(wid, id, body): Promise<MedicalCoverageResponse>

Parameters​

wid​

string

id​

number

body​

SetMedicalPayerRouteRequest

Returns​

Promise<MedicalCoverageResponse>


setOrgAuthHandler()​

setOrgAuthHandler(handler): void

Set the handler for organization authentication requirements. This handler is called when a 401 response includes WWW-Authenticate header with realm="org". The handler should redirect the user to complete org auth.

Parameters​

handler​

OrgAuthHandler | undefined

Returns​

void

Inherited from​

BaseApiClient.setOrgAuthHandler


setOrgSession()​

setOrgSession(session, orgUuid?): void

Set the opaque org session credential a bearer client sends as X-Org-Session. Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still use X-Org-Token through setOrgToken() during the migration window.

orgUuid is the org that issued the credential; passing it lets the 401 handler detect a stale session when a subsequent request targets a different org and re-fire the org-auth handler instead of silently 401-ing. Callers without that context (legacy / unknown) may omit it.

Parameters​

session​

string | undefined

orgUuid?​

string

Returns​

void

Inherited from​

BaseApiClient.setOrgSession


setOrgToken()​

setOrgToken(token, orgUuid?): void

Parameters​

token​

string | undefined

orgUuid?​

string

Returns​

void

Deprecated​

Legacy compatibility for stateless orgToken JWE credentials. Prefer setOrgSession() for opaque org browser sessions.

Inherited from​

BaseApiClient.setOrgToken


submitMedicalClaim()​

submitMedicalClaim(wid, body): Promise<MedicalBillingSubmissionActionResponse>

Parameters​

wid​

string

body​

MedicalBillingSubmissionActionRequest

Returns​

Promise<MedicalBillingSubmissionActionResponse>


updateApiKey()​

updateApiKey(newApiKey): void

Update the API key (used after successful re-authentication).

Parameters​

newApiKey​

string

Returns​

void

Inherited from​

BaseApiClient.updateApiKey


updateMedicalCharge()​

updateMedicalCharge(wid, id, body): Promise<MedicalChargeResponse>

Parameters​

wid​

string

id​

number

body​

UpdateMedicalChargeRequest

Returns​

Promise<MedicalChargeResponse>


updateMedicalCoverage()​

updateMedicalCoverage(wid, id, body): Promise<MedicalCoverageResponse>

Parameters​

wid​

string

id​

number

body​

UpdateMedicalCoverageRequest

Returns​

Promise<MedicalCoverageResponse>