This project contains all scripts to fetch and store data as well as a fully functioning API to fetch this data.
The project is based on PHP 8.3, API-Platform 3.4 and Symfony 6.4
Live API is available at https://data.instamed.fr.
Six types of data are currently available:
- The RPPS (Répertoire Partagé des Professionnels de Santé) contains all the data of French health professionals.
- Contains all the data of allowed drugs on the French market.
- Contains all data from the OMS CIM-10 database.
- Contains all known allergens.
- Contains all the medical acts and their reimbursement rates by the social security.
- Contains a database of medical acts.
Prerequisites:
- Have docker installed
- Have docker-compose installed
Installation:
-
Clone the repository:
git clone [email protected]:instamedsolutions/rpps_api.git
-
Navigate to the project directory:
cd rpps_api
-
Create an empty SQLite file that will be used by Docker:
touch test_db.sqlite
-
Start the Instamed project to ensure the instamed network is up.
-
Start the Docker services for this project:
docker-compose up -d
-
Access the shell in the rpps-database container and install Composer dependencies:
make shell composer install
Setup with test data:
Duration: ~10/15 minutes
$ make setup-dev
To run the docker environment you can start the docker server with the following command :
docker-compose up
Then here are some useful commands
# Starts a bash session in the container
make shell
# Install a composer package
make composer-require package='name/of/your/package'
# Runs the doctrine migrations
make migrate:
# Creates a new doctrine migration
make create-migration:
All code is tested using phpunit All test files are in the tests/ folder in 3 sub folders :
- Unit : Contains all unit tests of the project
- Integration : Contains all the integration tests of the project
- Functional : Contains all the functional tests of the project
To run the tests, run the command
make phpunit