babelfhir-ts 1.0.42 → 1.1.0

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.
Files changed (30) hide show
  1. package/README.md +73 -190
  2. package/out/src/generator/base-r4/well-known-system-codes.json +63 -0
  3. package/out/src/generator/classGenerator.js +98 -923
  4. package/out/src/generator/classHeuristics.js +312 -0
  5. package/out/src/generator/clientGenerator.js +3 -857
  6. package/out/src/generator/clientReadmeGenerator.js +260 -0
  7. package/out/src/generator/constants.js +126 -28
  8. package/out/src/generator/enrichResourceHandlers.js +690 -0
  9. package/out/src/generator/enrichResourceTemplate.js +711 -0
  10. package/out/src/generator/fieldPatternExtractor.js +331 -0
  11. package/out/src/generator/index.js +24 -857
  12. package/out/src/generator/interfaceFieldProcessor.js +631 -0
  13. package/out/src/generator/interfaceGenerator.js +17 -1592
  14. package/out/src/generator/packageParser.js +170 -3
  15. package/out/src/generator/processFlatField.js +508 -0
  16. package/out/src/generator/processNestedField.js +506 -0
  17. package/out/src/generator/randomSupportGenerator.js +4 -984
  18. package/out/src/generator/randomUtilitiesTemplate.js +120 -0
  19. package/out/src/generator/sdFetcher.js +350 -0
  20. package/out/src/generator/sdParser.js +49 -677
  21. package/out/src/generator/sdProcessor.js +584 -0
  22. package/out/src/generator/sdTypes.js +5 -0
  23. package/out/src/generator/sliceAggregator.js +417 -0
  24. package/out/src/generator/sliceElementGenerator.js +569 -0
  25. package/out/src/generator/sliceValidatorGenerator.js +383 -0
  26. package/out/src/generator/smartAuthGenerator.js +605 -0
  27. package/out/src/generator/utils.js +10 -2
  28. package/out/src/generator/validatorGenerator.js +102 -445
  29. package/out/src/main.js +8 -3
  30. package/package.json +9 -3
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # BabelFHIR-TS
6
6
 
