@metriport/commonwell-sdk 4.3.2 → 4.3.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.
Files changed (58) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +40 -40
  3. package/lib/client/commonwell-api.d.ts +49 -49
  4. package/lib/client/commonwell-api.js +2 -2
  5. package/lib/client/commonwell.d.ts +425 -425
  6. package/lib/client/commonwell.js +739 -739
  7. package/lib/client/document.d.ts +7 -7
  8. package/lib/client/document.js +71 -71
  9. package/lib/common/commonwell-error.d.ts +12 -12
  10. package/lib/common/commonwell-error.js +34 -34
  11. package/lib/common/fileDownload.d.ts +11 -11
  12. package/lib/common/fileDownload.js +43 -43
  13. package/lib/common/make-jwt.d.ts +24 -24
  14. package/lib/common/make-jwt.js +90 -90
  15. package/lib/common/metriport-error.d.ts +4 -4
  16. package/lib/common/metriport-error.js +33 -33
  17. package/lib/common/util.d.ts +25 -25
  18. package/lib/common/util.js +70 -70
  19. package/lib/common/validate-npi.d.ts +9 -9
  20. package/lib/common/validate-npi.js +39 -39
  21. package/lib/index.d.ts +20 -20
  22. package/lib/index.js +54 -54
  23. package/lib/models/address.d.ts +50 -50
  24. package/lib/models/address.js +28 -28
  25. package/lib/models/certificates.d.ts +156 -156
  26. package/lib/models/certificates.js +26 -26
  27. package/lib/models/contact.d.ts +50 -50
  28. package/lib/models/contact.js +39 -39
  29. package/lib/models/demographics.d.ts +292 -292
  30. package/lib/models/demographics.js +34 -34
  31. package/lib/models/document.d.ts +4421 -4421
  32. package/lib/models/document.js +151 -151
  33. package/lib/models/enrollment-summary.d.ts +18 -18
  34. package/lib/models/enrollment-summary.js +14 -14
  35. package/lib/models/facility.d.ts +75 -75
  36. package/lib/models/facility.js +10 -10
  37. package/lib/models/human-name.d.ts +53 -53
  38. package/lib/models/human-name.js +37 -37
  39. package/lib/models/identifier.d.ts +79 -79
  40. package/lib/models/identifier.js +36 -36
  41. package/lib/models/iso-date.d.ts +3 -3
  42. package/lib/models/iso-date.js +6 -6
  43. package/lib/models/iso-datetime.d.ts +3 -3
  44. package/lib/models/iso-datetime.js +8 -8
  45. package/lib/models/link.d.ts +642 -642
  46. package/lib/models/link.js +50 -50
  47. package/lib/models/organization.d.ts +763 -763
  48. package/lib/models/organization.js +83 -83
  49. package/lib/models/patient.d.ts +3617 -3617
  50. package/lib/models/patient.js +49 -49
  51. package/lib/models/period.d.ts +12 -12
  52. package/lib/models/period.js +12 -12
  53. package/lib/models/person.d.ts +2440 -2440
  54. package/lib/models/person.js +39 -39
  55. package/lib/models/purpose-of-use.d.ts +29 -29
  56. package/lib/models/purpose-of-use.js +34 -34
  57. package/package.json +2 -2
  58. package/lib/tst.d.ts +0 -54
@@ -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