Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```bash
# Development
bun install # Install dependencies
bun test # Run all tests
bun test # Run all tests
bun test --watch # Run tests in watch mode
bun test --coverage # Run tests with coverage
bun run typecheck # Type check the codebase
Expand All @@ -22,6 +22,19 @@ bun run cli typeschema generate hl7.fhir.r4.core@4.0.1 -o schemas.ndjson
bun run cli generate typescript -i schemas.ndjson -o ./types
```

## Verification

After any code change, run at minimum:
```bash
bun run typecheck && bun run lint && bun test
```

For full verification including example generation and cross-project type checking:
```bash
make all
```
This runs: tests, lint with auto-fix, and all example generation pipelines (TypeScript R4, CCDA, SQL-on-FHIR, C#, Python, Mustache).

## Architecture Overview

This is a FHIR code generation toolkit with a **three-stage pipeline**:
Expand Down Expand Up @@ -69,6 +82,13 @@ FHIR Package → TypeSchema Generator → TypeSchema Format → Code Generators
- **Generated code**: Output goes to `generated/` directory
- **Utilities**: Common functions in `src/utils.ts` and `src/typeschema/utils.ts`

## General Principles

- Bias toward action: start making changes directly. Do not write plan files, explore the entire codebase, or use Task sub-agents unless explicitly asked.
- Keep changes minimal and focused. Do not over-engineer (no extra abstractions, generics, or variants beyond what was requested). When in doubt, do the simplest thing that works.
- Only modify files and directories that were explicitly mentioned or are directly required by the change. Do not refactor surrounding code.
- When asked to review or explain code, explain first before proposing fixes. Do not jump to making changes unless explicitly asked to fix something.

## Development Guidelines

### TypeScript Configuration
Expand Down
57 changes: 32 additions & 25 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots

exports[`Patient with extensions built from profiles 1`] = `
{
"_birthDate": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
"valueDateTime": "1770-12-17T12:00:00+01:00",
},
],
},
"birthDate": "1770-12-17",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
"valueAddress": {
"city": "Bonn",
"country": "DE",
},
},
],
"name": [
{
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "van",
},
],
},
"family": "van Beethoven",
"given": [
"Ludwig",
],
},
],
"resourceType": "Patient",
}
`;
Loading