@metriport/commonwell-cert-runner 2.4.0 → 2.4.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/flows/contribution/binary.js +1 -2
- package/dist/flows/contribution/binary.js.map +1 -1
- package/dist/flows/contribution/contribution-server.js +18 -9
- package/dist/flows/contribution/contribution-server.js.map +1 -1
- package/dist/flows/contribution/document-reference.js +1 -2
- package/dist/flows/contribution/document-reference.js.map +1 -1
- package/dist/flows/contribution/token.js +19 -10
- package/dist/flows/contribution/token.js.map +1 -1
- package/dist/flows/directory-management.js +1 -2
- package/dist/flows/directory-management.js.map +1 -1
- package/dist/flows/document-consumption.js +3 -4
- package/dist/flows/document-consumption.js.map +1 -1
- package/dist/flows/document-contribution.js +1 -2
- package/dist/flows/document-contribution.js.map +1 -1
- package/dist/flows/link-management.js +1 -2
- package/dist/flows/link-management.js.map +1 -1
- package/dist/flows/org-management-initiator-only.js +1 -2
- package/dist/flows/org-management-initiator-only.js.map +1 -1
- package/dist/flows/org-management.js +3 -4
- package/dist/flows/org-management.js.map +1 -1
- package/dist/flows/patient-management.js +1 -2
- package/dist/flows/patient-management.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- 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/payloads/probable-patient-sina.js +1 -2
- package/dist/payloads/probable-patient-sina.js.map +1 -1
- package/dist/payloads.d.ts +1 -1
- package/dist/payloads.d.ts.map +1 -1
- package/dist/payloads.js +25 -15
- package/dist/payloads.js.map +1 -1
- 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/dist/single-commands/document-parse.js +18 -9
- package/dist/single-commands/document-parse.js.map +1 -1
- package/dist/single-commands/init-contrib-server.js +18 -9
- package/dist/single-commands/init-contrib-server.js.map +1 -1
- package/dist/single-commands/org-get.js +18 -9
- package/dist/single-commands/org-get.js.map +1 -1
- package/dist/single-commands/patient-create.js +18 -9
- package/dist/single-commands/patient-create.js.map +1 -1
- package/dist/single-commands/patient-delete.js +18 -9
- package/dist/single-commands/patient-delete.js.map +1 -1
- package/dist/single-commands/patient-get-links.js +18 -9
- package/dist/single-commands/patient-get-links.js.map +1 -1
- package/dist/single-commands/patient-get-probable-links.js +18 -9
- package/dist/single-commands/patient-get-probable-links.js.map +1 -1
- package/dist/single-commands/patient-get.js +18 -9
- package/dist/single-commands/patient-get.js.map +1 -1
- package/dist/util.js +26 -17
- package/dist/util.js.map +1 -1
- package/package.json +9 -9
package/dist/util.js
CHANGED
|
@@ -15,15 +15,33 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
36
|
+
exports.getEnv = getEnv;
|
|
37
|
+
exports.getEnvOrFail = getEnvOrFail;
|
|
38
|
+
exports.getCertificateContent = getCertificateContent;
|
|
39
|
+
exports.filterTruthy = filterTruthy;
|
|
40
|
+
exports.firstElementOrFail = firstElementOrFail;
|
|
41
|
+
exports.makeShortName = makeShortName;
|
|
42
|
+
exports.getMetriportPatientIdOrFail = getMetriportPatientIdOrFail;
|
|
43
|
+
exports.logError = logError;
|
|
44
|
+
exports.waitSeconds = waitSeconds;
|
|
27
45
|
const dotenv = __importStar(require("dotenv"));
|
|
28
46
|
dotenv.config();
|
|
29
47
|
// keep that ^ above all other imports
|
|
@@ -33,14 +51,12 @@ const shared_1 = require("@metriport/shared");
|
|
|
33
51
|
function getEnv(name) {
|
|
34
52
|
return process.env[name];
|
|
35
53
|
}
|
|
36
|
-
exports.getEnv = getEnv;
|
|
37
54
|
function getEnvOrFail(name) {
|
|
38
55
|
const value = getEnv(name);
|
|
39
56
|
if (!value || value.trim().length < 1)
|
|
40
57
|
throw new Error(`Missing env var ${name}`);
|
|
41
58
|
return value;
|
|
42
59
|
}
|
|
43
|
-
exports.getEnvOrFail = getEnvOrFail;
|
|
44
60
|
function getCertificateContent(cert) {
|
|
45
61
|
const regex = /-+BEGIN CERTIFICATE-+([\s\S]+?)-+END CERTIFICATE-+/i;
|
|
46
62
|
const matches = cert.match(regex);
|
|
@@ -50,17 +66,14 @@ function getCertificateContent(cert) {
|
|
|
50
66
|
}
|
|
51
67
|
return undefined;
|
|
52
68
|
}
|
|
53
|
-
exports.getCertificateContent = getCertificateContent;
|
|
54
69
|
function filterTruthy(o) {
|
|
55
70
|
return o ? o : [];
|
|
56
71
|
}
|
|
57
|
-
exports.filterTruthy = filterTruthy;
|
|
58
72
|
function firstElementOrFail(arr, fieldName) {
|
|
59
73
|
if (arr && arr.length > 0)
|
|
60
74
|
return arr[0];
|
|
61
75
|
throw new Error(`No first ${fieldName ? fieldName : "element"} on array`);
|
|
62
76
|
}
|
|
63
|
-
exports.firstElementOrFail = firstElementOrFail;
|
|
64
77
|
function makeShortName() {
|
|
65
78
|
let shortName = " ";
|
|
66
79
|
while (shortName.includes(" ")) {
|
|
@@ -68,7 +81,6 @@ function makeShortName() {
|
|
|
68
81
|
}
|
|
69
82
|
return shortName;
|
|
70
83
|
}
|
|
71
|
-
exports.makeShortName = makeShortName;
|
|
72
84
|
function getMetriportPatientIdOrFail(patient, context) {
|
|
73
85
|
if (!patient)
|
|
74
86
|
throw new Error("Missing patient");
|
|
@@ -76,7 +88,6 @@ function getMetriportPatientIdOrFail(patient, context) {
|
|
|
76
88
|
console.log(`>>> [${context}] Patient ID: ${patientId}`);
|
|
77
89
|
return patientId;
|
|
78
90
|
}
|
|
79
|
-
exports.getMetriportPatientIdOrFail = getMetriportPatientIdOrFail;
|
|
80
91
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
92
|
function logError(error) {
|
|
82
93
|
console.error(`Error (${error.response?.status}): ${error.message}`);
|
|
@@ -84,10 +95,8 @@ function logError(error) {
|
|
|
84
95
|
console.error(JSON.stringify(error.response.data, null, 2));
|
|
85
96
|
}
|
|
86
97
|
}
|
|
87
|
-
exports.logError = logError;
|
|
88
98
|
function waitSeconds(seconds) {
|
|
89
99
|
console.log(`waiting ${seconds} seconds...`);
|
|
90
100
|
return (0, shared_1.sleep)(seconds * 1000);
|
|
91
101
|
}
|
|
92
|
-
exports.waitSeconds = waitSeconds;
|
|
93
102
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,MAAM,mCAAe;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAChB,sCAAsC;AACtC,2CAAwC;AACxC,8DAAoE;AAEpE,8CAA0C;AAE1C,gBAAuB,IAAY;IACjC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AACD,sBAA6B,IAAY;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IAClF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+BAAsC,IAAY;IAChD,MAAM,KAAK,GAAG,qDAAqD,CAAC;IACpE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,OAAO,IAAI,OAAO,CAA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CAAC;QACzB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,qBAA4B,OAAe;IACzC,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,aAAa,CAAC,CAAC;IAC7C,OAAO,IAAA,cAAK,EAAC,OAAO,GAAG,IAAK,CAAC,CAAC;AAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/commonwell-cert-runner",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
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/",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"clean": "rimraf dist && rimraf node_modules",
|
|
30
30
|
"tsc": "tsc",
|
|
31
|
-
"build": "
|
|
31
|
+
"build": "tsgo -p .",
|
|
32
32
|
"build:cloud": "npm run build",
|
|
33
33
|
"start": "ts-node src/index.ts",
|
|
34
|
-
"typecheck": "
|
|
34
|
+
"typecheck": "tsgo --noEmit",
|
|
35
35
|
"lint": "npx eslint . --ext .ts",
|
|
36
36
|
"lint-fix": "npm run lint --fix",
|
|
37
37
|
"prettier-fix": "npx prettier '**/*.{js,ts,md}' --write --ignore-path ../../.prettierignore",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@metriport/commonwell-sdk": "file:packages/commonwell-sdk",
|
|
45
45
|
"@metriport/shared": "file:packages/shared",
|
|
46
|
-
"axios": "^1.
|
|
46
|
+
"axios": "^1.15.0",
|
|
47
47
|
"commander": "^9.5.0",
|
|
48
48
|
"dayjs": "^1.11.7",
|
|
49
49
|
"dotenv": "^16.0.3",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"@types/jsonwebtoken": "^9.0.5",
|
|
58
58
|
"@types/lodash": "^4.14.194",
|
|
59
59
|
"@types/node": "^18.11.18",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "
|
|
61
|
-
"@typescript-eslint/parser": "
|
|
62
|
-
"eslint": "
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "8.59.4",
|
|
61
|
+
"@typescript-eslint/parser": "8.59.4",
|
|
62
|
+
"eslint": "8.57.1",
|
|
63
63
|
"eslint-config-prettier": "^8.6.0",
|
|
64
64
|
"nodemon": "^2.0.20",
|
|
65
65
|
"ts-node": "^10.9.1",
|
|
66
|
-
"typescript": "
|
|
66
|
+
"typescript": "6.0.3"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "dc4dd57a22d064cbec9e38d58287ae87231a76e4"
|
|
69
69
|
}
|