@metriport/commonwell-sdk 4.3.3 → 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.
- package/LICENSE +20 -20
- package/README.md +40 -40
- package/lib/client/commonwell-api.d.ts +49 -49
- package/lib/client/commonwell-api.js +2 -2
- package/lib/client/commonwell.d.ts +425 -425
- package/lib/client/commonwell.js +739 -739
- package/lib/client/document.d.ts +7 -7
- package/lib/client/document.js +71 -71
- package/lib/common/commonwell-error.d.ts +12 -12
- package/lib/common/commonwell-error.js +34 -34
- package/lib/common/fileDownload.d.ts +11 -11
- package/lib/common/fileDownload.js +43 -43
- package/lib/common/make-jwt.d.ts +24 -24
- package/lib/common/make-jwt.js +90 -90
- package/lib/common/metriport-error.d.ts +4 -4
- package/lib/common/metriport-error.js +33 -33
- package/lib/common/util.d.ts +25 -25
- package/lib/common/util.js +70 -70
- package/lib/common/validate-npi.d.ts +9 -9
- package/lib/common/validate-npi.js +39 -39
- package/lib/index.d.ts +20 -20
- package/lib/index.js +54 -54
- package/lib/models/address.d.ts +50 -50
- package/lib/models/address.js +28 -28
- package/lib/models/certificates.d.ts +156 -156
- package/lib/models/certificates.js +26 -26
- package/lib/models/contact.d.ts +50 -50
- package/lib/models/contact.js +39 -39
- package/lib/models/demographics.d.ts +292 -292
- package/lib/models/demographics.js +34 -34
- package/lib/models/document.d.ts +4421 -4421
- package/lib/models/document.js +151 -151
- package/lib/models/enrollment-summary.d.ts +18 -18
- package/lib/models/enrollment-summary.js +14 -14
- package/lib/models/facility.d.ts +75 -75
- package/lib/models/facility.js +10 -10
- package/lib/models/human-name.d.ts +53 -53
- package/lib/models/human-name.js +37 -37
- package/lib/models/identifier.d.ts +79 -79
- package/lib/models/identifier.js +36 -36
- package/lib/models/iso-date.d.ts +3 -3
- package/lib/models/iso-date.js +6 -6
- package/lib/models/iso-datetime.d.ts +3 -3
- package/lib/models/iso-datetime.js +8 -8
- package/lib/models/link.d.ts +642 -642
- package/lib/models/link.js +50 -50
- package/lib/models/organization.d.ts +763 -763
- package/lib/models/organization.js +83 -83
- package/lib/models/patient.d.ts +3617 -3617
- package/lib/models/patient.js +49 -49
- package/lib/models/period.d.ts +12 -12
- package/lib/models/period.js +12 -12
- package/lib/models/person.d.ts +2440 -2440
- package/lib/models/person.js +39 -39
- package/lib/models/purpose-of-use.d.ts +29 -29
- package/lib/models/purpose-of-use.js +34 -34
- package/package.json +2 -2
package/lib/models/person.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patientLinkSearchRespSchema = exports.patientLinkSchema = exports.personSearchRespSchema = exports.personSchema = exports.personLinksSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const demographics_1 = require("./demographics");
|
|
6
|
-
const enrollment_summary_1 = require("./enrollment-summary");
|
|
7
|
-
const link_1 = require("./link");
|
|
8
|
-
exports.personLinksSchema = zod_1.z.object({
|
|
9
|
-
self: link_1.linkSchema,
|
|
10
|
-
patientLink: link_1.linkSchema.optional().nullable(),
|
|
11
|
-
patientMatch: link_1.linkSchema.optional().nullable(),
|
|
12
|
-
unenroll: link_1.linkSchema.optional().nullable(),
|
|
13
|
-
enroll: link_1.linkSchema.optional().nullable(),
|
|
14
|
-
reset: link_1.linkSchema.optional().nullable(),
|
|
15
|
-
});
|
|
16
|
-
// The Person resource represents a natural person independent of a specific healthcare context.
|
|
17
|
-
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.6 Person)
|
|
18
|
-
exports.personSchema = zod_1.z.object({
|
|
19
|
-
enrolled: zod_1.z.boolean().optional().nullable(),
|
|
20
|
-
enrollmentSummary: enrollment_summary_1.enrollmentSummarySchema.optional().nullable(),
|
|
21
|
-
details: demographics_1.demographicsSchema,
|
|
22
|
-
_links: exports.personLinksSchema.optional().nullable(),
|
|
23
|
-
});
|
|
24
|
-
exports.personSearchRespSchema = zod_1.z.object({
|
|
25
|
-
message: zod_1.z.string(),
|
|
26
|
-
_embedded: zod_1.z.object({ person: zod_1.z.array(exports.personSchema) }),
|
|
27
|
-
_links: zod_1.z.object({ self: link_1.linkSchema }),
|
|
28
|
-
});
|
|
29
|
-
// Within the context of a Person resource, a PatientLink represents a confirmed relationship to a Patient Record.
|
|
30
|
-
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.5 PatientLink)
|
|
31
|
-
exports.patientLinkSchema = zod_1.z.object({
|
|
32
|
-
patient: zod_1.z.string(),
|
|
33
|
-
assuranceLevel: link_1.lolaSchema,
|
|
34
|
-
_links: exports.personLinksSchema.optional().nullable(),
|
|
35
|
-
});
|
|
36
|
-
exports.patientLinkSearchRespSchema = zod_1.z.object({
|
|
37
|
-
_embedded: zod_1.z.object({ patientLink: zod_1.z.array(exports.patientLinkSchema) }),
|
|
38
|
-
_links: zod_1.z.object({ self: link_1.linkSchema }),
|
|
39
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.patientLinkSearchRespSchema = exports.patientLinkSchema = exports.personSearchRespSchema = exports.personSchema = exports.personLinksSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const demographics_1 = require("./demographics");
|
|
6
|
+
const enrollment_summary_1 = require("./enrollment-summary");
|
|
7
|
+
const link_1 = require("./link");
|
|
8
|
+
exports.personLinksSchema = zod_1.z.object({
|
|
9
|
+
self: link_1.linkSchema,
|
|
10
|
+
patientLink: link_1.linkSchema.optional().nullable(),
|
|
11
|
+
patientMatch: link_1.linkSchema.optional().nullable(),
|
|
12
|
+
unenroll: link_1.linkSchema.optional().nullable(),
|
|
13
|
+
enroll: link_1.linkSchema.optional().nullable(),
|
|
14
|
+
reset: link_1.linkSchema.optional().nullable(),
|
|
15
|
+
});
|
|
16
|
+
// The Person resource represents a natural person independent of a specific healthcare context.
|
|
17
|
+
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.6 Person)
|
|
18
|
+
exports.personSchema = zod_1.z.object({
|
|
19
|
+
enrolled: zod_1.z.boolean().optional().nullable(),
|
|
20
|
+
enrollmentSummary: enrollment_summary_1.enrollmentSummarySchema.optional().nullable(),
|
|
21
|
+
details: demographics_1.demographicsSchema,
|
|
22
|
+
_links: exports.personLinksSchema.optional().nullable(),
|
|
23
|
+
});
|
|
24
|
+
exports.personSearchRespSchema = zod_1.z.object({
|
|
25
|
+
message: zod_1.z.string(),
|
|
26
|
+
_embedded: zod_1.z.object({ person: zod_1.z.array(exports.personSchema) }),
|
|
27
|
+
_links: zod_1.z.object({ self: link_1.linkSchema }),
|
|
28
|
+
});
|
|
29
|
+
// Within the context of a Person resource, a PatientLink represents a confirmed relationship to a Patient Record.
|
|
30
|
+
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.5 PatientLink)
|
|
31
|
+
exports.patientLinkSchema = zod_1.z.object({
|
|
32
|
+
patient: zod_1.z.string(),
|
|
33
|
+
assuranceLevel: link_1.lolaSchema,
|
|
34
|
+
_links: exports.personLinksSchema.optional().nullable(),
|
|
35
|
+
});
|
|
36
|
+
exports.patientLinkSearchRespSchema = zod_1.z.object({
|
|
37
|
+
_embedded: zod_1.z.object({ patientLink: zod_1.z.array(exports.patientLinkSchema) }),
|
|
38
|
+
_links: zod_1.z.object({ self: link_1.linkSchema }),
|
|
39
|
+
});
|
|
40
40
|
//# sourceMappingURL=person.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export declare enum PurposeOfUse {
|
|
2
|
-
TREATMENT = "TREATMENT",
|
|
3
|
-
PAYMENT = "PAYMENT",
|
|
4
|
-
OPERATIONS = "OPERATIONS",
|
|
5
|
-
SYSADMIN = "SYSADMIN",
|
|
6
|
-
FRAUD = "FRAUD",
|
|
7
|
-
PSYCHOTHERAPY = "PSYCHOTHERAPY",
|
|
8
|
-
TRAINING = "TRAINING",
|
|
9
|
-
LEGAL = "LEGAL",
|
|
10
|
-
MARKETING = "MARKETING",
|
|
11
|
-
DIRECTORY = "DIRECTORY",
|
|
12
|
-
FAMILY = "FAMILY",
|
|
13
|
-
PRESENT = "PRESENT",
|
|
14
|
-
EMERGENCY = "EMERGENCY",
|
|
15
|
-
DISASTER = "DISASTER",
|
|
16
|
-
PUBLICHEALTH = "PUBLICHEALTH",
|
|
17
|
-
ABUSE = "ABUSE",
|
|
18
|
-
OVERSIGHT = "OVERSIGHT",
|
|
19
|
-
JUDICIAL = "JUDICIAL",
|
|
20
|
-
LAW = "LAW",
|
|
21
|
-
DECEASED = "DECEASED",
|
|
22
|
-
DONATION = "DONATION",
|
|
23
|
-
RESEARCH = "RESEARCH",
|
|
24
|
-
THREAT = "THREAT",
|
|
25
|
-
GOVERNMENT = "GOVERNMENT",
|
|
26
|
-
WORKERSCOMP = "WORKERSCOMP",
|
|
27
|
-
COVERAGE = "COVERAGE",
|
|
28
|
-
REQUEST = "REQUEST"
|
|
29
|
-
}
|
|
1
|
+
export declare enum PurposeOfUse {
|
|
2
|
+
TREATMENT = "TREATMENT",
|
|
3
|
+
PAYMENT = "PAYMENT",
|
|
4
|
+
OPERATIONS = "OPERATIONS",
|
|
5
|
+
SYSADMIN = "SYSADMIN",
|
|
6
|
+
FRAUD = "FRAUD",
|
|
7
|
+
PSYCHOTHERAPY = "PSYCHOTHERAPY",
|
|
8
|
+
TRAINING = "TRAINING",
|
|
9
|
+
LEGAL = "LEGAL",
|
|
10
|
+
MARKETING = "MARKETING",
|
|
11
|
+
DIRECTORY = "DIRECTORY",
|
|
12
|
+
FAMILY = "FAMILY",
|
|
13
|
+
PRESENT = "PRESENT",
|
|
14
|
+
EMERGENCY = "EMERGENCY",
|
|
15
|
+
DISASTER = "DISASTER",
|
|
16
|
+
PUBLICHEALTH = "PUBLICHEALTH",
|
|
17
|
+
ABUSE = "ABUSE",
|
|
18
|
+
OVERSIGHT = "OVERSIGHT",
|
|
19
|
+
JUDICIAL = "JUDICIAL",
|
|
20
|
+
LAW = "LAW",
|
|
21
|
+
DECEASED = "DECEASED",
|
|
22
|
+
DONATION = "DONATION",
|
|
23
|
+
RESEARCH = "RESEARCH",
|
|
24
|
+
THREAT = "THREAT",
|
|
25
|
+
GOVERNMENT = "GOVERNMENT",
|
|
26
|
+
WORKERSCOMP = "WORKERSCOMP",
|
|
27
|
+
COVERAGE = "COVERAGE",
|
|
28
|
+
REQUEST = "REQUEST"
|
|
29
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PurposeOfUse = void 0;
|
|
4
|
-
// https://www.hl7.org/fhir/codesystem-nhin-purposeofuse.html
|
|
5
|
-
var PurposeOfUse;
|
|
6
|
-
(function (PurposeOfUse) {
|
|
7
|
-
PurposeOfUse["TREATMENT"] = "TREATMENT";
|
|
8
|
-
PurposeOfUse["PAYMENT"] = "PAYMENT";
|
|
9
|
-
PurposeOfUse["OPERATIONS"] = "OPERATIONS";
|
|
10
|
-
PurposeOfUse["SYSADMIN"] = "SYSADMIN";
|
|
11
|
-
PurposeOfUse["FRAUD"] = "FRAUD";
|
|
12
|
-
PurposeOfUse["PSYCHOTHERAPY"] = "PSYCHOTHERAPY";
|
|
13
|
-
PurposeOfUse["TRAINING"] = "TRAINING";
|
|
14
|
-
PurposeOfUse["LEGAL"] = "LEGAL";
|
|
15
|
-
PurposeOfUse["MARKETING"] = "MARKETING";
|
|
16
|
-
PurposeOfUse["DIRECTORY"] = "DIRECTORY";
|
|
17
|
-
PurposeOfUse["FAMILY"] = "FAMILY";
|
|
18
|
-
PurposeOfUse["PRESENT"] = "PRESENT";
|
|
19
|
-
PurposeOfUse["EMERGENCY"] = "EMERGENCY";
|
|
20
|
-
PurposeOfUse["DISASTER"] = "DISASTER";
|
|
21
|
-
PurposeOfUse["PUBLICHEALTH"] = "PUBLICHEALTH";
|
|
22
|
-
PurposeOfUse["ABUSE"] = "ABUSE";
|
|
23
|
-
PurposeOfUse["OVERSIGHT"] = "OVERSIGHT";
|
|
24
|
-
PurposeOfUse["JUDICIAL"] = "JUDICIAL";
|
|
25
|
-
PurposeOfUse["LAW"] = "LAW";
|
|
26
|
-
PurposeOfUse["DECEASED"] = "DECEASED";
|
|
27
|
-
PurposeOfUse["DONATION"] = "DONATION";
|
|
28
|
-
PurposeOfUse["RESEARCH"] = "RESEARCH";
|
|
29
|
-
PurposeOfUse["THREAT"] = "THREAT";
|
|
30
|
-
PurposeOfUse["GOVERNMENT"] = "GOVERNMENT";
|
|
31
|
-
PurposeOfUse["WORKERSCOMP"] = "WORKERSCOMP";
|
|
32
|
-
PurposeOfUse["COVERAGE"] = "COVERAGE";
|
|
33
|
-
PurposeOfUse["REQUEST"] = "REQUEST";
|
|
34
|
-
})(PurposeOfUse = exports.PurposeOfUse || (exports.PurposeOfUse = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PurposeOfUse = void 0;
|
|
4
|
+
// https://www.hl7.org/fhir/codesystem-nhin-purposeofuse.html
|
|
5
|
+
var PurposeOfUse;
|
|
6
|
+
(function (PurposeOfUse) {
|
|
7
|
+
PurposeOfUse["TREATMENT"] = "TREATMENT";
|
|
8
|
+
PurposeOfUse["PAYMENT"] = "PAYMENT";
|
|
9
|
+
PurposeOfUse["OPERATIONS"] = "OPERATIONS";
|
|
10
|
+
PurposeOfUse["SYSADMIN"] = "SYSADMIN";
|
|
11
|
+
PurposeOfUse["FRAUD"] = "FRAUD";
|
|
12
|
+
PurposeOfUse["PSYCHOTHERAPY"] = "PSYCHOTHERAPY";
|
|
13
|
+
PurposeOfUse["TRAINING"] = "TRAINING";
|
|
14
|
+
PurposeOfUse["LEGAL"] = "LEGAL";
|
|
15
|
+
PurposeOfUse["MARKETING"] = "MARKETING";
|
|
16
|
+
PurposeOfUse["DIRECTORY"] = "DIRECTORY";
|
|
17
|
+
PurposeOfUse["FAMILY"] = "FAMILY";
|
|
18
|
+
PurposeOfUse["PRESENT"] = "PRESENT";
|
|
19
|
+
PurposeOfUse["EMERGENCY"] = "EMERGENCY";
|
|
20
|
+
PurposeOfUse["DISASTER"] = "DISASTER";
|
|
21
|
+
PurposeOfUse["PUBLICHEALTH"] = "PUBLICHEALTH";
|
|
22
|
+
PurposeOfUse["ABUSE"] = "ABUSE";
|
|
23
|
+
PurposeOfUse["OVERSIGHT"] = "OVERSIGHT";
|
|
24
|
+
PurposeOfUse["JUDICIAL"] = "JUDICIAL";
|
|
25
|
+
PurposeOfUse["LAW"] = "LAW";
|
|
26
|
+
PurposeOfUse["DECEASED"] = "DECEASED";
|
|
27
|
+
PurposeOfUse["DONATION"] = "DONATION";
|
|
28
|
+
PurposeOfUse["RESEARCH"] = "RESEARCH";
|
|
29
|
+
PurposeOfUse["THREAT"] = "THREAT";
|
|
30
|
+
PurposeOfUse["GOVERNMENT"] = "GOVERNMENT";
|
|
31
|
+
PurposeOfUse["WORKERSCOMP"] = "WORKERSCOMP";
|
|
32
|
+
PurposeOfUse["COVERAGE"] = "COVERAGE";
|
|
33
|
+
PurposeOfUse["REQUEST"] = "REQUEST";
|
|
34
|
+
})(PurposeOfUse = exports.PurposeOfUse || (exports.PurposeOfUse = {}));
|
|
35
35
|
//# sourceMappingURL=purpose-of-use.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/commonwell-sdk",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"description": "SDK to simplify CommonWell API integration - by Metriport Inc.",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"prettier": "^2.8.3",
|
|
52
52
|
"typescript": "^4.9.5"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "63c3af0dad4eb9b9a1b82bde8f547fcdec8489c3"
|
|
55
55
|
}
|