Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #161 from senaite/port-panic
Browse files Browse the repository at this point in the history
Compatibility with senaite.panic add-on
  • Loading branch information
ramonski committed Feb 2, 2020
2 parents c48594c + f22e751 commit 5da4cc1
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 497 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog

**Added**

- #161 Compatibility with `senaite.panic` add-on
- #166 Better handling of ClientPatientID and Patient fields in Add Sample

**Changed**
Expand Down
19 changes: 0 additions & 19 deletions bika/health/browser/analysis/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions bika/health/browser/analysis/configure.zcml

This file was deleted.

120 changes: 0 additions & 120 deletions bika/health/browser/analysis/resultoutofrange.py

This file was deleted.

1 change: 0 additions & 1 deletion bika/health/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
xmlns="http://namespaces.zope.org/zope"
i18n_domain="senaite.health">

<include package=".analysis"/>
<include package=".aetiologicagent"/>
<include package=".analysisrequest"/>
<include package=".analysisrequests"/>
Expand Down
1 change: 0 additions & 1 deletion bika/health/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<include package=".static" />
<include package=".subscribers" />
<include package=".upgrade" />
<include package=".widgets" />

<!-- TODO REMOVE obsolete module -->
<include package=".obsolete" />
Expand Down
10 changes: 0 additions & 10 deletions bika/health/content/analysisrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ def __init__(self, context):
),
),

ExtBooleanField(
'PanicEmailAlertToClientSent',
default=False,
widget=BooleanWidget(
visible={'edit': 'invisible',
'view': 'invisible',
'add': 'invisible'},
),
),

ExtStringField(
'ClientPatientID',
searchable=True,
Expand Down
65 changes: 0 additions & 65 deletions bika/health/content/analysisspec.py

This file was deleted.

41 changes: 5 additions & 36 deletions bika/health/content/bikasetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,20 @@
# Copyright 2018-2019 by it's authors.
# Some rights reserved, see README and LICENSE.

from Products.Archetypes.Widget import BooleanWidget
from archetypes.schemaextender.interfaces import ISchemaExtender,\
IOrderableSchemaExtender
from bika.lims.fields import *
from archetypes.schemaextender.interfaces import IOrderableSchemaExtender
from zope.component import adapts
from zope.interface import implements

from bika.health import bikaMessageFactory as _
from bika.lims.fields import *
from bika.lims.interfaces import IBikaSetup
from zope.component import adapts, getAdapters
from zope.interface import implements


class BikaSetupSchemaExtender(object):
adapts(IBikaSetup)
implements(IOrderableSchemaExtender)

fields = [
ExtBooleanField('EnablePanicAlert',
schemata="Analyses",
default=False,
widget=BooleanWidget(
label=_("Enable panic levels alert"),
description=_("Alert labmanagers with an email when an "
"analysis result exceeding a panic level is "
"submitted"))
),
ExtBooleanField('AutoShowPanicAlertEmailPopup',
schemata="Analyses",
default=False,
widget=BooleanWidget(
label=_("Show client email pop-up when panic level"),
description=_("If enabled, shows automatically an email form "
"pop-up for alerting the client about a panic "
"level exceeded when Analysis Request view is "
"loaded"))
),
ExtStringField('PatientConditionsHeightUnits',
schemata="Cases",
default=_("Feet/inches"),
Expand Down Expand Up @@ -114,17 +94,6 @@ class BikaSetupSchemaExtender(object):
"preferences' tab.")
)
),
ExtBooleanField('EnableBikaAnalysisRequestRequestForm',
schemata="Analyses",
default=False,
widget=BooleanWidget(
label=_("Enable Bika's analysis request form."),
description=_("It enables the secondary analysis request form. This request has some characteristic "
"features as allowing you to register more than one analysis request at the same time. "
"It's useful if you are supposed to register a big amount of analysis request at the same "
"time.")
)
),
ExtBooleanField('CaseDoctorIsMandatory',
schemata="Cases",
default=True,
Expand Down
1 change: 0 additions & 1 deletion bika/health/content/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<adapter factory=".batch.BatchSchemaModifier" />

<adapter factory=".analysis.AnalysisSchemaExtender" />
<adapter factory=".analysisspec.AnalysisSpecSchemaModifier" />
<adapter factory=".bikasetup.BikaSetupSchemaExtender" />
<adapter factory=".client.ClientSchemaExtender" />

Expand Down
1 change: 1 addition & 0 deletions bika/health/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<version>1.2.3</version>
<dependencies>
<dependency>profile-senaite.lims:default</dependency>
<dependency>profile-senaite.panic:default</dependency>
</dependencies>
</metadata>
Loading

0 comments on commit 5da4cc1

Please sign in to comment.