hl7v2 1.2.1 → 1.2.2
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/cjs/hl7-component.js
CHANGED
|
@@ -99,7 +99,7 @@ class Hl7Component {
|
|
|
99
99
|
let segmentIndex = this.segment.index;
|
|
100
100
|
if (segmentIndex < 0)
|
|
101
101
|
segmentIndex = this.message.segments.length;
|
|
102
|
-
|
|
102
|
+
const err = new hl7_error_js_1.HL7Error(`The field (${location}) contained data of the wrong data type. ${e.message}.`, {
|
|
103
103
|
segmentType: this.segment.segmentType,
|
|
104
104
|
segmentSequence: segmentIndex,
|
|
105
105
|
fieldPosition: this.field.position,
|
|
@@ -107,6 +107,8 @@ class Hl7Component {
|
|
|
107
107
|
repetitionIndex: this.repetition.index,
|
|
108
108
|
hl7ErrorCode: 102,
|
|
109
109
|
});
|
|
110
|
+
err.stack = e.stack;
|
|
111
|
+
throw err;
|
|
110
112
|
}
|
|
111
113
|
return;
|
|
112
114
|
}
|
package/cjs/hl7-sub-component.js
CHANGED
|
@@ -5,7 +5,6 @@ const hl7v2_dictionary_1 = require("hl7v2-dictionary");
|
|
|
5
5
|
const hl7_error_js_1 = require("./hl7-error.js");
|
|
6
6
|
const hl7_escape_js_1 = require("./utils/hl7-escape.js");
|
|
7
7
|
class Hl7SubComponent {
|
|
8
|
-
// protected _raw?: any;
|
|
9
8
|
constructor(component, position, def) {
|
|
10
9
|
this.component = component;
|
|
11
10
|
this.position = position;
|
package/esm/hl7-component.js
CHANGED
|
@@ -96,7 +96,7 @@ export class Hl7Component {
|
|
|
96
96
|
let segmentIndex = this.segment.index;
|
|
97
97
|
if (segmentIndex < 0)
|
|
98
98
|
segmentIndex = this.message.segments.length;
|
|
99
|
-
|
|
99
|
+
const err = new HL7Error(`The field (${location}) contained data of the wrong data type. ${e.message}.`, {
|
|
100
100
|
segmentType: this.segment.segmentType,
|
|
101
101
|
segmentSequence: segmentIndex,
|
|
102
102
|
fieldPosition: this.field.position,
|
|
@@ -104,6 +104,8 @@ export class Hl7Component {
|
|
|
104
104
|
repetitionIndex: this.repetition.index,
|
|
105
105
|
hl7ErrorCode: 102,
|
|
106
106
|
});
|
|
107
|
+
err.stack = e.stack;
|
|
108
|
+
throw err;
|
|
107
109
|
}
|
|
108
110
|
return;
|
|
109
111
|
}
|
package/esm/hl7-sub-component.js
CHANGED
|
@@ -2,7 +2,6 @@ import { toHL7DateTime, } from 'hl7v2-dictionary';
|
|
|
2
2
|
import { HL7Error } from './hl7-error.js';
|
|
3
3
|
import { hl7Escape, hl7UnEscape } from './utils/hl7-escape.js';
|
|
4
4
|
export class Hl7SubComponent {
|
|
5
|
-
// protected _raw?: any;
|
|
6
5
|
constructor(component, position, def) {
|
|
7
6
|
this.component = component;
|
|
8
7
|
this.position = position;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl7v2",
|
|
3
3
|
"description": "HL7 v2 parser, serializer, validator for NodeJS",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"uid": "^2.0.2"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"hl7v2-dictionary": "^1.2.
|
|
18
|
+
"hl7v2-dictionary": "^1.2.2"
|
|
19
19
|
},
|
|
20
20
|
"type": "module",
|
|
21
21
|
"exports": {
|