@rethinkhealth/hl7v2-utils 0.2.4
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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Rethink Health
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @rethinkhealth/hl7v2-utils
|
|
2
|
+
|
|
3
|
+
A utility package for working with HL7v2 messages, most commonly used within the `@rethinkhealth/hl7v2` ecosystem — a unist-inspired collection of plugins and utilities designed to parse, transform, validate, and manipulate HL7v2 messages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @rethinkhealth/hl7v2-utils
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Contributing
|
|
12
|
+
|
|
13
|
+
We welcome contributions! Please see our [Contributing Guide](../../CONTRIBUTING.md) for more details.
|
|
14
|
+
|
|
15
|
+
1. Fork the repository
|
|
16
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
17
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
18
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
19
|
+
5. Open a Pull Request
|
|
20
|
+
|
|
21
|
+
## Code of Conduct
|
|
22
|
+
|
|
23
|
+
To ensure a welcoming and positive environment, we have a [Code of Conduct](../../CODE_OF_CONDUCT.md) that all contributors and participants are expected to adhere to.
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
Copyright 2025 Rethink Health, SUARL. All rights reserved.
|
|
28
|
+
|
|
29
|
+
This program is licensed to you under the terms of the [MIT License](https://opensource.org/licenses/MIT). This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [LICENSE](../../LICENSE) file for details.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HL7v2 Delimiters type
|
|
3
|
+
*/
|
|
4
|
+
export interface HL7v2Delimiters {
|
|
5
|
+
field: string;
|
|
6
|
+
component: string;
|
|
7
|
+
subcomponent: string;
|
|
8
|
+
repetition: string;
|
|
9
|
+
escape: string;
|
|
10
|
+
segment: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_DELIMITERS: {
|
|
13
|
+
field: string;
|
|
14
|
+
component: string;
|
|
15
|
+
repetition: string;
|
|
16
|
+
subcomponent: string;
|
|
17
|
+
escape: string;
|
|
18
|
+
segment: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB;;;;;;;CAO9B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * HL7v2 Delimiters type\n */\nexport interface HL7v2Delimiters {\n field: string;\n component: string;\n subcomponent: string;\n repetition: string;\n escape: string;\n segment: string; // now always a string\n}\n\nexport const DEFAULT_DELIMITERS = {\n field: '|',\n component: '^',\n repetition: '~',\n subcomponent: '&',\n escape: '\\\\',\n segment: '\\n',\n};\n"],"mappings":";AAYO,IAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,SAAS;AACX;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rethinkhealth/hl7v2-utils",
|
|
3
|
+
"description": "hl7v2 utilities",
|
|
4
|
+
"version": "0.2.4",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Melek Somai",
|
|
8
|
+
"email": "melek@rethinkhealth.io"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "22.15.31",
|
|
20
|
+
"@vitest/coverage-c8": "^0.33.0",
|
|
21
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
22
|
+
"tsup": "8.5.0",
|
|
23
|
+
"typescript": "^5.8.3",
|
|
24
|
+
"vitest": "^3.2.4",
|
|
25
|
+
"@rethinkhealth/testing": "0.0.0",
|
|
26
|
+
"@rethinkhealth/tsconfig": "0.0.0"
|
|
27
|
+
},
|
|
28
|
+
"repository": "rethinkhealth/hl7v2.git",
|
|
29
|
+
"homepage": "https://www.rethinkhealth.io/hl7v2/docs",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"health",
|
|
32
|
+
"healthcare",
|
|
33
|
+
"hl7",
|
|
34
|
+
"hl7v2",
|
|
35
|
+
"nodejs",
|
|
36
|
+
"typescript"
|
|
37
|
+
],
|
|
38
|
+
"packageManager": "pnpm@10.12.1",
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup && tsc --emitDeclarationOnly",
|
|
44
|
+
"check-types": "tsc --noEmit"
|
|
45
|
+
}
|
|
46
|
+
}
|