Feature/reversing distribution

Reversing distribution to patient and to service
This code is nicely formatted.  However, is it necessary to use a function here?  What is the difference between these two lines of code:
```javascript
function renderSql() {
  return "SELECT column1, columns2, FROM table WHERE id = 1;";
}
sql = renderSql();

// versus
sql = "SELECT column1, columns2, FROM table WHERE id = 1;";
```

I do not see an advantage to the functions `genSql()` and `preSql()`.  They can easily be defined as strings.