@oystehr/sdk
Version:
Oystehr SDK
35 lines (32 loc) • 1.24 kB
text/typescript
// AUTOGENERATED -- DO NOT EDIT
import { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';
import { SDKResource } from '../../client/client';
import { OystehrConfig } from '../../config';
export class ErxV2 extends SDKResource {
constructor(config: OystehrConfig) {
super(config);
}
#baseUrlThunk(): string {
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
}
/**
* Search for medications. Provide at least one of code or name filters
*/
medicationSearch(
params: ErxV2MedicationSearchParams,
request?: OystehrClientRequest
): Promise<ErxV2MedicationSearchResponse>;
/**
* Search for medications. Provide at least one of code or name filters
*/
medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;
/**
* Search for medications. Provide at least one of code or name filters
*/
medicationSearch(
params?: ErxV2MedicationSearchParams | OystehrClientRequest,
request?: OystehrClientRequest
): Promise<ErxV2MedicationSearchResponse> {
return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
}
}