Skip to main content

What is JSON Schema?

JSON Schema is a standard for defining the structure of JSON data. Think of it as a “mold” or “template” that you tell the API to fill with data extracted from clinical text. Analogy: If clinical text is shapeless clay, JSON Schema is the mold you define for the API to give it the exact shape you need.

Requirements

  • Version: Must use JSON Schema Draft-07
  • Mandatory indicator: Include "$schema": "http://json-schema.org/draft-07/schema#"
  • Supported types: object, array, string, number, boolean, null

Basic schema


Special annotation: source

Standard and custom nomenclatures

You can annotate fields with "source" to indicate the specific dataset or version you want to use:

Supported standard sources


Custom sources by hospital center

Does your HIS/EHR use proprietary codes?

We can train specialized models with your internal nomenclatures.

Real use cases

1. Medication codes

Pharmacy system with NDC codes, RxNorm, or internal nomenclature:

2. Diagnostic test codes

Codes from your radiology system (RIS) or internal laboratory:

3. Custom center templates

Specific fields from your medical record or internal registries:

How to activate custom sources?

  1. Share your catalog/nomenclature:
    • Excel file, CSV, or database dump
    • Include: code, description, synonyms if applicable
  2. Our team trains the model:
    • Estimated time: 2-4 weeks
    • Validation with test cases from your center
  3. Specify your custom source:
    • Use the identifier we provide
  4. The API returns codes in your nomenclature:
    • No post-processing
    • Ready for your system
Benefit: Zero friction. Data comes out in the exact format your HIS/EHR expects.

Tips for effective schemas

Best practices

1. Be specific in descriptions
2. Use required for mandatory fields
3. Add examples to guide the model
4. Use enum for predefined values
5. Validate formats when possible

Common errors

1. Vague schemas
2. Omitting descriptions
3. Not using source for codes

Complete examples

Example 1: Minimum Basic Dataset (MDS)

Example 2: Structured consultation note

Example 3: ICU record


Schema validation

Online tools

Validate your schema before using it:

Code validation

Python:
JavaScript:

Next steps

View practical examples

Complete schemas with requests and responses

Request structure

How to send the schema

Error handling

422 errors for invalid schemas