@@ -57,11 +57,11 @@ def add_options(options_json) -> list:
5757 Helper function to extract all answer choices to a list
5858 """
5959 options = []
60- for j in options_json [f "choices" ]:
60+ for j in options_json ["choices" ]:
6161 if "schema:name" in j and j ["schema:name" ] != "" :
6262 choice = j ["schema:name" ]
6363 elif "name" in j and j ["name" ] != "" :
64- choice = j [f "name" ]
64+ choice = j ["name" ]
6565 if "en" in j ["name" ] and isinstance (["name" ], dict ):
6666 choice = choice ["en" ]
6767 else :
@@ -161,10 +161,10 @@ def parse_reproschema_items(self, reproschema_items: OrderedDict,
161161 curr_item ["text" ] = preamble + str (
162162 item_json ["question" ]["en" ])
163163
164- elif f "prefLabel" in item_json :
164+ elif "prefLabel" in item_json :
165165 curr_item ["text" ] = str (item_json ["prefLabel" ])
166166 else :
167- curr_item [f "text" ] = curr_item [f "linkId" ]
167+ curr_item ["text" ] = curr_item ["linkId" ]
168168
169169 id_str : str = var_name
170170 id_str = id_str .replace ("_" , "-" )
@@ -200,7 +200,7 @@ def parse_reproschema_items(self, reproschema_items: OrderedDict,
200200 if "valueType" in item_json [
201201 "responseOptions" ] and "int" in item_json [
202202 "responseOptions" ]["valueType" ]:
203- curr_item [f "type" ] = f "integer"
203+ curr_item ["type" ] = "integer"
204204 elif "valueType" in item_json [
205205 "responseOptions" ] and "date" in item_json [
206206 "responseOptions" ]["valueType" ]:
@@ -283,7 +283,7 @@ def convert_to_fhir(self, reproschema_content: dict):
283283 ])
284284
285285 question_order = [("items/" + sub .replace ("items/" , "" ))
286- for sub in reproschema_schema [f "ui" ][f "order" ]]
286+ for sub in reproschema_schema ["ui" ]["order" ]]
287287
288288 reproschema_items = OrderedDict (
289289 (key , reproschema_items [key ]) for key in question_order )
0 commit comments