hl7-tstd 0.3.0 → 1.0.0-dev.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.
- package/README.md +11 -4
- package/dist/index.cjs +308 -281
- package/dist/index.d.cts +20 -22
- package/dist/index.d.ts +20 -22
- package/dist/index.js +307 -261
- package/package.json +4 -4
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
A simple package to create, parse & transform HL7 message.
|
|
4
4
|
|
|
5
5
|
```typescript
|
|
6
|
-
|
|
6
|
+
// CJS
|
|
7
|
+
const { HL7 } = require('hl7-tstd');
|
|
8
|
+
|
|
9
|
+
// ESM
|
|
10
|
+
import HL7, { type Segment } from 'hl7-tstd';
|
|
11
|
+
|
|
12
|
+
// TS
|
|
13
|
+
import HL7, { type Segment } from 'hl7-tstd';
|
|
7
14
|
|
|
8
15
|
const hl7 = new HL7(raw); // raw: raw HL7 message string
|
|
9
16
|
```
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
> ⚠️ _Warning:_ `Segment` import is provided only to facilitate typing variables. It is not intended for intantiation. Stick to type-only import.
|
|
12
19
|
|
|
13
20
|
### parseOptions
|
|
14
21
|
|
|
@@ -19,7 +26,7 @@ Additional configs for hl7 parsing and building.
|
|
|
19
26
|
| fieldDelim | `\|` | `string` |
|
|
20
27
|
| repeatingDelim | `~` | `string` |
|
|
21
28
|
| componentDelim | `^` | `string` |
|
|
22
|
-
| subCompDelim |
|
|
29
|
+
| subCompDelim | `&` | `string` |
|
|
23
30
|
| eolDelim | `\r?\n\|\r` | `\r?\n\|\r` \| `\r\n` \| `\n` \| `\r` |
|
|
24
31
|
| buildEolChar | `\r\n` | `string` |
|
|
25
32
|
|
|
@@ -307,7 +314,7 @@ Here,
|
|
|
307
314
|
</details>
|
|
308
315
|
|
|
309
316
|
<details id="transform">
|
|
310
|
-
<summary><code>transform</code>
|
|
317
|
+
<summary><code>transform</code> 🗑 </summary>
|
|
311
318
|
|
|
312
319
|
> ⚠️ **Deprecated**: This method is triggered internally and doesn't need to be invoked manually.
|
|
313
320
|
|