File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ def _make_seed_pointer(
130130 doc_ref .type .coding [0 ].display = TYPE_ATTRIBUTES .get (
131131 f"{ SNOMED_SYSTEM_URL } |{ type_code } "
132132 ).get ("display" )
133- type = f"{ SNOMED_SYSTEM_URL } |{ type_code } "
134- category = TYPE_CATEGORIES .get (type )
133+ type_url = f"{ SNOMED_SYSTEM_URL } |{ type_code } "
134+ category = TYPE_CATEGORIES .get (type_url )
135135 doc_ref .category [0 ].coding [0 ].code = category .split ("|" )[- 1 ]
136136 doc_ref .category [0 ].coding [0 ].display = CATEGORY_ATTRIBUTES .get (category ).get (
137137 "display"
@@ -229,10 +229,12 @@ def _set_up_count_iterator(pointers_per_px: float) -> iter:
229229 generates a distribution of counts per individual patient.
230230 """
231231
232- sum = int ((pointers_per_px - 1.0 ) * 100 ) # no patients can have zero pointers
232+ extra_per_hundred = int (
233+ (pointers_per_px - 1.0 ) * 100
234+ ) # no patients can have zero pointers
233235 counts = {}
234- counts ["3" ] = sum // 10
235- counts ["2" ] = sum - 2 * counts ["3" ]
236+ counts ["3" ] = extra_per_hundred // 10
237+ counts ["2" ] = extra_per_hundred - 2 * counts ["3" ]
236238 counts ["1" ] = 100 - counts [2 ] - counts [3 ]
237239 return _set_up_cyclical_iterator (counts )
238240
You can’t perform that action at this time.
0 commit comments