Skip to main content

Decision Suite

All seven endpoints follow the same async pattern: submit a POST request, receive 202 Accepted with a job_id, then poll GET /api/v1/jobs/:id for the completed result.
These endpoints are for research, workflow assistance, and decision support only. They are not a substitute for licensed clinical judgment, radiology reads, or pharmacy verification. Validate outputs against clinical guidelines before acting on any result.
Enable step-level diagnostics by setting output.include_diagnostics: true. The completed job payload will include per-step timing and routing information. Use this for monitoring and support debugging, not for end-user UI.

Accepts patient vitals, history, and labs as JSON. Returns a risk level, time-sensitivity classification, and ranked recommended actions.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/risk-priority" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "patient_data",
      "data": "{\"vitals\":{\"hr\":110,\"bp\":\"140/90\"},\"complaint\":\"chest pain\",\"age\":58}",
      "image_data": null
    },
    "context": { "locale": "en" },
    "output": { "format": "json", "include_diagnostics": false }
  }'

Body parameters

input.type
string
required
Must be "patient_data".
input.data
string
required
JSON-stringified patient data: vitals, complaint, history, labs. Max 120,000 characters.
input.image_data
string
Optional base64-encoded or data:-prefixed image for vision-assisted analysis (HuatuoGPT when configured). Max 8 MB.
context
object
Arbitrary JSON metadata (locale, facility, etc.). Max 16,000 characters serialized.
output.format
string
"report" or "json". Defaults to "json".
output.include_diagnostics
boolean
Include step-level timing in the completed job payload. Defaults to false.

Response fields (completed job)

risk_level
string
One of "critical", "high", "moderate", or "low".
time_sensitivity
string
One of "immediate", "hours", "days", or "weeks".
next_action
string
Primary recommended next action for the care team.
Ranked list of specific action strings.
escalation_triggers
array
Conditions that should prompt immediate escalation.
priority_rank_rationale
string
Explanation of the risk classification.
risk_flags
array
Specific risk signals extracted from the patient data.
disclaimer
string
Mandatory disclaimer text.

Accepts a patient care timeline as JSON. Returns an adherence risk rating, missed follow-up items, predicted dropout window, and intervention recommendations.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/adherence" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "patient_timeline",
      "data": "{\"appointments\":[{\"date\":\"2025-01-10\",\"attended\":false},{\"date\":\"2025-02-14\",\"attended\":true}],\"medications\":[{\"name\":\"metformin\",\"last_fill\":\"2024-12-01\"}]}",
      "notes": "Patient reports difficulty affording transport to clinic."
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "patient_timeline".
input.data
string
required
JSON-stringified care timeline (appointments, medications, lab visits). Must be valid JSON. Max 200,000 characters.
input.notes
string
Optional free-text clinical notes to supplement the timeline. Max 64,000 characters.

Response fields (completed job)

adherence_risk
string
One of "high", "moderate", or "low".
next_action
string
Recommended immediate intervention action.
missed_items
array
Array of missed appointments or medications. Each item includes type, description, optional date, and severity.
predicted_dropoff_window
string
Estimated timeframe when the patient is at highest dropout risk.
intervention_recommendations
array
Specific outreach or support actions to improve adherence.
engagement_score
number
Engagement proxy between 0 (disengaged) and 1 (fully engaged).
barriers_detected
array
Identified barriers to care (e.g. transport, cost, literacy).
escalation_triggers
array
Conditions that warrant urgent care team follow-up.
risk_flags
array
Specific adherence risk signals.

Accepts free-text clinical notes and returns structured entities: symptoms, conditions, medications, risk factors, and a chronological timeline. Useful for EHR pre-population and audit workflows.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/notes-structure" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "clinical_notes",
      "data": "Patient is a 45yo female with a 3-week history of productive cough, low-grade fever, and unintentional weight loss of 4kg. Started on amoxicillin 500mg TID 1 week ago with partial improvement. PMHx: Type 2 DM (metformin 1g BD). No known allergies.",
      "format_hint": "soap"
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "clinical_notes".
input.data
string
required
The free-text clinical notes to structure. Max 64,000 characters.
input.format_hint
string
Optional hint about the note format, e.g. "soap", "discharge_summary". Max 64 characters.

Response fields (completed job)

summary
string
Concise narrative summary of the structured note.
symptoms
array
Extracted symptoms. Each item includes name, severity, onset, duration, and status.
conditions
array
Identified conditions. Each item includes name, icd_hint, status, and confidence.
medications
array
Medications mentioned. Each item includes name, dose, frequency, route, status, and start_date.
risk_factors
array
Identified risk factors. Each item includes factor and optional detail.
timeline
array
Chronological event list. Each item includes date, event, and optional detail.

