@atomic-ehr/codegen 0.0.2 → 0.0.3-canary.20251124124513.ba9446c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/dist/cli/index.js +14 -49
- package/dist/index.d.ts +26 -1632
- package/dist/index.js +1285 -5444
- package/dist/index.js.map +1 -1
- package/package.json +14 -17
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Atomic FHIR Codegen
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@atomic-ehr/codegen/v/canary)
|
|
4
|
+
[](https://badge.fury.io/js/%40atomic-ehr%2Fcodegen)
|
|
5
|
+
[](https://github.com/atomic-ehr/codegen/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/atomic-ehr/codegen/actions/workflows/sdk-tests.yml)
|
|
7
|
+
|
|
3
8
|
A powerful, extensible code generation toolkit for FHIR (Fast Healthcare Interoperability Resources) that transforms FHIR specifications into strongly-typed code for multiple programming languages.
|
|
4
9
|
|
|
5
10
|
## Features
|
|
@@ -11,6 +16,12 @@ A powerful, extensible code generation toolkit for FHIR (Fast Healthcare Interop
|
|
|
11
16
|
- 🔄 **Intermediate Format** - TypeSchema format enables multi-language support
|
|
12
17
|
- 🛠️ **Developer Friendly** - Fluent API, CLI, and configuration file support
|
|
13
18
|
|
|
19
|
+
## Versions
|
|
20
|
+
|
|
21
|
+
- `canary` channel - Latest development version from `main` branch
|
|
22
|
+
- `latest` channel - Latest stable version (currently in developer preview)
|
|
23
|
+
- all versions: [NPM: @atomic-ehr/codegen](https://www.npmjs.com/package/@atomic-ehr/codegen?activeTab=versions)
|
|
24
|
+
|
|
14
25
|
## Installation
|
|
15
26
|
|
|
16
27
|
```bash
|
|
@@ -40,7 +51,7 @@ const report = await builder.generate();
|
|
|
40
51
|
console.log(report);
|
|
41
52
|
```
|
|
42
53
|
|
|
43
|
-
Run the script
|
|
54
|
+
Run the script with:
|
|
44
55
|
|
|
45
56
|
- `npm exec tsx scripts/generate-types.ts`
|
|
46
57
|
- `pnpm exec tsx scripts/generate-types.ts`
|
|
@@ -101,7 +112,7 @@ The toolkit uses a three-stage architecture (details: [link](https://www.health-
|
|
|
101
112
|
Resolve Canonicals → Transform to Type Schema → Generate
|
|
102
113
|
```
|
|
103
114
|
|
|
104
|
-
1. **Input Layer** - Parses FHIR packages and profiles, resolves canonicals and transforms them into TypeSchema format
|
|
115
|
+
1. **Input Layer** - Parses FHIR packages and profiles, resolves canonicals, and transforms them into TypeSchema format
|
|
105
116
|
2. **Intermediate Format** - TypeSchema provides a universal representation for FHIR data entities
|
|
106
117
|
3. **Output Generators** - Generate code for TypeScript, Python, and other languages
|
|
107
118
|
|
|
@@ -109,8 +120,8 @@ Resolve Canonicals → Transform to Type Schema → Generate
|
|
|
109
120
|
|
|
110
121
|
Actual examples of type generation and usage can be found here: [examples/typescript-r4](examples/typescript-r4):
|
|
111
122
|
|
|
112
|
-
- `demo.ts` - a simple script
|
|
113
|
-
- `generate.ts` - script to generate types
|
|
123
|
+
- `demo.ts` - a simple script that creates resources and demonstrates how to work with profiles
|
|
124
|
+
- `generate.ts` - script to generate types
|
|
114
125
|
|
|
115
126
|
### Generate Types for a Custom Profile (Draft)
|
|
116
127
|
|