@metriport/api-sdk 18.5.0-alpha.0 → 18.5.0
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.
|
@@ -10,14 +10,20 @@
|
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const metriport_1 = require("./medical/client/metriport");
|
|
13
|
-
const API_KEY = "YXdkYXdkZHdhOmNkYjY3OGFiLTA3ZTMtNDJjNS05M2Y1LTU1NDFjZjFmMTVhOA=="; // Replace with your API key
|
|
14
|
-
const BASE_URL = "http://localhost:8080"; // "https://api.metriport.com"; // or "https://api.sandbox.metriport.com" for sandbox
|
|
15
|
-
const PATIENT_ID = "019885be-755b-746e-937c-51df3b33078c"; // Replace with a real patient ID
|
|
13
|
+
// const API_KEY = "YXdkYXdkZHdhOmNkYjY3OGFiLTA3ZTMtNDJjNS05M2Y1LTU1NDFjZjFmMTVhOA=="; // Replace with your API key
|
|
14
|
+
// const BASE_URL = "http://localhost:8080"; // "https://api.metriport.com"; // or "https://api.sandbox.metriport.com" for sandbox
|
|
15
|
+
// const PATIENT_ID = "019885be-755b-746e-937c-51df3b33078c"; // Replace with a real patient ID
|
|
16
|
+
// TODO: laod from .env!! to aovid indexing !
|
|
17
|
+
// staging
|
|
18
|
+
const API_KEY = "UkFHT0o2eWU4emY2UkN6QjB4REZIOjEwY2NlNGFjLTM2MjgtNGY3OS1iZGExLTYxYzczZGE1ODc1OQ"; // Replace with your API key
|
|
19
|
+
const BASE_URL = "https://api.staging.metriport.com"; // "https://api.metriport.com"; // or "https://api.sandbox.metriport.com" for sandbox
|
|
20
|
+
const PATIENT_ID = "0192da90-6f7d-71bd-b40c-7ea4bafc2a43"; // Replace with a real patient ID
|
|
21
|
+
console.log("=== jahkwndlma;w ===\n");
|
|
16
22
|
async function testEmbedToken() {
|
|
17
23
|
console.log("=== Testing Embed Token ===\n");
|
|
18
24
|
const metriport = new metriport_1.MetriportMedicalApi(API_KEY, { baseAddress: BASE_URL });
|
|
19
25
|
const response = await metriport.createEmbedToken({
|
|
20
|
-
expirationInSeconds:
|
|
26
|
+
expirationInSeconds: 7200, // 2 hour
|
|
21
27
|
});
|
|
22
28
|
console.log("Token:", response.token);
|
|
23
29
|
console.log("\nPatient View URL:", `https://ehr.metriport.com/embed/app/patient/${PATIENT_ID}#access_token=${response.token}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch-embed-token.js","sourceRoot":"","sources":["../src/scratch-embed-token.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAEH,0DAAiE;AAEjE,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"scratch-embed-token.js","sourceRoot":"","sources":["../src/scratch-embed-token.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAEH,0DAAiE;AAEjE,mHAAmH;AACnH,kIAAkI;AAElI,+FAA+F;AAE/F,6CAA6C;AAE7C,UAAU;AACV,MAAM,OAAO,GAAG,gFAAgF,CAAC,CAAC,4BAA4B;AAC9H,MAAM,QAAQ,GAAG,mCAAmC,CAAC,CAAC,qFAAqF;AAE3I,MAAM,UAAU,GAAG,sCAAsC,CAAC,CAAC,iCAAiC;AAC5F,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAEtC,KAAK,UAAU,cAAc;IAC3B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAE7C,MAAM,SAAS,GAAG,IAAI,+BAAmB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE9E,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,gBAAgB,CAAC;QAChD,mBAAmB,EAAE,IAAI,EAAE,SAAS;KACrC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CACT,qBAAqB,EACrB,+CAA+C,UAAU,iBAAiB,QAAQ,CAAC,KAAK,EAAE,CAC3F,CAAC;IACF,OAAO,CAAC,GAAG,CACT,iBAAiB,EACjB,wEAAwE,QAAQ,CAAC,KAAK,EAAE,CACzF,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACpB,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,IAAI;QACF,MAAM,cAAc,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;KAC7B;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;KAChC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/api-sdk",
|
|
3
|
-
"version": "18.5.0
|
|
3
|
+
"version": "18.5.0",
|
|
4
4
|
"description": "Metriport helps you access and manage health and medical data, through a single open source API.",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@medplum/fhirtypes": "^2.0.32",
|
|
61
|
-
"@metriport/shared": "^0.29.0
|
|
61
|
+
"@metriport/shared": "^0.29.0",
|
|
62
62
|
"axios": "^1.8.2",
|
|
63
63
|
"dayjs": "^1.11.7",
|
|
64
64
|
"dotenv": "^16.3.1",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"ts-jest": "29.1.1",
|
|
79
79
|
"typescript": "^4.9.5"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "77ce40c6e3872beb863c52b0d561b69df9726f5a"
|
|
82
82
|
}
|