Implementing Open Referral with Drupal and WordPress

A. ChavanAbhijeet Chavan is the Chief Technology Officer of Urban Insight, a digital solutions agency that produces platforms like DLAW, a Drupal-based platform for building public information websites. In this post, he describes the recent adoption of Open Referral for DLAW’s legal services resource websites, which are in use in over a dozen states across the country. Welcome, Abhijeet!  –ed

Many organizations provide health, legal, and other social services to people in need. If organizations can publish information about the services they provide in a common format, this data can be aggregated and searchable so that people needing assistance can find right organization for their needs. The Open Referral initiative has developed a data interchange format called the Human Service Data Specification (HSDS) for publishing machine-readable data about service providers, their locations, and the services they provide.

For organizations that use the Drupal content management system for maintaining their websites, we have developed openreferral-drupal (ORD), an open source Drupal module to make it possible to publish resource directory data in HSDS format. The ORD module was developed as part of the Drupal for Legal Aid Websites (DLAW) project.

To maintain resource data in the structure that is needed to publish in the HSDS format, Devin Balkind of Sarapis developed a sample database using Airtable, an easy-to-use web database. Anyone can make a copy of the sample dataset and use it to maintain their own HSDS resource data in Airtable.

Sample dataset in Airtable. Make a copy to start your own Open Referral dataset.

The ORD module extracts data from the HSDS Airtable database and publishes it in HSDS format on a Drupal website.

OpenReferral Drupal (ORD) module extracts data from Airtable and publishes it in HSDS format.

To use the ORD module:

  1. Make a copy of the sample database in Airtable. Make a note of your Airtable <em”>API key and the API Base URL for the database.
  2. Populate the Airtable database with your own data.
  3. Install the ORD module on your Drupal website.
  4. In the ORD module configuration panel set Airtable API key and the API Base URL for the database. Then click Save.

The ORD module will extract data from the AirTable database and generate files as specified in the Open Referral HSDS (v 1.1) format at the following URLs:

(your website domain)/openreferral/datapackage.json
(your website domain)/openreferral/organizations.csv
(your website domain)/openreferral/phones.csv
(your website domain)/openreferral/postal_addresses.csv

The first time one of the above URL is requested, ORD will extract data from the Airtable database, cache the data on the Drupal website, and generate the Openreferral files. Depending on the amount of data in the database, this first step may take a minute or longer. Subsequent requests to the above URLs will be faster.

The ORD module does not automatically update the cache. When you update the Airtable database, click the Purge Cache button on the ORD module configuration panel.

OpenReferral DLAW Configuration
OpenReferral DLAW Configuration

This first version of the ORD module implements only a few features of the HSDS data. I hope others will extend this module and use this approach for other web platforms.

Open Referral for WordPress

We also developed Open Referral WordPress Plugin as a port of ORD for WordPress. I encourage WordPress developers to experiment with and extend this plugin.

Open Referral WordPress Plugin configuration panel
Open Referral WordPress Plugin configuration panel

Open Referral Drupal module and WordPress plugin were developed by Abhijeet Chavan and Ki Kim of Urban Insight. Thanks to Devin Balkind of Sarapis for building the Airtable implementation of HSDS v1.1.  and to Greg Bloom of Open Referral for his support. And thanks to the Legal Services Corporation for supporting innovation in legal technology.

Resources

Follow me on Twitter @legalaidtech

This blog post is by Abhijeet Chavan. Licensed CC 4.0 BY-SA

Comments

One response to “Implementing Open Referral with Drupal and WordPress”

  1. […] Stanford’s team built a prototype of a data transformer that can receive data in the HSDS format and output it into schema.org markup. The project team leveraged the output from LegalServer’s Referral Hub, translated it into schema.org markup, and loaded this markup onto Legal Services of North Florida’s (LSNF) site. The project team also supported other legal aid websites such as LawHelpNY.org (a ProBonoNet site) and Idaho Legal Aid Services, (a side on DLAW, which adopted Open Referral for its Drupal implementation in 2017). […]

Leave a Reply

Your email address will not be published. Required fields are marked *