@metriport/commonwell-sdk 4.4.1-alpha.1 → 4.4.1-alpha.2
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/package.json +8 -2
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -7
- package/__tests__/commonwell-sdk.test.js +0 -7
- package/src/client/commonwell-api.ts +0 -125
- package/src/client/commonwell.ts +0 -984
- package/src/client/document.ts +0 -88
- package/src/common/commonwell-error.ts +0 -30
- package/src/common/fileDownload.ts +0 -27
- package/src/common/make-jwt.ts +0 -81
- package/src/common/metriport-error.ts +0 -9
- package/src/common/util.ts +0 -68
- package/src/common/validate-npi.ts +0 -40
- package/src/index.ts +0 -38
- package/src/models/address.ts +0 -28
- package/src/models/certificates.ts +0 -34
- package/src/models/contact.ts +0 -41
- package/src/models/demographics.ts +0 -37
- package/src/models/document.ts +0 -181
- package/src/models/enrollment-summary.ts +0 -14
- package/src/models/facility.ts +0 -9
- package/src/models/human-name.ts +0 -37
- package/src/models/identifier.ts +0 -42
- package/src/models/iso-date.ts +0 -5
- package/src/models/iso-datetime.ts +0 -8
- package/src/models/link.ts +0 -54
- package/src/models/organization.ts +0 -92
- package/src/models/patient.ts +0 -60
- package/src/models/period.ts +0 -12
- package/src/models/person.ts +0 -50
- package/src/models/purpose-of-use.ts +0 -30
- package/tsconfig.json +0 -25
- package/tsconfig.ref.json +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/commonwell-sdk",
|
|
3
|
-
"version": "4.4.1-alpha.
|
|
3
|
+
"version": "4.4.1-alpha.2",
|
|
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/",
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE",
|
|
39
|
+
"package.json"
|
|
40
|
+
],
|
|
35
41
|
"repository": {
|
|
36
42
|
"url": "https://github.com/metriport/metriport.git",
|
|
37
43
|
"type": "git",
|
|
@@ -68,5 +74,5 @@
|
|
|
68
74
|
"prettier": "^2.8.3",
|
|
69
75
|
"typescript": "^4.9.5"
|
|
70
76
|
},
|
|
71
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "633052184c5afb4d76fdad7d7b91c8e9d9b57557"
|
|
72
78
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as stream from "stream";
|
|
2
|
-
import { RequestMetadata } from "./commonwell";
|
|
3
|
-
import { CertificateParam, CertificateResp } from "../models/certificates";
|
|
4
|
-
import { DocumentQueryResponse, DocumentQueryFullResponse } from "../models/document";
|
|
5
|
-
import { Identifier, StrongId } from "../models/identifier";
|
|
6
|
-
import { NetworkLink, PatientLinkProxy } from "../models/link";
|
|
7
|
-
import { Organization, OrganizationList } from "../models/organization";
|
|
8
|
-
import {
|
|
9
|
-
Patient,
|
|
10
|
-
PatientNetworkLinkResp,
|
|
11
|
-
PatientSearchResp,
|
|
12
|
-
PatientLinkResp,
|
|
13
|
-
} from "../models/patient";
|
|
14
|
-
import { PatientLink, PatientLinkSearchResp, Person, PersonSearchResp } from "../models/person";
|
|
15
|
-
|
|
16
|
-
export interface CommonWellAPI {
|
|
17
|
-
get lastReferenceHeader(): string | undefined;
|
|
18
|
-
createOrg(meta: RequestMetadata, organization: Organization): Promise<Organization>;
|
|
19
|
-
updateOrg(meta: RequestMetadata, organization: Organization, id: string): Promise<Organization>;
|
|
20
|
-
getAllOrgs(
|
|
21
|
-
meta: RequestMetadata,
|
|
22
|
-
summary?: boolean,
|
|
23
|
-
offset?: number,
|
|
24
|
-
limit?: number,
|
|
25
|
-
sort?: string
|
|
26
|
-
): Promise<OrganizationList>;
|
|
27
|
-
getOneOrg(meta: RequestMetadata, id: string): Promise<Organization | undefined>;
|
|
28
|
-
addCertificateToOrg(
|
|
29
|
-
meta: RequestMetadata,
|
|
30
|
-
certificate: CertificateParam,
|
|
31
|
-
id: string
|
|
32
|
-
): Promise<CertificateResp>;
|
|
33
|
-
replaceCertificateForOrg(
|
|
34
|
-
meta: RequestMetadata,
|
|
35
|
-
certificate: CertificateParam,
|
|
36
|
-
id: string
|
|
37
|
-
): Promise<CertificateResp>;
|
|
38
|
-
deleteCertificateFromOrg(
|
|
39
|
-
meta: RequestMetadata,
|
|
40
|
-
id: string,
|
|
41
|
-
thumbprint: string,
|
|
42
|
-
purpose: string
|
|
43
|
-
): Promise<void>;
|
|
44
|
-
getCertificatesFromOrg(
|
|
45
|
-
meta: RequestMetadata,
|
|
46
|
-
id: string,
|
|
47
|
-
thumbprint?: string,
|
|
48
|
-
purpose?: string
|
|
49
|
-
): Promise<CertificateResp>;
|
|
50
|
-
getCertificatesFromOrgByThumbprint(
|
|
51
|
-
meta: RequestMetadata,
|
|
52
|
-
id: string,
|
|
53
|
-
thumbprint: string,
|
|
54
|
-
purpose?: string
|
|
55
|
-
): Promise<CertificateResp>;
|
|
56
|
-
getCertificatesFromOrgByThumbprintAndPurpose(
|
|
57
|
-
meta: RequestMetadata,
|
|
58
|
-
id: string,
|
|
59
|
-
thumbprint: string,
|
|
60
|
-
purpose: string
|
|
61
|
-
): Promise<CertificateResp>;
|
|
62
|
-
enrollPerson(meta: RequestMetadata, person: Person): Promise<Person>;
|
|
63
|
-
searchPerson(meta: RequestMetadata, key: string, system: string): Promise<PersonSearchResp>;
|
|
64
|
-
searchPersonByPatientDemo(meta: RequestMetadata, patientId: string): Promise<PersonSearchResp>;
|
|
65
|
-
getPersonById(meta: RequestMetadata, personId: string): Promise<Person>;
|
|
66
|
-
updatePerson(meta: RequestMetadata, person: Person, id: string): Promise<Person>;
|
|
67
|
-
patientMatch(meta: RequestMetadata, id: string): Promise<PatientSearchResp>;
|
|
68
|
-
addPatientLink(
|
|
69
|
-
meta: RequestMetadata,
|
|
70
|
-
personId: string,
|
|
71
|
-
patientUri: string,
|
|
72
|
-
patientStrongId?: StrongId
|
|
73
|
-
): Promise<PatientLink>;
|
|
74
|
-
reenrollPerson(meta: RequestMetadata, id: string): Promise<Person>;
|
|
75
|
-
unenrollPerson(meta: RequestMetadata, id: string): Promise<Person>;
|
|
76
|
-
deletePerson(meta: RequestMetadata, id: string): Promise<void>;
|
|
77
|
-
registerPatient(meta: RequestMetadata, patient: Patient): Promise<Patient>;
|
|
78
|
-
getPatient(meta: RequestMetadata, id: string): Promise<Patient>;
|
|
79
|
-
searchPatient(
|
|
80
|
-
meta: RequestMetadata,
|
|
81
|
-
fname: string,
|
|
82
|
-
lname: string,
|
|
83
|
-
dob: string,
|
|
84
|
-
gender?: string,
|
|
85
|
-
zip?: string
|
|
86
|
-
): Promise<PatientSearchResp>;
|
|
87
|
-
updatePatient(meta: RequestMetadata, patient: Patient, id: string): Promise<Patient>;
|
|
88
|
-
mergePatients(
|
|
89
|
-
meta: RequestMetadata,
|
|
90
|
-
nonSurvivingPatientId: string,
|
|
91
|
-
referencePatientLink: string
|
|
92
|
-
): Promise<void>;
|
|
93
|
-
getNetworkLinks(meta: RequestMetadata, patientId: string): Promise<PatientNetworkLinkResp>;
|
|
94
|
-
deletePatient(meta: RequestMetadata, id: string): Promise<void>;
|
|
95
|
-
queryDocuments(meta: RequestMetadata, patientId: string): Promise<DocumentQueryResponse>;
|
|
96
|
-
queryDocumentsFull(meta: RequestMetadata, patientId: string): Promise<DocumentQueryFullResponse>;
|
|
97
|
-
retrieveDocument(
|
|
98
|
-
meta: RequestMetadata,
|
|
99
|
-
inputUrl: string,
|
|
100
|
-
outputStream: stream.Writable
|
|
101
|
-
): Promise<void>;
|
|
102
|
-
upgradeOrDowngradeNetworkLink(
|
|
103
|
-
meta: RequestMetadata,
|
|
104
|
-
href: string,
|
|
105
|
-
proxy?: PatientLinkProxy
|
|
106
|
-
): Promise<NetworkLink>;
|
|
107
|
-
updatePatientLink(
|
|
108
|
-
meta: RequestMetadata,
|
|
109
|
-
patientLinkUri: string,
|
|
110
|
-
patientUri?: string,
|
|
111
|
-
identifier?: Identifier
|
|
112
|
-
): Promise<PatientLink>;
|
|
113
|
-
getPatientLinks(
|
|
114
|
-
meta: RequestMetadata,
|
|
115
|
-
personId: string,
|
|
116
|
-
limitToOrg?: boolean
|
|
117
|
-
): Promise<PatientLinkSearchResp>;
|
|
118
|
-
getPatientLink(
|
|
119
|
-
meta: RequestMetadata,
|
|
120
|
-
personId: string,
|
|
121
|
-
patientId: string
|
|
122
|
-
): Promise<PatientLinkResp>;
|
|
123
|
-
deletePatientLink(meta: RequestMetadata, patientLinkUri: string): Promise<void>;
|
|
124
|
-
resetPatientLink(meta: RequestMetadata, personId: string, patientId: string): Promise<void>;
|
|
125
|
-
}
|