Open Compute - utilities by Jori Health
Project description
open-compute
Utilities by Jori Health. Provides:
jori_health.ai: simple AI facadeopen_compute: conversion agents between FHIR and patient journey
Requirements
- Python 3.9+
Install
Option A: Install directly from GitHub
pip install git+https://github.com/jori-health/open-compute.git
Option B: Install from a local clone (editable)
git clone https://github.com/jori-health/open-compute.git
cd open-compute
python -m venv .venv
. .venv/bin/activate
python -m pip install -U pip
python -m pip install -e .
Once published to PyPI you will be able to run:
pip install open-compute
Quickstart
AI facade: default instance
from jori_health.ai import joriai
print(joriai.ask("hello")) # -> "world"
print(joriai.ask("How are you?")) # -> "Echo: How are you?"
Or create your own instance
Open Compute: FHIR <-> Patient Journey
from open_compute import (
FHIRPatientData,
PatientJourney,
JourneyStage,
fhir_to_journey,
journey_to_fhir,
)
# FHIR -> Journey
bundle = FHIRPatientData(entries=[
{"resource": {"resourceType": "Patient", "id": "pat-123"}},
{"resource": {"resourceType": "Encounter", "status": "finished", "reasonCode": [{"text": "Annual physical"}]}},
{"resource": {"resourceType": "Observation", "code": {"text": "Blood Pressure"}, "valueString": "120/80"}},
])
journey = fhir_to_journey(bundle)
print(journey.patient_id) # "pat-123"
print([s.name for s in journey.stages]) # ["Registration", "Encounter", "Observation"]
# Journey -> FHIR
journey2 = PatientJourney(
patient_id="pat-123",
stages=[
JourneyStage(name="Encounter", description="Follow-up", metadata={"status": "in-progress"}),
JourneyStage(name="Observation", description="Heart Rate", metadata={"value": "72 bpm"}),
],
)
bundle2 = journey_to_fhir(journey2)
print(len(bundle2.entries)) # 3
from jori_health.ai import JoriAI
ai = JoriAI()
print(ai.ask("hello")) # -> "world"
Testing locally (optional)
pytest -q
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_compute-0.1.0.tar.gz.
File metadata
- Download URL: open_compute-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f81346c5df6ea982bfb93aed5a0560af937924088062b8f09c8a59e3d305411
|
|
| MD5 |
077734d91e7468fd4478cf7b31cfef73
|
|
| BLAKE2b-256 |
790156855cfd90246c2be437b54db65a2b5ae71ce84ed9facb9202e64392a55f
|
Provenance
The following attestation bundles were made for open_compute-0.1.0.tar.gz:
Publisher:
publish.yml on Jori-Health/Open-Compute
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_compute-0.1.0.tar.gz -
Subject digest:
1f81346c5df6ea982bfb93aed5a0560af937924088062b8f09c8a59e3d305411 - Sigstore transparency entry: 622283090
- Sigstore integration time:
-
Permalink:
Jori-Health/Open-Compute@79d276fb045020ca33701cfdd8512aa818678fd3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Jori-Health
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79d276fb045020ca33701cfdd8512aa818678fd3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file open_compute-0.1.0-py3-none-any.whl.
File metadata
- Download URL: open_compute-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e38a9f1d604605ec20f24704d4bc2f4c8b86a953e5b8c13cfd3c2ebf5781d8e
|
|
| MD5 |
ee056586df0b73b053af42c9476fda6c
|
|
| BLAKE2b-256 |
bf8d147b5e7b0fcd62a4a08ef321e09867c0eb0308177378ced2375757658020
|
Provenance
The following attestation bundles were made for open_compute-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Jori-Health/Open-Compute
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_compute-0.1.0-py3-none-any.whl -
Subject digest:
3e38a9f1d604605ec20f24704d4bc2f4c8b86a953e5b8c13cfd3c2ebf5781d8e - Sigstore transparency entry: 622283104
- Sigstore integration time:
-
Permalink:
Jori-Health/Open-Compute@79d276fb045020ca33701cfdd8512aa818678fd3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Jori-Health
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79d276fb045020ca33701cfdd8512aa818678fd3 -
Trigger Event:
release
-
Statement type: