Skip to content

Latest commit

 

History

History

tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Tools

A variety of handy bash, SQL, and Python scripts. See below for a quick description of each file.

amazon_ec2_setup

Installs and launches a Buendia OpenMRS server on an Amazon EC2 instance. (This script first installs all the necessary dependencies and yum packages, then runs openmrs_setup, openmrs_build, and openmrs_run.)

buendia_concept_dictionary.sql

A SQL file containing the concepts that were added and edited for Buendia. Generated by dump_new_concepts_sql.py.

clear_server.sql

A SQL script that resets an OpenMRS database to an empty state (no patients, observations, encounters, orders, or visits).

convert_to_json.py

Wraps an XML XForm instance in a JSON object for posting via REST. Inverse of convert_to_xml.py.

convert_to_xml.py

Extracts the XML XForm instance from a JSON object wrapper. Inverse of convert_to_json.py.

dedupdeb

Removes packages whose current version is unchanged from the previous version. (Typically run after building all the packages.)

demo-0.2-patients-merged.json

Demo data with a few patients. Input for generate_site_sql.py.

demo.json

Minimal demo data. Input for generate_site_sql.py.

diffdeb

Compares two .deb files to see if they are the same in all their contents except for the version number declared in the control file. Used by dedupdeb.

download_java_deps

Download the various OpenJDK package dependencies to a given directory. Currently, this gets openjdk-7 from experimental, tomcat7 from jessie, and some of their dependencies from sid. Downloads files for both amd64 and i386.

See the openjdk-7.md documentation file for more details.

dump_new_concepts_sql.py

Examines an OpenMRS database, using some heuristics to find all the concepts we have added or edited beyond the standard CIEL concepts, and dumps that data to a SQL file (see buendia_concept_dictionary.sql).

fetch

Fetches a file from a URL to a local path. Files are cached in /tmp and the network download is skipped if the requested file is already in the cache.

fetch_circleci_artifacts

Downloads the artifacts from the latest successful build of a given project and branch on CircleCI.

generate_concept_remapping_sql

Given a directory full of *.sql table schemas, produces the SQL commands to renumber concept_ids according to a concept_renumbering table.

generate_site_sql.py

Takes a JSON description of some data (such as demo.json) and generates a SQL script that will construct the entities (users, patients, observations, locations, and concepts) in the JSON file in the various OpenMRS tables.

generate_stress_data.py

A script that was never written.

generate_user_remapping_sql

Given a directory full of *.sql table schemas, produces the SQL commands to replace all the foreign key references to users.user_id with @buendia_admin.

get_package_version.sh

Print a suitable Debian package version number based on the current build situation.

get_patients

Uses HTTP to fetch all the patients from an OpenMRS server using the Buendia API, and prints out each patient record as a JSON object.

install_omod

Installs a Buendia OMOD on an OpenMRS server, replacing any existing Buendia module, and restarts the server to apply the change.

index_debs

Indexes a particular suite of Debian packages within a given apt repository directory.

make_fresh_dump.sh

Produces a cleaned snapshot of an entire OpenMRS database as a zip file of SQL dumps. "Cleaned" means the snapshot has been cleaned by clear_server.sql and contains no patients or observations.

make_release_package.sh

Constructs a zip package containing the specified RC (release candidate) builds of the client APK and the server module, together with scripts to provision them onto an Edison. Takes as input a cleaned database dump and the site-specific initialization SQL.

mkdeb

Builds a Debian .deb package from a control file and data files.

openmrs_account_setup

Sets up an OpenMRS user with a given username and password.

openmrs_build

Builds the Buendia module and installs it in an OpenMRS development server.

openmrs_dump

Dumps an entire MySQL database as a zip file containing a SQL dump of each table and a SQL script to load all the tables into a database.

openmrs_ensure_sdk

Ensures that the OpenMRS SDK has been installed and configured.

openmrs_load

Loads a dump file (produced by openmrs_dump) into a MySQL database.

openmrs_run

Starts a local OpenMRS server for development. Typically used after openmrs_build.

openmrs_setup

Sets up a local OpenMRS server with a MySQL database, for development. A typical sequence of commands is openmrs_setup, then openmrs_build, then openmrs_run.

post_patients

Generates some fake patient records and posts them to the Buendia API. Typically used to fill up a database with some dummy data for load testing purposes.

prepare_gce_for_demo.sh

Sets up a GCE instance with demo data (such as demo.json).

profile_apply

Given a Buendia profile (a CSV file), constructs the charts, forms, and concepts described by the profile in the MySQL database. This script is invoked when you click the "Apply" button on the "Manage Buendia Profiles" page.

profile_validate

Performs a cursory check that a given CSV file has the general form of a Buendia profile.

purge_older_packages

Scans a Debian apt pool stored in Git and destructively removes all but the n newest versions of each package. Intended primarily to be run from CI. Use with extreme caution.

remote-execution.sh

A collection of useful Bash functions for running shell commands on a remote host.

stress-testing/

This directory contains scripts for stress-testing a Buendia server.

test-form.csv

A Buendia profile containing a form with some basic fields for testing.

test_patient_id_duplication

A stress-testing script that attempts to rapidly and concurrently post patients with duplicate IDs to a Buendia API, to verify that the Buendia server correctly enforces uniqueness of patient IDs in its database.

trigger_archive_update

Manually triggers a rebuild for the projectbuendia.github.io apt repo in CircleCI. Intended as an aid to CI development.

update_apt_archive

Copies Debian packages into an apt repository which is also a Github repository from a given source path, deduplicates the packages, re-indexes the apt repository, then commits the changes to git and pushes the whole mess up to Github. Currently, we are using the gh-pages branch of the projectbuendia/builds project, which points to https://projectbuendia.github.io/builds/.

warmup

Makes some requests to a Buendia API to confirm that it's running and available. When a server has been idle for a while, or has just booted, issuing these requests has the side effect of warming up the server so it is ready to respond more quickly to the next request.