@@ 289-299 (lines=11) @@ | ||
286 | ||
287 | class Ethnicities(WorksheetImporter): |
|
288 | ||
289 | def Import(self): |
|
290 | folder = self.context.bika_setup.bika_ethnicities |
|
291 | rows = self.get_rows(3) |
|
292 | for row in rows: |
|
293 | _id = folder.invokeFactory('Ethnicity', id=tmpID()) |
|
294 | obj = folder[_id] |
|
295 | if row.get('Title', None): |
|
296 | obj.edit(title=row['Title'], |
|
297 | description=row.get('Description', '')) |
|
298 | obj.unmarkCreationFlag() |
|
299 | renameAfterCreation(obj) |
|
300 | ||
301 | ||
302 | class Patients(WorksheetImporter): |
|
@@ 230-240 (lines=11) @@ | ||
227 | ||
228 | class Case_Statuses(WorksheetImporter): |
|
229 | ||
230 | def Import(self): |
|
231 | folder = self.context.bika_setup.bika_casestatuses |
|
232 | rows = self.get_rows(3) |
|
233 | for row in rows: |
|
234 | if row['title']: |
|
235 | _id = folder.invokeFactory('CaseStatus', id=tmpID()) |
|
236 | obj = folder[_id] |
|
237 | obj.edit(title=row['title'], |
|
238 | description=row.get('description', '')) |
|
239 | obj.unmarkCreationFlag() |
|
240 | renameAfterCreation(obj) |
|
241 | ||
242 | ||
243 | class Diseases(WorksheetImporter): |
|
@@ 215-225 (lines=11) @@ | ||
212 | ||
213 | class Case_Outcomes(WorksheetImporter): |
|
214 | ||
215 | def Import(self): |
|
216 | folder = self.context.bika_setup.bika_caseoutcomes |
|
217 | rows = self.get_rows(3) |
|
218 | for row in rows: |
|
219 | if row['title']: |
|
220 | _id = folder.invokeFactory('CaseOutcome', id=tmpID()) |
|
221 | obj = folder[_id] |
|
222 | obj.edit(title=row['title'], |
|
223 | description=row.get('description', '')) |
|
224 | obj.unmarkCreationFlag() |
|
225 | renameAfterCreation(obj) |
|
226 | ||
227 | ||
228 | class Case_Statuses(WorksheetImporter): |