import { iccBedrugsApi } from "../icc-api/iccApi" import * as _ from "lodash" import { XHR } from "../icc-api/api/XHR" import * as models from "../icc-api/model/models" export class IccBedrugsXApi extends iccBedrugsApi { atcCache: { [key: string]: Promise> } = {} constructor(host: string, headers: Array) { super(host, headers) } getCachedCheapAlternativesBasedOnAtc( medecinePackageId: string, lang: string ): Promise | any> { return ( this.atcCache[medecinePackageId + "|" + lang] || (this.atcCache[medecinePackageId + "|" + lang] = this.getCheapAlternativesBasedOnAtc( medecinePackageId, lang )) ) } }