@cosyte/synth 0.1.10 → 0.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/CHANGELOG.md +10 -0
- package/README.md +13 -4
- package/dist/astm/index.cjs.map +1 -1
- package/dist/astm/index.mjs.map +1 -1
- package/dist/ccda/index.cjs.map +1 -1
- package/dist/ccda/index.mjs.map +1 -1
- package/dist/deid/index.cjs.map +1 -1
- package/dist/deid/index.mjs.map +1 -1
- package/dist/fhir/index.cjs.map +1 -1
- package/dist/fhir/index.mjs.map +1 -1
- package/dist/hl7/index.cjs.map +1 -1
- package/dist/hl7/index.d.cts +18 -9
- package/dist/hl7/index.d.ts +18 -9
- package/dist/hl7/index.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/ncpdp/index.cjs.map +1 -1
- package/dist/ncpdp/index.mjs.map +1 -1
- package/dist/x12/index.cjs.map +1 -1
- package/dist/x12/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/hl7/index.d.cts
CHANGED
|
@@ -237,7 +237,8 @@ interface GenerateAdtOptions {
|
|
|
237
237
|
* ```ts
|
|
238
238
|
* import { generateAdt } from "@cosyte/synth/hl7";
|
|
239
239
|
* const msg = generateAdt({ seed: 12345, trigger: "A01" });
|
|
240
|
-
*
|
|
240
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
241
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ADT^A01", the type in MSH-9
|
|
241
242
|
* ```
|
|
242
243
|
*/
|
|
243
244
|
declare function generateAdt(options?: GenerateAdtOptions): Hl7Message;
|
|
@@ -279,7 +280,8 @@ interface GenerateOruOptions {
|
|
|
279
280
|
* ```ts
|
|
280
281
|
* import { generateOru } from "@cosyte/synth/hl7";
|
|
281
282
|
* const msg = generateOru({ seed: 12345 });
|
|
282
|
-
*
|
|
283
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
284
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ORU^R01", the type in MSH-9
|
|
283
285
|
* ```
|
|
284
286
|
*/
|
|
285
287
|
declare function generateOru(options?: GenerateOruOptions): Hl7Message;
|
|
@@ -312,7 +314,8 @@ interface GenerateOrmOptions {
|
|
|
312
314
|
* ```ts
|
|
313
315
|
* import { generateOrm } from "@cosyte/synth/hl7";
|
|
314
316
|
* const msg = generateOrm({ seed: 12345 });
|
|
315
|
-
*
|
|
317
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
318
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ORM^O01", the type in MSH-9
|
|
316
319
|
* ```
|
|
317
320
|
*/
|
|
318
321
|
declare function generateOrm(options?: GenerateOrmOptions): Hl7Message;
|
|
@@ -344,7 +347,8 @@ interface GenerateSiuOptions {
|
|
|
344
347
|
* ```ts
|
|
345
348
|
* import { generateSiu } from "@cosyte/synth/hl7";
|
|
346
349
|
* const msg = generateSiu({ seed: 12345 });
|
|
347
|
-
*
|
|
350
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
351
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "SIU^S12", the type in MSH-9
|
|
348
352
|
* ```
|
|
349
353
|
*/
|
|
350
354
|
declare function generateSiu(options?: GenerateSiuOptions): Hl7Message;
|
|
@@ -377,7 +381,8 @@ interface GenerateVxuOptions {
|
|
|
377
381
|
* ```ts
|
|
378
382
|
* import { generateVxu } from "@cosyte/synth/hl7";
|
|
379
383
|
* const msg = generateVxu({ seed: 12345 });
|
|
380
|
-
*
|
|
384
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
385
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "VXU^V04", the type in MSH-9
|
|
381
386
|
* ```
|
|
382
387
|
*/
|
|
383
388
|
declare function generateVxu(options?: GenerateVxuOptions): Hl7Message;
|
|
@@ -410,7 +415,8 @@ interface GenerateMdmOptions {
|
|
|
410
415
|
* ```ts
|
|
411
416
|
* import { generateMdm } from "@cosyte/synth/hl7";
|
|
412
417
|
* const msg = generateMdm({ seed: 12345 });
|
|
413
|
-
*
|
|
418
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
419
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "MDM^T02^MDM_T02", the type in MSH-9
|
|
414
420
|
* ```
|
|
415
421
|
*/
|
|
416
422
|
declare function generateMdm(options?: GenerateMdmOptions): Hl7Message;
|
|
@@ -443,7 +449,8 @@ interface GenerateDftOptions {
|
|
|
443
449
|
* ```ts
|
|
444
450
|
* import { generateDft } from "@cosyte/synth/hl7";
|
|
445
451
|
* const msg = generateDft({ seed: 12345 });
|
|
446
|
-
*
|
|
452
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
453
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "DFT^P03^DFT_P03", the type in MSH-9
|
|
447
454
|
* ```
|
|
448
455
|
*/
|
|
449
456
|
declare function generateDft(options?: GenerateDftOptions): Hl7Message;
|
|
@@ -475,7 +482,8 @@ interface GenerateOmlOptions {
|
|
|
475
482
|
* ```ts
|
|
476
483
|
* import { generateOml } from "@cosyte/synth/hl7";
|
|
477
484
|
* const msg = generateOml({ seed: 12345 });
|
|
478
|
-
*
|
|
485
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
486
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "OML^O21^OML_O21", the type in MSH-9
|
|
479
487
|
* ```
|
|
480
488
|
*/
|
|
481
489
|
declare function generateOml(options?: GenerateOmlOptions): Hl7Message;
|
|
@@ -531,7 +539,8 @@ interface GenerateAckOptions {
|
|
|
531
539
|
* ```ts
|
|
532
540
|
* import { generateAck, generateOru } from "@cosyte/synth/hl7";
|
|
533
541
|
* const ack = generateAck({ seed: 7, inbound: generateOru({ seed: 7 }) });
|
|
534
|
-
*
|
|
542
|
+
* const [msh, msa] = ack.toString().split("\r"); // synthetic segments: assert on them, never log them
|
|
543
|
+
* console.log(msh?.split("|")[8], msa?.split("|")[1]); // "ACK^R01^ACK" "AA", the type and the code
|
|
535
544
|
* ```
|
|
536
545
|
*/
|
|
537
546
|
declare function generateAck(options?: GenerateAckOptions): Hl7Message;
|
package/dist/hl7/index.d.ts
CHANGED
|
@@ -237,7 +237,8 @@ interface GenerateAdtOptions {
|
|
|
237
237
|
* ```ts
|
|
238
238
|
* import { generateAdt } from "@cosyte/synth/hl7";
|
|
239
239
|
* const msg = generateAdt({ seed: 12345, trigger: "A01" });
|
|
240
|
-
*
|
|
240
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
241
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ADT^A01", the type in MSH-9
|
|
241
242
|
* ```
|
|
242
243
|
*/
|
|
243
244
|
declare function generateAdt(options?: GenerateAdtOptions): Hl7Message;
|
|
@@ -279,7 +280,8 @@ interface GenerateOruOptions {
|
|
|
279
280
|
* ```ts
|
|
280
281
|
* import { generateOru } from "@cosyte/synth/hl7";
|
|
281
282
|
* const msg = generateOru({ seed: 12345 });
|
|
282
|
-
*
|
|
283
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
284
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ORU^R01", the type in MSH-9
|
|
283
285
|
* ```
|
|
284
286
|
*/
|
|
285
287
|
declare function generateOru(options?: GenerateOruOptions): Hl7Message;
|
|
@@ -312,7 +314,8 @@ interface GenerateOrmOptions {
|
|
|
312
314
|
* ```ts
|
|
313
315
|
* import { generateOrm } from "@cosyte/synth/hl7";
|
|
314
316
|
* const msg = generateOrm({ seed: 12345 });
|
|
315
|
-
*
|
|
317
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
318
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "ORM^O01", the type in MSH-9
|
|
316
319
|
* ```
|
|
317
320
|
*/
|
|
318
321
|
declare function generateOrm(options?: GenerateOrmOptions): Hl7Message;
|
|
@@ -344,7 +347,8 @@ interface GenerateSiuOptions {
|
|
|
344
347
|
* ```ts
|
|
345
348
|
* import { generateSiu } from "@cosyte/synth/hl7";
|
|
346
349
|
* const msg = generateSiu({ seed: 12345 });
|
|
347
|
-
*
|
|
350
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
351
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "SIU^S12", the type in MSH-9
|
|
348
352
|
* ```
|
|
349
353
|
*/
|
|
350
354
|
declare function generateSiu(options?: GenerateSiuOptions): Hl7Message;
|
|
@@ -377,7 +381,8 @@ interface GenerateVxuOptions {
|
|
|
377
381
|
* ```ts
|
|
378
382
|
* import { generateVxu } from "@cosyte/synth/hl7";
|
|
379
383
|
* const msg = generateVxu({ seed: 12345 });
|
|
380
|
-
*
|
|
384
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
385
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "VXU^V04", the type in MSH-9
|
|
381
386
|
* ```
|
|
382
387
|
*/
|
|
383
388
|
declare function generateVxu(options?: GenerateVxuOptions): Hl7Message;
|
|
@@ -410,7 +415,8 @@ interface GenerateMdmOptions {
|
|
|
410
415
|
* ```ts
|
|
411
416
|
* import { generateMdm } from "@cosyte/synth/hl7";
|
|
412
417
|
* const msg = generateMdm({ seed: 12345 });
|
|
413
|
-
*
|
|
418
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
419
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "MDM^T02^MDM_T02", the type in MSH-9
|
|
414
420
|
* ```
|
|
415
421
|
*/
|
|
416
422
|
declare function generateMdm(options?: GenerateMdmOptions): Hl7Message;
|
|
@@ -443,7 +449,8 @@ interface GenerateDftOptions {
|
|
|
443
449
|
* ```ts
|
|
444
450
|
* import { generateDft } from "@cosyte/synth/hl7";
|
|
445
451
|
* const msg = generateDft({ seed: 12345 });
|
|
446
|
-
*
|
|
452
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
453
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "DFT^P03^DFT_P03", the type in MSH-9
|
|
447
454
|
* ```
|
|
448
455
|
*/
|
|
449
456
|
declare function generateDft(options?: GenerateDftOptions): Hl7Message;
|
|
@@ -475,7 +482,8 @@ interface GenerateOmlOptions {
|
|
|
475
482
|
* ```ts
|
|
476
483
|
* import { generateOml } from "@cosyte/synth/hl7";
|
|
477
484
|
* const msg = generateOml({ seed: 12345 });
|
|
478
|
-
*
|
|
485
|
+
* const wire = msg.toString(); // the whole message, synthetic: assert on it, never log it
|
|
486
|
+
* console.log(wire.split("\r")[0]?.split("|")[8]); // "OML^O21^OML_O21", the type in MSH-9
|
|
479
487
|
* ```
|
|
480
488
|
*/
|
|
481
489
|
declare function generateOml(options?: GenerateOmlOptions): Hl7Message;
|
|
@@ -531,7 +539,8 @@ interface GenerateAckOptions {
|
|
|
531
539
|
* ```ts
|
|
532
540
|
* import { generateAck, generateOru } from "@cosyte/synth/hl7";
|
|
533
541
|
* const ack = generateAck({ seed: 7, inbound: generateOru({ seed: 7 }) });
|
|
534
|
-
*
|
|
542
|
+
* const [msh, msa] = ack.toString().split("\r"); // synthetic segments: assert on them, never log them
|
|
543
|
+
* console.log(msh?.split("|")[8], msa?.split("|")[1]); // "ACK^R01^ACK" "AA", the type and the code
|
|
535
544
|
* ```
|
|
536
545
|
*/
|
|
537
546
|
declare function generateAck(options?: GenerateAckOptions): Hl7Message;
|