@medplum/hl7 2.1.9 → 2.1.11
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/api-extractor.json +3 -0
- package/dist/types.d.ts +68 -0
- package/package.json +31 -31
- package/tsdoc.json +4 -0
- package/dist/types/base.d.ts +0 -9
- package/dist/types/client.d.ts +0 -18
- package/dist/types/connection.d.ts +0 -13
- package/dist/types/constants.d.ts +0 -3
- package/dist/types/events.d.ts +0 -11
- package/dist/types/index.d.ts +0 -6
- package/dist/types/server.d.ts +0 -11
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { Hl7Message } from '@medplum/core';
|
|
4
|
+
import net from 'net';
|
|
5
|
+
|
|
6
|
+
export declare const CR: string;
|
|
7
|
+
|
|
8
|
+
declare const FS_2: string;
|
|
9
|
+
export { FS_2 as FS }
|
|
10
|
+
|
|
11
|
+
export declare abstract class Hl7Base extends EventTarget {
|
|
12
|
+
addEventListener<K extends keyof Hl7EventMap>(type: K, listener: ((event: Hl7EventMap[K]) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
13
|
+
removeEventListener<K extends keyof Hl7EventMap>(type: K, listener: ((event: Hl7EventMap[K]) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare class Hl7Client extends Hl7Base {
|
|
17
|
+
options: Hl7ClientOptions;
|
|
18
|
+
host: string;
|
|
19
|
+
port: number;
|
|
20
|
+
connection?: Hl7Connection;
|
|
21
|
+
constructor(options: Hl7ClientOptions);
|
|
22
|
+
connect(): Promise<Hl7Connection>;
|
|
23
|
+
send(msg: Hl7Message): Promise<void>;
|
|
24
|
+
sendAndWait(msg: Hl7Message): Promise<Hl7Message>;
|
|
25
|
+
close(): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export declare interface Hl7ClientOptions {
|
|
29
|
+
host: string;
|
|
30
|
+
port: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare class Hl7Connection extends Hl7Base {
|
|
34
|
+
readonly socket: net.Socket;
|
|
35
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
36
|
+
constructor(socket: net.Socket, encoding?: BufferEncoding | undefined);
|
|
37
|
+
send(reply: Hl7Message): void;
|
|
38
|
+
sendAndWait(msg: Hl7Message): Promise<Hl7Message>;
|
|
39
|
+
close(): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare class Hl7ErrorEvent extends Event {
|
|
43
|
+
readonly error: Error;
|
|
44
|
+
constructor(error: Error);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare interface Hl7EventMap {
|
|
48
|
+
message: Hl7MessageEvent;
|
|
49
|
+
error: Hl7ErrorEvent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export declare class Hl7MessageEvent extends Event {
|
|
53
|
+
readonly connection: Hl7Connection;
|
|
54
|
+
readonly message: Hl7Message;
|
|
55
|
+
constructor(connection: Hl7Connection, message: Hl7Message);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare class Hl7Server {
|
|
59
|
+
readonly handler: (connection: Hl7Connection) => void;
|
|
60
|
+
server?: net.Server;
|
|
61
|
+
constructor(handler: (connection: Hl7Connection) => void);
|
|
62
|
+
start(port: number, encoding?: BufferEncoding): void;
|
|
63
|
+
stop(): void;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export declare const VT: string;
|
|
67
|
+
|
|
68
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/hl7",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "Medplum HL7 Utilities",
|
|
5
|
-
"
|
|
6
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"medplum",
|
|
7
|
+
"fhir",
|
|
8
|
+
"healthcare",
|
|
9
|
+
"interoperability",
|
|
10
|
+
"json",
|
|
11
|
+
"serialization",
|
|
12
|
+
"hl7",
|
|
13
|
+
"standards",
|
|
14
|
+
"clinical",
|
|
15
|
+
"dstu2",
|
|
16
|
+
"stu3",
|
|
17
|
+
"r4",
|
|
18
|
+
"normative"
|
|
19
|
+
],
|
|
7
20
|
"homepage": "https://www.medplum.com/",
|
|
8
21
|
"repository": {
|
|
9
22
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/medplum/medplum.git",
|
|
23
|
+
"url": "git+https://github.com/medplum/medplum.git",
|
|
11
24
|
"directory": "packages/hl7"
|
|
12
25
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
26
|
+
"license": "Apache-2.0",
|
|
27
|
+
"author": "Medplum <hello@medplum.com>",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"exports": {
|
|
30
|
+
"types": "./dist/types.d.ts",
|
|
31
|
+
"require": "./dist/cjs/index.cjs",
|
|
32
|
+
"import": "./dist/esm/index.mjs"
|
|
15
33
|
},
|
|
34
|
+
"main": "dist/cjs/index.cjs",
|
|
35
|
+
"module": "dist/esm/index.mjs",
|
|
36
|
+
"types": "dist/types.d.ts",
|
|
16
37
|
"scripts": {
|
|
38
|
+
"build": "npm run clean && tsc --project tsconfig.build.json && node esbuild.mjs && api-extractor run --local",
|
|
17
39
|
"clean": "rimraf dist",
|
|
18
|
-
"build": "npm run clean && tsc --project tsconfig.build.json && node esbuild.mjs",
|
|
19
40
|
"test": "jest"
|
|
20
41
|
},
|
|
21
42
|
"dependencies": {
|
|
@@ -24,28 +45,7 @@
|
|
|
24
45
|
"devDependencies": {
|
|
25
46
|
"@medplum/fhirtypes": "*"
|
|
26
47
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"exports": {
|
|
31
|
-
"types": "./dist/types/index.d.ts",
|
|
32
|
-
"require": "./dist/cjs/index.cjs",
|
|
33
|
-
"import": "./dist/esm/index.mjs"
|
|
34
|
-
},
|
|
35
|
-
"sideEffects": false,
|
|
36
|
-
"keywords": [
|
|
37
|
-
"medplum",
|
|
38
|
-
"fhir",
|
|
39
|
-
"healthcare",
|
|
40
|
-
"interoperability",
|
|
41
|
-
"json",
|
|
42
|
-
"serialization",
|
|
43
|
-
"hl7",
|
|
44
|
-
"standards",
|
|
45
|
-
"clinical",
|
|
46
|
-
"dstu2",
|
|
47
|
-
"stu3",
|
|
48
|
-
"r4",
|
|
49
|
-
"normative"
|
|
50
|
-
]
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
}
|
|
51
51
|
}
|
package/tsdoc.json
ADDED
package/dist/types/base.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Hl7ErrorEvent, Hl7MessageEvent } from './events';
|
|
2
|
-
export interface Hl7EventMap {
|
|
3
|
-
message: Hl7MessageEvent;
|
|
4
|
-
error: Hl7ErrorEvent;
|
|
5
|
-
}
|
|
6
|
-
export declare abstract class Hl7Base extends EventTarget {
|
|
7
|
-
addEventListener<K extends keyof Hl7EventMap>(type: K, listener: ((event: Hl7EventMap[K]) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
8
|
-
removeEventListener<K extends keyof Hl7EventMap>(type: K, listener: ((event: Hl7EventMap[K]) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
9
|
-
}
|
package/dist/types/client.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Hl7Message } from '@medplum/core';
|
|
2
|
-
import { Hl7Base } from './base';
|
|
3
|
-
import { Hl7Connection } from './connection';
|
|
4
|
-
export interface Hl7ClientOptions {
|
|
5
|
-
host: string;
|
|
6
|
-
port: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class Hl7Client extends Hl7Base {
|
|
9
|
-
options: Hl7ClientOptions;
|
|
10
|
-
host: string;
|
|
11
|
-
port: number;
|
|
12
|
-
connection?: Hl7Connection;
|
|
13
|
-
constructor(options: Hl7ClientOptions);
|
|
14
|
-
connect(): Promise<Hl7Connection>;
|
|
15
|
-
send(msg: Hl7Message): Promise<void>;
|
|
16
|
-
sendAndWait(msg: Hl7Message): Promise<Hl7Message>;
|
|
17
|
-
close(): void;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { Hl7Message } from '@medplum/core';
|
|
4
|
-
import net from 'net';
|
|
5
|
-
import { Hl7Base } from './base';
|
|
6
|
-
export declare class Hl7Connection extends Hl7Base {
|
|
7
|
-
readonly socket: net.Socket;
|
|
8
|
-
readonly encoding?: BufferEncoding | undefined;
|
|
9
|
-
constructor(socket: net.Socket, encoding?: BufferEncoding | undefined);
|
|
10
|
-
send(reply: Hl7Message): void;
|
|
11
|
-
sendAndWait(msg: Hl7Message): Promise<Hl7Message>;
|
|
12
|
-
close(): void;
|
|
13
|
-
}
|
package/dist/types/events.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Hl7Message } from '@medplum/core';
|
|
2
|
-
import { Hl7Connection } from './connection';
|
|
3
|
-
export declare class Hl7MessageEvent extends Event {
|
|
4
|
-
readonly connection: Hl7Connection;
|
|
5
|
-
readonly message: Hl7Message;
|
|
6
|
-
constructor(connection: Hl7Connection, message: Hl7Message);
|
|
7
|
-
}
|
|
8
|
-
export declare class Hl7ErrorEvent extends Event {
|
|
9
|
-
readonly error: Error;
|
|
10
|
-
constructor(error: Error);
|
|
11
|
-
}
|
package/dist/types/index.d.ts
DELETED
package/dist/types/server.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import net from 'net';
|
|
4
|
-
import { Hl7Connection } from './connection';
|
|
5
|
-
export declare class Hl7Server {
|
|
6
|
-
readonly handler: (connection: Hl7Connection) => void;
|
|
7
|
-
server?: net.Server;
|
|
8
|
-
constructor(handler: (connection: Hl7Connection) => void);
|
|
9
|
-
start(port: number, encoding?: BufferEncoding): void;
|
|
10
|
-
stop(): void;
|
|
11
|
-
}
|