@vidal-community/vidal-web-components
Version:
Vidal Web Components
32 lines • 1.05 kB
JavaScript
export var DrugType;
(function (DrugType) {
DrugType[DrugType["PACK"] = 0] = "PACK";
DrugType[DrugType["UCD"] = 1] = "UCD";
})(DrugType || (DrugType = {}));
export class Drug {
constructor(id, cip13, cip, name, ucd, ucd13, type, vmpName, marketStatus, vmpId = Number(undefined), offMarketDate = undefined, productId = Number(undefined), prescribableName = undefined) {
this.id = id;
this.cip13 = cip13;
this.cip = cip;
this.name = name;
this.ucd = ucd;
this.ucd13 = ucd13;
this.type = type;
this.vmpId = vmpId;
this.vmpName = vmpName;
this.marketStatus = marketStatus;
this.offMarketDate = offMarketDate;
this.prescribableName = prescribableName;
this.productId = productId;
}
isOffMarket() {
return 'DELETED' === this.marketStatus;
}
isUcd() {
return this.type === DrugType.UCD;
}
isOffMarKetUcd() {
return this.isUcd() && this.isOffMarket();
}
}
//# sourceMappingURL=drug.js.map