Skip to content
Snippets Groups Projects
Commit b5f8d8ef authored by juanf's avatar juanf
Browse files

SSDM-1285 : ELN - Peter Lab Migration

SVN: 33064
parent 37c19764
No related branches found
No related tags found
No related merge requests found
...@@ -184,10 +184,14 @@ class FileMakerEntityAdaptor(EntityAdaptor): ...@@ -184,10 +184,14 @@ class FileMakerEntityAdaptor(EntityAdaptor):
## Customer specific logic: different sample types ## Customer specific logic: different sample types
## ##
class FMPeterOpenBISDTO(OpenBISDTO): class FMPeterOpenBISDTO(OpenBISDTO):
def isSampleCacheable(self):
return True
def isInOpenBIS(self, tr): def isInOpenBIS(self, tr):
code = self.getIdentifier(tr) code = self.getIdentifier(tr)
if (code is not None) and (' ' not in code): if (code is not None) and (' ' not in code):
sampleID2Sample[self.values["NAME"]] = self.values if self.isSampleCacheable():
sampleID2Sample[self.values["NAME"]] = self.values
sample = getSampleForUpdate("/INVENTORY/"+code, None, tr) sample = getSampleForUpdate("/INVENTORY/"+code, None, tr)
if sample is not None: if sample is not None:
lastModificationData = self.values["MODIFICATION_DATE"].strip() lastModificationData = self.values["MODIFICATION_DATE"].strip()
...@@ -473,6 +477,9 @@ class ChemicalAdaptor(FileMakerEntityAdaptor): ...@@ -473,6 +477,9 @@ class ChemicalAdaptor(FileMakerEntityAdaptor):
self.entities.append(ChemicalOpenBISDTO(values, self.definition)) self.entities.append(ChemicalOpenBISDTO(values, self.definition))
class ChemicalOpenBISDTO(FMPeterOpenBISDTO): class ChemicalOpenBISDTO(FMPeterOpenBISDTO):
def isSampleCacheable(self):
return False
def write(self, tr): def write(self, tr):
code = "CHEM_" + self.values["RECORD_NUMBER"] code = "CHEM_" + self.values["RECORD_NUMBER"]
if code is not None: if code is not None:
...@@ -487,7 +494,6 @@ class ChemicalOpenBISDTO(FMPeterOpenBISDTO): ...@@ -487,7 +494,6 @@ class ChemicalOpenBISDTO(FMPeterOpenBISDTO):
## Sirna ## Sirna
## ##
class SirnaAdaptor(FileMakerEntityAdaptor): class SirnaAdaptor(FileMakerEntityAdaptor):
def init(self): def init(self):
self.selectQuery = "SELECT * FROM \"siRNA\"" self.selectQuery = "SELECT * FROM \"siRNA\""
self.definition = definitions.siRNADefinition self.definition = definitions.siRNADefinition
...@@ -497,6 +503,9 @@ class SirnaAdaptor(FileMakerEntityAdaptor): ...@@ -497,6 +503,9 @@ class SirnaAdaptor(FileMakerEntityAdaptor):
self.entities.append(SirnaOpenBISDTO(values, self.definition)) self.entities.append(SirnaOpenBISDTO(values, self.definition))
class SirnaOpenBISDTO(FMPeterOpenBISDTO): class SirnaOpenBISDTO(FMPeterOpenBISDTO):
def isSampleCacheable(self):
return False
def write(self, tr): def write(self, tr):
code = "SI_" + self.values["SIRNA_OLIGONUMBER"] code = "SI_" + self.values["SIRNA_OLIGONUMBER"]
if code is not None: if code is not None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment