# ceddcozum / childmetrics

Pediatric clinical calculators from the terminal. 32 tools for growth, neonatal, bone mineral, diabetes, puberty, organ size, blood pressure, and more.

All calculations run locally — no API keys, no network requests, no patient data transmitted.

Also available as `childmetrics` (same behavior; see [`childmetrics-pkg/README.md`](./childmetrics-pkg/README.md) for the alias package):

```bash
npx childmetrics --list
```

## Install

```bash
# Run directly (no install)
npx ceddcozum --list

# Or install globally
npm install -g ceddcozum
# or
npm install -g childmetrics
```

## Usage

```bash
# Simple key=value syntax
ceddcozum auxology sex=male age=5.5 height=110 weight=19

# JSON args (for LLM agents)
ceddcozum auxology --args '{"sex":"male","age":5.5,"height":110}' --format json

# Growth hormone with brand name
ceddcozum growth-hormone weight=25 'usagePattern=her gün 2 mg' concentrationIU=30

# View tool schema (OpenAI function format)
ceddcozum auxology --schema

# Export all schemas for LLM tool-calling
ceddcozum --schemas
```

## Commands

| Command | Description |
|---------|-------------|
| `ceddcozum --list` | List all 32 available tools |
| `ceddcozum <tool> key=value ...` | Run a calculator |
| `ceddcozum <tool> --args '{...}'` | Run with JSON args |
| `ceddcozum <tool> --schema` | Show tool schema (OpenAI format) |
| `ceddcozum --schemas` | Dump all schemas |
| `--format human` | Human-readable output (default) |
| `--format json` | JSON `ToolResult[]` array |

## LLM Agent Integration

```bash
# 1. Get schemas for your LLM system prompt
ceddcozum --schemas > tools.json

# 2. Agent decides to call a tool
ceddcozum auxology --args '{"sex":"female","age":3,"height":92}' --format json

# 3. Parse JSON array — each item has: label, value, unit?, sds?, percentile?
```

## ToolResult Schema

```typescript
interface ToolResult {
  label: string       // Human-readable label
  value: string       // Computed value
  unit?: string       // Unit of measurement
  sds?: number        // Standard deviation score
  percentile?: number // Percentile (0-100)
}
```

## License

Apache License 2.0 — see [LICENSE](./LICENSE).

Copyright 2026 ÇEDD (Çocuk Endokrinolojisi ve Diyabet Derneği) / TSPED (Turkish Society for Pediatric Endocrinology and Diabetes).

Attribution is required when using or redistributing this software. See [NOTICE](./NOTICE) for details.
