Beispiel #1
0
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.icon = "++resource++bika.lims.images/worksheet_big.png"
        self.contentFilter = {}
        self.show_select_row = False
        self.show_sort_column = False
        self.allow_edit = True

        self.columns = {
            'Pos': {'title': _('Position')},
            'DueDate': {'title': _('Due date')},
            'Category': {'title': _('Category')},
            'Service': {'title': _('Analysis')},
            'Result': {'title': _('Result')},
            'Uncertainty': {'title': _('+-')},
            'retested': {'title': _('Retested'), 'type':'boolean'},
##            'Attachments': {'title': _('Attachments')},
            'state_title': {'title': _('State')},
        }
        self.review_states = [
            {'title': _('All'), 'id':'all',
             'transitions': ['submit', 'verify', 'retract', 'unassign'],
             'columns':['Pos',
                        'Category',
                        'Service',
                        'Result',
                        'Uncertainty',
##                        'Attachments',
                        'DueDate',
                        'state_title'],
             },
        ]
Beispiel #2
0
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.contentFilter = {'portal_type':'ReferenceAnalysis',
                              'path': {'query':"/".join(self.context.getPhysicalPath()),
                                       'level':0}}
        self.show_select_row = False
        self.show_sort_column = False
        self.show_select_column = False
        self.allow_edit = False

        self.columns = {
            'id': {'title': _('ID')},
            'Category': {'title': _('Category')},
            'Service': {'title': _('Service')},
            'Worksheet': {'title': _('Worksheet')},
            'Result': {'title': _('Result')},
            'Uncertainty': {'title': _('+-')},
            'DueDate': {'title': _('Due Date')},
            'retested': {'title': _('Retested'), 'type':'boolean'},
            'state_title': {'title': _('State')},
        }
        self.review_states = [
            {'id':'all',
             'title': _('All'),
             'transitions': [],
             'columns':['id',
                        'Category',
                        'Service',
                        'Worksheet',
                        'Result',
                        'Uncertainty',
                        'DueDate',
                        'state_title'],
             },
        ]
Beispiel #3
0
    def __init__(self, context, request):
        BaseView.__init__(self, context, request)
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'portal_type':'Analysis',
                              'review_state':'sample_received',
                              'worksheetanalysis_review_state':'unassigned'}
        self.icon = self.portal_url + "/++resource++bika.lims.images/worksheet_big.png"
        self.contentFilter = {}
        self.show_select_row = False
        self.show_sort_column = False
        self.allow_edit = True
        self.show_categories = False
        self.expand_all_categories = False

        self.columns = {
            'Pos': {'title': _('Position')},
            'DueDate': {'title': _('Due Date')},
            'Service': {'title': _('Analysis')},
            'getPriority': {'title': _('Priority')},
            'Method': {'title': _('Method')},
            'DetectionLimit': {
                'title': _('DL'),
                'sortable': False,
                'toggle': False},
            'Result': {'title': _('Result'),
                       'input_width': '6',
                       'input_class': 'ajax_calculate numeric',
                       'sortable': False},
            'Uncertainty': {'title': _('+-')},
            'ResultDM': {'title': _('Dry')},
            'retested': {'title': "<img src='++resource++bika.lims.images/retested.png' title='%s'/>" % _('Retested'),
                         'type':'boolean'},
            'Attachments': {'title': _('Attachments')},
            'Instrument': {'title': _('Instrument')},
            'state_title': {'title': _('State')},
            'Priority': { 'title': _('Priority'), 'index': 'Priority'},
        }
        self.review_states = [
            {'id':'default',
             'title': _('All'),
             'contentFilter':{},
             'transitions': [{'id':'submit'},
                             {'id':'verify'},
                             {'id':'retract'},
                             {'id':'unassign'}],
             'columns':['Pos',
                        'Service',
                        'Priority',
                        'Method',
                        'Instrument',
                        'DetectionLimit',
                        'Result',
                        'Uncertainty',
                        'DueDate',
                        'state_title',
                        'Attachments']
             },
        ]
