def formatPatentRow(patentPack): # Expand (patentID, technologyCaseNumber, patentName, patentApplicationType, lawFirmName, lawFirmReferenceNumber, patentFilingDate, patentSerialNumber, patentNumber, patentStatus), inventorIDs = patentPack # Return return [ store.strip(technologyCaseNumber), store.strip(patentStatus), store.strip(patentApplicationType), store.strip(lawFirmName), store.strip(lawFirmReferenceNumber), store.formatDate(patentFilingDate), store.strip(patentSerialNumber), store.strip(patentNumber), ', '.join(contactNameByID[x] for x in inventorIDs), store.strip(patentName), ]
def stripTechnology(result): 'Strip whitespace from technology fields and return a dictionary' technologyID, technologyCaseNumber, technologyTitle, projectName, technologyStatus, disclosureDate, technologyComments = map(store.escape, result) return dict(technologyID=technologyID, technologyCaseNumber=technologyCaseNumber, technologyTitle=technologyTitle, disclosureDate=store.formatDate(disclosureDate), projectName=projectName, technologyStatus=technologyStatus, technologyComments=technologyComments)
def stripPayableDetail(result): 'Strip whitespace from payableDetail fields and return a dictionary' payableDetailID, payableID, invoiceNumber, amount, invoiceDate, invoiceDateDue = map(store.escape, result) return dict(payableDetailID=payableDetailID, payableID=payableID, invoiceNumber=invoiceNumber, amount='$ %.02f' % amount, invoiceDate=store.formatDate(invoiceDate), invoiceDateDue=store.formatDate(invoiceDateDue))
def stripRemark(result): 'Strip whitespace from remark fields and return a dictionary' remarkID, remarkDate, remark, linkTable, linkID = map(store.escape, result) return dict(remarkID=remarkID, remarkDate=store.formatDate(remarkDate), remark=remark.replace('\r', ''), linkTable=linkTable.lower(), linkID=linkID)
def stripPatent(result): 'Strip whitespace from patent fields and return a dictionary' patentID, patentCaseNumber, patentTitle, patentApplicationType, lawFirm, legalReferenceNumber, patentFilingDate, patentSerialNumber, patentNumber = map(store.escape, result) return dict(patentID=patentID, patentCaseNumber=patentCaseNumber, patentTitle=patentTitle, patentApplicationType=patentApplicationType, lawFirm=lawFirm, legalReferenceNumber=legalReferenceNumber, patentFilingDate=store.formatDate(patentFilingDate), patentSerialNumber=patentSerialNumber, patentNumber=patentNumber)