def addDocument(self, doc):
		rxcui =  doc.get('rxcui', '0')
		fields = {
			'tty': doc.get('tty', None),
			'ndc': doc.get('ndc', None),
			'label': doc.get('label', None),
			'drug_class': doc.get('drugClasses', None),
			'treatment_intent': doc.get('treatmentIntents', None),
			'ingredient': doc.get('ingredients', None)
			}
		for k, v in fields.items():
			if not v: continue
			v = v if isinstance(v, list) else [v]
			for vv in v:
				self.sqlite.execute(
					'INSERT INTO drug_cache(rxcui, property, value) values(?, ?, ?)',
					(rxcui, k, vv))
		self.handled += 1
		if (50 % self.handled == 0): self.sqlite.commit()
dataset/ETHPy150Open chb/py-umls/rxnorm_link_run.py/SQLiteDocHandler.addDocument/swapped operands of `%`