Beispiel #4
0
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'portal_type':'ReferenceAnalysis',
                              'path': {'query':"/".join(self.context.getPhysicalPath()),
                                       'level':0}}
        self.show_select_row = False
        self.show_sort_column = False
        self.show_select_column = False
        self.allow_edit = False

        self.columns = {
            'id': {'title': _('ID'), 'toggle':False},
            'getReferenceAnalysesGroupID': {'title': _('QC Sample ID'), 'toggle': True},
            'Category': {'title': _('Category'), 'toggle':True},
            'Service': {'title': _('Service'), 'toggle':True},
            'Worksheet': {'title': _('Worksheet'), 'toggle':True},
            'Method': {
                'title': _('Method'),
                'sortable': False,
                'toggle': True},
            'Instrument': {
                'title': _('Instrument'),
                'sortable': False,
                'toggle': True},
            'Result': {'title': _('Result'), 'toggle':True},
            'Captured': {'title': _('Captured'), 'toggle':True},
            'Uncertainty': {'title': _('+-'), 'toggle':True},
            'DueDate': {'title': _('Due Date'),
                        'index': 'getDueDate',
                        'toggle':True},
            'retested': {'title': _('Retested'), 'type':'boolean', 'toggle':True},
            'state_title': {'title': _('State'), 'toggle':True},
        }
        self.review_states = [
            {'id':'default',
             'title': _('All'),
             'contentFilter':{},
             'transitions': [],
             'columns':['id',
                        'getReferenceAnalysesGroupID',
                        'Category',
                        'Service',
                        'Worksheet',
                        'Method',
                        'Instrument',
                        'Result',
                        'Captured',
                        'Uncertainty',
                        'DueDate',
                        'state_title'],
             },
        ]
        self.anjson = {}
Beispiel #5
0
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     if kwargs.get('getPointOfCapture', '') == 'lab':
         self.allow_edit = False
         self.columns['Request'] = {'title': _("Request"),
                                    'sortable':False}
         # Add Request column
         pos = self.review_states[0]['columns'].index('Service') + 1
         self.review_states[0]['columns'].insert(pos, 'Request')
Beispiel #6
0
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_select_column = False
     self.allow_edit = False
     self.show_workflow_action_buttons = False
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     self.columns['Request'] = {'title': _("Request"),
                                'sortable':False}
     # Add Request column
     pos = self.review_states[0]['columns'].index('Service') + 1
     self.review_states[0]['columns'].insert(pos, 'Request')
Beispiel #7
0
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_select_column = False
     self.allow_edit = False
     self.show_workflow_action_buttons = False
     for k, v in kwargs.items():
         self.contentFilter[k] = v
     self.columns["Request"] = {"title": _("Request"), "sortable": False}
     self.columns["Priority"] = {"title": _("Priority"), "sortable": False}
     # Add Request and Priority columns
     pos = self.review_states[0]["columns"].index("Service") + 1
     self.review_states[0]["columns"].insert(pos, "Request")
     pos += 1
     self.review_states[0]["columns"].insert(pos, "Priority")
Beispiel #8
0
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_workflow_action_buttons = False
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     self.contentFilter['getSampleUID'] = context.UID()
     self.columns['Request'] = {
         'title': _("Request"),
         'attr': 'getParentTitle',
         'replace_url': 'getParentURL',
         'sortable': False}
     # Add Request columns
     pos = self.review_states[0]['columns'].index('Service') + 1
     self.review_states[0]['columns'].insert(pos, 'Request')
     pos += 1
Beispiel #9
0
    def __init__(self, context, request, **kwargs):
        AnalysesView.__init__(self, context, request, **kwargs)
        self.columns['getReferenceAnalysesGroupID'] = {'title': _('QC Sample ID'),
                                                       'sortable': False}
        self.columns['Partition'] = {'title': _('Reference Sample'),
                                     'sortable': False}
        self.columns['Retractions'] = {'title': '',
                                                  'sortable': False}
        self.review_states[0]['columns'] = ['Service',
                                            'getReferenceAnalysesGroupID',
                                            'Partition',
                                            'Result',
                                            'Uncertainty',
                                            'CaptureDate',
                                            'Retractions']


        analyses = self.context.getReferenceAnalyses()
        asuids = [an.UID() for an in analyses]
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'UID': asuids}
        self.anjson = {}
