babelfhir-ts 1.0.42 → 1.0.43
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 +72 -187
- package/out/src/generator/base-r4/well-known-system-codes.json +63 -0
- package/out/src/generator/classGenerator.js +262 -267
- package/out/src/generator/constants.js +122 -22
- package/out/src/generator/index.js +73 -14
- package/out/src/generator/packageParser.js +170 -3
- package/out/src/generator/randomSupportGenerator.js +560 -32
- package/out/src/generator/sdParser.js +50 -7
- package/out/src/generator/utils.js +10 -2
- package/out/src/main.js +1 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# BabelFHIR-TS
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/babelfhir-ts)
|
|
8
8
|
[](https://www.npmjs.com/package/@babelfhir-ts/client-r4)
|
|
9
9
|
[](https://opensource.org/licenses/ISC)
|
|
10
10
|
[](https://www.typescriptlang.org/)
|
|
@@ -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
|
|
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
|

|
|
54
54
|

|
|
@@ -61,7 +61,7 @@ The first pipeline validates generated resources using the [Firely .NET SDK vali
|
|
|
61
61
|
|
|
62
62
|
### Validation with HL7 Java Validator
|
|
63
63
|
|
|
64
|
-
The second pipeline validates using the [official HL7 FHIR Validator](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator) (v6.
|
|
64
|
+
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
65
|
|
|
66
66
|

|
|
67
67
|

|
|
@@ -78,48 +78,27 @@ The second pipeline validates using the [official HL7 FHIR Validator](https://co
|
|
|
78
78
|
|
|
79
79
|
## Installation
|
|
80
80
|
|
|
81
|
-
Install globally (recommended when using the CLI frequently):
|
|
82
|
-
|
|
83
81
|
```bash
|
|
84
82
|
npm install -g babelfhir-ts
|
|
85
83
|
```
|
|
86
84
|
|
|
87
|
-
Or
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npx babelfhir-ts --help
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
> **Requirements:** Node.js 18+ (ESM support) and an internet connection when downloading packages from remote registries.
|
|
85
|
+
Or on-demand: `npx babelfhir-ts --help`
|
|
94
86
|
|
|
95
|
-
|
|
87
|
+
> **Requirements:** Node.js 18+ and an internet connection for remote registries.
|
|
96
88
|
|
|
97
|
-
|
|
89
|
+
## Quick Start
|
|
98
90
|
|
|
99
91
|
```bash
|
|
92
|
+
# Generate from a local folder
|
|
100
93
|
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
94
|
|
|
111
|
-
|
|
95
|
+
# Download and process from a registry
|
|
112
96
|
babelfhir-ts --package hl7.fhir.us.core@8.0.0
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Download, process and install a processed package into your current project:
|
|
116
97
|
|
|
117
|
-
|
|
98
|
+
# Install as a project dependency
|
|
118
99
|
babelfhir-ts install hl7.fhir.us.core@8.0.0
|
|
119
100
|
```
|
|
120
101
|
|
|
121
|
-
After generation you can import the emitted classes:
|
|
122
|
-
|
|
123
102
|
```ts
|
|
124
103
|
import { USCorePatientClass } from "./output/USCorePatientClass";
|
|
125
104
|
|
|
@@ -127,176 +106,82 @@ const patient = USCorePatientClass.random();
|
|
|
127
106
|
const { errors, warnings } = await patient.validate();
|
|
128
107
|
```
|
|
129
108
|
|
|
130
|
-
|
|
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" });
|
|
109
|
+
## CLI Reference
|
|
140
110
|
|
|
141
|
-
|
|
142
|
-
const appointment = await client.read().appointment().read("456");
|
|
111
|
+
<!-- CLI_HELP_START -->
|
|
143
112
|
```
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
113
|
+
BabelFHIR-TS: Generate TypeScript interfaces from FHIR StructureDefinitions
|
|
114
|
+
|
|
115
|
+
Usage:
|
|
116
|
+
babelfhir-ts [options] [<input> [output]]
|
|
117
|
+
babelfhir-ts install [--package] <pkg@version|path> [--registry <url>] [options]
|
|
118
|
+
|
|
119
|
+
Arguments:
|
|
120
|
+
input Input can be:
|
|
121
|
+
- Canonical URL of a FHIR profile (http://... or https://...)
|
|
122
|
+
- Directory containing FHIR packages (.tgz/.zip files)
|
|
123
|
+
- Single FHIR package (.tgz/.zip file)
|
|
124
|
+
- Single StructureDefinition (.json file)
|
|
125
|
+
- Directory containing StructureDefinition files
|
|
126
|
+
output Output directory or archive name (optional)
|
|
127
|
+
|
|
128
|
+
Commands:
|
|
129
|
+
install Download, process, and npm install package as dependency
|
|
130
|
+
|
|
131
|
+
Options:
|
|
132
|
+
-h, --help Show this help message
|
|
133
|
+
-v, --version Show version number
|
|
134
|
+
--log <dest> Log destination: console (default) or file
|
|
135
|
+
--log-level <level> Log verbosity: error, warn, info (default), or debug
|
|
136
|
+
--cache-dir <path> Custom cache directory (default: .cache, env: FHIR_CACHE_ROOT)
|
|
137
|
+
--no-cache Delete .cache folder after generation
|
|
138
|
+
--no-classes Only generate interfaces and types (skip class generation)
|
|
139
|
+
--no-client Skip FHIR client generation (client generated by default)
|
|
140
|
+
--package <pkg@version> Download FHIR package from registry and process it
|
|
141
|
+
--registry <url> FHIR package registry URL (default: https://packages.simplifier.net)
|
|
142
|
+
--tx-server <url> Terminology server URL for ValueSet expansion (e.g., https://tx.fhir.org/r4)
|
|
143
|
+
When set, expands ValueSets without explicit codes using $expand operation
|
|
144
|
+
|
|
145
|
+
Examples:
|
|
146
|
+
babelfhir-ts # Process ./input to ./output
|
|
147
|
+
babelfhir-ts http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient # Generate from profile URL
|
|
148
|
+
babelfhir-ts package.tgz # Process package to current directory
|
|
149
|
+
babelfhir-ts package.tgz modified-package.tgz # Embed interfaces in package
|
|
150
|
+
babelfhir-ts profiles/ generated/ # Process directory to directory
|
|
151
|
+
babelfhir-ts --package hl7.fhir.us.core@8.0.0 # Download and process from default registry
|
|
152
|
+
babelfhir-ts --package hl7.fhir.us.core@8.0.0 output/ # Download and output to directory
|
|
153
|
+
babelfhir-ts --package pkg@version --log console --log-level debug # With verbose logging
|
|
154
|
+
babelfhir-ts install de.gematik.isik-basismodul@3.1.0 # Download, process, and npm install
|
|
155
|
+
babelfhir-ts install ./package.tgz # Install from local package file
|
|
156
|
+
babelfhir-ts install hl7.fhir.us.core@8.0.0 --registry <url> # Install from custom registry
|
|
157
|
+
babelfhir-ts install --package hl7.fhir.us.core@8.0.0 --registry <url> # Alternative syntax
|
|
172
158
|
```
|
|
159
|
+
<!-- CLI_HELP_END -->
|
|
173
160
|
|
|
174
|
-
|
|
161
|
+
## Documentation
|
|
175
162
|
|
|
176
|
-
|
|
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`.
|
|
163
|
+
Full documentation is available at **[max-health-inc.github.io/BabelFHIR-TS/docs/](https://max-health-inc.github.io/BabelFHIR-TS/docs/)**
|
|
181
164
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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.
|
|
238
|
-
|
|
239
|
-
### Validation Scope
|
|
240
|
-
|
|
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.
|
|
165
|
+
- [Getting Started](https://max-health-inc.github.io/BabelFHIR-TS/docs/getting-started) — installation, quick start, first generation
|
|
166
|
+
- [CLI Reference](https://max-health-inc.github.io/BabelFHIR-TS/docs/cli-reference) — full list of commands and options
|
|
167
|
+
- [Generated Code Guide](https://max-health-inc.github.io/BabelFHIR-TS/docs/generated-code) — understanding the output, module resolution, FHIR type imports
|
|
168
|
+
- [FHIR Client](https://max-health-inc.github.io/BabelFHIR-TS/docs/fhir-client) — type-safe server interactions
|
|
169
|
+
- [Validation](https://max-health-inc.github.io/BabelFHIR-TS/docs/validation) — what validators check, CI pipelines, known Firely SDK issues
|
|
170
|
+
- [Limitations](https://max-health-inc.github.io/BabelFHIR-TS/docs/limitations) — R4 only, edge cases, random() caveats
|
|
171
|
+
- [Contributing](https://max-health-inc.github.io/BabelFHIR-TS/docs/contributing) — dev setup, scripts, project structure
|
|
292
172
|
|
|
293
173
|
## License
|
|
294
174
|
|
|
295
175
|
ISC © Maximilian Nussbaumer
|
|
296
176
|
|
|
177
|
+
## Changelog
|
|
178
|
+
|
|
179
|
+
Release notes are published automatically on GitHub Releases:
|
|
180
|
+
**[View all releases](https://github.com/Max-Health-Inc/BabelFHIR-TS/releases)**
|
|
181
|
+
|
|
297
182
|
## Contributing
|
|
298
183
|
|
|
299
|
-
Contributions are welcome!
|
|
184
|
+
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
185
|
|
|
301
186
|
## Security
|
|
302
187
|
|
|
@@ -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
|
+
}
|