Skip to content

Commit 66444a5

Browse files
committed
Compatibility with core#2537
1 parent 11c4d85 commit 66444a5

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

src/senaite/ast/config.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
u"(Susceptible, increased exposure) and R (Resistant)"),
115115
"choices": "0:|1:S|2:I|3:R",
116116
"sort_key": 530,
117-
"string_result": True,
117+
"result_type": "string",
118118
"point_of_capture": AST_POINT_OF_CAPTURE,
119119
"calculation": AST_CALCULATION_TITLE,
120120
},
@@ -129,7 +129,7 @@
129129
# XXX This is a choices field, but choices are populated on creation
130130
"choices": "",
131131
"sort_key": 505,
132-
"string_result": True,
132+
"result_type": "string",
133133
"point_of_capture": AST_POINT_OF_CAPTURE,
134134
"calculation": AST_CALCULATION_TITLE,
135135
},
@@ -144,7 +144,7 @@
144144
u"disk charge."),
145145
"size": "3",
146146
"sort_key": 510,
147-
"string_result": True,
147+
"result_type": "string",
148148
"point_of_capture": AST_POINT_OF_CAPTURE,
149149
"calculation": AST_CALCULATION_TITLE,
150150
},
@@ -160,7 +160,7 @@
160160
u"susceptible to an antibiotic."),
161161
"size": "3",
162162
"sort_key": 520,
163-
"string_result": True,
163+
"result_type": "string",
164164
"point_of_capture": AST_POINT_OF_CAPTURE,
165165
"calculation": AST_CALCULATION_TITLE,
166166
},
@@ -176,7 +176,7 @@
176176
u"susceptible to an antibiotic."),
177177
"size": "5",
178178
"sort_key": 520,
179-
"string_result": True,
179+
"result_type": "string",
180180
"point_of_capture": AST_POINT_OF_CAPTURE,
181181
"calculation": AST_CALCULATION_TITLE,
182182
},
@@ -187,7 +187,7 @@
187187
# XXX senaite.app.listing has no support for boolean types (interim)
188188
"type": "boolean",
189189
"sort_key": 540,
190-
"string_result": True,
190+
"result_type": "string",
191191
"point_of_capture": AST_POINT_OF_CAPTURE,
192192
"calculation": AST_CALCULATION_TITLE,
193193
},
@@ -200,9 +200,8 @@
200200
u"representatives"),
201201
# XXX This is a choices field, but choices are populated on creation
202202
"choices": "",
203-
"type": "multichoice",
203+
"result_type": "multichoice",
204204
"sort_key": 550,
205-
"string_result": True,
206205
"point_of_capture": AST_POINT_OF_CAPTURE,
207206
"calculation": AST_CALCULATION_TITLE,
208207
},
@@ -212,8 +211,7 @@
212211
"sort_key": 500,
213212
# The options are the list of microorganisms and are automatically
214213
# added when the corresponding analysis is initialized
215-
"options_type": "multiselect",
216-
"string_result": False,
214+
"result_type": "multiselect",
217215
"point_of_capture": "lab",
218216
"calculation": None,
219217
}

src/senaite/ast/setuphandlers.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,15 @@ def setup_ast_services(portal, update_existing=True):
227227

228228
description = settings.get("description", AUTOGENERATED)
229229
sort_key = settings.get("sort_key", 1000)
230-
options_type = settings.get("options_type", "select")
231-
string_result = settings.get("string_result", False)
230+
result_type = settings.get("result_type", "numeric")
232231
poc = settings.get("point_of_capture", AST_POINT_OF_CAPTURE)
233232
calc_name = settings.get("calculation", AST_CALCULATION_TITLE)
234233

235234
service.setKeyword(key)
236235
service.setTitle(title)
237236
service.setDescription(description)
238237
service.setSortKey(sort_key)
239-
service.setResultOptionsType(options_type)
240-
service.setStringResult(string_result)
238+
service.setResultType(result_type)
241239
service.setPointOfCapture(poc)
242240

243241
# Get the calculation

0 commit comments

Comments
 (0)