File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Please append a line to the changelog for each change made.
44
5+ ## v2.0.9
6+ ### New features
7+
8+ ### Improvements
9+ - Removed duplicated ScanReportConcepts which are produced when non-standard codes are mapped via multiple routes to the same standard code.
10+
11+ ### Bugfixes
12+
13+
514## v2.0.8
615### New features
716
Original file line number Diff line number Diff line change 22import time
33import requests
44import logging
5- from collections import defaultdict
5+ from collections import defaultdict , OrderedDict
66from ProcessQueue import helpers
77
88api_url = os .environ .get ("APP_URL" ) + "api/"
@@ -93,6 +93,12 @@ def find_standard_concept_batch(source_concepts: list):
9393 relationship ["concept_id_2" ]
9494 )
9595
96+ # Remove duplicates from within each entry, by converting each to an Ordered Dict
97+ # (the keys of which must be unique, and will preserve the order if that's
98+ # important) and then back to a list.
99+ for pair in combined_pairs :
100+ combined_pairs [pair ] = list (OrderedDict .fromkeys (combined_pairs [pair ]))
101+
96102 return combined_pairs
97103
98104
You can’t perform that action at this time.
0 commit comments