Skip to content

City-of-Helsinki/drupal-helfi-sote

Repository files navigation

City of Helsinki - SOTE Drupal project

SOTE, short for Sosiaali- ja terveyspalvelut, is a site providing information about the health and social services in the city of Helsinki. The project is sometimes referred to simply as Terveys.

Environments

Env Branch Drush alias URL
development * - http://helfi-sote.docker.so/
production main @main https://hel.fi/fi/sosiaali-ja-terveyspalvelut

Requirements

You need to have these applications installed to operate on all environments:

  • Docker
  • Stonehenge
  • For the new person: Your SSH public key needs to be added to servers

Create and start the environment

For the first time (new project):

$ make new

And following times to create and start the environment:

$ make fresh

NOTE: Change these according of the state of your project.

CSS-files not loading?

If stylesheets are not loading correctly, you need to give write access to public/sites/default/files

Run make drush-cr; drush-uli after this.

Login to Drupal container

This will log you inside the app container:

$ make shell

Instance specific features

Custom paragraphs

Health Station Search (health_station_search)

The Health Station Search paragraph lets the user filter health stations based on their home address. The health stations are TPR entities that are categorized as such.

This search functionality is built with React and utilizes a Views listing (health_station_search) as a fallback when JavaScript is disabled. All React-based searches are located in the hdbt theme, where most of the related logic is implemented. Some templating is done for the fallback View in the hdbt_subtheme.

  • The fallback listing is a View called (health_station_search) and it doesn't have any filters. The fallback View configuration can be found in here.
  • The search has a React front and the code can be found here.
  • The paragraph has editable title and description fields.
  • Can be added to landing pages.
  • The index that the search uses is called Health stations (health_stations).

Maternity and Child Health Clinic Search (maternity_and_child_health_clini)

The Maternity and Child Health Clinic Search lists these clinics and lets user filter the clinics based on their home address. The clinics are TPR entities that are categorized as such.

The machine name of this paragraph might look that its cut short but that is the correct machine name. This search functionality is built with React and utilizes a Views listing (maternity_and_child_health_clinics_search) as a fallback when JavaScript is disabled. All React-based searches are located in the hdbt theme, where most of the related logic is implemented. Some templating is done for the fallback View in the hdbt_subtheme.

  • The fallback listing is a View called (maternity_and_child_health_clinics_search) and it doesn't have any filters. The fallback View configuration can be found in here.
  • The search has a React front and the code can be found here.
  • The paragraph has editable title and description fields.
  • Can be added to landing pages.
  • The index that the search uses is called maternity and child health clinic (maternity_and_child_health_clinic).

IBM Watson Chat

The SOTE instance uses the IBM Watson Chatbot implementation. It has two blocks for controlling the visibility of the chat with one being the default and the other exceptions. You can configure the blocks for the chats on the block layout page (admin/structure/block). More documentation about the IBM Watson chatbot is available in Confluence, and the code for the Drupal block can be found here.

SUUNTE Chat

The SUUNTE chat, also referred to as Genesys Chat, is implemented on the SOTE instance and includes a block that controls where the chat is visible. The code related to the chat can be found in the custom module helfi_sote.

You can configure the chat block on the block layout page (admin/structure/block). Additional documentation about the SUUNTE chat can be found on Confluence using the keywords Genesys or SUUNTE. Most of the information there is in Finnish.

Template customization for the TPR entities

SOTE has customization on how the Errand services and Service Channels are displayed. Customization can be found from the hdbt_subtheme templates folder here.

Unit Search (unit_search) override

The default Unit Search View is overridden in the SOTE instance and the code can be found form the helfi_sote_config custom module.