Skip to content

Reference Implementation of the IHE Standardized Operational Log of Events (SOLE) Standard

License

Notifications You must be signed in to change notification settings

mohannadhussain/ihe-sole-repo

Repository files navigation

Reference implementation of the IHE SOLE Standard

Built using PHP v7 and the SLIM v3 framework. 100% Work in progress!

Usage

Soon, a copy of this will be hosted by the SIIM Hackathon for anyone to use with a free API key. Otherwise, you can choose to host your own copy by following the installation instructions below.

Submit bulk events

POST the JSON representation of your events to /bulk-syslog-events. Look in the samples directory for some sample events to play with. Example below using curl in BASH:

curl --request POST \
  --url http://localhost:8000/bulk-syslog-events \
  --header 'accept: application/json' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data 'YOUR_JSON_EVENTS_HERE'

You will not get any content back, only HTTP response codes as explained here:

  • 204 all went well!
  • 400 Known error (status message to explain, e.g. malformatted JSON)
  • 500 Unkown error, see logs/app.log for more information.

Installation instructions

Easy method: Docker (thanks to @ctoland) - Good for getting it up and running with minimal work

Docker and Docker Compose required. Visit docker.com for installation instructions for your platform.

Installation of composer modules.

Run from base of the repository.

docker-compose run composer

Run the DB and Webserver

Run from base of the repository.

docker-compose up

You may add a -d to run in the background.

URLs:

http://localhost/bulk-syslog-events

Additional information for the headers for the POST provided in main README.md

Hard method: Full-installation - Good for development/code modification ease

Pre-requisites

  • Web server, e.g. Apache HTTP Server or NGINX
  • Any plug-ins/dependencies necessary for your web server to execute PHP code
  • Composer for PHP dependency management
  • PostgreSQL Database - others (e.g. MySQL) may work, but I have not attempted to use them.
  • SQL Power Architect to visualize the database schema and export database creation SQL script. The free edition is sufficient for our needs here.

Installation steps

  • In SQL Power Architect, open db-schema/sole-repo.architect then click Tools->Forward Engineer select PostgreSQL as the type then click OK. If you are prompted about any warnings/errors click to Ignore Warnings. Copy the SQL script shown.
  • In your favourite PostgreSQL management tool (psql, PhpPgAdmin, PgAdmin...etc), create a new database and user (defaults are ihesole for DB name, username and password). Then past and execute the SQL script from the step above.
  • In the project directory, run composer install to download all dependencies
  • Deploy to your web server, which could mean copying/moving the project to the web server, using a symlink or other ways.
  • Using tools like curl or Postman, you should be able to use the RESTful API.

Want to contribute?

Please fork, make changes as appropriate and submit a pull request.

License

MIT license - see LICENSE for verbiage.

About

Reference Implementation of the IHE Standardized Operational Log of Events (SOLE) Standard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published