@metriport/shared 0.21.0 → 0.21.1
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/dist/interface/external/ehr/fhir-resource.d.ts +89 -0
- package/dist/interface/external/ehr/fhir-resource.d.ts.map +1 -0
- package/dist/interface/external/ehr/fhir-resource.js +17 -0
- package/dist/interface/external/ehr/fhir-resource.js.map +1 -0
- package/dist/interface/external/ehr/resource-diff.d.ts +6 -0
- package/dist/interface/external/ehr/resource-diff.d.ts.map +1 -0
- package/dist/interface/external/ehr/resource-diff.js +13 -0
- package/dist/interface/external/ehr/resource-diff.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const fhirResourceSchema: z.ZodIntersection<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
resourceType: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
id: string;
|
|
7
|
+
resourceType: string;
|
|
8
|
+
}, {
|
|
9
|
+
id: string;
|
|
10
|
+
resourceType: string;
|
|
11
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
12
|
+
export type FhirResource = z.infer<typeof fhirResourceSchema>;
|
|
13
|
+
export declare const fhirResourcesSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
resourceType: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
id: string;
|
|
18
|
+
resourceType: string;
|
|
19
|
+
}, {
|
|
20
|
+
id: string;
|
|
21
|
+
resourceType: string;
|
|
22
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">;
|
|
23
|
+
export type FhirResources = z.infer<typeof fhirResourcesSchema>;
|
|
24
|
+
export declare const fhirResourceWrapperSchema: z.ZodObject<{
|
|
25
|
+
resource: z.ZodIntersection<z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
resourceType: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
id: string;
|
|
30
|
+
resourceType: string;
|
|
31
|
+
}, {
|
|
32
|
+
id: string;
|
|
33
|
+
resourceType: string;
|
|
34
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
resource: {
|
|
37
|
+
id: string;
|
|
38
|
+
resourceType: string;
|
|
39
|
+
} & Record<string, any>;
|
|
40
|
+
}, {
|
|
41
|
+
resource: {
|
|
42
|
+
id: string;
|
|
43
|
+
resourceType: string;
|
|
44
|
+
} & Record<string, any>;
|
|
45
|
+
}>;
|
|
46
|
+
export type FhirResourceWrapper = z.infer<typeof fhirResourceWrapperSchema>;
|
|
47
|
+
export declare const fhirResourceBundleSchema: z.ZodObject<{
|
|
48
|
+
resourceType: z.ZodLiteral<"Bundle">;
|
|
49
|
+
entry: z.ZodArray<z.ZodObject<{
|
|
50
|
+
resource: z.ZodIntersection<z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
resourceType: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
id: string;
|
|
55
|
+
resourceType: string;
|
|
56
|
+
}, {
|
|
57
|
+
id: string;
|
|
58
|
+
resourceType: string;
|
|
59
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
resource: {
|
|
62
|
+
id: string;
|
|
63
|
+
resourceType: string;
|
|
64
|
+
} & Record<string, any>;
|
|
65
|
+
}, {
|
|
66
|
+
resource: {
|
|
67
|
+
id: string;
|
|
68
|
+
resourceType: string;
|
|
69
|
+
} & Record<string, any>;
|
|
70
|
+
}>, "many">;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
resourceType: "Bundle";
|
|
73
|
+
entry: {
|
|
74
|
+
resource: {
|
|
75
|
+
id: string;
|
|
76
|
+
resourceType: string;
|
|
77
|
+
} & Record<string, any>;
|
|
78
|
+
}[];
|
|
79
|
+
}, {
|
|
80
|
+
resourceType: "Bundle";
|
|
81
|
+
entry: {
|
|
82
|
+
resource: {
|
|
83
|
+
id: string;
|
|
84
|
+
resourceType: string;
|
|
85
|
+
} & Record<string, any>;
|
|
86
|
+
}[];
|
|
87
|
+
}>;
|
|
88
|
+
export type FhirResourceBundle = z.infer<typeof fhirResourceBundleSchema>;
|
|
89
|
+
//# sourceMappingURL=fhir-resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fhir-resource.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/ehr/fhir-resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;uCAM9B,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;gDAA6B,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fhirResourceBundleSchema = exports.fhirResourceWrapperSchema = exports.fhirResourcesSchema = exports.fhirResourceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.fhirResourceSchema = zod_1.z.intersection(zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
resourceType: zod_1.z.string(),
|
|
8
|
+
}), zod_1.z.record(zod_1.z.string(), zod_1.z.any()));
|
|
9
|
+
exports.fhirResourcesSchema = exports.fhirResourceSchema.array();
|
|
10
|
+
exports.fhirResourceWrapperSchema = zod_1.z.object({
|
|
11
|
+
resource: exports.fhirResourceSchema,
|
|
12
|
+
});
|
|
13
|
+
exports.fhirResourceBundleSchema = zod_1.z.object({
|
|
14
|
+
resourceType: zod_1.z.literal("Bundle"),
|
|
15
|
+
entry: exports.fhirResourceWrapperSchema.array(),
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=fhir-resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fhir-resource.js","sourceRoot":"","sources":["../../../../src/interface/external/ehr/fhir-resource.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,kBAAkB,GAAG,OAAC,CAAC,YAAY,CAC9C,OAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,EACF,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAC9B,CAAC;AAGW,QAAA,mBAAmB,GAAG,0BAAkB,CAAC,KAAK,EAAE,CAAC;AAGjD,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,0BAAkB;CAC7B,CAAC,CAAC;AAGU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,KAAK,EAAE,iCAAyB,CAAC,KAAK,EAAE;CACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-diff.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/ehr/resource-diff.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,QAAQ,QAAQ;IAChB,cAAc,cAAc;CAC7B;AACD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,IAAI,qBAAqB,CAE7F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isResourceDiffDirection = exports.ResourceDiffDirection = void 0;
|
|
4
|
+
var ResourceDiffDirection;
|
|
5
|
+
(function (ResourceDiffDirection) {
|
|
6
|
+
ResourceDiffDirection["DIFF_EHR"] = "Ehr";
|
|
7
|
+
ResourceDiffDirection["DIFF_METRIPORT"] = "Metriport";
|
|
8
|
+
})(ResourceDiffDirection = exports.ResourceDiffDirection || (exports.ResourceDiffDirection = {}));
|
|
9
|
+
function isResourceDiffDirection(direction) {
|
|
10
|
+
return Object.values(ResourceDiffDirection).includes(direction);
|
|
11
|
+
}
|
|
12
|
+
exports.isResourceDiffDirection = isResourceDiffDirection;
|
|
13
|
+
//# sourceMappingURL=resource-diff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-diff.js","sourceRoot":"","sources":["../../../../src/interface/external/ehr/resource-diff.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,yCAAgB,CAAA;IAChB,qDAA4B,CAAA;AAC9B,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AACD,SAAgB,uBAAuB,CAAC,SAAiB;IACvD,OAAO,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,SAAkC,CAAC,CAAC;AAC3F,CAAC;AAFD,0DAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/shared",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Common code shared across packages - by Metriport Inc.",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"ts-jest": "29.1.1",
|
|
102
102
|
"typescript": "^4.9.5"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "602d1430355c592194f1f3ce609831c16a7fc61c"
|
|
105
105
|
}
|