Accepts a clinical situation as JSON and returns a reasoning-backed recommended action, alternatives, contraindications, and evidence references.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/decision-support" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "clinical_query",
      "data": "{\"patient\":{\"age\":72,\"weight_kg\":68},\"presentation\":\"new-onset AF with rapid ventricular rate\",\"current_meds\":[\"warfarin\",\"digoxin\"],\"eGFR\":38}",
      "guidelines": "AHA/ACC 2023 AF guidelines"
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "clinical_query".
input.data
string
required
JSON-stringified clinical situation (patient demographics, presentation, current medications, relevant labs). Must be valid JSON. Max 120,000 characters.
input.structured_data
object
Optional additional structured fields to supplement data.
input.guidelines
string
Optional reference guidelines to ground the recommendation, e.g. "AHA/ACC 2023". Max 64,000 characters.

Response fields (completed job)

Primary recommended clinical action.
reasoning
string
Detailed reasoning behind the recommendation.
confidence
number
Confidence score between 0 and 1.
alternatives
array
Alternative actions. Each item includes action, rationale, and when_to_prefer.
contraindications
array
Specific contraindications relevant to the clinical situation.
evidence_references
array
Supporting evidence. Each item includes guideline, recommendation, and strength.
red_flags
array
Warning signs requiring immediate attention.

Accepts a medication list as JSON and returns interaction warnings, contraindications, duplicate therapy flags, dosing notes, and renal/hepatic adjustment guidance.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/medication-check" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "medication_review",
      "data": "{\"medications\":[{\"name\":\"warfarin\",\"dose\":\"5mg\",\"frequency\":\"daily\"},{\"name\":\"aspirin\",\"dose\":\"100mg\",\"frequency\":\"daily\"},{\"name\":\"ibuprofen\",\"dose\":\"400mg\",\"frequency\":\"TID\"}],\"conditions\":[\"AF\",\"CKD stage 3\"],\"age\":72}"
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "medication_review".
input.data
string
required
JSON-stringified medication list including names, doses, frequencies, and relevant patient conditions. Must be valid JSON. Max 200,000 characters.

Response fields (completed job)

interactions
array
Drug-drug interactions. Each item includes drug_a, drug_b, severity, mechanism, and recommendation.
contraindications
array
Medication-condition contraindications. Each item includes medication, condition, severity, and recommendation.
duplicates
array
Duplicate therapy flags (same class or overlapping mechanism).
monitoring_recommendations
array
Specific lab or clinical monitoring items to order.
dosing_notes
array
Dose-specific guidance notes.
renal_adjustments
array
Renal dose adjustment recommendations.
hepatic_adjustments
array
Hepatic dose adjustment recommendations.
pregnancy_lactation_notes
array
Safety notes for pregnancy or lactation.
top_concerns
array
Highest-priority safety concerns for immediate attention.
summary
string
Narrative summary of the full medication review.

Accepts an imaging scan plus a modality label. Returns structured findings, a radiologist-style impression, a plain-language explanation, urgency classification, and optional measurements. Uses the MONAI sidecar for segmentation when configured.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/scan-analysis" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "medical_scan",
      "data": "data:image/jpeg;base64,<...>",
      "modality": "chest_xray",
      "clinical_question": "Rule out pneumonia in immunocompromised patient"
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "medical_scan".
input.data
string
required
Base64-encoded scan image or data:-prefixed URL. Max 8 MB.
input.modality
string
required
Imaging modality, e.g. "chest_xray", "abdominal_ct", "brain_mri". Max 64 characters.
input.clinical_question
string
Optional clinical question to focus the analysis, e.g. "Rule out pulmonary embolism". Max 4,000 characters.

Response fields (completed job)

findings
array
Structured findings. Each item includes region, description, severity, and confidence.
impression
string
Radiologist-style overall impression.
plain_language_explanation
string
Patient-friendly explanation of the scan findings.
anomalies_detected
boolean
Whether any anomalies were identified.
urgency
string
One of "stat", "routine", or "non_urgent".
Recommended next diagnostic or clinical step.
differential
array
Differential diagnoses. Each item includes condition and likelihood.
measurements
array
Quantitative measurements. Each item includes structure, value, unit, and normal_range.

Accepts a research query and optional dataset attachment. Returns analysis, statistical insights, methodology review, literature connections, and recommended next steps.

Request

curl -sS -X POST "$PI_BASE_URL/api/v1/health/research-assist" \
  -H "Authorization: Bearer $PI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "type": "research_query",
      "data": "{\"question\":\"Does early mobility in ICU patients reduce ventilator days?\",\"study_type\":\"RCT\",\"population\":\"mechanically ventilated adults\",\"outcome\":\"ventilator-free days at 28 days\"}",
      "dataset": null
    },
    "output": { "format": "json" }
  }'

Body parameters

input.type
string
required
Must be "research_query".
input.data
string
required
JSON-stringified research query. Include question, study_type, population, and outcome fields where applicable. Must be valid JSON. Max 100,000 characters.
input.dataset
string
Optional base64-encoded dataset attachment for analysis. Max 8 MB.

Response fields (completed job)

analysis_summary
string
Narrative summary of the research analysis.
statistical_insights
array
Statistical findings. Each item includes test, result, interpretation, and p_value.
methodology_review
object
Includes strengths, weaknesses, and suggestions arrays.
literature_connections
array
Related literature. Each item includes topic, summary, and citations.
Suggested follow-on research or validation steps.
limitations
array
Identified limitations of the current analysis.