7
- [![npm version](https://img.shields.io/npm/v/babelfhir-ts.svg)](https://www.npmjs.com/package/babelfhir-ts)
7
+ [![npm: babelfhir-ts](https://img.shields.io/npm/v/babelfhir-ts.svg?label=babelfhir-ts)](https://www.npmjs.com/package/babelfhir-ts)
8
8
  [![@babelfhir-ts/client-r4](https://img.shields.io/npm/v/@babelfhir-ts/client-r4.svg?label=%40babelfhir-ts%2Fclient-r4)](https://www.npmjs.com/package/@babelfhir-ts/client-r4)
9
9
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
10
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue)](https://www.typescriptlang.org/)
@@ -21,7 +21,7 @@
21
21
  - **Random data builders** for testing and development (when class generation is enabled)
22
22
  - **Zero manual mapping**—consume any FHIR package or Implementation Guide directly from registries
23
23
  - **Fast and lightweight**—minimal runtime deps; only `fhirpath` is required for validators
24
- - **Type-safe FHIR client** — generated client extends [`@babelfhir-ts/client-r4`](https://www.npmjs.com/package/@babelfhir-ts/client-r4) with profile-specific methods (e.g., `.usCorePatient()`, `.pASClaim()`) on top of 145 base R4 resource accessors
24
+ - **Type-safe FHIR client** — generated client extends [`@babelfhir-ts/client-r4`](https://www.npmjs.com/package/@babelfhir-ts/client-r4) with profile-specific methods (e.g., `.usCorePatient()`, `.pASClaim()`) on top of base R4 resource accessors
25
25
  - **Install any FHIR profile as a node module**—use `babelfhir-ts install` to add Implementation Guides directly to your project
26
26
 
27
27
  <!-- PARITY-BADGES:START - Do not remove or modify this section -->
@@ -48,7 +48,7 @@ Every pull request runs two independent CI pipelines that validate generated cod
48
48
 
49
49
  ### Validation with Firely .NET SDK
50
50
 
51
- The first pipeline validates generated resources using the [Firely .NET SDK validator](https://docs.fire.ly/projects/Firely-NET-SDK/) (v3.0.1). Results are published as live badges:
51
+ The first pipeline validates generated resources using the [Firely .NET SDK validator](https://docs.fire.ly/projects/Firely-NET-SDK/) (v3.1.0). Results are published as live badges:
52
52
 
53
53
  ![US Core 8.0.0](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-us-core.json)
54
54
  ![ISiK Basis 4.0.3](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-isik-basis.json)
@@ -57,11 +57,9 @@ The first pipeline validates generated resources using the [Firely .NET SDK vali
57
57
  ![CH Core 5.0.0](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-ch-core.json)
58
58
  ![DaVinci PAS 2.0.1](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-davinci-pas.json)
59
59
 
60
- > 11 profiles are excluded from this pipeline due to schema loading issues in the Firely SDK. These profiles validate successfully with the HL7 Java Validator below. Details in [docs/FIRELY-VALIDATOR-BUGS.md](./docs/FIRELY-VALIDATOR-BUGS.md).
61
-
62
60
  ### Validation with HL7 Java Validator
63
61
 
64
- The second pipeline validates using the [official HL7 FHIR Validator](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator) (v6.3.11), the reference implementation for FHIR conformance checking:
62
+ The second pipeline validates using the [official HL7 FHIR Validator](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator) (v6.9.1), the reference implementation for FHIR conformance checking:
65
63
 
66
64
  ![US Core 8.0.0](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-hl7-us-core.json)
67
65
  ![ISiK Basis 4.0.3](https://img.shields.io/endpoint?url=https://max-health-inc.github.io/BabelFHIR-TS/badges/badge-hl7-isik-basis.json)
@@ -78,48 +76,27 @@ The second pipeline validates using the [official HL7 FHIR Validator](https://co
78
76
 
79
77
  ## Installation
80
78
 
81
- Install globally (recommended when using the CLI frequently):
82
-
83
79
  ```bash
84
80
  npm install -g babelfhir-ts
85
81
  ```
86
82
 
87
- Or invoke on-demand without a global install:
88
-
89
- ```bash
90
- npx babelfhir-ts --help
91
- ```
83
+ Or on-demand: `npx babelfhir-ts --help`
92
84
 
93
- > **Requirements:** Node.js 18+ (ESM support) and an internet connection when downloading packages from remote registries.
85
+ > **Requirements:** Node.js 18+ and an internet connection for remote registries.
94
86
 
95
- ## Quick start
96
-
97
- Generate code from a local folder that contains FHIR packages:
87
+ ## Quick Start
98
88
 
99
89
  ```bash
90
+ # Generate from a local folder
100
91
  babelfhir-ts input/ output/
101
- ```
102
-
103
- Process a single package archive and write the generated interfaces back into a new `.tgz` file:
104
-
105
- ```bash
106
- babelfhir-ts hl7.fhir.us.core-8.0.0.tgz us-core-generated.tgz
107
- ```
108
-
109
- Download and process a package directly from a registry (defaults to `https://packages.simplifier.net`):
110
92
 
111
- ```bash
93
+ # Download and process from a registry
112
94
  babelfhir-ts --package hl7.fhir.us.core@8.0.0
113
- ```
114
95
 
115
- Download, process and install a processed package into your current project:
116
-
117
- ```bash
96
+ # Install as a project dependency
118
97
  babelfhir-ts install hl7.fhir.us.core@8.0.0
119
98
  ```
120
99
 
121
- After generation you can import the emitted classes:
122
-
123
100
  ```ts
124
101
  import { USCorePatientClass } from "./output/USCorePatientClass";
125
102
 
@@ -127,176 +104,82 @@ const patient = USCorePatientClass.random();
127
104
  const { errors, warnings } = await patient.validate();
128
105
  ```
129
106
 
130
- Or use the generated FHIR client to interact with a FHIR server:
131
-
132
- ```ts
133
- import { FhirClient } from "./output/fhir-client";
134
-
135
- const client = new FhirClient("https://hapi.fhir.org/baseR4");
136
-
137
- // Profile-specific methods generated from your IG
138
- const patient = await client.read().usCorePatient().read("123");
139
- const bundle = await client.read().usCoreCondition().search({ patient: "123" });
140
-
141
- // All 145 base R4 resource types are also available
142
- const appointment = await client.read().appointment().read("456");
143
- ```
144
-
145
- ## Using the generated code in your project
146
-
147
- Generated profile packages installed via `babelfhir-ts install` are published as **compiled JavaScript with TypeScript declarations**:
148
-
149
- - JavaScript for runtime: `index.js`, `*.js`
150
- - Type declarations for IDE/TS: `index.d.ts`, `*.d.ts`
151
- - Dependencies:
152
- - `@types/fhir` is included as a dependency of the generated package (no extra setup in your app)
153
- - [`@babelfhir-ts/client-r4`](https://www.npmjs.com/package/@babelfhir-ts/client-r4) is included as a dependency (base FHIR R4 client that the generated client extends)
154
- - `fhirpath` is a peer dependency (required only if you use the generated validators/classes)
155
-
156
- Install `fhirpath` in your app if you plan to call `.validate()` or use the generated classes.
157
-
158
- ### Module resolution
159
-
160
- Generated packages work with all modern TypeScript setups:
161
-
162
- - **Node.js 18+** with `"type": "module"` in `package.json`
163
- - **Bundlers** (Vite, esbuild, Webpack) with ESM output
164
- - **TypeScript 5.0+** with any module resolution (`node16`, `nodenext`, or `bundler`)
165
-
166
- #### FHIR type imports
167
-
168
- Generated code imports base FHIR types from `"fhir/r4"`:
169
-
170
- ```ts
171
- import { Appointment, Extension, CodeableConcept } from "fhir/r4";
172
- ```
173
-
174
- Since `@types/fhir` doesn't provide a `package.json` `exports` field, BabelFHIR-TS includes an **ambient module declaration** (`fhir-r4.d.ts`) in every generated package. The generated `index.d.ts` references this file:
175
-
176
- ```ts
177
- /// <reference path="./fhir-r4.d.ts" />
178
- ```
179
-
180
- This ensures TypeScript can resolve `fhir/r4` imports automatically without any configuration in your project's `tsconfig.json`.
181
-
182
- ## CLI reference
107
+ ## CLI Reference
183
108
 
109
+ <!-- CLI_HELP_START -->
184
110
  ```
185
- babelfhir-ts [options] [<input> [output]]
111
+ BabelFHIR-TS: Generate TypeScript interfaces from FHIR StructureDefinitions
112
+
113
+ Usage:
114
+ babelfhir-ts [options] [<input> [output]]
115
+ babelfhir-ts install [--package] <pkg@version|path> [--registry <url>] [options]
116
+
117
+ Arguments:
118
+ input Input can be:
119
+ - Canonical URL of a FHIR profile (http://... or https://...)
120
+ - Directory containing FHIR packages (.tgz/.zip files)
121
+ - Single FHIR package (.tgz/.zip file)
122
+ - Single StructureDefinition (.json file)
123
+ - Directory containing StructureDefinition files
124
+ output Output directory or archive name (optional)
125
+
126
+ Commands:
127
+ install Download, process, and npm install package as dependency
128
+
129
+ Options:
130
+ -h, --help Show this help message
131
+ -v, --version Show version number
132
+ --log <dest> Log destination: console (default) or file
133
+ --log-level <level> Log verbosity: error, warn, info (default), or debug
134
+ --cache-dir <path> Custom cache directory (default: .cache, env: FHIR_CACHE_ROOT)
135
+ --no-cache Delete .cache folder after generation
136
+ --no-classes Only generate interfaces and types (skip class generation)
137
+ --no-client Skip FHIR client generation (client generated by default)
138
+ --package <pkg@version> Download FHIR package from registry and process it
139
+ --registry <url> FHIR package registry URL (default: https://packages.simplifier.net)
140
+ --tx-server <url> Terminology server URL for ValueSet expansion (e.g., https://tx.fhir.org/r4)
141
+ When set, expands ValueSets without explicit codes using $expand operation
142
+
143
+ Examples:
144
+ babelfhir-ts # Process ./input to ./output
145
+ babelfhir-ts http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient # Generate from profile URL
146
+ babelfhir-ts package.tgz # Process package to current directory
147
+ babelfhir-ts package.tgz modified-package.tgz # Embed interfaces in package
148
+ babelfhir-ts profiles/ generated/ # Process directory to directory
149
+ babelfhir-ts --package hl7.fhir.us.core@8.0.0 # Download and process from default registry
150
+ babelfhir-ts --package hl7.fhir.us.core@8.0.0 output/ # Download and output to directory
151
+ babelfhir-ts --package pkg@version --log console --log-level debug # With verbose logging
152
+ babelfhir-ts install de.gematik.isik-basismodul@3.1.0 # Download, process, and npm install
153
+ babelfhir-ts install ./package.tgz # Install from local package file
154
+ babelfhir-ts install hl7.fhir.us.core@8.0.0 --registry <url> # Install from custom registry
155
+ babelfhir-ts install --package hl7.fhir.us.core@8.0.0 --registry <url> # Alternative syntax
186
156
  ```
157
+ <!-- CLI_HELP_END -->
187
158
 
188
- | Argument / option | Description |
189
- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
190
- | `<input>` | Directory of FHIR packages/StructureDefinitions, single package (`.tgz`/`.zip`), or single StructureDefinition `.json`. Defaults to `./input` when omitted. |
191
- | `<output>` | Destination directory or archive. Defaults to `./output` when omitted. |
192
- | `install` | Downloads, processes, and installs a package as a project dependency. |
193
- | `--package <pkg@version>` | Fetch a package from a registry and process it without manual download. |
194
- | `--registry <url>` | Custom registry base URL (default:`https://packages.simplifier.net`). |
195
- | `--tx-server <url>` | Terminology server URL for ValueSet expansion (e.g., `https://tx.fhir.org/r4`). When set, expands ValueSets without explicit codes using the `$expand` operation. |
196
- | `--log <level>` | Control logging output:`none` (default), `console`, or `file`. |
197
- | `--no-cache` | Remove the `.cache` directory once generation completes. |
198
- | `--no-classes` | Skip emitting helper classes (interfaces & validators only). |
199
- | `--no-client` | Skip FHIR client generation (`fhir-client/` module). |
200
- | `--cache-dir <path>` | Custom cache directory (default:`.cache`). Also configurable via `FHIR_CACHE_ROOT` env var. |
201
- | `-h, --help` | Print usage help. |
202
- | `-v, --version` | Print the BabelFHIR-TS version. |
203
-
204
- ### Supported inputs
205
-
206
- - **Directory** – scan all `.tgz`, `.zip`, or `.json` files inside the folder
207
- - **Archive** – process a FHIR NPM package in `.tgz` or `.zip` format
208
- - **StructureDefinition JSON** – generate code for a single profile definition
209
-
210
- ## Scripts for contributors
211
-
212
- | Script | Purpose |
213
- | --------------------------- | ---------------------------------------------------------------------------- |
214
- | `npm run generate` | Execute the CLI against the local `input/` folder and refresh `output/`. |
215
- | `npm run generate:check` | End-to-end check: generate, type-check, and lint the emitted output. |
216
- | `npm test` | Type-check and run all Vitest suites (coverage enabled). |
217
- | `npm test pipelineParity` | Run pipeline parity tests against Firely .NET SDK validator. |
218
-
219
- ## Caching notes
220
-
221
- The generator caches downloaded StructureDefinitions and packages inside `.cache/`. When you need a clean run, pass `--no-cache` or manually remove the folder. Temporary downloads land in `.temp-*` directories and are cleaned up automatically.
222
-
223
- ## Why BabelFHIR-TS?
224
-
225
- **The FHIR Challenge**: Implementation Guides define strict profiles that constrain base FHIR resources with required or must-support elements, custom extensions, value set bindings, and cardinality rules. Existing TypeScript libraries can't capture these requirements when you need profile-specific types, leading to an overhead when using TypeScript to build apps that interact with FHIR servers.
226
-
227
- **The BabelFHIR-TS Solution**: Automatically generates TypeScript interfaces and validation logic directly from StructureDefinition JSON. Your IDE autocompletes required fields, flags missing extensions at compile-time, and validates FHIRPath invariants at runtime.
228
-
229
- ## Limitations
230
-
231
- BabelFHIR-TS is a code generation tool that parses FHIR StructureDefinitions and produces TypeScript interfaces and validators. While it handles many common FHIR profiling patterns, there are important limitations to be aware of:
232
-
233
- ### Profile Mapping Accuracy
234
-
235
- - **Not guaranteed for all IGs**: The generator uses heuristics to interpret StructureDefinition constraints, slicing rules, and extensions. Complex or unusual profiling patterns may not map correctly to TypeScript.
236
- - **Test before production**: Always validate the generated code against your specific Implementation Guide's examples and test cases. We recommend running the official FHIR validator alongside BabelFHIR-TS in your QA pipeline.
237
- - **Edge cases**: Rare profiling constructs (deeply nested slicing, conditional constraints, complex discriminators) may generate suboptimal or incomplete types.
159
+ ## Documentation
238
160
 
239
- ### Validation Scope
161
+ Full documentation is available at **[max-health-inc.github.io/BabelFHIR-TS/docs/](https://max-health-inc.github.io/BabelFHIR-TS/docs/)**
240
162
 
241
- The generated `validate()` methods DO check:
242
-
243
- - **FHIRPath constraints** from StructureDefinition invariants
244
- - **Cardinality rules** (min/max occurrences)
245
- - **Required fields** from profiles
246
- - **Pattern constraints** (patternCodeableConcept, patternCoding)
247
- - **Slice validation** for common patterns (coding arrays, BackboneElement slices)
248
- - **Data type correctness** (string, number, boolean, etc.)
249
-
250
- The generated validators DO NOT check:
251
-
252
- - **Terminology validation** (ValueSet expansion, code system membership) - requires terminology server
253
- - **Reference resolution** (checking that referenced resources exist) - requires FHIR server
254
- - **Complex discriminator types** (type, profile, exists, position) - only pattern/value discriminators supported
255
- - **Cross-resource business rules** - application-specific logic
256
-
257
- For comprehensive conformance testing, use the official [HL7 FHIR Validator](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator)!
258
-
259
- ### TypeScript Limitations
260
-
261
- - **Runtime type checking is limited**: TypeScript types are erased at compile time. The generated interfaces provide compile-time safety but cannot enforce constraints at runtime without the validator functions.
262
- - **Extension slicing**: While the generator creates typed extension interfaces, TypeScript cannot enforce that extension arrays contain exactly the required slices at compile time (this is validated at runtime).
263
- - **Choice types**: FHIR's `[x]` choice types (e.g., `value[x]`) are represented as union types in TypeScript, which may require runtime type narrowing.
264
-
265
- ### Generated Helper Methods
266
-
267
- - **`random()` is not fully conformant**: The generated `.random()` methods create test data that satisfies TypeScript types and basic cardinality, but **do not guarantee** fully valid FHIR resources. Random data may violate:
268
-
269
- - Complex FHIRPath invariants
270
- - ValueSet bindings (codes are randomly chosen from required bindings but not guaranteed to be semantically correct)
271
- - Profile-specific business rules
272
- - Reference integrity constraints
273
-
274
- Use `random()` for development, testing, and prototyping, but always validate production data on the FHIR server side.
275
- - **`validate()` coverage**: The generated validation methods execute FHIRPath expressions and check constraints from StructureDefinitions. They are tested against the HL7 Java Validator and the Firely .NET SDK for the Implementation Guides listed in the [Continuous Validation](#continuous-validation) section. Edge cases, complex slicing patterns, or profiles not in the CI pipeline may produce different results. For production conformance testing, use the official [HL7 FHIR Validator](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator) as the source of truth.
276
-
277
- ### FHIR Version Support
278
-
279
- - **R4 only**: The current version targets FHIR R4. Support for R5, DSTU2, or STU3 is not yet available.
280
- - **Dependencies**: Generated code depends on `@types/fhir` (R4 definitions) and `fhirpath` (R4 compatible).
281
-
282
- ### Reporting Issues
283
-
284
- If you encounter an Implementation Guide that doesn't generate correctly, please [open an issue](https://github.com/Max-Health-Inc/BabelFHIR-TS/issues) with:
285
-
286
- - The package name and version
287
- - The specific StructureDefinition URL
288
- - Expected vs. actual generated output
289
- - Any validation errors or type mismatches
290
-
291
- We continuously improve the generator based on real-world IG usage, and your feedback helps make BabelFHIR-TS more robust.
163
+ - [Getting Started](https://max-health-inc.github.io/BabelFHIR-TS/docs/getting-started) — installation, quick start, first generation
164
+ - [CLI Reference](https://max-health-inc.github.io/BabelFHIR-TS/docs/cli-reference) — full list of commands and options
165
+ - [Generated Code Guide](https://max-health-inc.github.io/BabelFHIR-TS/docs/generated-code) — understanding the output, module resolution, FHIR type imports
166
+ - [FHIR Client](https://max-health-inc.github.io/BabelFHIR-TS/docs/fhir-client) — type-safe server interactions
167
+ - [Validation](https://max-health-inc.github.io/BabelFHIR-TS/docs/validation) — what validators check, CI pipelines, known Firely SDK issues
168
+ - [Limitations](https://max-health-inc.github.io/BabelFHIR-TS/docs/limitations) — R4 only, edge cases, random() caveats
169
+ - [Contributing](https://max-health-inc.github.io/BabelFHIR-TS/docs/contributing) — dev setup, scripts, project structure
292
170
 
293
171
  ## License
294
172
 
295
173
  ISC © Maximilian Nussbaumer
296
174
 
175
+ ## Changelog
176
+
177
+ Release notes are published automatically on GitHub Releases:
178
+ **[View all releases](https://github.com/Max-Health-Inc/BabelFHIR-TS/releases)**
179
+
297
180
  ## Contributing
298
181
 
299
- Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project.
182
+ Contributions are welcome! See the [Contributing guide](https://max-health-inc.github.io/BabelFHIR-TS/docs/contributing) for dev setup, scripts, and how to submit changes.
300
183
 
301
184
  ## Security
302
185
 
@@ -0,0 +1,63 @@
1
+ {
2
+ "_description": "Curated sample codes for large external CodeSystems (LOINC, SNOMED CT, etc.) that cannot be shipped in full due to size or licensing. Used as fallback when the CodeSystem has content='not-present' to allow ValueSet resolution for core R4 ValueSets like observation-codes without requiring a terminology server.",
3
+ "_valueSets": "Maps core R4 ValueSet canonical URLs to included CodeSystem URLs. Used when the dependency package containing the ValueSet is not cached locally.",
4
+ "systems": {
5
+ "http://loinc.org": [
6
+ { "code": "29463-7", "display": "Body weight" },
7
+ { "code": "8302-2", "display": "Body height" },
8
+ { "code": "85354-9", "display": "Blood pressure panel with all children optional" },
9
+ { "code": "8867-4", "display": "Heart rate" },
10
+ { "code": "9279-1", "display": "Respiratory rate" },
11
+ { "code": "8310-5", "display": "Body temperature" },
12
+ { "code": "2708-6", "display": "Oxygen saturation in Arterial blood" },
13
+ { "code": "39156-5", "display": "Body mass index (BMI)" },
14
+ { "code": "59408-5", "display": "Oxygen saturation in Arterial blood by Pulse oximetry" },
15
+ { "code": "8480-6", "display": "Systolic blood pressure" },
16
+ { "code": "8462-4", "display": "Diastolic blood pressure" },
17
+ { "code": "718-7", "display": "Hemoglobin [Mass/volume] in Blood" },
18
+ { "code": "2339-0", "display": "Glucose [Mass/volume] in Blood" },
19
+ { "code": "55284-4", "display": "Blood pressure systolic and diastolic" },
20
+ { "code": "3141-9", "display": "Body weight Measured" },
21
+ { "code": "72166-2", "display": "Tobacco smoking status" },
22
+ { "code": "11506-3", "display": "Provider-unspecified Progress note" },
23
+ { "code": "4548-4", "display": "Hemoglobin A1c/Hemoglobin.total in Blood" },
24
+ { "code": "2093-3", "display": "Cholesterol [Mass/volume] in Serum or Plasma" },
25
+ { "code": "2571-8", "display": "Triglyceride [Mass/volume] in Serum or Plasma" },
26
+ { "code": "6690-2", "display": "Leukocytes [#/volume] in Blood by Automated count" },
27
+ { "code": "789-8", "display": "Erythrocytes [#/volume] in Blood by Automated count" },
28
+ { "code": "777-3", "display": "Platelets [#/volume] in Blood by Automated count" },
29
+ { "code": "1742-6", "display": "Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma" },
30
+ { "code": "1920-8", "display": "Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma" },
31
+ { "code": "2160-0", "display": "Creatinine [Mass/volume] in Serum or Plasma" },
32
+ { "code": "3094-0", "display": "Urea nitrogen [Mass/volume] in Serum or Plasma" },
33
+ { "code": "2823-3", "display": "Potassium [Moles/volume] in Serum or Plasma" },
34
+ { "code": "2951-2", "display": "Sodium [Moles/volume] in Serum or Plasma" },
35
+ { "code": "14959-1", "display": "Microalbumin [Mass/volume] in Urine" },
36
+ { "code": "82810-3", "display": "Pregnancy status" }
37
+ ],
38
+ "http://snomed.info/sct": [
39
+ { "code": "27113001", "display": "Body weight" },
40
+ { "code": "50373000", "display": "Body height measure" },
41
+ { "code": "75367002", "display": "Blood pressure" },
42
+ { "code": "364075005", "display": "Heart rate" },
43
+ { "code": "86290005", "display": "Respiratory rate" },
44
+ { "code": "386725007", "display": "Body temperature" },
45
+ { "code": "431314004", "display": "SpO2 - Loss of oxygen in blood" },
46
+ { "code": "60621009", "display": "Body mass index" },
47
+ { "code": "271649006", "display": "Systolic blood pressure" },
48
+ { "code": "271650006", "display": "Diastolic blood pressure" },
49
+ { "code": "404684003", "display": "Clinical finding" },
50
+ { "code": "118228005", "display": "Functional finding" },
51
+ { "code": "250171008", "display": "Clinical history and observation findings" },
52
+ { "code": "363787002", "display": "Observable entity" },
53
+ { "code": "386661006", "display": "Fever" }
54
+ ]
55
+ },
56
+ "valueSets": {
57
+ "http://hl7.org/fhir/ValueSet/observation-codes": ["http://loinc.org"],
58
+ "http://hl7.org/fhir/ValueSet/body-site": ["http://snomed.info/sct"],
59
+ "http://hl7.org/fhir/ValueSet/observation-methods": ["http://snomed.info/sct"],
60
+ "http://hl7.org/fhir/ValueSet/clinical-findings": ["http://snomed.info/sct"],
61
+ "http://hl7.org/fhir/ValueSet/condition-code": ["http://snomed.info/sct"]
62
+ }
63
+ }