from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.browser.fields import HistoryAwareReferenceField from bika.lims.browser.widgets import DateTimeWidget from bika.lims.browser.widgets import RecordsWidget from bika.lims.config import PROJECTNAME from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from bika.lims.interfaces import IInstrument from bika.lims.utils import to_utf8 from plone.app.folder.folder import ATFolder from zope.interface import implements from datetime import date from DateTime import DateTime from bika.lims.config import QCANALYSIS_TYPES schema = BikaFolderSchema.copy() + BikaSchema.copy() + Schema(( ReferenceField('InstrumentType', vocabulary='getInstrumentTypes', allowed_types=('InstrumentType',), relationship='InstrumentInstrumentType', required=1, widget=SelectionWidget( format='select', label=_("Instrument type"), ), ), ReferenceField('Manufacturer', vocabulary='getManufacturers', allowed_types=('Manufacturer',),
from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import safe_unicode from bika.lims.browser import BrowserView from bika.lims.content.bikaschema import BikaSchema from bika.lims.config import PROJECTNAME from bika.lims.browser.fields import CoordinateField from bika.lims.browser.widgets import CoordinateWidget from bika.lims.browser.fields import DurationField from bika.lims.browser.widgets import DurationWidget from bika.lims import PMF, bikaMessageFactory as _ from zope.interface import implements import json import plone import sys schema = BikaSchema.copy() + Schema(( StringField('SiteTitle', widget=StringWidget( label = _("Site Title"), description = _("Title of the site"), ), ), StringField('SiteCode', widget=StringWidget( label = _("Site Code"), description = _("Code for the site"), ), ), StringField('SiteDescription', widget=StringWidget( label = _("Site Description"),
from AccessControl import ClassSecurityInfo from Products.ATExtensions.ateapi import RecordWidget from Products.Archetypes.public import * from bika.lims.config import PROJECTNAME from Products.CMFCore import permissions as CMFCorePermissions from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import safe_unicode from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from archetypes.referencebrowserwidget import ReferenceBrowserWidget from plone.app.folder.folder import ATFolder from bika.lims.browser.fields import AddressField from bika.lims.browser.widgets import AddressWidget from bika.lims import PMF, bikaMessageFactory as _ schema = BikaFolderSchema.copy() + BikaSchema.copy() + ManagedSchema(( StringField('Name', required = 1, searchable = True, validators = ('uniquefieldvalidator',), widget = StringWidget( label=_("Name"), ), ), StringField('TaxNumber', widget = StringWidget( label=_("VAT number"), ), ), StringField('Phone', widget = StringWidget(
from AccessControl import ClassSecurityInfo from Products.Archetypes.public import * from Products.CMFCore.permissions import View, ModifyPortalContent from bika.lims.content.bikaschema import BikaSchema from bika.lims.config import I18N_DOMAIN, PROJECTNAME from bika.lims import bikaMessageFactory as _ schema = BikaSchema.copy() schema['description'].schemata = 'default' schema['description'].widget.visible = True class ReferenceManufacturer(BaseContent): security = ClassSecurityInfo() schema = schema registerType(ReferenceManufacturer, PROJECTNAME)
from zope.interface import implements from Products.Archetypes import atapi from Products.Archetypes.public import BaseContent from bika.lims.interfaces import IMultifile from bika.lims.content.bikaschema import BikaSchema from bika.lims import bikaMessageFactory as _ from bika.lims import config schema = BikaSchema.copy() + atapi.Schema( ( atapi.StringField( "DocumentID", required=1, validators=("uniquefieldvalidator",), widget=atapi.StringWidget(label=_("Document ID")), ), atapi.FileField( "File", required=1, widget=atapi.FileWidget(label=_("Document"), description=_("File upload ")) ), atapi.StringField("DocumentVersion", widget=atapi.StringWidget(label=_("Document Version"))), atapi.StringField( "DocumentLocation", widget=atapi.StringWidget( label=_("Document Location"), description=_("Location where the document set is shelved") ), ), atapi.StringField( "DocumentType", required=1, widget=atapi.StringWidget(
), ), ), ComputedField( "SampleTypeTitle", expression="context.getSampleType() and context.getSampleType().Title() or ''", widget=ComputedWidget(visible=False), ), ComputedField( "SampleTypeUID", expression="context.getSampleType() and context.getSampleType().UID() or ''", widget=ComputedWidget(visible=False), ), ) ) + BikaSchema.copy() + Schema( ( RecordsField( "ResultsRange", schemata=PMF("Reference Results"), required=1, type="analysisspec", subfields=("keyword", "min", "max", "error"), required_subfields=("keyword", "min", "max", "error"), subfield_labels={ "keyword": _("Analysis Service"), "min": _("Min"), "max": _("Max"), "error": _("% Error"), },
from Products.Archetypes.public import * from Products.Archetypes.references import HoldingReference from Products.ATContentTypes.lib.historyaware import HistoryAwareMixin from Products.ATContentTypes.utils import DT2dt, dt2DT from Products.CMFCore import permissions from Products.CMFPlone.utils import safe_unicode from zope.interface import implements from bika.lims.browser.fields import DateTimeField from bika.lims.browser.widgets import ReferenceWidget from bika.lims.browser.widgets import SelectionWidget as BikaSelectionWidget import sys from bika.lims.utils import to_unicode schema = BikaSchema.copy() + Schema(( # TODO This field is only for v1.3.0 migration purposes # bika_catalog contains an "isValid" index. We will take advantage of this # index to keep track of the Samples that have been migrated already in # order to prevent an unnecessary reimport when v1.3.0 is rerun. # This field is used by `isValid` function BooleanField( 'Migrated', default=False, ), StringField( 'SampleID', required=1, searchable=True, mode="rw", read_permission=permissions.View,
ComputedField( 'SampleTypeTitle', expression="context.getSampleType().Title() if context.getSampleType() else ''", widget=ComputedWidget( visible=False, ), ), ComputedField( 'SampleTypeUID', expression="context.getSampleType().UID() if context.getSampleType() else ''", widget=ComputedWidget( visible=False, ), ), )) + BikaSchema.copy() + Schema(( RecordsField( 'ResultsRange', # schemata = 'Specifications', required=1, type='resultsrange', subfields=( 'keyword', 'min', 'max', 'error', 'hidemin', 'hidemax', 'rangecomment' ),
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright 2018-2019 by it's authors. # Some rights reserved, see README and LICENSE. from AccessControl import ClassSecurityInfo from bika.lims import bikaMessageFactory as _b from bika.health import bikaMessageFactory as _ from bika.lims.browser.widgets import RecordsWidget from bika.lims.content.bikaschema import BikaSchema from bika.health.config import PROJECTNAME from Products.Archetypes.public import * from Products.ATExtensions.ateapi import RecordsField from zope.interface import implements schema = BikaSchema.copy() + Schema((RecordsField( 'AetiologicAgentSubtypes', type='aetiologicagentsubtypes', subfields=('Subtype', 'SubtypeRemarks'), subfield_labels={ 'Subtype': _('Subtype'), 'SubtypeRemarks': _('Remarks') }, subfield_sizes={ 'Subtype': 10, 'SubtypeRemarks': 25 }, widget=RecordsWidget( label='Subtypes', description=_("A list of aetiologic agent subtypes."), visible=True,
), ), ComputedField('SampleTypeTitle', expression = "context.getSampleType() and context.getSampleType().Title() or ''", widget = ComputedWidget( visible = False, ), ), ComputedField('SampleTypeUID', expression = "context.getSampleType() and context.getSampleType().UID() or ''", widget = ComputedWidget( visible = False, ), ), )) + \ BikaSchema.copy() + \ Schema(( RecordsField('ResultsRange', schemata = PMF('Reference Results'), required = 1, type = 'analysisspec', subfields = ('keyword', 'min', 'max', 'error'), required_subfields = ('keyword', 'min', 'max', 'error'), subfield_labels = {'keyword': _('Analysis Service'), 'min': _('Min'), 'max': _('Max'), 'error': _('% Error')}, widget = SpecWidget( checkbox_bound = 1, label = _("Reference Results"), description = _("Click on Analysis Categories (against shaded background) "
# -*- coding: utf-8 -*- from zope.interface import implements from AccessControl import ClassSecurityInfo from Products.Archetypes.public import BaseContent from Products.Archetypes import atapi from bika.lims.content.bikaschema import BikaSchema from bika.lims.config import PROJECTNAME from bika.lims.interfaces import IInstrumentLocation schema = BikaSchema.copy() schema['description'].schemata = 'default' schema['description'].widget.visible = True class InstrumentLocation(BaseContent): """A physical place, where an Instrument is located """ implements(IInstrumentLocation) security = ClassSecurityInfo() displayContentsTab = False schema = schema _at_rename_after_creation = True def _renameAfterCreation(self, check_auto_id=False):
from bika.lims import bikaMessageFactory as _ from bika.lims.config import PROJECTNAME from bika.lims.content.bikaschema import BikaFolderSchema from bika.lims.content.bikaschema import BikaSchema from bika.lims.interfaces import IStorageLevel from bika.lims.interfaces import IStorageLevelIsAssignable from bika.lims.utils import t from plone.app.folder.folder import ATFolder from Products.Archetypes.public import * from Products.CMFCore.permissions import View, ModifyPortalContent from zope.interface import alsoProvides, noLongerProvides from zope.interface import implements from Acquisition import aq_chain schema = BikaFolderSchema.copy() + BikaSchema.copy() + Schema(( ComputedField( 'ParentUID', expression='context.aq_parent.UID()', widget=ComputedWidget( visible=False, ), ), BooleanField( 'HasChildren', default=False, widget=BooleanWidget(visible=False), ), IntegerField( 'NumberOfAvailableChildren', default=0,
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from AccessControl import ClassSecurityInfo from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.config import PROJECTNAME from bika.lims.interfaces import ISubGroup from bika.lims.content.bikaschema import BikaSchema from bika.lims.fields import * from Products.Archetypes.public import * from zope.interface import implements schema = BikaSchema.copy() + Schema((ExtStringField( 'SortKey', widget=StringWidget( label=_("Sort Key"), description=_("Subgroups are sorted with this key in group views"))), )) schema['description'].widget.visible = True schema['description'].schemata = 'default' class SubGroup(BaseContent): implements(ISubGroup) security = ClassSecurityInfo() displayContentsTab = False schema = schema
from zope.interface import implements from Products.Archetypes import atapi from Products.Archetypes.public import BaseContent from bika.lims.interfaces import IMultifile from bika.lims.content.bikaschema import BikaSchema from bika.lims import bikaMessageFactory as _ from bika.lims import config schema = BikaSchema.copy() + atapi.Schema(( atapi.StringField('DocumentID', required=1, validators=('uniquefieldvalidator',), widget = atapi.StringWidget( label=_("Document ID"), ) ), atapi.FileField('File', required=1, widget = atapi.FileWidget( label=_("Document"), description=_("File upload "), ) ), atapi.StringField('DocumentVersion', widget = atapi.StringWidget( label=_("Document Version"), )
}, )) remarks = StringField( 'FreeText', widget=TextAreaWidget( label=_("Remarks"), description= _("Explanation about disease or symptom in case of unknown disease or insufficient information" ), cols=30, rows=20, ), ) schema = BikaSchema.copy() + Schema((version, code, remarks)) schema['title'].widget.visible = {'view': 'visible', 'edit': 'visible'} schema['title'].widget.label = "Disease Ontology" schema[ 'title'].widget.description = "Name of ontology used fro disease. Can be several values e.g. ICD, SNOMED" schema['description'].widget.visible = {'view': 'visible', 'edit': 'visible'} schema['description'].widget.description = "Description from the selected Disease Ontology Code " \ "e.g. Malignant neoplasm of prostate" class DiseaseOntology(BaseContent): security = ClassSecurityInfo() implements(IDiseaseOntology, IConstrainTypes) displayContentsTab = False schema = schema _at_rename_after_creation = True