Opal

Latest version: v0.23.0

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 10

0.13.0

Removes support for Python 2.x

Due to the upgrade to Django 2.x, Opal no longer supports Python 2.x.

Opal is now tested against Python 3.5, 3.6

Episode.active

The field `Episode.active` was previously implicitly set when calling `.set_tag_names()` to
something equivalent to the value of `bool(len(tag_names) > 0)`.

As of 0.13.0 the value of `Episode.active` is checked whenever `.save()` is called, prior
to the database call. The correct value is looked up via `Episode.category.is_active()`.

The default calculation of `.active` has also changed to be roughly equivalent to
` bool(self.episode.end is None)`.

Applications are now able to easily _change_ this behaviour by overriding the `.is_active`
method of the relevant `EpisodeCategory`.

Coding systems for lookuplists

Lookuplist entries may now have an associated coding system and code value stored against them.

This enables applications to explicitly code entries against e.g. SNOMED value sets.

Note: This will requires a migration to be created for all applications.

New date display format helpers

Introduces two new Angular filters: `displayDate` and `displayDateTime`. These format a date
for display according to the setting `DATE_DISPLAY_FORMAT`. This defaults to `D MMM YYYY`.

New applications will have this setting in their scaffold, existing applications may wish to add
it.

All core Opal templates that previously used `shortDate` or `shortDateTime` have been updated to
use either `displayDate` or `displayDateTime`.

Removes scope.jumpToEpisode and scope.getEpisodeId from Search and Extract

We no longer use these functions, instead we use an HTML link to the patient detail view.

Removes Patient.to_dict().active_episode_id

We no longer include a value for "active_episode_id" as part of the Patient to_dict serialisation.

This is effectively meaningless since we moved to an episode model that allows for multiple
concurrent episodes.

Removes CopyToCategory

Removes the entire CopyToCategory flow from Opal Core. If applications continue to rely on it,
they are advised to implement at application level.

In general application developers are advised to find alternative ways to display subrecords
from multiple episodes rather than copying them however, as this is known to cause duplication
of data that is hard to trace back later on.

This includes the API endpoint at `episode/$id/actions/copyto/$category/`, the template
`copy_to_category.html`, the Angular controller `CopyToCategoryCtrl` and service
`CopyToCategory` and Subrecord property `_clonable`.

Lookuplist data format

Lookuplist entries in data files are no longer required to have an empty synonyms list
if the entry doesn't have a synonym. This reduces the file size and makes it easier to
hand craft data files for new applications.

TaggedPatientList Episode serialisation

Alters the default serialisation of TaggedPatientList serialisation to no longer filter out
'inactive' episodes. Given that 'active' was always true when an episode had a tag, this
was effectivly a no-op anyway unless applications were altering the `get_queryset` for
these patient lists somehow.

Removes the deprecated Model._title property

Use of `Model._title` to set a display name of a subrecord has issued a warning for several
releases - this has now been removed and will no longer work.


Free text or foreign key fields are now, by default case insensitive

This can be adjusted with a flag on the field.

Existing fk_or_ft fields could therefore still have the field set as free text.

This change is not accompanied by a retrospective migration so your existing fk_or_ft may be
stored in a case sensitive manner. It is recommended you migrate all of your fk_or_ft fields
as this will give you consistent behaviour.

For example

Prior to this change if I had an allergy for "paracetomol" but an entry in the models.Drug
table of "Paracetomol", it would be stored as free text in the `Allergies.drug` field, because
it was case sensitive. Going forward after this change it will be saved as a foreign key. This
change will not be made retrospecively however so you would need to add a migration that resaved
the Allergies.drug.

Misc Changes

* The undocumented Reopen Episode flow included in Opal < 0.8.0 has now been completely removed,
including the `reopen_episode_modal.html` template and the url/view at `templates/modals/reopen_episode.html/`.

* Removes the method `.deleteItem` from the `RecordEditor` service.

* Adds in a footer updated/created by to the form base template

* Changes the default value of `_ft` fields on `ForeignKeyOrFreeTextField` from b'' to ''. This requires a migration

* `__unicode__` model methods have been renamed `__str__`

* Adds an index argument to `PatientList.as_menuitem()` and `Pathway.as_menuitem()`

