Esempio n. 1
0
	def _get_all_document_org_units(self):
		cmd = gmOrganization._SQL_get_org_unit % (
			'pk_org_unit IN (SELECT DISTINCT ON (pk_org_unit) pk_org_unit FROM blobs.v_doc_med WHERE pk_patient = %(pat)s)'
		)
		args = {'pat': self.pk_patient}
		rows, idx = gmPG2.run_ro_queries(queries = [{'cmd': cmd, 'args': args}], get_col_idx = True)
		return [ gmOrganization.cOrgUnit(row = {'data': r, 'idx': idx, 'pk_field': 'pk_org_unit'}) for r in rows ]
Esempio n. 2
0
	def _get_all_document_org_units(self):
		cmd = gmOrganization._SQL_get_org_unit % (
			'pk_org_unit IN (SELECT DISTINCT ON (pk_org_unit) pk_org_unit FROM blobs.v_doc_med WHERE pk_patient = %(pat)s)'
		)
		args = {'pat': self.pk_patient}
		rows, idx = gmPG2.run_ro_queries(queries = [{'cmd': cmd, 'args': args}], get_col_idx = True)
		return [ gmOrganization.cOrgUnit(row = {'data': r, 'idx': idx, 'pk_field': 'pk_org_unit'}) for r in rows ]
Esempio n. 3
0
 def _get_org_unit(self):
     if self._payload[self._idx['pk_org_unit']] is None:
         return None
     return gmOrganization.cOrgUnit(self._payload[self._idx['pk_org_unit']])
Esempio n. 4
0
 def _get_org_unit(self):
     return gmOrganization.cOrgUnit(
         aPK_obj=self._payload[self._idx['pk_org_unit']])
Esempio n. 5
0
	def _data2instance(self):
		if self.GetData() is None:
			return None
		return gmOrganization.cOrgUnit(aPK_obj = self.GetData())
Esempio n. 6
0
	def _get_org_unit(self):
		return gmOrganization.cOrgUnit(aPK_obj = self._payload[self._idx['pk_org_unit']])
Esempio n. 7
0
	def _get_org_unit(self):
		if self._payload[self._idx['pk_org_unit']] is None:
			return None
		return gmOrganization.cOrgUnit(self._payload[self._idx['pk_org_unit']])
Esempio n. 8
0
 def _data2instance(self):
     if self.GetData() is None:
         return None
     return gmOrganization.cOrgUnit(aPK_obj=self.GetData())