Implementing Row-Level Inventory Overrides in PharmaStock
I focused on improving how inventory data is edited in PharmaStock by implementing row-level override functionality. Previously, updating medication details such as generic name or strength would affect all inventory records tied to that medication. To solve this, I introduced override fields directly on the InventoryStock entity. This allows each inventory row to store its own version of medication data without modifying the shared medication record. On the backend, I created dedicated PATCH endpoints for each override field, including generic name, medication name, NDC, strength, and dosage form. These endpoints update only the targeted inventory record. I also updated the mapping layer to prioritize override values when present, falling back to the base medication data when they are not. On the frontend, I refactored the Angular save logic to detect which fields were changed and dynamically call the appropriate PATCH endpoints. The save operations are executed sequentially ...