Code Monkey home page Code Monkey logo

healthtools.ke-api's Introduction

HealthTools.KE-api

HealthTools Kenya API to retrieve, structure and return data being used by the health tools. It provides data on the following medical officer registries:

Specifications

Specification for the API is shown below. It is an open api and requires no authentication to access.

EndPoint Allowed Methods Functionality Parameters
/doctors/search.json GET Search a doctor by the name q=[name]
/nurses/search.json GET Search a nurse by the name q=[name]
/clinical-officers/search.json GET Search a clinical officer by the name q=[name]

Installation

Clone the repo from github $ git clone [email protected]:RyanSept/HealthTools.KE-api.git

Change directory into package $ cd HealthTools.KE-api

Install the dependencies by running $ pip install -r requirements.txt

Install Memcached

  • If on linux follow this link
  • On mac use brew install memcached

You can set the required environment variables like so

$ export APP_DEBUG=<False> # True or False
$ export MEMCACHED_URL=<memcache_url:port> # defaults to 127.0.0.1:8000
$ export GA_TRACKING_ID=<google-analytics-tracking-id>
$ export SMS_USER=<sms-provider-user-id>
$ export SMS_PASS=<sms-provider-passcode>
$ export SMS_SHORTCODE=<sms-provider-shortcode>
$ export SMS_SEND_URL=<url-for-sms-provider>
$ export AWS_ACCESS_KEY=<aws-access-key-id>
$ export AWS_SECRET_KEY=<aws-secret-key>
$ export ES_HOST=<elasticsearch_host_endpoint> (DO NOT SET THIS IF YOU WOULD LIKE TO USE ELASTIC SEARCH LOCALLY ON YOUR MACHINE)
$ export ES_PORT=<elasticsearch_port>
$ export ES_INDEX=<elasticsearch_index>

If you want to use elasticsearch locally on your machine use the following instructions to set it up

For linux and windows users, follow instructions from this link

For mac users run brew install elasticsearch on your terminal

Run memcached on your terminal $ memcached -p <port you set MEMCACHED_URL to run on>(default: 8000)

If you set up elasticsearch locally run it $ elasticsearch

You can now run the server $ python manage.py or gunicorn manage:app for production.

Running the tests

Run memcached on your terminal $ memcached -p <port you set MEMCACHED_URL to run on>(default: 8000)

make sure if you use elasticsearch locally, it's running

Use nosetests to run tests (with stdout) like this: $ nosetests --nocapture

healthtools.ke-api's People

Contributors

ryansept avatar davidlemayian avatar gathondu avatar andela-mabdussalam avatar chegejames avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.