npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@clinicalhelper/clinicalhelper

v0.1.9

Published

practice management for mental health

Downloads

11

Readme

Clinical Helper is a cloud-ready mental health practice management application that runs a Nodejs backend accessing a MySQL database and a React web application user interface. These components are available on NPM and github

clinicalhelper: https://github.com/clinicalhelper/clinicalhelper https://www.npmjs.com/package/@clinicalhelper/clinicalhelper

clinicalhelperclient: https://github.com/clinicalhelper/clinicalhelperclient https://www.npmjs.com/package/@clinicalhelper/clinicalhelperclient

The Clinical Helper application has been tested and verified on the AWS HIPAA reference architecture.

For a quick tour of the Clinical Helper application click here. For detailed information on simplenodeorm see simplenodeorm.pdf

A typical Clinical Helper deployment architecture would consist of:

  1. Ubuntu 19 server
  2. Nodejs 13
  3. apache2 web server
  4. MySQL 8

To get started:

  • Setup an Ubuntu 19 server with the applications listed above.
  • Clone the clinicalhelper application to the desired location
  • From the clinicalhelper directory run "npm update" to pull in the required dependencies
  • Modify the appconfig.json file found in <clinicalhelper-install-location> and modify the various path entries as required:
   {
     "testMode" : false,
     "dbConfiguration" : "/<install-location>/clinicalhelper/dbconfig/dbconfig.json",
     "defaultMaxJoinDepth" : 4,
     "defaultDesignTableDepth": 4,
     "createTablesIfRequired" : false,
     "apiPort" : 8888,
     "logFile" : "/<install-location>/clinicalhelper/logs/clinicalhelper.log",
     "logLevel" : "info",
     "maxRowsForGetAll" : 1000,
     "authorizer": "auth/ClinicalHelperAuthorizer",
     "chartjsurl": "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js",
     "ormModuleRootPath": "orm",
     "context": "clinicalhelper",
     "queryDocumentRoot" : "/<install-location>/clinicalhelper/reports/docs/queries",
     "reportDocumentRoot" : "/<install-location>/clinicalhelper/reports/docs/reports",
     "reportDocumentGroupsDefinition": "/<install-location>/clinicalhelper/reports/docs/report-document-groups.json",
     "queryDocumentGroupsDefinition": "/<install-location>/clinicalhelper/reports/docs/query-document-groups.json",
     "formCacheTimeout": 3660,
     "reportCacheTimeout": 3660,
     "lookupListCacheTimeout": 600,
     "reportHierarchyCacheTimeout": 3660,
     "defaultCacheTimeout": 60,
     "sessionCacheTimeout": 3660,
     "websiteUrl": "<clinical-helper-client-url>,
     "redisCache": false,
     "redisClusterPort": 0,
     "redisClusterHost": "",
     "aliases" : {}
   }
   

For more information on the appconfig.json settings see the simplenodeorm documentation simplenodeorm.pdf

  • Update the dbconfig.json found at /<install-location>/clinicalhelper/dbconfig/dbconfig.json to setup the connection pool:
   {
   	"pools": [
   		{
   			"dbtype": "mysql",
   			"host": "localhost",
   			"user": "<my-user>",
   			"poolAlias": "<my-poolalias>",
   			"password": "<my-password>",
   			"database": "clinicalhelper",
   			"supportBigNumbers": true,
   			"waitForConnections": true,
   			"connectionLimit": 20
   		}
   	]
   }

Utilities for generating the Clinical Helper database are found in /<install-location>/clinicalhelper/dbconfig clinicalhelper.sql practice-update.sh

Create an in input data initialization file with data as follows:

   SCHEMA_NAME="my-db-schemaname"
   DBUSER_NAME="my-db-username"
   PRACTICE_NAME="my-practice-name"
   SUPER_USER_ROOT_PASSWORD="application-super-user-password"
   SUPER_USER_PASSWORD=`echo -n "$SUPER_USER_ROOT_PASSWORD" | md5sum | sed 's/ .*$//'`
   DBUSER_PASSWORD="my-database-password"
   PRACTICE_ADDRESS="my-practice-address"
   PRACTICE_CITY="my-practice-city"
   PRACTICE_STATE="my-practice-state-abbreviation"
   PRACTICE_ZIP="my-practice-zipcode"
   PRACTICE_PHONE="my-practice-phonenumber"

From a location that contains clinicalhelper.sql, practice-update.sh and the data file run the following from the the command line:

./practice-update.sh init.data

This will generate a file named init.sql that you can use to initialize the Clinical Helper schema.

  • Test the clinicalhelper setup by running "node ClinicalHelper.js" from the clinicalhelper directory. You should see output similar to the following:
   info: creating connection pools...
   info:     <my-poolalias> connection pool created
   info: loading api ORM definitions...
   info: loading orm definitions...
   info: orm definitions loaded
   info: ORM definitions loaded 
   info: starting api server...
   info: ClinicalHelper server started
   info: api server is live on port 8888
  • Kill the currently running ClinicalHelper instance
  • Install the pm2 process manager by running "npm install pm2 -g"
  • From the clinicalhelper directory run "pm2 start ClinicalHelper.js"
  • Run "pm2 startup" - this will output a command that you will need to copy and run from the command line.
  • Run "pm2 save" - Clinical Helper should now run on startup. You can also run "pm2 status" and "pm2 stop ClinicalHelper"
  • Configure apache2 to proxy requests to the clinicalhelper nodejs backend by adding something the following to the appropriate apache2 conf file:
    <VirtualHost 10.0.0.3:443>
        DocumentRoot /var/www/html
        SSLEngine on
        SSLCertificateFile /<clinicalhelper-install-location>/clinicalhelper/cert/server.crt
        SSLCertificateKeyFile /<clinicalhelper-install-location>/clinicalhelper/cert/server.key
       ProxyRequests off
        ProxyPreserveHost on
        ProxyVia Full
        <Proxy *>
            Require all granted
        </Proxy>
    
        <Location /node>
            ProxyPass http://localhost:8888
            ProxyPassReverse  http://localhost:8888
        </Location>
        <Directory "/var/www/html">
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
  • Clone the clinicalhelperclient repository and modify the appconfig.json file found at /<clinicalhelperclient-install-location>/src/appconfig.json
  • Run "npm update" to pull in required dependencies
  • Modify the following entry in appconfig.json: "apiServerUrl": "http://<your-host>/node",
  • Run the npm run build command to build a production react build. Copy everything under the generated /<clinicalhelperclient-install-location>/build folder to /var/www/html on the ubuntu server.
  • Restart the apache2 service ensure you can pull up the clinicalhelper app by pulling up url https://<your-host>?context=your-pool-alias
  • You should be able to login with username=system and password=password-created-during-db-init