Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1391 Configurable object identifiers #1885

Merged
merged 2 commits into from
Dec 22, 2016

Conversation

rockfruit
Copy link
Contributor

Provides an interface 'IHaveIdentifiers' which allows objects providing it to be referred to by multiple configurable IDs. This can be used to allow objects to have CAS numbers assigned to them, or to allow a Patient record to be looked up via a national ID, driver's license, or hospital record number.

To use this:

  • Provide the bika.lims.interfaces.IHaveIdentifiers interface on your object. These objects will now have a new field added to their schema called 'Identifiers'. The field contains a list of dictionaries: {'IdentifierType', 'Identifier', 'Title'}.

  • Enter Bika Setup, and select "Identifier Types". Here you can configure the name and description of all types of identifiers to be used on the system. You can also specify a list of portal_types which each identifier type can be used to identify.

  • A new KeywordIndex index 'Identifiers' is added to portal_catalog, bika_catalog and bika_setup_catalog.

  • The field is flagged 'searchable=True' so 'Identifier' values are available in the SearchText ZCFullText index.

  • This commit adds an IdentifierType called 'CAS Nr' representing Chemical Abstract Service registry numbers, and applies the IHaveIdentifiers interface to AnalysisServices

Provides an interface 'IHaveIdentifiers' which allows objects providing it to be referred to by multiple configurable IDs.  This can be used to allow objects to have CAS numbers assigned to them, or to allow a Patient record to be looked up via a national ID, driver's license, or hospital record number.

To use this:

- Provide the bika.lims.interfaces.IHaveIdentifiers interface on your object.  These objects will now have a new field added to their schema called 'Identifiers'.  The field contains a list of dictionaries:  {'IdentifierType', 'Identifier', 'Title'}.

- Enter Bika Setup, and select "Identifier Types".  Here you can configure the name and description of all types of identifiers to be used on the system.  You can also specify a list of portal_types which each identifier type can be used to identify.

- A new KeywordIndex index 'Identifiers' is added to portal_catalog, bika_catalog and bika_setup_catalog.

- The field is flagged 'searchable=True' so 'Identifier' values are available in the SearchText ZCFullText index.

- This commit adds an IdentifierType called 'CAS Nr' representing Chemical Abstract Service registry numbers, and applies the IHaveIdentifiers interface to AnalysisServices
Adding SearchableText as a ReferenceWidget combogrid search field caused failure because SearchableText was a method not an attribute.
@xispa xispa self-assigned this Dec 20, 2016
@xispa
Copy link
Contributor

xispa commented Dec 22, 2016

This one is pretty cool!

@xispa xispa merged commit 9f179e1 into bikalims:master Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants