Project Healthcare, also known as the brokering service, is an open-source initiative aimed at integrating patient-facing applications with location-aware consultation and diagnostics services. It achieves this by providing:
- Diagnosis API to capture patient symptoms.
- Geolocation API to locate nearby healthcare facilities based on patient needs.
Built on the BlackSheep framework, it adheres to domain-driven design and uses a sandwich service model, facilitating seamless data flow between upstream providers and downstream consumer services. The platform focuses on personalized, cost-effective healthcare integration, especially for underserved and rural communities.
- Processor: Dual-core CPU (e.g., Intel Core i3 or equivalent)
- RAM: 4 GB
- Storage: 10 GB free space
- OS: Windows 10, macOS 10.15, or Linux.
- Python: 3.8+
- BlackSheep Web Framework
- SQLAlchemy
- Docker
- Poetry
python = "^3.12"
pydantic = "^2.9.1"
blacksheep = "^2.0.7"
Hypercorn = "^0.17.3"
MarkupSafe = "^2.1.3"
uvloop = {version = "^0.20.0", markers = "sys_platform != 'win32'"}
pydantic-settings = {version = "^2.3.4", markers = "sys_platform != 'win32'"}
cython = "^3.0.11"
sqlalchemy = {version="^2.0.34", markers = "sys_platform != 'win32'", extras = ["asyncio"]}
alembic = "^1.13.2"
aiosqlite = "^0.20.0"
sqlmodel = {version="^0.0.22"}
rich = {version = "^13.8.0"}
spatialite = "^0.0.3"
- Postman for endpoint testing
- Render for deployment and instance testing
- Diagnosis API: Captures patient symptoms and fetches relevant healthcare facility data.
- Geolocation API: Captures the patient's location and suggests nearby facilities.
- Explore OpenAPI Specification (OAS)
- Docker and container orchestration
- Python
- BlackSheep
- Flask
- Docker Tutorial for Beginners
- Flask Tutorial: Building APIs with Flask
- Getting Started with Blacksheep
- What is an API?
- SQLAlchemy for Beginners
- Explore SQLAlchemy Documentation
- Blacksheep OpenAPI Documentation
- Render Deployment Guide
- Presenting BlackSheep: One of Today’s Fastest Web Frameworks for Python
- Building Flask: A Step-by-Step Guide for Beginners
- SQLAlchemy ORM Tutorial
- OpenAPI Specification
- Docker In-Depth
- Clone the repository
- Install dependencies
- Run the app
Link to the README.md
A public sandbox environment is available for testing the application.
Visit: Sandbox URL
There are 2 endpoints related to diagnosis and geolocation:
-
Parameters:
X-Origin-Match-Header
(header, string)
-
Request Body (JSON format):
{ "query": "string", "query_id": { "query_id": "string" } }
-
Response:
- If the
X-Origin-Match-Header
issecret
, it returns an OK response with a 200 success code. - If the
X-Origin-Match-Header
is notsecret
, it generates an error with a 400 status code: "Invalid origin match header value provided."
- If the
-
Parameters:
X-Origin-Match-Header
(header, string)
-
Request Body (JSON format):
{ "location": { "lat": <latitude>, "lng": <longitude> }, "cust_id": { "cust_id": "string" }, "query_id": { "query_id": "string" } }
-
Response:
- If the
X-Origin-Match-Header
issecret
, it returns an OK response with a 200 success code. - If the
X-Origin-Match-Header
is notsecret
, it generates an error with a 400 status code: "Invalid origin match header value provided." - If latitude (
lat
) and longitude (lng
) are not provided with thecust_id
andquery_id
, it returns a 400 status code. - If correct
lat
andlng
are provided, it generates a 200 status code response.
- If the