Resource browser
Browse and edit any FHIR resource as JSON or YAML
EditHistory Save JSONYAML
123456789
{ "resourceType": "Patient", "name": [ { "given": [ "Ada" ], "family": "Smi" } ], "gender": "female", "birthDate": "1985-04-12" }
Editing · unsavedPatient/1456994b
HistoryCollections GET New request
GET /fhir/Patient?family=Smith&_count=1 Send
Request: RawParamsHeadersBody JSONYAML
123
GET /fhir/Patient?family=Smith&_count=1 Content-Type: application/json Accept: application/json
Response:BodyHeaders200 OK · 14 ms
12345678910111213
{ "resourceType": "Bundle", "type": "searchset", "total": 1, "entry": [ { "resource": { "resourceType": "Patient", "id": "1456994b", "name": [ { "use": "official", "family": "Smith", "given": [ "Ada" ] } ], "gender": "female" } } ] }
HistoryStructureQueries New query
RUN FETCH SIZE 10
123456
-- Query FHIR JSONB straight from PostgreSQL select id, resource#>>'{name,0,family}' as family, resource#>>'{name,0,given,0}' as given, resource->>'birthDate' as birth_date from patient where resource#>>'{name,0,family}' = 'Smith'
id
family
given
birth_date
1456994b
Smith
Ada
1985-04-12
9b2c4d1e
Smith
Grace
1990-11-03
7f3a8c5d
Smith
Alan
1978-06-23
3 rows · 12 msSQL on FHIR · read-only
SQLQuery BuilderLineageEdit RUN Save
DEPENDENCIES
riskSQLVIEWhttp://demo.aidbox/Library/sv-cvd-risk
PARAMETERS
min_scoreinteger5
SQL
123456
SELECT CASE WHEN age < 50 THEN '40-49' WHEN age < 60 THEN '50-59' WHEN age < 70 THEN '60-69' ELSE '70-79' END AS age_group, count(*) AS patients FROM risk WHERE risk_score >= :min_score AND on_statin = 0 GROUP BY 1 ORDER BY 1
TableListChart
age_group
patients
40-49
6
50-59
3
60-69
7
70-79
5
Save a copy Share
COMMUNITY

CVD Risk — dependency graph demo

ViewDefinition → SQLView → SQLQuery graph computing CVD risk on synthetic data, with pie / bar / butterfly / line charts.

The cohort

A synthetic cohort of 60 patients aged 40–79, roughly half male and half female. No one here is a real person — everything is produced by a small deterministic generator, but using the same real coding systems a Synthea export would (LOINC, SNOMED CT, RxNorm).

Each patient carries exactly the inputs a cardiovascular risk score needs:

  • Systolic blood pressure (LOINC 8480-6) and total cholesterol (LOINC 2093-3) — six quarterly readings each.
  • HDL cholesterol (LOINC 2085-9) — a single recent value.
  • Smoking status (LOINC 72166-2) — about 1 in 4 are current smokers.
  • Diabetes and hypertension as Condition resources (SNOMED).
  • Statin therapy as a MedicationRequest (RxNorm).

Every resource is tagged cohort = cvd-demo, so the views below see only this cohort.

1. Load the cohort

One transaction bundle creates everything in a single POST: the 60 patients with their observations, conditions and medications, plus the ViewDefinition / SQLView / SQLQuery definitions used below.

RESTSEND
12345678
POST /fhir Content-Type: application/json { "resourceType": "Bundle", "type": "transaction", "entry": [ { "resource": { "resourceType": "ViewDefinition", "id": "vd-patient", "resource": "Patient" } }, … 60 patients + observations + conditions ] }

2. The data, flattened (ViewDefinition)

Each cell shows one slice of the cohort as a plain table, read straight from the FHIR resources.

ViewDefinitionRUN
Patient demographics
Flat projection of cohort patients: one row per Patient with id, administrative gender and birth date.
Result (60)
patient_id
gender
birth_date
pt-018
female
1984-06-15
pt-019
male
1962-06-15
pt-020
female
1967-06-15
pt-021
male
1976-06-15
pt-022
male
1950-06-15

3. One row per patient (SQLView)

Here the per-measurement history is reduced to the latest value per patient, and each patient gets a cardiovascular risk score and a category.

SQLViewRUN
Patient risk factors (latest values)
One row per patient with the latest systolic BP, total cholesterol and HDL plus smoking, diabetes and statin flags.
Result (60)TableChart
Search packages by name or description…Package
app.aidbox.main0.0.1
Main Aidbox FHIR package that stores canonical resources created via the API.
#direct#ig
hl7.fhir.r4.core4.0.1
Definitions (API, structures and terminologies) for the R4 version of the FHIR standard
#direct#fhir.core
hl7.fhir.us.core3.1.1
HL7 International — US Realm Steering Committee
#direct#fhir.ig
io.health-samurai.core.r40.0.0-snapshot
Health Samurai Aidbox infrastructure resources
#system#ig
io.health-samurai.sdc.r40.0.0-snapshot
Health Samurai SDC (Structured Data Capture) resources
#system#ig