@metriport/commonwell-cert-runner 2.1.3 → 2.1.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/package.json +2 -2
- package/dist/payloads/patient-carin.d.ts +0 -3
- package/dist/payloads/patient-carin.d.ts.map +0 -1
- package/dist/payloads/patient-carin.js +0 -34
- package/dist/payloads/patient-carin.js.map +0 -1
- package/dist/payloads/patient-crane.d.ts +0 -3
- package/dist/payloads/patient-crane.d.ts.map +0 -1
- package/dist/payloads/patient-crane.js +0 -31
- package/dist/payloads/patient-crane.js.map +0 -1
- package/dist/single-commands/create-patient.d.ts +0 -5
- package/dist/single-commands/create-patient.d.ts.map +0 -1
- package/dist/single-commands/create-patient.js +0 -56
- package/dist/single-commands/create-patient.js.map +0 -1
- package/dist/single-commands/delete-patient.d.ts +0 -5
- package/dist/single-commands/delete-patient.d.ts.map +0 -1
- package/dist/single-commands/delete-patient.js +0 -51
- package/dist/single-commands/delete-patient.js.map +0 -1
- package/dist/single-commands/get-patient-links.d.ts +0 -5
- package/dist/single-commands/get-patient-links.d.ts.map +0 -1
- package/dist/single-commands/get-patient-links.js +0 -52
- package/dist/single-commands/get-patient-links.js.map +0 -1
- package/dist/single-commands/get-patient.d.ts +0 -5
- package/dist/single-commands/get-patient.d.ts.map +0 -1
- package/dist/single-commands/get-patient.js +0 -52
- package/dist/single-commands/get-patient.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/commonwell-cert-runner",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Tool to run through Edge System CommonWell certification test cases - by Metriport Inc.",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"ts-node": "^10.9.1",
|
|
66
66
|
"typescript": "^4.9.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d179ab1fe459b46e670bb3c937f7b807416c3219"
|
|
69
69
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-carin.d.ts","sourceRoot":"","sources":["../../src/payloads/patient-carin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAGb,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,kBAAkB,EAAE,YA2BhC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patientConnieCarin = void 0;
|
|
4
|
-
const commonwell_sdk_1 = require("@metriport/commonwell-sdk");
|
|
5
|
-
const identifier_1 = require("@metriport/commonwell-sdk/models/identifier");
|
|
6
|
-
exports.patientConnieCarin = {
|
|
7
|
-
address: [
|
|
8
|
-
{
|
|
9
|
-
use: commonwell_sdk_1.AddressUseCodes.home,
|
|
10
|
-
postalCode: "01890",
|
|
11
|
-
state: "MA",
|
|
12
|
-
line: ["681 Schumm View"],
|
|
13
|
-
city: "Winchester",
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
name: [
|
|
17
|
-
{
|
|
18
|
-
use: commonwell_sdk_1.NameUseCodes.usual,
|
|
19
|
-
given: ["Connie"],
|
|
20
|
-
family: ["CarinTest"],
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
gender: commonwell_sdk_1.GenderCodes.F,
|
|
24
|
-
birthDate: "1945-01-12",
|
|
25
|
-
identifier: [
|
|
26
|
-
{
|
|
27
|
-
use: "official",
|
|
28
|
-
type: "SSN",
|
|
29
|
-
value: "109887878",
|
|
30
|
-
system: identifier_1.KnownIdentifierSystems.SSN,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=patient-carin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-carin.js","sourceRoot":"","sources":["../../src/payloads/patient-carin.ts"],"names":[],"mappings":";;;AAAA,8DAKmC;AACnC,4EAAqF;AAExE,QAAA,kBAAkB,GAAiB;IAC9C,OAAO,EAAE;QACP;YACE,GAAG,EAAE,gCAAe,CAAC,IAAI;YACzB,UAAU,EAAE,OAAO;YACnB,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,CAAC,iBAAiB,CAAC;YACzB,IAAI,EAAE,YAAY;SACnB;KACF;IACD,IAAI,EAAE;QACJ;YACE,GAAG,EAAE,6BAAY,CAAC,KAAK;YACvB,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,MAAM,EAAE,CAAC,WAAW,CAAC;SACtB;KACF;IACD,MAAM,EAAE,4BAAW,CAAC,CAAC;IACrB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE;QACV;YACE,GAAG,EAAE,UAAU;YACf,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,WAAW;YAClB,MAAM,EAAE,mCAAsB,CAAC,GAAG;SACnC;KACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-crane.d.ts","sourceRoot":"","sources":["../../src/payloads/patient-crane.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAGb,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,iBAAiB,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAyB9D,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patientTracyCrane = void 0;
|
|
4
|
-
const commonwell_sdk_1 = require("@metriport/commonwell-sdk");
|
|
5
|
-
exports.patientTracyCrane = {
|
|
6
|
-
address: [
|
|
7
|
-
{
|
|
8
|
-
use: commonwell_sdk_1.AddressUseCodes.home,
|
|
9
|
-
postalCode: "01462",
|
|
10
|
-
state: "MA",
|
|
11
|
-
line: ["458 Streich Street"],
|
|
12
|
-
city: "Lunenburg",
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
name: [
|
|
16
|
-
{
|
|
17
|
-
use: commonwell_sdk_1.NameUseCodes.usual,
|
|
18
|
-
given: ["Tracy"],
|
|
19
|
-
family: ["CraneTest"],
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
gender: commonwell_sdk_1.GenderCodes.F,
|
|
23
|
-
birthDate: "1936-12-26",
|
|
24
|
-
telecom: [
|
|
25
|
-
{
|
|
26
|
-
value: "2223601564",
|
|
27
|
-
system: commonwell_sdk_1.ContactSystemCodes.phone,
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=patient-crane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-crane.js","sourceRoot":"","sources":["../../src/payloads/patient-crane.ts"],"names":[],"mappings":";;;AAAA,8DAMmC;AAEtB,QAAA,iBAAiB,GAAqC;IACjE,OAAO,EAAE;QACP;YACE,GAAG,EAAE,gCAAe,CAAC,IAAI;YACzB,UAAU,EAAE,OAAO;YACnB,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,CAAC,oBAAoB,CAAC;YAC5B,IAAI,EAAE,WAAW;SAClB;KACF;IACD,IAAI,EAAE;QACJ;YACE,GAAG,EAAE,6BAAY,CAAC,KAAK;YACvB,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,MAAM,EAAE,CAAC,WAAW,CAAC;SACtB;KACF;IACD,MAAM,EAAE,4BAAW,CAAC,CAAC;IACrB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE;QACP;YACE,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,mCAAkB,CAAC,KAAK;SACjC;KACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-patient.d.ts","sourceRoot":"","sources":["../../src/single-commands/create-patient.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,wBAAsB,aAAa,kBAgBlC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.createPatient = void 0;
|
|
27
|
-
const dotenv = __importStar(require("dotenv"));
|
|
28
|
-
dotenv.config();
|
|
29
|
-
const org_management_1 = require("../flows/org-management");
|
|
30
|
-
const payloads_1 = require("../payloads");
|
|
31
|
-
const patient_tracy_1 = require("../payloads/patient-tracy");
|
|
32
|
-
const util_1 = require("../util");
|
|
33
|
-
// Set one of the patient demographics from "../payloads" here
|
|
34
|
-
const patientDemo = patient_tracy_1.patientTracyCrane;
|
|
35
|
-
/**
|
|
36
|
-
* Supporting function used to create a patient.
|
|
37
|
-
*/
|
|
38
|
-
async function createPatient() {
|
|
39
|
-
if (!patientDemo) {
|
|
40
|
-
throw new Error("No patient demographics set, this is required");
|
|
41
|
-
}
|
|
42
|
-
const { commonWell } = await (0, org_management_1.initApiForExistingOrg)();
|
|
43
|
-
console.log(`Create Patient`);
|
|
44
|
-
const patientCreate = (0, payloads_1.makePatient)({
|
|
45
|
-
facilityId: commonWell.oid,
|
|
46
|
-
demographics: patientDemo,
|
|
47
|
-
});
|
|
48
|
-
const resp = await commonWell.createOrUpdatePatient(patientCreate);
|
|
49
|
-
console.log("Transaction ID: " + commonWell.lastTransactionId);
|
|
50
|
-
console.log("Response: " + JSON.stringify(resp, null, 2));
|
|
51
|
-
const patientId = (0, util_1.getMetriportPatientIdOrFail)(resp.Patients[0], "createPatient");
|
|
52
|
-
console.log("Patient ID: " + patientId);
|
|
53
|
-
}
|
|
54
|
-
exports.createPatient = createPatient;
|
|
55
|
-
createPatient();
|
|
56
|
-
//# sourceMappingURL=create-patient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-patient.js","sourceRoot":"","sources":["../../src/single-commands/create-patient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAGhB,4DAAgE;AAChE,0CAA0C;AAC1C,6DAA8D;AAC9D,kCAAsD;AAEtD,8DAA8D;AAC9D,MAAM,WAAW,GAAqC,iCAAiB,CAAC;AAExE;;GAEG;AACI,KAAK,UAAU,aAAa;IACjC,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,sCAAqB,GAAE,CAAC;IAErD,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC9B,MAAM,aAAa,GAAY,IAAA,sBAAW,EAAC;QACzC,UAAU,EAAE,UAAU,CAAC,GAAG;QAC1B,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,IAAA,kCAA2B,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;AAC1C,CAAC;AAhBD,sCAgBC;AAED,aAAa,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-patient.d.ts","sourceRoot":"","sources":["../../src/single-commands/delete-patient.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAsB,aAAa,kBAalC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.deletePatient = void 0;
|
|
27
|
-
const dotenv = __importStar(require("dotenv"));
|
|
28
|
-
dotenv.config();
|
|
29
|
-
// keep that ^ above all other imports
|
|
30
|
-
const util_1 = require("@metriport/commonwell-sdk/common/util");
|
|
31
|
-
const org_management_1 = require("../flows/org-management");
|
|
32
|
-
const patientId = process.argv[2]; // read patient ID from command line argument
|
|
33
|
-
/**
|
|
34
|
-
* Supporting function used in case the flow breaks and we don't delete the patient.
|
|
35
|
-
*/
|
|
36
|
-
async function deletePatient() {
|
|
37
|
-
if (!patientId || patientId.trim().length < 1) {
|
|
38
|
-
throw new Error("No patientId provided. Add it as an argument to the command");
|
|
39
|
-
}
|
|
40
|
-
const { commonWell } = await (0, org_management_1.initApiForExistingOrg)();
|
|
41
|
-
const encodedPatientId = (0, util_1.encodeToCwPatientId)({
|
|
42
|
-
patientId: patientId,
|
|
43
|
-
assignAuthority: commonWell.oid,
|
|
44
|
-
});
|
|
45
|
-
console.log(`Delete Patient ${patientId}`);
|
|
46
|
-
await commonWell.deletePatient(encodedPatientId);
|
|
47
|
-
console.log(`Patient deleted successfully`);
|
|
48
|
-
}
|
|
49
|
-
exports.deletePatient = deletePatient;
|
|
50
|
-
deletePatient();
|
|
51
|
-
//# sourceMappingURL=delete-patient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-patient.js","sourceRoot":"","sources":["../../src/single-commands/delete-patient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAChB,sCAAsC;AACtC,gEAA4E;AAC5E,4DAAgE;AAEhE,MAAM,SAAS,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,6CAA6C;AAExF;;GAEG;AACI,KAAK,UAAU,aAAa;IACjC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7C,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;KAChF;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,sCAAqB,GAAE,CAAC;IAErD,MAAM,gBAAgB,GAAG,IAAA,0BAAmB,EAAC;QAC3C,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,UAAU,CAAC,GAAG;KAChC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,kBAAkB,SAAS,EAAE,CAAC,CAAC;IAC3C,MAAM,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAC9C,CAAC;AAbD,sCAaC;AAED,aAAa,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient-links.d.ts","sourceRoot":"","sources":["../../src/single-commands/get-patient-links.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAsB,eAAe,kBAepC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getPatientLinks = void 0;
|
|
27
|
-
const dotenv = __importStar(require("dotenv"));
|
|
28
|
-
dotenv.config();
|
|
29
|
-
// keep that ^ above all other imports
|
|
30
|
-
const util_1 = require("@metriport/commonwell-sdk/common/util");
|
|
31
|
-
const org_management_1 = require("../flows/org-management");
|
|
32
|
-
const patientId = process.argv[2]; // read patient ID from command line argument
|
|
33
|
-
/**
|
|
34
|
-
* Supporting function used to get links for a patient by ID.
|
|
35
|
-
*/
|
|
36
|
-
async function getPatientLinks() {
|
|
37
|
-
if (!patientId || patientId.trim().length < 1) {
|
|
38
|
-
throw new Error("No patientId provided. Add it as an argument to the command");
|
|
39
|
-
}
|
|
40
|
-
const { commonWell } = await (0, org_management_1.initApiForExistingOrg)();
|
|
41
|
-
const encodedPatientId = (0, util_1.encodeToCwPatientId)({
|
|
42
|
-
patientId: patientId,
|
|
43
|
-
assignAuthority: commonWell.oid,
|
|
44
|
-
});
|
|
45
|
-
console.log(`Get Patient Links for ${patientId}`);
|
|
46
|
-
const resp = await commonWell.getPatientLinksByPatientId(encodedPatientId);
|
|
47
|
-
console.log("Transaction ID: " + commonWell.lastTransactionId);
|
|
48
|
-
console.log("Response: " + JSON.stringify(resp, null, 2));
|
|
49
|
-
}
|
|
50
|
-
exports.getPatientLinks = getPatientLinks;
|
|
51
|
-
getPatientLinks();
|
|
52
|
-
//# sourceMappingURL=get-patient-links.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient-links.js","sourceRoot":"","sources":["../../src/single-commands/get-patient-links.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAChB,sCAAsC;AACtC,gEAA4E;AAC5E,4DAAgE;AAEhE,MAAM,SAAS,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,6CAA6C;AAExF;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7C,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;KAChF;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,sCAAqB,GAAE,CAAC;IAErD,MAAM,gBAAgB,GAAG,IAAA,0BAAmB,EAAC;QAC3C,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,UAAU,CAAC,GAAG;KAChC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,yBAAyB,SAAS,EAAE,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAfD,0CAeC;AAED,eAAe,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient.d.ts","sourceRoot":"","sources":["../../src/single-commands/get-patient.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAsB,UAAU,kBAe/B"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getPatient = void 0;
|
|
27
|
-
const dotenv = __importStar(require("dotenv"));
|
|
28
|
-
dotenv.config();
|
|
29
|
-
// keep that ^ above all other imports
|
|
30
|
-
const util_1 = require("@metriport/commonwell-sdk/common/util");
|
|
31
|
-
const org_management_1 = require("../flows/org-management");
|
|
32
|
-
const patientId = process.argv[2]; // read patient ID from command line argument
|
|
33
|
-
/**
|
|
34
|
-
* Supporting function used to get a patient by ID.
|
|
35
|
-
*/
|
|
36
|
-
async function getPatient() {
|
|
37
|
-
if (!patientId || patientId.trim().length < 1) {
|
|
38
|
-
throw new Error("No patientId provided. Add it as an argument to the command");
|
|
39
|
-
}
|
|
40
|
-
const { commonWell } = await (0, org_management_1.initApiForExistingOrg)();
|
|
41
|
-
const encodedPatientId = (0, util_1.encodeToCwPatientId)({
|
|
42
|
-
patientId: patientId,
|
|
43
|
-
assignAuthority: commonWell.oid,
|
|
44
|
-
});
|
|
45
|
-
console.log(`Get Patient ${patientId}`);
|
|
46
|
-
const resp = await commonWell.getPatient(encodedPatientId);
|
|
47
|
-
console.log("Transaction ID: " + commonWell.lastTransactionId);
|
|
48
|
-
console.log("Response: " + JSON.stringify(resp, null, 2));
|
|
49
|
-
}
|
|
50
|
-
exports.getPatient = getPatient;
|
|
51
|
-
getPatient();
|
|
52
|
-
//# sourceMappingURL=get-patient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-patient.js","sourceRoot":"","sources":["../../src/single-commands/get-patient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAChB,sCAAsC;AACtC,gEAA4E;AAC5E,4DAAgE;AAEhE,MAAM,SAAS,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,6CAA6C;AAExF;;GAEG;AACI,KAAK,UAAU,UAAU;IAC9B,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7C,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;KAChF;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,sCAAqB,GAAE,CAAC;IAErD,MAAM,gBAAgB,GAAG,IAAA,0BAAmB,EAAC;QAC3C,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,UAAU,CAAC,GAAG;KAChC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,eAAe,SAAS,EAAE,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAfD,gCAeC;AAED,UAAU,EAAE,CAAC"}
|