@metriport/commonwell-sdk 4.3.10 → 4.3.12

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.
Files changed (55) hide show
  1. package/lib/client/commonwell-api.d.ts +49 -49
  2. package/lib/client/commonwell-api.js +2 -2
  3. package/lib/client/commonwell.d.ts +425 -425
  4. package/lib/client/commonwell.js +739 -739
  5. package/lib/client/document.d.ts +7 -7
  6. package/lib/client/document.js +71 -71
  7. package/lib/common/commonwell-error.d.ts +12 -12
  8. package/lib/common/commonwell-error.js +34 -34
  9. package/lib/common/fileDownload.d.ts +11 -11
  10. package/lib/common/fileDownload.js +43 -43
  11. package/lib/common/make-jwt.d.ts +24 -24
  12. package/lib/common/make-jwt.js +90 -90
  13. package/lib/common/metriport-error.d.ts +4 -4
  14. package/lib/common/metriport-error.js +33 -33
  15. package/lib/common/util.d.ts +25 -25
  16. package/lib/common/util.js +70 -70
  17. package/lib/common/validate-npi.d.ts +9 -9
  18. package/lib/common/validate-npi.js +39 -39
  19. package/lib/index.d.ts +20 -20
  20. package/lib/index.js +54 -54
  21. package/lib/models/address.d.ts +50 -50
  22. package/lib/models/address.js +28 -28
  23. package/lib/models/certificates.d.ts +156 -156
  24. package/lib/models/certificates.js +26 -26
  25. package/lib/models/contact.d.ts +50 -50
  26. package/lib/models/contact.js +39 -39
  27. package/lib/models/demographics.d.ts +292 -292
  28. package/lib/models/demographics.js +34 -34
  29. package/lib/models/document.d.ts +4421 -4421
  30. package/lib/models/document.js +151 -151
  31. package/lib/models/enrollment-summary.d.ts +18 -18
  32. package/lib/models/enrollment-summary.js +14 -14
  33. package/lib/models/facility.d.ts +75 -75
  34. package/lib/models/facility.js +10 -10
  35. package/lib/models/human-name.d.ts +53 -53
  36. package/lib/models/human-name.js +37 -37
  37. package/lib/models/identifier.d.ts +79 -79
  38. package/lib/models/identifier.js +36 -36
  39. package/lib/models/iso-date.d.ts +3 -3
  40. package/lib/models/iso-date.js +6 -6
  41. package/lib/models/iso-datetime.d.ts +3 -3
  42. package/lib/models/iso-datetime.js +8 -8
  43. package/lib/models/link.d.ts +642 -642
  44. package/lib/models/link.js +50 -50
  45. package/lib/models/organization.d.ts +763 -763
  46. package/lib/models/organization.js +83 -83
  47. package/lib/models/patient.d.ts +3617 -3617
  48. package/lib/models/patient.js +49 -49
  49. package/lib/models/period.d.ts +12 -12
  50. package/lib/models/period.js +12 -12
  51. package/lib/models/person.d.ts +2440 -2440
  52. package/lib/models/person.js +39 -39
  53. package/lib/models/purpose-of-use.d.ts +29 -29
  54. package/lib/models/purpose-of-use.js +34 -34
  55. package/package.json +2 -2
