Opal

Latest version: v0.23.0

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

Scan your dependencies

Page 6 of 10

0.10.1

Plugin API end points can now override application end points

A change to the order that APIs are registered with Django Rest Framework allows
plugins to now override the core Opal application APIs.

Fonts are now locally sourced

Fonts are now served from Opal's static assets rather than from the Google CDN.

print/screen stylesheets have been collapsed into opal.css

Print/screen differences are now in opal.css with media tags.

Google Analytics is now deferred

The loading in of Google Analytics is now deferred to the bottom of the body
tag to allow the page to load without waiting on analytics scripts to load.

Scaffold version control failures

The `startplugin` and `startproject` commands initialize a git repository by
default. If we (The `subprocess` module) cannot find the `git` command, we now
continue with a message printed to screen rather than raising an exception.

Episode.objects.serialised now uses select_related

`ForeignKeyOrFreeText` fields now have their ForeignKey items preselected when
we use `Episode.objects.serialised`. This provides a speed boost for applications
with moderately heavy `ForeignKeyOrFreeText` usage.

(Approx 30-40% in our tests.)

0.10

being Django defaults, were confusing to users and developers in our use case.

When we delete and look up list instance, we no longer delete all subrecords that use
that instance. Instead we set the look up list instances name in the free text field on
the subrecord.

When you delete a user, it will no longer delete all related episodes and subrecords

Episode Category stages

Episode categories now enforce a set of valid `Episode.stage` values.
`EpisodeCategory` now includes the `.get_stages()` and `.has_stage(stage)` methods,
while `Episode` has a `set_stage` setter which is used by the UpdateFromDictMixin JSON API.

lookuplists.lookuplists

Adds the utility generator `lookuplists.lookuplists()` which wil yield every lookuplist
currently available.

Discoverable.filter()

Disoverable features now have a `filter` method which allows you to filter features
with matching attributes.

Pathways ContextProcessor

The 'opal.core.pathways.context_processors.pathways' Context Processor will allow you to
access your pathways from templates without having to explicitly load them in a view. In
turn, this allows patterns like:

{% include pathways.YourPathway.get_display_name %}


Missing consistency token errors

`.update_from_dict()` will now raise the new error
`opal.core.errors.MissingConsistencyTokenError` if it is called without a consistency
token when one is set on the model. Previously it would raise `APIError`.

The JSON API will now return a more specific message in the response boday, explaining
that the problem is a missing consistency token.

dump_lookup_lists --many-files

Adds the `--many-files` option to the `dump_lookup_lists` command which will write
each installed lookup list to a separate file in the `./data/lookuplists` directory
of the application.

Template removals

We remove a number of stale unused templates:

* changelog.html
* contact.html
* extract_footer.html
* tagging_detail.html
* _helpers/inline_form.html
* responsive/_phone_episode_list.html'
* responsive/_tablet_episode_list.html

Removing LoginRequiredMixin

