diff --git a/frontend/src/components/ChipsInput/ChipsInput.tsx b/frontend/src/components/ChipsInput/ChipsInput.tsx index 7fd03b4d..32e4e332 100644 --- a/frontend/src/components/ChipsInput/ChipsInput.tsx +++ b/frontend/src/components/ChipsInput/ChipsInput.tsx @@ -59,7 +59,6 @@ const ChipsInput: React.FC = ({ const handleSuggestionClick = (selected: string) => { onChange([...value, selected]); - setInputFocused(false); // Close dropdown after selection setInputValue(""); }; @@ -131,7 +130,10 @@ const ChipsInput: React.FC = ({ {filteredSuggestions.map((item, idx) => (
  • handleSuggestionClick(item)} + onMouseDown={(e) => { + e.preventDefault(); + handleSuggestionClick(item) + }} className="px-3 py-2 cursor-pointer hover:bg-gray-100 text-sm" > {item} diff --git a/server/api/views/listMeds/views.py b/server/api/views/listMeds/views.py index 796d9b17..72a7a310 100644 --- a/server/api/views/listMeds/views.py +++ b/server/api/views/listMeds/views.py @@ -42,6 +42,8 @@ def post(self, request): return Response({'error': 'Diagnosis not found'}, status=status.HTTP_404_NOT_FOUND) meds = {'first': [], 'second': [], 'third': []} + priorMeds = data.get('priorMedications', "").split(',') + exclude_result.extend([med.strip() for med in priorMeds if med.strip()]) included_set = set(include_result) excluded_set = set(exclude_result)