Beispiel #10
0
    def __init__(self, context, request, **kwargs):
        AnalysesView.__init__(self, context, request)
        self.title = _("Analyses pending")
        self.show_select_all_checkbox = False
        self.show_categories = False
        self.pagesize = 50
        # Get temp objects that are too time consuming to obtain every time
        self.worksheet_catalog = getToolByName(
            context, CATALOG_WORKSHEET_LISTING)
        # Check if the filter bar functionality is activated or not
        self.filter_bar_enabled =\
            self.context.bika_setup.getDisplayAdvancedFilterBarForAnalyses()

        # each editable item needs it's own allow_edit
        # which is a list of field names.
        self.allow_edit = True

        self.columns['AnalysisRequest'] = {
            'title': _('Analysis Request'),
            'attr': 'getRequestID',
            'replace_url': 'getRequestURL',
            'sortable': False
            }
        self.columns['Worksheet'] = {
            'title': _('Worksheet'),
            'sortable': False
            }
        self.review_states = [
            {'id': 'default',
             'title':  _('Results pending'),
             'transitions': [{'id': 'sample'},
                             {'id': 'submit'},
                             {'id': 'cancel'},
                             # {'id': 'assign'}
                             ],
             'contentFilter': {'review_state': [
                'sample_received', 'assigned', 'attachment_due'],
                'cancellation_state': 'active', },
             'columns': ['AnalysisRequest',
                         'Worksheet',
                         'Service',
                         'Result',
                         'Uncertainty',
                         'Partition',
                         'Method',
                         'Instrument',
                         'Analyst',
                         'state_title',
                         ]
             },
            {'id': 'to_be_verified',
             'title':  _('To be verified'),
             'transitions': [{'id': 'verify'},
                             {'id': 'cancel'}
                             ],
             'contentFilter': {
                'review_state': ['to_be_verified'],
                'cancellation_state': 'active', },
             'columns': ['AnalysisRequest',
                         'Worksheet',
                         'Service',
                         'Result',
                         'Uncertainty',
                         'Partition',
                         'Method',
                         'Instrument',
                         'Analyst',
                         'state_title',
                         ]
             },
        ]
Beispiel #11
0
 def __init__(self, context, request):
     AnalysesView.__init__(self, context, request)
     self.icon = "++resource++bika.lims.images/worksheet_big.png"
     self.title = "%s: %s" % (context.Title(), _("Add Analyses"))
     self.description = _("")
Beispiel #12
0
 def __init__(self, context, request):
     BaseView.__init__(self, context, request)
     self.context = context
     self.request = request
     self.analyst = None
     self.instrument = None
     self.contentFilter = {
         'getWorksheetUID': context.UID(),
         'sort_on': 'sortable_title'
     }
     self.sort_on = 'sortable_title'
     self.icon = self.portal_url + "/++resource++bika.lims.images/worksheet_big.png"
     self.allow_edit = True
     self.show_categories = False
     self.expand_all_categories = False
     self.columns = {
         'Pos': {
             'title': _('Position')
         },
         'DueDate': {
             'title': _('Due Date')
         },
         'Service': {
             'title': _('Analysis')
         },
         'Method': {
             'title': _('Method')
         },
         'DetectionLimit': {
             'title': _('DL'),
             'sortable': False,
             'toggle': False
         },
         'Result': {
             'title': _('Result'),
             'input_width': '6',
             'input_class': 'ajax_calculate numeric',
             'sortable': False
         },
         'Uncertainty': {
             'title': _('+-')
         },
         'retested': {
             'title':
             "<img src='++resource++bika.lims.images/retested.png' title='%s'/>"
             % _('Retested'),
             'type':
             'boolean'
         },
         'Attachments': {
             'title': _('Attachments')
         },
         'Instrument': {
             'title': _('Instrument')
         },
         'state_title': {
             'title': _('State')
         },
     }
     self.review_states = [
         {
             'id':
             'default',
             'title':
             _('All'),
             'contentFilter': {},
             'transitions': [{
                 'id': 'submit'
             }, {
                 'id': 'verify'
             }, {
                 'id': 'retract'
             }, {
                 'id': 'unassign'
             }],
             'columns': [
                 'Pos', 'Service', 'Method', 'Instrument', 'DetectionLimit',
                 'Result', 'Uncertainty', 'DueDate', 'state_title',
                 'Attachments'
             ]
         },
     ]
     self.bika_setup = api.get_bika_setup()
     self.uids_strpositions = self.get_uids_strpositions()
     self.items_rowspans = dict()