/rapidsms-decisiontree-app

A dependency of the Coordinated Entry Screening tool

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

rapidsms-decisiontree-app

This application is a generic implementation of a decision tree, which is completely database-configurable. Users are asked questions and respond via SMS messages using the RapidSMS framework built on top of Django. Dimagi wrote the original code for this project, and Caktus Consulting Group, LLC currently packages and maintains it.

Visit the parent repo to learn about features, installation, and the test suite. See the full documentation for a complete overview of usage.

DataMade forked and customized rapidsms-decisiontree-app to meet the requirements of Coordinated Entry Screening (CES), a tool to help people experiencing homelessness find resources.

Customizations

This fork includes several adjustments – most notably, significant, CES-specific changes made to the data models and the handle function in the the decisiontree App.

The decisiontree App and data models

  • The CES tool returns either questions or resource recommendations. This fork renames the "Question" model as "Message" and requires a Transition (the way users navigate between survey questions) to have a next_state. See this pull request for the full conversation about these changes.
  • The CES tool also tracks user analytics, such as, identifying when users cancel a survey (i.e., by selecting "goodbye"). This fork adds a state_at_close field to the Session model.
  • Later versions of Twilio allow for messages longer than 160 characters! This fork adjusts for that.

Other notable changes

The basic functionality of the decisiontree App remains intact. However, these changes are designed to specifically cooperate with the CES tool and the DataMade fork of RapidSMS: they may not integrate easily with other implementations of rapidsms-decisiontree-app.