As Django ships with a `LoginRequiredMixin` of its own we no longer roll our own
in `opal.core.views.

Testing options

Adds a `--failfast` option to the test harness to stop test runs on the first
failure.

If you are a plugin developer upgrading an existing plugin you will have to
manually add support for `--failfast` passthrough to your `runtests.py`.

If you are a plugin developer upgrading an existing plugin you will have to
manually add support for `--failfast` passthrough to your `runtests.py`.

Moves scaffold to be a django management command

The rest of the api is still the same but now
we run `python manage.py scaffold {my_app_name}`

Deprecations completed

As previously noted in console warnings, the Angular Episode service no longer
supports the `discharge_date`, `date_of_admission`, `date_of_episode` properties.
These were replaced by `.start` and `.end`.

Updates to the Dependency Graph

* Django: 1.8.13 -> 1.10.8
* Django Reversion: 1.8.7 -> 1.10.2
* Django Rest Framework: 3.2.2 -> 3.4.7
* Psycopg2: 2.5 -> 2.7
* Jinja2: 2.9.6 -> 2.10
* Ffs: 0.0.8.1 -> 0.0.8.2
* Requests: 2.7.0 -> 2.18.4
* django-celery: 3.1.17 -> 3.2.2
* celery: 3.1.19 -> 3.1.25

Misc Changes

Removes the undocumented `collapsed_multisave` tag from the `pathways` templatetag
library.

Adds a setting `OPAL_FAVICON_PATH` to specify the application Favicon to use.

Adds the `rows` option to the textarea template tag which just fills in the html textarea
`rows` attribute. Text areas are defaulted to 5 rows (the same as before).

Configures the setting `CSRF_FAILURE_VIEW` to use the bundled `opal.views.csrf_failure` view.

Pathway slugs may now include hyphens as well as numbers, lower case letters and underscores.

Bugfix: in edit_item.js $scope.episode_category is now set from episode.category_name
as opposed to episode.category (which was always null)

Fixes some instances of progressbars not being reset if unexpected error states
occur.

Improves the rendering of patient detail pages where no patient with the ID from
route params exits. (Displays a polite message instead of erroring.)

Incorrect pluralisation of subrecord names in the Admin view has been fixed. (Migrations
will have to be run in all models which extend the changed core Opal models (this is due
to a minor upstream Django bug)

Minor change to the diagnosis form.

0.10.0

This is a major release with breaking changes from upstream dependencies.
You are almost certain to require changes to your application. Please see
the upgrade guide for further details.

Referencedata in new applications

Opal now includes core lookuplist data in an `opal.core.referencedata` plugin
which is installed and loaded by default by the `startproject` scaffolding.

Deletion cascade behaviour

0.9.0

When creating new plugins we will place the plugin definition class in `plugin.py` rather than `__init__.py`

opal.core.api.patient_from_pk

A decorator that changes a method that is passed a pk, to a method that is passed a patient.


ToDictMixin._bulk_serialise

Adds a flag to the to dict mixin to determine whether the item is serialised as part of `Episode/Patient.to_dict`.


Fixes bugs in add many subrecord radio buttons

Previously multiple radio buttons for the same subrecord field on the same page would
not appear to the user to update correctly. This has now been fixed.


Angular UI Libraries

0.8.3

opal.log.ConfidentialEmailer
Adds a custom email logger. This enables Django error emails which remove any confidential patient data.

Also adds in the karma config to the MANIFEST.in so that we include the karma configs on pip install. It also moves it
to "opal/tests/js_config/karma_defaults.js".

0.8.2

OPAL_LOCATION is added as a system variable when running js tests
If you run opal test js, your karma config is now run in an environment that has
access to the OPAL_LOCATION variable which points to the opal parent directory.

A Data Dictionary In The Extract
The Extract zip file has a data dictionary with human readable metadata about each field.

Enhanced Application menus

The application menu API, previously python dicts stored in attributes on either plugin or
application subclasses, now consists of the new `opal.core.menus.MenuItem` class, enabling
enhanced customisation and flexibility.

PUT to the episode API returns the episode with all its subrecords
Previously it only returned the episode. Now it matches the episode create api end point

Episode/Patient links in admin
In the admin, episodes and patients lists now have links to the patient detail pages.

User data for the client

Adds a `User` Angular service that enables applications to use user data.
Also adds some directives to make it easy to render User names and avatars.

Episode.getFullName()

Adds a utility method to the `Episode` service that returns a human readable patient name.

Plugin.get_javascripts, Plugin.get_styles

Enhances the API available for plugins to include javascript and css by adding methods on
`opal.core.plugins.OpalPlugin`

'element_type' argument for the form template tags

Numeric database fields are now set as the html5 type="number" when rendering
them with the forms templatetag library. This means on mobile devices it will
bring up the numeric keypad. The element type can now be set via the template
tag API with the 'element_type' argument.

OPAL_LOGO_PATH

This new setting allows applications to set the path at which the app logo is served.
If `OPAL_LOGO_PATH` is set, the value is passed to the `{% static %}` templatetag to set
the `src` atribute of an image in the default application header and login screen.

Inactive episodes in PatientLists

Changes the behaviour of `opal.core.PatientList.to_dict` to serialise inactive
episodes by default rather than filtering by Episode.active == True.

`opal.core.TaggedPatientList.to_dict` continues to filter by Episode.active ==
True by default.

Notice of future removals

The context variables `brand_name` `settings` and `extra_application` in `opal.views.IndexView`
are no longer helpful thanks to the settings context processor. These will be removed in
0.9.0 and emit warnings until then.

Misc changes

Adds a new filter - `underscore-to-spaces` for removing underscores from strings.

The options for `SymptomComplex.duration` have moved from the default form template to a choices
declaration on the model. These are scheduled to move again to a lookuplist.

The default value of `Subrecord.get_display_name` now uses Django `Meta.verbose_name`.

Minor fixes

Fixes a bug where the allergies form rendered the provisional field twice

Updates to the Dependency Graph

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.