Execution exception and Duplicate custom meds when manually readding custom med with 2 generics under certain circumstance

Description

None

Environment

Steps to recreate:

  • Be an admin user

  • Go to inventory, add custom medication.

  • Click the plus to add another ingredient to the medication

  • If we create a 2-ingredient custom med where one of the medications is in `medication_generics` and the other is not in that table and also not in `concept_medication_generics`, it will add ok the first time. If we remove it, refresh the page, and then try to add the exact same custom medication back, we get execution exception, same as above. If the other medication IS in `concept_medication_generics`, then subsequent readds will add a duplicate with a new medication id whether the medication was removed from inventory or not.

Status

Assignee

Unassigned

Reporter

Alex Nakhleh

Labels

None

Priority

Medium
Configure