@@ -1,50 +1,50 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patientLinkRespSchema = exports.patientNetworkLinkRespSchema = exports.patientSearchRespSchema = exports.patientSchema = exports.patientLinksSchema = exports.patientOrganizationSchema = void 0;
4
- const zod_1 = require("zod");
5
- const demographics_1 = require("./demographics");
6
- const identifier_1 = require("./identifier");
7
- const link_1 = require("./link");
8
- const facility_1 = require("./facility");
9
- const person_1 = require("./person");
10
- exports.patientOrganizationSchema = zod_1.z.object({
11
- type: zod_1.z.string().optional().nullable(),
12
- reference: zod_1.z.string().optional().nullable(),
13
- display: zod_1.z.string().optional().nullable(),
14
- });
15
- exports.patientLinksSchema = zod_1.z.object({
16
- self: link_1.linkSchema,
17
- networkLink: link_1.linkSchema.optional().nullable(),
18
- person: link_1.linkSchema.optional().nullable(),
19
- personMatch: link_1.linkSchema.optional().nullable(),
20
- upgrade: link_1.linkSchema.optional().nullable(),
21
- downgrade: link_1.linkSchema.optional().nullable(),
22
- });
23
- // The Patient resource represents a natural patient independent of a specific healthcare context.
24
- // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.4 Patient)
25
- exports.patientSchema = zod_1.z.object({
26
- active: zod_1.z.boolean().optional().nullable(),
27
- identifier: zod_1.z.array(identifier_1.identifierSchema).optional().nullable(),
28
- provider: exports.patientOrganizationSchema.optional().nullable(),
29
- details: demographics_1.demographicsSchema,
30
- _links: exports.patientLinksSchema.optional().nullable(),
31
- facilities: zod_1.z.array(facility_1.facilitySchema).optional().nullable(),
32
- });
33
- exports.patientSearchRespSchema = zod_1.z.object({
34
- message: zod_1.z.string(),
35
- _embedded: zod_1.z.object({ patient: zod_1.z.array(exports.patientSchema) }),
36
- _links: zod_1.z.object({ self: link_1.linkSchema }),
37
- });
38
- exports.patientNetworkLinkRespSchema = zod_1.z.object({
39
- _embedded: zod_1.z.object({
40
- networkLink: zod_1.z.array(link_1.networkLinkSchema.optional().nullable()).optional().nullable(),
41
- }),
42
- _links: zod_1.z.object({ self: link_1.linkSchema }).optional(),
43
- });
44
- exports.patientLinkRespSchema = zod_1.z.object({
45
- _embedded: zod_1.z.object({
46
- patientLink: zod_1.z.array(person_1.patientLinkSchema).optional().nullable(),
47
- }),
48
- _links: zod_1.z.object({ self: link_1.linkSchema }).optional(),
49
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.patientLinkRespSchema = exports.patientNetworkLinkRespSchema = exports.patientSearchRespSchema = exports.patientSchema = exports.patientLinksSchema = exports.patientOrganizationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const demographics_1 = require("./demographics");
6
+ const identifier_1 = require("./identifier");
7
+ const link_1 = require("./link");
8
+ const facility_1 = require("./facility");
9
+ const person_1 = require("./person");
10
+ exports.patientOrganizationSchema = zod_1.z.object({
11
+ type: zod_1.z.string().optional().nullable(),
12
+ reference: zod_1.z.string().optional().nullable(),
13
+ display: zod_1.z.string().optional().nullable(),
14
+ });
15
+ exports.patientLinksSchema = zod_1.z.object({
16
+ self: link_1.linkSchema,
17
+ networkLink: link_1.linkSchema.optional().nullable(),
18
+ person: link_1.linkSchema.optional().nullable(),
19
+ personMatch: link_1.linkSchema.optional().nullable(),
20
+ upgrade: link_1.linkSchema.optional().nullable(),
21
+ downgrade: link_1.linkSchema.optional().nullable(),
22
+ });
23
+ // The Patient resource represents a natural patient independent of a specific healthcare context.
24
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.4 Patient)
25
+ exports.patientSchema = zod_1.z.object({
26
+ active: zod_1.z.boolean().optional().nullable(),
27
+ identifier: zod_1.z.array(identifier_1.identifierSchema).optional().nullable(),
28
+ provider: exports.patientOrganizationSchema.optional().nullable(),
29
+ details: demographics_1.demographicsSchema,
30
+ _links: exports.patientLinksSchema.optional().nullable(),
31
+ facilities: zod_1.z.array(facility_1.facilitySchema).optional().nullable(),
32
+ });
33
+ exports.patientSearchRespSchema = zod_1.z.object({
34
+ message: zod_1.z.string(),
35
+ _embedded: zod_1.z.object({ patient: zod_1.z.array(exports.patientSchema) }),
36
+ _links: zod_1.z.object({ self: link_1.linkSchema }),
37
+ });
38
+ exports.patientNetworkLinkRespSchema = zod_1.z.object({
39
+ _embedded: zod_1.z.object({
40
+ networkLink: zod_1.z.array(link_1.networkLinkSchema.optional().nullable()).optional().nullable(),
41
+ }),
42
+ _links: zod_1.z.object({ self: link_1.linkSchema }).optional(),
43
+ });
44
+ exports.patientLinkRespSchema = zod_1.z.object({
45
+ _embedded: zod_1.z.object({
46
+ patientLink: zod_1.z.array(person_1.patientLinkSchema).optional().nullable(),
47
+ }),
48
+ _links: zod_1.z.object({ self: link_1.linkSchema }).optional(),
49
+ });
50
50
  //# sourceMappingURL=patient.js.map
@@ -1,12 +1,12 @@
1
- import { z } from "zod";
2
- export declare const periodSchema: z.ZodObject<{
3
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
4
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
5
- }, "strip", z.ZodTypeAny, {
6
- start?: string | undefined;
7
- end?: string | undefined;
8
- }, {
9
- start?: string | undefined;
10
- end?: string | undefined;
11
- }>;
12
- export type Period = z.infer<typeof periodSchema>;
1
+ import { z } from "zod";
2
+ export declare const periodSchema: z.ZodObject<{
3
+ start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
4
+ end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ start?: string | undefined;
7
+ end?: string | undefined;
8
+ }, {
9
+ start?: string | undefined;
10
+ end?: string | undefined;
11
+ }>;
12
+ export type Period = z.infer<typeof periodSchema>;
@@ -1,13 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.periodSchema = void 0;
4
- const zod_1 = require("zod");
5
- const iso_date_1 = require("./iso-date");
6
- const iso_datetime_1 = require("./iso-datetime");
7
- // A time period defined by a start and end time.
8
- // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.12 Period)
9
- exports.periodSchema = zod_1.z.object({
10
- start: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema).optional(),
11
- end: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema).optional(),
12
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.periodSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const iso_date_1 = require("./iso-date");
6
+ const iso_datetime_1 = require("./iso-datetime");
7
+ // A time period defined by a start and end time.
8
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.12 Period)
9
+ exports.periodSchema = zod_1.z.object({
10
+ start: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema).optional(),
11
+ end: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema).optional(),
12
+ });
13
13
  //# sourceMappingURL=period.js.map