* Adds a `get_absolute_url()` method to `Patient` and `Episode

* Adds `btn-cancel`, `btn-save` and `btn-delete` classes to the respective form buttons.

* Moves the cancel button by default to be left of the save button.

* Renames the (undocumented, internal) Angular service `FieldTranslater` to `FieldTranslator`

* If an item is deleted from the edit item modal, RecordEditor.openEditItemModal will now resolve after
the delete item modal is closed with 'deleted'

Updates to the Dependency Graph

* Django: 1.10.8 -> 2.0.9
* Django Rest Framework: 3.4.7 -> 3.7.4
* Django Reversion: 1.10.2 -> 3.0.1
* Letter: 0.4.1 -> 0.5
* Requests: 2.18.4 -> 2.20.1
* Psycopg2: 2.7 -> 2.7.6.1
* Python Dateutil: 2.4.2 -> 2.7.5

0.12.1

* If an item is deleted from the edit item modal, RecordEditor.openEditItemModal will now resolve after the delete item modal is closed with 'deleted'

* Fixes the default investigation modal

0.12.0

Misc Changes
* Adds the {% block analytics %} in the base template (opal/templates/base.html) that by default contains the google analytics code.

* Adds the block {% block javascripts %} in the base template (opal/templates/base.html) that will compress all javascripts.

* Adds a method `.demographics()` to `opal.models.Patient` which returns the relevant demographics instance.

* Adds a `for_user` method on to the menu item. This method
takes a user and by default returns True. Override this
to decide if a menu item should be shown in the nav bar.

0.11.2

Includes referencedata JSON files in Manifest.

0.11.1

Fixes the user_options in the date picker tag to display the options as part of the text input.

0.11.0

Adds options of `today` and `yesterday` in the date picker

If you pass in `user_options=True` to the date picker. You will be provided with
options to select today or yesterday in the form tag.

Adds `dateHelper` to the rootScope

The dateHelper has the functions `now` and `yesterday` that return javascript Dates for
the current time and the current time - 1 day.

Deprecates the _title property

In future we will use the standard `verbose_name` property as the display name.
The abstract models have been changed to account for this.

Core API registration

A refactor in the way that the core APIs are registered by Opal means that
importing `opal.core.api` in a plugin API no longer results in circular imports.

Fixes a bug whereby episodes were serialising differently depending on whether
the code path went via `.to_dict()` or `.objects.serialised()`.

HelpTextStep can now use a custom template

The `opal.core.pathway.steps.HelpTextStep` can now have a `help_text_template` passed in.

This is the template for what will be placed in the side bar.

Adds in a radio_vertical template tag

This displays the label and then the radio
buttons as a vertical list.

opal.core.serialization

A number of helpers related to serialization and deserialization have been brought
together in the new module `opal.core.serialization`.

Removes "episode_history" from episode serialization

Serialised episodes previously contained a "shallow" copy of all other episodes in
a property named `episode_history`. This was primarially useful before we switched
from episode-oriented to patient-oriented detail views by default.

This also includes a change to the signature of the `.serialised()` method of the
Episode manager, which no longer accepts a `episode_history` kwarg.

as_menuitem helpers

Applications using Opal Menuitems often wish to add menu items for Patient Lists and
Pathways.

To aid this, the `.as_menuitem()` method now creates one from the target class with
sensible but overridable defaults.

`opal serve` command

We add `opal serve` to the Opal commandline tool. Currently this simply wraps the
Django runserver management command. It is envisaged that in the future this will
also initialize e.g. sass precompilers with a single command.

Misc Changes

Adds the utility function `opal.utils.get`. Similar to the `getattr` builtin, `get` looks
for a method named `get_$attr` and will call that if it exists.

Adds the method `.get_absolute_url()` to `opal.core.pathways.Pathway` and
`opal.core.patient_lists.PatientList`.

Template removals

We removed a number of superfluous templates:

* opal/templates/patient_lists/spreadsheet_list.html
* opal/templates/layouts/left-panel.html

Static asset minification

The Django upgrade in Opal 0.10 stopped compressor minifying files
when DEBUG is set to False. This fixes that issue by upgrading Django compressor to
a version that supports Django 1.10.

The return of an old friend: IE Document modes

Users report that their system administrators sometimes configure Internet Explorer
in such a way that it uses e.g. IE7 Document mode by default.

This is problematical for Opal applications which do in fact make use of internet
technologies that were in widespread use after say, 2006.

We have altered `base.html` to specify `"X-UA-Compatible" content="IE=Edge"`. If you
override `base.html`in your application we advise that you add this `<meta>` tag.

Misc Changes

* Adds the utility function `opal.core.subrecords.singletons()` which returns
a generator function which will yield all subrecord singletons.
* Fixes a URI encoding bug in the `Episode.findByHospitalNumber()` method that
made hospital numbers including `` or `/` raise an error.
* Adds the methods `.get_absolute_url()`, `.get_icon()` and `get_display_name()`
to `opal.core.pathways.Pathway` and `opal.core.patient_lists.PatientList`.

Updates to the Dependency Graph

* Django compressor: 1.5 -> 2.2

Page 5 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.