@metriport/commonwell-cert-runner 2.3.0 → 2.3.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/document-consumption.d.ts +6 -0
- package/dist/document-consumption.d.ts.map +1 -0
- package/dist/document-consumption.js +85 -0
- package/dist/document-consumption.js.map +1 -0
- package/dist/document-contribution.d.ts +8 -0
- package/dist/document-contribution.d.ts.map +1 -0
- package/dist/document-contribution.js +514 -0
- package/dist/document-contribution.js.map +1 -0
- package/dist/issues/issue425-strong-id-on-link.d.ts +4 -0
- package/dist/issues/issue425-strong-id-on-link.d.ts.map +1 -0
- package/dist/issues/issue425-strong-id-on-link.js +125 -0
- package/dist/issues/issue425-strong-id-on-link.js.map +1 -0
- package/dist/link-management.d.ts +4 -0
- package/dist/link-management.d.ts.map +1 -0
- package/dist/link-management.js +47 -0
- package/dist/link-management.js.map +1 -0
- package/dist/org-management.d.ts +4 -0
- package/dist/org-management.d.ts.map +1 -0
- package/dist/org-management.js +47 -0
- package/dist/org-management.js.map +1 -0
- package/dist/patient-management.d.ts +4 -0
- package/dist/patient-management.d.ts.map +1 -0
- package/dist/patient-management.js +91 -0
- package/dist/patient-management.js.map +1 -0
- package/dist/person-management.d.ts +4 -0
- package/dist/person-management.d.ts.map +1 -0
- package/dist/person-management.js +94 -0
- package/dist/person-management.js.map +1 -0
- package/dist/shared-person.d.ts +22 -0
- package/dist/shared-person.d.ts.map +1 -0
- package/dist/shared-person.js +78 -0
- package/dist/shared-person.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { CommonWell, Document, RequestMetadata } from "@metriport/commonwell-sdk";
|
|
3
|
+
export declare function documentConsumption(commonWell: CommonWell, queryMeta: RequestMetadata): Promise<void>;
|
|
4
|
+
export declare function queryDocuments(commonWell: CommonWell, queryMeta: RequestMetadata): Promise<Document[]>;
|
|
5
|
+
export declare function retrieveDocument(commonWell: CommonWell, queryMeta: RequestMetadata, doc: Document): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=document-consumption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-consumption.d.ts","sourceRoot":"","sources":["../src/document-consumption.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAW,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAS3F,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,iBAK3F;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,eAAe,GACzB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAgCrB;AAED,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,eAAe,EAC1B,GAAG,EAAE,QAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.retrieveDocument = exports.queryDocuments = exports.documentConsumption = void 0;
|
|
28
|
+
const commonwell_sdk_1 = require("@metriport/commonwell-sdk");
|
|
29
|
+
const fs = __importStar(require("fs"));
|
|
30
|
+
const payloads_1 = require("./payloads");
|
|
31
|
+
const shared_person_1 = require("./shared-person");
|
|
32
|
+
const util_1 = require("./util");
|
|
33
|
+
// Document Consumption
|
|
34
|
+
// https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Document-Consumption-(SOAP,-REST).aspx
|
|
35
|
+
async function documentConsumption(commonWell, queryMeta) {
|
|
36
|
+
const documents = await queryDocuments(commonWell, queryMeta);
|
|
37
|
+
for (const doc of documents) {
|
|
38
|
+
await retrieveDocument(commonWell, queryMeta, doc);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.documentConsumption = documentConsumption;
|
|
42
|
+
async function queryDocuments(commonWell, queryMeta) {
|
|
43
|
+
// E1: Document Query
|
|
44
|
+
console.log(`>>> E1c: Query for documents using FHIR (REST)`);
|
|
45
|
+
const { personId, patientId } = await (0, shared_person_1.findOrCreatePerson)(commonWell, queryMeta, (0, payloads_1.makeDocPerson)({ facilityId: commonWell.oid }));
|
|
46
|
+
if (!personId)
|
|
47
|
+
throw new Error(`[E1c] personId is undefined before calling getNetworkLinks()`);
|
|
48
|
+
const respLinks = await commonWell.getNetworkLinks(queryMeta, patientId);
|
|
49
|
+
console.log(respLinks);
|
|
50
|
+
const allLinks = respLinks._embedded.networkLink
|
|
51
|
+
? respLinks._embedded.networkLink.flatMap(util_1.filterTruthy)
|
|
52
|
+
: [];
|
|
53
|
+
const lola1Links = allLinks.filter(commonwell_sdk_1.isLOLA1);
|
|
54
|
+
console.log(`Found ${allLinks.length} network links, ${lola1Links.length} are LOLA 1`);
|
|
55
|
+
for (const link of lola1Links) {
|
|
56
|
+
const upgradeURL = link._links?.upgrade?.href;
|
|
57
|
+
if (!upgradeURL) {
|
|
58
|
+
console.log(`[queryDocuments] missing upgrade URL for link `, link);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const respUpgradeLink = await commonWell.upgradeOrDowngradeNetworkLink(queryMeta, upgradeURL);
|
|
62
|
+
console.log(respUpgradeLink);
|
|
63
|
+
}
|
|
64
|
+
console.log(`>>> [E1c] Querying for docs...`);
|
|
65
|
+
const respDocQuery = await commonWell.queryDocuments(queryMeta, patientId);
|
|
66
|
+
return respDocQuery.entry;
|
|
67
|
+
}
|
|
68
|
+
exports.queryDocuments = queryDocuments;
|
|
69
|
+
async function retrieveDocument(commonWell, queryMeta, doc) {
|
|
70
|
+
// E2: Document Retrieve
|
|
71
|
+
console.log(`>>> E2c: Retrieve documents using FHIR (REST)`);
|
|
72
|
+
// store the query result as well
|
|
73
|
+
const queryFileName = `./cw_consumption_${doc.id ?? "ID"}_${(0, payloads_1.makeId)()}.response.file`;
|
|
74
|
+
fs.writeFileSync(queryFileName, JSON.stringify(doc));
|
|
75
|
+
const fileName = `./cw_consumption_${doc.id ?? "ID"}_${(0, payloads_1.makeId)()}.contents.file`;
|
|
76
|
+
// the default is UTF-8, avoid changing the encoding if we don't know the file we're downloading
|
|
77
|
+
const outputStream = fs.createWriteStream(fileName, { encoding: undefined });
|
|
78
|
+
console.log(`File being created at ${process.cwd()}/${fileName}`);
|
|
79
|
+
const url = doc.content.location;
|
|
80
|
+
if (!url)
|
|
81
|
+
throw new Error(`[E2c] missing content.location in document ${doc.id}`);
|
|
82
|
+
await commonWell.retrieveDocument(queryMeta, url, outputStream);
|
|
83
|
+
}
|
|
84
|
+
exports.retrieveDocument = retrieveDocument;
|
|
85
|
+
//# sourceMappingURL=document-consumption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-consumption.js","sourceRoot":"","sources":["../src/document-consumption.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8DAA2F;AAC3F,uCAAyB;AACzB,yCAAmD;AACnD,mDAAqD;AACrD,iCAAsC;AAEtC,uBAAuB;AACvB,kHAAkH;AAE3G,KAAK,UAAU,mBAAmB,CAAC,UAAsB,EAAE,SAA0B;IAC1F,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC9D,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;QAC3B,MAAM,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;KACpD;AACH,CAAC;AALD,kDAKC;AAEM,KAAK,UAAU,cAAc,CAClC,UAAsB,EACtB,SAA0B;IAE1B,qBAAqB;IACrB,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAE9D,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,kCAAkB,EACtD,UAAU,EACV,SAAS,EACT,IAAA,wBAAa,EAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,CAC9C,CAAC;IAEF,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAC/F,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,WAAW;QAC9C,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAY,CAAC;Q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M,YAAY,GAAG,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,yBAAyB,OAAO,CAAC,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC,CAAC;IAClE,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClF,MAAM,UAAU,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;AAClE,CAAC;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { CommonWell, RequestMetadata } from "@metriport/commonwell-sdk";
|
|
3
|
+
export declare function documentContribution({ memberManagementApi, api: apiDefaultOrg, queryMeta, }: {
|
|
4
|
+
memberManagementApi: CommonWell;
|
|
5
|
+
api: CommonWell;
|
|
6
|
+
queryMeta: RequestMetadata;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=document-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-contribution.d.ts","sourceRoot":"","sources":["../src/document-contribution.ts"],"names":[],"mappings":";AACA,OAAO,EAAW,UAAU,EAAW,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAkC1F,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,GAAG,EAAE,aAAa,EAClB,SAAS,GACV,EAAE;IACD,mBAAmB,EAAE,UAAU,CAAC;IAChC,GAAG,EAAE,UAAU,CAAC;IAChB,SAAS,EAAE,eAAe,CAAC;CAC5B,iBA6GA"}
|
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.documentContribution = void 0;
|
|
31
|
+
const commonwell_sdk_1 = require("@metriport/commonwell-sdk");
|
|
32
|
+
const axios_1 = __importDefault(require("axios"));
|
|
33
|
+
const fs = __importStar(require("fs"));
|
|
34
|
+
const lodash_1 = require("lodash");
|
|
35
|
+
const payloads_1 = require("./payloads");
|
|
36
|
+
const shared_person_1 = require("./shared-person");
|
|
37
|
+
const util_1 = require("./util");
|
|
38
|
+
const AXIOS_TIMEOUT_MILLIS = 20000;
|
|
39
|
+
// Document Contribution
|
|
40
|
+
// https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Document-Contribution-(SOAP,-REST).aspx
|
|
41
|
+
const commonwellPrivateKey = (0, util_1.getEnvOrFail)("COMMONWELL_ORG_PRIVATE_KEY");
|
|
42
|
+
const commonwellCert = (0, util_1.getEnvOrFail)("COMMONWELL_ORG_CERTIFICATE");
|
|
43
|
+
const orgIdSuffix = (0, util_1.getEnvOrFail)("DOCUMENT_CONTRIBUTION_ORGANIZATION_ID");
|
|
44
|
+
const firstName = (0, util_1.getEnv)("DOCUMENT_CONTRIBUTION_PATIENT_FIRST_NAME");
|
|
45
|
+
const lastName = (0, util_1.getEnv)("DOCUMENT_CONTRIBUTION_PATIENT_LAST_NAME");
|
|
46
|
+
const dob = (0, util_1.getEnv)("DOCUMENT_CONTRIBUTION_PATIENT_DATE_OF_BIRTH");
|
|
47
|
+
const gender = (0, util_1.getEnv)("DOCUMENT_CONTRIBUTION_PATIENT_GENDER");
|
|
48
|
+
const zip = (0, util_1.getEnv)("DOCUMENT_CONTRIBUTION_PATIENT_ZIP");
|
|
49
|
+
const fhirUrl = (0, util_1.getEnvOrFail)("DOCUMENT_CONTRIBUTION_FHIR_URL");
|
|
50
|
+
const docUrl = (0, util_1.getEnvOrFail)("DOCUMENT_CONTRIBUTION_URL");
|
|
51
|
+
const rootOid = (0, util_1.getEnvOrFail)("COMMONWELL_OID");
|
|
52
|
+
async function documentContribution({ memberManagementApi, api: apiDefaultOrg, queryMeta, }) {
|
|
53
|
+
console.log(`>>> E3: Query for documents served by Metriport's FHIR server`);
|
|
54
|
+
if (!firstName) {
|
|
55
|
+
console.log(`Skipping E3 because no first name provided`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!lastName) {
|
|
59
|
+
console.log(`Skipping E3 because no last name provided`);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!zip) {
|
|
63
|
+
console.log(`Skipping E3 because no zip provided`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!dob) {
|
|
67
|
+
console.log(`Skipping E3 because no date of birth provided`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (!gender) {
|
|
71
|
+
console.log(`Skipping E3 because no gender provided`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const { orgAPI: apiNewOrg, orgName, orgId, } = await getOrCreateOrg(memberManagementApi, queryMeta);
|
|
75
|
+
const person = (0, payloads_1.makeDocPerson)({
|
|
76
|
+
firstName,
|
|
77
|
+
lastName,
|
|
78
|
+
zip,
|
|
79
|
+
gender,
|
|
80
|
+
dob,
|
|
81
|
+
facilityId: apiDefaultOrg.oid,
|
|
82
|
+
});
|
|
83
|
+
console.log(`Find or create patient and person on main org`);
|
|
84
|
+
const { personId, patientId: patientIdMainOrg } = await (0, shared_person_1.findOrCreatePerson)(apiDefaultOrg, queryMeta, person);
|
|
85
|
+
console.log(`personId: ${personId}`);
|
|
86
|
+
console.log(`patientId on main org: ${patientIdMainOrg}`);
|
|
87
|
+
const newPerson = (0, lodash_1.cloneDeep)(person);
|
|
88
|
+
newPerson.identifier = (0, payloads_1.makePatient)({ facilityId: apiNewOrg.oid }).identifier;
|
|
89
|
+
if (newPerson.identifier) {
|
|
90
|
+
newPerson.identifier[0].assigner = orgName;
|
|
91
|
+
newPerson.identifier[0].label = orgName;
|
|
92
|
+
}
|
|
93
|
+
const { patientId: patientIdNewOrg } = await (0, shared_person_1.findOrCreatePatient)(apiNewOrg, queryMeta, newPerson, personId);
|
|
94
|
+
console.log(`patientId: ${patientIdNewOrg}`);
|
|
95
|
+
console.log(`Get patients links`);
|
|
96
|
+
const respGetLinks = await apiNewOrg.getNetworkLinks(queryMeta, patientIdNewOrg);
|
|
97
|
+
console.log(respGetLinks);
|
|
98
|
+
const allLinks = respGetLinks._embedded.networkLink
|
|
99
|
+
? respGetLinks._embedded.networkLink.flatMap(util_1.filterTruthy)
|
|
100
|
+
: [];
|
|
101
|
+
const lola1Links = allLinks.filter(commonwell_sdk_1.isLOLA1);
|
|
102
|
+
console.log(`Found ${allLinks.length} network links, ${lola1Links.length} are LOLA 1`);
|
|
103
|
+
for (const link of lola1Links) {
|
|
104
|
+
const upgradeURL = link._links?.upgrade?.href;
|
|
105
|
+
if (!upgradeURL) {
|
|
106
|
+
console.log(`[queryDocuments] missing upgrade URL for link `, link);
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const respUpgradeLink = await apiNewOrg.upgradeOrDowngradeNetworkLink(queryMeta, upgradeURL);
|
|
110
|
+
console.log(respUpgradeLink);
|
|
111
|
+
}
|
|
112
|
+
console.log(`>>> [E3] Populating test data on FHIR server...`);
|
|
113
|
+
const fhirApi = axios_1.default.create({
|
|
114
|
+
timeout: AXIOS_TIMEOUT_MILLIS,
|
|
115
|
+
baseURL: fhirUrl,
|
|
116
|
+
});
|
|
117
|
+
// TODO: #230 we could split convertPatientIdToSubjectId() in two and reuse the part that splits the CW patientId.
|
|
118
|
+
const newPatientId = patientIdNewOrg.split("%5E%5E%5E")[0];
|
|
119
|
+
await addOrgToFHIRServer(orgId, orgName, fhirApi);
|
|
120
|
+
await addPatientToFHIRServer(newPatientId, fhirApi);
|
|
121
|
+
await addDocumentRefAndBinaryToFHIRServer(newPatientId, orgId, orgName, fhirApi);
|
|
122
|
+
console.log(`>>> [E3] Querying for docs from the main org...`);
|
|
123
|
+
const respDocQuery = await apiDefaultOrg.queryDocuments(queryMeta, patientIdMainOrg);
|
|
124
|
+
console.log(respDocQuery);
|
|
125
|
+
const documents = respDocQuery.entry ?? [];
|
|
126
|
+
for (const doc of documents) {
|
|
127
|
+
console.log(`DOCUMENT: ${JSON.stringify(doc, undefined, 2)}`);
|
|
128
|
+
// store the query result as well
|
|
129
|
+
const queryFileName = `./cw_contribution_${doc.id ?? "ID"}_${(0, payloads_1.makeId)()}.response.file`;
|
|
130
|
+
fs.writeFileSync(queryFileName, JSON.stringify(doc));
|
|
131
|
+
const fileName = `./cw_contribution_${doc.id ?? "ID"}_${(0, payloads_1.makeId)()}.contents.file`;
|
|
132
|
+
// the default is UTF-8, avoid changing the encoding if we don't know the file we're downloading
|
|
133
|
+
const outputStream = fs.createWriteStream(fileName, { encoding: undefined });
|
|
134
|
+
console.log(`File being created at ${process.cwd()}/${fileName}`);
|
|
135
|
+
const url = doc.content?.location;
|
|
136
|
+
if (url != null)
|
|
137
|
+
await apiDefaultOrg.retrieveDocument(queryMeta, url, outputStream);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.documentContribution = documentContribution;
|
|
141
|
+
async function getOrCreateOrg(memberManagementApi, queryMeta) {
|
|
142
|
+
const orgPayload = (0, payloads_1.makeDocContribOrganization)(orgIdSuffix);
|
|
143
|
+
const orgId = orgPayload.organizationId;
|
|
144
|
+
const orgIdWithoutNamespace = orgId.slice("urn:oid:".length);
|
|
145
|
+
const orgName = orgPayload.name;
|
|
146
|
+
console.log(`Get the doc org - ID ${orgId}, name ${orgName}`);
|
|
147
|
+
const respGetOneOrg = await memberManagementApi.getOneOrg(queryMeta, orgId);
|
|
148
|
+
console.log(respGetOneOrg);
|
|
149
|
+
if (!respGetOneOrg) {
|
|
150
|
+
console.log(`Doc org not found, create one`);
|
|
151
|
+
const respCreateOrg = await memberManagementApi.createOrg(queryMeta, orgPayload);
|
|
152
|
+
console.log(respCreateOrg);
|
|
153
|
+
console.log(`Add certificate to doc org`);
|
|
154
|
+
const respAddCertificateToOrg = await memberManagementApi.addCertificateToOrg(queryMeta, payloads_1.certificate, orgIdWithoutNamespace);
|
|
155
|
+
console.log(respAddCertificateToOrg);
|
|
156
|
+
}
|
|
157
|
+
const orgAPI = new commonwell_sdk_1.CommonWell(commonwellCert, commonwellPrivateKey, orgName, //commonwellSandboxOrgName,
|
|
158
|
+
orgIdWithoutNamespace, //commonwellSandboxOID,
|
|
159
|
+
commonwell_sdk_1.APIMode.integration);
|
|
160
|
+
return { orgAPI, orgName, orgId: orgIdWithoutNamespace };
|
|
161
|
+
}
|
|
162
|
+
async function addOrgToFHIRServer(orgId, orgName, fhirApi) {
|
|
163
|
+
// TODO: #230 we could create data as a JS structure instead of string - easier for future code enhancements and maintenance.
|
|
164
|
+
const data = `{
|
|
165
|
+
"resourceType": "Organization",
|
|
166
|
+
"id": "${orgId}",
|
|
167
|
+
"meta": {
|
|
168
|
+
"versionId": "1",
|
|
169
|
+
"lastUpdated": "2023-02-04T13:23:38.744+00:00",
|
|
170
|
+
"source": "${rootOid}"
|
|
171
|
+
},
|
|
172
|
+
"identifier": [
|
|
173
|
+
{
|
|
174
|
+
"system": "urn:ietf:rfc:3986",
|
|
175
|
+
"value": "${orgId}"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"active": true,
|
|
179
|
+
"type": [
|
|
180
|
+
{
|
|
181
|
+
"coding": [
|
|
182
|
+
{
|
|
183
|
+
"system": "http://terminology.hl7.org/CodeSystem/organization-type",
|
|
184
|
+
"code": "prov",
|
|
185
|
+
"display": "Healthcare Provider"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"text": "Healthcare Provider"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"name": "${orgName}",
|
|
192
|
+
"telecom": [
|
|
193
|
+
{
|
|
194
|
+
"system": "phone",
|
|
195
|
+
"value": "5088287000"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"address": [
|
|
199
|
+
{
|
|
200
|
+
"line": [
|
|
201
|
+
"88 WASHINGTON STREET"
|
|
202
|
+
],
|
|
203
|
+
"city": "TAUNTON",
|
|
204
|
+
"state": "MA",
|
|
205
|
+
"postalCode": "02780",
|
|
206
|
+
"country": "US"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}`;
|
|
210
|
+
await fhirApi.put(`/Organization/${orgId}`, JSON.parse(data));
|
|
211
|
+
}
|
|
212
|
+
async function addPatientToFHIRServer(patientId, fhirApi) {
|
|
213
|
+
const data = `{
|
|
214
|
+
"resourceType": "Patient",
|
|
215
|
+
"id": "${patientId}",
|
|
216
|
+
"meta": {
|
|
217
|
+
"versionId": "6",
|
|
218
|
+
"lastUpdated": "2023-02-15T22:27:07.642+00:00",
|
|
219
|
+
"source": "${rootOid}"
|
|
220
|
+
},
|
|
221
|
+
"extension": [
|
|
222
|
+
{
|
|
223
|
+
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
|
224
|
+
"extension": [
|
|
225
|
+
{
|
|
226
|
+
"url": "ombCategory",
|
|
227
|
+
"valueCoding": {
|
|
228
|
+
"system": "urn:oid:2.16.840.1.113883.6.238",
|
|
229
|
+
"code": "2106-3",
|
|
230
|
+
"display": "White"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"url": "text",
|
|
235
|
+
"valueString": "White"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
|
241
|
+
"extension": [
|
|
242
|
+
{
|
|
243
|
+
"url": "ombCategory",
|
|
244
|
+
"valueCoding": {
|
|
245
|
+
"system": "urn:oid:2.16.840.1.113883.6.238",
|
|
246
|
+
"code": "2186-5",
|
|
247
|
+
"display": "Not Hispanic or Latino"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"url": "text",
|
|
252
|
+
"valueString": "Not Hispanic or Latino"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
|
|
258
|
+
"valueString": "Deadra347 Borer986"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
|
|
262
|
+
"valueCode": "M"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
|
|
266
|
+
"valueAddress": {
|
|
267
|
+
"city": "Billerica",
|
|
268
|
+
"state": "Massachusetts",
|
|
269
|
+
"country": "US"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"url": "http://synthetichealth.github.io/synthea/disability-adjusted-life-years",
|
|
274
|
+
"valueDecimal": 14.062655945052095
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"url": "http://synthetichealth.github.io/synthea/quality-adjusted-life-years",
|
|
278
|
+
"valueDecimal": 58.93734405494791
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"identifier": [
|
|
282
|
+
{
|
|
283
|
+
"system": "https://github.com/synthetichealth/synthea",
|
|
284
|
+
"value": "2fa15bc7-8866-461a-9000-f739e425860a"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"type": {
|
|
288
|
+
"coding": [
|
|
289
|
+
{
|
|
290
|
+
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
|
291
|
+
"code": "MR",
|
|
292
|
+
"display": "Medical Record Number"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"text": "Medical Record Number"
|
|
296
|
+
},
|
|
297
|
+
"system": "http://hospital.smarthealthit.org",
|
|
298
|
+
"value": "2fa15bc7-8866-461a-9000-f739e425860a"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": {
|
|
302
|
+
"coding": [
|
|
303
|
+
{
|
|
304
|
+
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
|
305
|
+
"code": "SS",
|
|
306
|
+
"display": "Social Security Number"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"text": "Social Security Number"
|
|
310
|
+
},
|
|
311
|
+
"system": "http://hl7.org/fhir/sid/us-ssn",
|
|
312
|
+
"value": "999-93-7537"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"type": {
|
|
316
|
+
"coding": [
|
|
317
|
+
{
|
|
318
|
+
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
|
319
|
+
"code": "DL",
|
|
320
|
+
"display": "Driver's License"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"text": "Driver's License"
|
|
324
|
+
},
|
|
325
|
+
"system": "urn:oid:2.16.840.1.113883.4.3.25",
|
|
326
|
+
"value": "S99948707"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"type": {
|
|
330
|
+
"coding": [
|
|
331
|
+
{
|
|
332
|
+
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
|
333
|
+
"code": "PPN",
|
|
334
|
+
"display": "Passport Number"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"text": "Passport Number"
|
|
338
|
+
},
|
|
339
|
+
"system": "http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber",
|
|
340
|
+
"value": "X14078167X"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"name": [
|
|
344
|
+
{
|
|
345
|
+
"use": "official",
|
|
346
|
+
"family": "Rockefeller54",
|
|
347
|
+
"given": [
|
|
348
|
+
"Jonathan54"
|
|
349
|
+
],
|
|
350
|
+
"prefix": [
|
|
351
|
+
"Mr."
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"telecom": [
|
|
356
|
+
{
|
|
357
|
+
"system": "phone",
|
|
358
|
+
"value": "555-677-3119",
|
|
359
|
+
"use": "home"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"gender": "male",
|
|
363
|
+
"birthDate": "1983-12-22",
|
|
364
|
+
"address": [
|
|
365
|
+
{
|
|
366
|
+
"extension": [
|
|
367
|
+
{
|
|
368
|
+
"url": "http://hl7.org/fhir/StructureDefinition/geolocation",
|
|
369
|
+
"extension": [
|
|
370
|
+
{
|
|
371
|
+
"url": "latitude",
|
|
372
|
+
"valueDecimal": 41.93879298871088
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"url": "longitude",
|
|
376
|
+
"valueDecimal": -71.06682353144593
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"line": [
|
|
382
|
+
"894 Brakus Bypass"
|
|
383
|
+
],
|
|
384
|
+
"city": "San Francisco",
|
|
385
|
+
"state": "California",
|
|
386
|
+
"postalCode": "81547",
|
|
387
|
+
"country": "US"
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
"maritalStatus": {
|
|
391
|
+
"coding": [
|
|
392
|
+
{
|
|
393
|
+
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
|
|
394
|
+
"code": "S",
|
|
395
|
+
"display": "S"
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
"text": "S"
|
|
399
|
+
},
|
|
400
|
+
"multipleBirthBoolean": false,
|
|
401
|
+
"communication": [
|
|
402
|
+
{
|
|
403
|
+
"language": {
|
|
404
|
+
"coding": [
|
|
405
|
+
{
|
|
406
|
+
"system": "urn:ietf:bcp:47",
|
|
407
|
+
"code": "en-US",
|
|
408
|
+
"display": "English"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"text": "English"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
}`;
|
|
416
|
+
await fhirApi.put(`/Patient/${patientId}`, JSON.parse(data));
|
|
417
|
+
}
|
|
418
|
+
async function addDocumentRefAndBinaryToFHIRServer(patientId, orgId, orgName, fhirApi) {
|
|
419
|
+
const binaryId = `${orgId}.969696`;
|
|
420
|
+
const payload = fs.readFileSync("./data/doc-contrib-payload");
|
|
421
|
+
const binaryData = `{
|
|
422
|
+
"resourceType": "Binary",
|
|
423
|
+
"id": "${binaryId}",
|
|
424
|
+
"contentType": "application/xml",
|
|
425
|
+
"data": "${payload}"
|
|
426
|
+
}`;
|
|
427
|
+
await fhirApi.put(`/Binary/${binaryId}`, JSON.parse(binaryData));
|
|
428
|
+
const docRefId = `${orgId}.696969`;
|
|
429
|
+
const data = `{
|
|
430
|
+
"resourceType": "DocumentReference",
|
|
431
|
+
"id": "${docRefId}",
|
|
432
|
+
"meta": {
|
|
433
|
+
"versionId": "19",
|
|
434
|
+
"lastUpdated": "2023-02-24T16:07:16.796+00:00",
|
|
435
|
+
"source": "${rootOid}"
|
|
436
|
+
},
|
|
437
|
+
"contained": [
|
|
438
|
+
{
|
|
439
|
+
"resourceType": "Organization",
|
|
440
|
+
"id": "${orgId}",
|
|
441
|
+
"name": "${orgName}"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"resourceType": "Patient",
|
|
445
|
+
"id": "${patientId}"
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
"masterIdentifier": {
|
|
449
|
+
"system": "urn:ietf:rfc:3986",
|
|
450
|
+
"value": "${docRefId}"
|
|
451
|
+
},
|
|
452
|
+
"identifier": [
|
|
453
|
+
{
|
|
454
|
+
"use": "official",
|
|
455
|
+
"system": "urn:ietf:rfc:3986",
|
|
456
|
+
"value": "${docRefId}"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"status": "current",
|
|
460
|
+
"type": {
|
|
461
|
+
"coding": [
|
|
462
|
+
{
|
|
463
|
+
"system": "http://loinc.org/",
|
|
464
|
+
"code": "75622-1",
|
|
465
|
+
"display": "HIV 1 and 2 tests - Meaningful Use set"
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
"subject": {
|
|
470
|
+
"reference": "Patient/${patientId}",
|
|
471
|
+
"type": "Patient"
|
|
472
|
+
},
|
|
473
|
+
"author": [
|
|
474
|
+
{
|
|
475
|
+
"reference": "#${orgId}",
|
|
476
|
+
"type": "Organization"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"description": "Summarization Of Episode Notes - provided by Metriport",
|
|
480
|
+
"content": [
|
|
481
|
+
{
|
|
482
|
+
"attachment": {
|
|
483
|
+
"contentType": "application/xml",
|
|
484
|
+
"url": "${docUrl}/Binary/${binaryId}"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"context": {
|
|
489
|
+
"event": [
|
|
490
|
+
{
|
|
491
|
+
"coding": [
|
|
492
|
+
{
|
|
493
|
+
"system": "http://snomed.info/sct",
|
|
494
|
+
"code": "62479008",
|
|
495
|
+
"display": "AIDS"
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
"text": "AIDS"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"period": {
|
|
502
|
+
"start": "2022-10-05T22:00:00.000Z",
|
|
503
|
+
"end": "2022-10-05T23:00:00.000Z"
|
|
504
|
+
},
|
|
505
|
+
"sourcePatientInfo": {
|
|
506
|
+
"reference": "#${patientId}",
|
|
507
|
+
"type": "Patient"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}`;
|
|
511
|
+
await fhirApi.put(`/DocumentReference/${docRefId}`, JSON.parse(data));
|
|
512
|
+
return { docRefId, binaryId };
|
|
513
|
+
}
|
|
514
|
+
//# sourceMappingURL=document-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-contribution.js","sourceRoot":"","sources":["../src/document-contribution.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8DAA0F;AAC1F,kDAA6C;AAC7C,uCAAyB;AACzB,mCAAmC;AACnC,yCAMoB;AACpB,mDAA0E;AAC1E,iCAA4D;AAE5D,MAAM,oBAAoB,GAAG,KAAM,CAAC;AAEpC,wBAAwB;AACxB,mHAAmH;AAEnH,MAAM,oBAAoB,GAAG,IAAA,mBAAY,EAAC,4BAA4B,CAAC,CAAC;AACxE,MAAM,cAAc,GAAG,IAAA,mBAAY,EAAC,4BAA4B,CAAC,CAAC;AAElE,MAAM,WAAW,GAAG,IAAA,mBAAY,EAAC,uCAAuC,CAAC,CAAC;AAE1E,MAAM,SAAS,GAAG,IAA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