Skip to content

Instantly share code, notes, and snippets.

@vHanda
Created March 23, 2023 15:18
Show Gist options
  • Save vHanda/c1c980ebf65edfa5e962649cc491e2e8 to your computer and use it in GitHub Desktop.
Save vHanda/c1c980ebf65edfa5e962649cc491e2e8 to your computer and use it in GitHub Desktop.
Inventory Item schema
export type InventoryItem = {
_id: ObjectId;
drugName: string;
productName: string;
prescribableName: string;
strength?: string;
dosageForm: string;
ndcCode?: string;
route: string;
labeller?: string;
medicineBatch: [
{
quantity: number;
productionDate: number;
expiryDate: number;
price: number;
batchNumber: number;
}
];
totalQuantity: number;
tax: boolean;
taxPercentage?: string;
LowStockCount: number;
addFlags: AddFlags;
deliverySchedule: DeliverySchedule;
shortExpiryDuration: number;
skuDetails: [
{
msu: number;
skuStrength: string;
description: string;
finalDetail: string;
}
];
itemFlag: ItemFlag;
shortExpiryDate: number;
isUpdated: boolean;
modifyBy: string;
createdAt: number;
substituteProduct: [
{
medicineName: string;
subProductName: string;
subRoute: string;
subDosageForm: string;
subStrength: string;
subtitutePrice: number;
substituteLabeller: string;
substituteTax: number;
subDrugName: string;
subNdcCode: string;
}
];
isOutOfStock: boolean;
/** barbados drug service code */
bdsCode?: string;
/** details for items under the Medl Care program */
medlCare?: {
/** when true the item will be considered a Medl Care item. defaults to false. */
enabled: boolean;
/** define the max number of this item that can have the Medl Care logic applied for one order. defaults to 0*/
maxQuantityPerOrder: number;
};
insuranceCode?: {
GLOC?: string;
};
otcStock?: number;
otcPrice?: number;
otcDescription?: string;
otcImageUrl?: string;
otcCategory?: string;
otcDiscount?: number;
productType: ProductType;
deletedAt: number;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment