Skip to main content
Challenge

Build a Mastra AI Health Stack Record Validation Workflow

National Digital Health Stacks require interoperable validation of diagnostic health records before committing to citizen health lockers. Build a Mastra AI TypeScript workflow that validates diagnostic metrics against Fast Healthcare Interoperability Resources (FHIR) specifications with 100% schema accuracy.

Business OperationsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Construct a Mastra AI TypeScript workflow that parses incoming diagnostic health records and verifies FHIR specification compliance.

Delivery guide

How work is evaluated

Evaluation

Evaluates FHIR JSON validation precision and anomaly identification accuracy.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

fhir_check

Verifies FHIR schema validation flag

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

validation_accuracy

Accuracy of FHIR compliance classification • target: 1 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Create Mastra AI TypeScript agent workflows for healthcare telemetry parsing

  • Implement FHIR DiagnosticReport schema validation rules

  • Store verified patient records in Mastra persistent state storage

  • Generate automated compliance logs for digital health network nodes

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic digital health diagnostic report payloads adhering to public FHIR definitions.

Challenge setup

Evaluates FHIR JSON validation precision and anomaly identification accuracy.

Challenge input

JSON diagnostic lab payload

Mastra AI

TypeScript workflow state management framework

Evaluated output

JSON validation result with fhir_compliant and anomaly_detected

Evaluation checks
  • Verifies FHIR schema validation flag
  • Accuracy of FHIR compliance classification • target: 1 • range: 0-1
Configured evaluation evidence
  • Benchmark: Healthcare Data Interoperability Benchmark
  • Validation Accuracy target: 1
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
  • Agno · Optional
  • BoTorch · Optional
Orchestration
  • Mastra AI · Required
  • Agno · Optional

Evaluation contract

  • fhir_check · Weight 1
  • validation_accuracy · Weight 1

Metrics

  • validation_accuracy · Target 1

Benchmarks

  • Healthcare Data Interoperability Benchmark
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON diagnostic lab payload

    Output: JSON validation result with fhir_compliant and anomaly_detected

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build a Mastra AI Health Stack Record Validation Workflow