Skip to content

Commit 5591394

Browse files
committed
Exclude PriorMedications
1 parent 3a64a47 commit 5591394

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/api/views/listMeds/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
class GetMedication(APIView):
2424
def post(self, request):
2525
data = request.data
26+
print(data)
2627
state_query = data.get('state', '')
2728
include_result = []
2829
exclude_result = []
@@ -42,6 +43,9 @@ def post(self, request):
4243
return Response({'error': 'Diagnosis not found'}, status=status.HTTP_404_NOT_FOUND)
4344
meds = {'first': [], 'second': [], 'third': []}
4445

46+
priorMeds = data.get('priorMedications', "").split(',')
47+
exclude_result.extend([med.strip() for med in priorMeds if med.strip()])
48+
print(exclude_result)
4549
included_set = set(include_result)
4650
excluded_set = set(exclude_result)
4751

0 commit comments

Comments
 (0)