From 4a0da66094a11958b62fd39b2e5cc559dcde796e Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:54:37 -0300 Subject: [PATCH 1/5] fix(cw-sdk): don't include req headers on errors Ref eng-532 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- .../commonwell/document/document-query.ts | 35 ++++++++++--------- .../commonwell-sdk/src/client/document.ts | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/packages/api/src/external/commonwell/document/document-query.ts b/packages/api/src/external/commonwell/document/document-query.ts index e71a3e142f..bece8e37d1 100644 --- a/packages/api/src/external/commonwell/document/document-query.ts +++ b/packages/api/src/external/commonwell/document/document-query.ts @@ -7,6 +7,7 @@ import { operationOutcomeResourceType, organizationQueryMeta, } from "@metriport/commonwell-sdk"; +import { ingestIntoSearchEngine } from "@metriport/core/command/consolidated/search/document-reference/ingest"; import { isCQDirectEnabledForCx, isEnhancedCoverageEnabledForCx, @@ -35,7 +36,6 @@ import { getPatientOrFail } from "../../../command/medical/patient/get-patient"; import { Config } from "../../../shared/config"; import { mapDocRefToMetriport } from "../../../shared/external"; import { reportMetric } from "../../aws/cloudwatch"; -import { ingestIntoSearchEngine } from "@metriport/core/command/consolidated/search/document-reference/ingest"; import { convertCDAToFHIR, isConvertible } from "../../fhir-converter/converter"; import { makeFhirApi } from "../../fhir/api/api-factory"; import { cwToFHIR } from "../../fhir/document"; @@ -267,18 +267,17 @@ export async function queryAndProcessDocuments({ const cwReference = error instanceof CommonwellError ? error.cwReference : undefined; - capture.message(msg, { + capture.error(msg, { extra: { context: `cw.queryAndProcessDocuments`, - error, patientId: patientParam.id, facilityId, forceDownload, requestId, ignoreDocRefOnFHIRServer, cwReference, + error: errorToString(error), }, - level: "error", }); throw error; } @@ -302,7 +301,7 @@ export async function internalGetDocuments({ const cwData = patient.data.externalData.COMMONWELL; - const reportDocQueryMetric = (queryStart: number) => { + function reportDocQueryMetric(queryStart: number) { const queryDuration = Date.now() - queryStart; reportMetric({ name: context, @@ -310,7 +309,7 @@ export async function internalGetDocuments({ unit: "Milliseconds", additionalDimension: "CommonWell", }); - }; + } const commonWell = makeCommonWellAPI(initiator.name, addOidPrefix(initiator.oid)); const queryMeta = organizationQueryMeta(initiator.oid, { npi: initiator.npi }); @@ -389,9 +388,8 @@ function reportCWErrors({ for (const [category, errors] of Object.entries(errorsByCategory)) { const msg = `CW Document query error`; log(`${msg} - Category: ${category}. Cause: ${JSON.stringify(errors)}`); - capture.message(msg, { + capture.error(msg, { extra: { ...context, errors, category }, - level: "error", }); } } @@ -526,10 +524,11 @@ async function downloadDocsAndUpsertFHIR({ log(`I have ${validDocs.length} valid docs to process`); // Get File info from S3 (or from memory, if override = true) - const getFilesWithStorageInfo = async () => - forceDownload + async function getFilesWithStorageInfo() { + return forceDownload ? await Promise.all(validDocs.map(convertToNonExistingS3Info(patient))) : await getS3Info(validDocs, patient); + } // Get all DocumentReferences for this patient + File info from S3 const [foundOnFHIR, filesWithStorageInfo] = await Promise.all([ @@ -553,7 +552,9 @@ async function downloadDocsAndUpsertFHIR({ const docsToDownload = filesToDownload.flatMap(f => validDocs.find(d => d.id === f.docId) ?? []); - const fileInfoByDocId = (docId: string) => filesWithStorageInfo.find(f => f.docId === docId); + function fileInfoByDocId(docId: string) { + return filesWithStorageInfo.find(f => f.docId === docId); + } const convertibleDocCount = docsToDownload.filter(doc => isConvertible(doc.content?.mimeType) @@ -639,9 +640,8 @@ async function downloadDocsAndUpsertFHIR({ patientId: patient.id, documentReference: doc, requestId, - error, + error: errorToString(error), }, - level: "error", }); throw error; } @@ -746,15 +746,14 @@ async function downloadDocsAndUpsertFHIR({ const msg = `Error processing doc from CW`; log(`${msg}: ${error}; doc ${JSON.stringify(doc)}`); if (!errorReported && !(error instanceof NotFoundError)) { - capture.message(msg, { + capture.error(msg, { extra: { context: `cw.downloadDocsAndUpsertFHIR`, patientId: patient.id, document: doc, requestId, - error, + error: errorToString(error), }, - level: "error", }); } throw error; @@ -835,7 +834,9 @@ async function triggerDownloadDocument({ } } -const fileIsConvertible = (f: File) => isConvertible(f.contentType); +function fileIsConvertible(f: File) { + return isConvertible(f.contentType); +} async function sleepBetweenChunks(): Promise { return sleepRandom(DOC_DOWNLOAD_CHUNK_DELAY_MAX_MS, DOC_DOWNLOAD_CHUNK_DELAY_MIN_PCT / 100); diff --git a/packages/commonwell-sdk/src/client/document.ts b/packages/commonwell-sdk/src/client/document.ts index d33753bc1b..1322914462 100644 --- a/packages/commonwell-sdk/src/client/document.ts +++ b/packages/commonwell-sdk/src/client/document.ts @@ -22,7 +22,7 @@ async function initQuery( throw new Error(`Could not determine subject ID for document query`); } const url = `${CommonWell.DOCUMENT_QUERY_ENDPOINT}?subject.id=${subjectId}`; - const additionalInfo = { headers, patientId }; + const additionalInfo = { patientId, url }; try { const response = await api.get(url, { headers }); return response; From 7f83e2735556a5ef6d8591acb203c34a6ef97dc8 Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:23:11 -0300 Subject: [PATCH 2/5] build: partial npm release Ref eng-532 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- package-lock.json | 44 +++++++-------- packages/api-sdk/package.json | 6 +- packages/api/package.json | 2 +- packages/carequality-cert-runner/package.json | 6 +- packages/carequality-sdk/package.json | 2 +- packages/commonwell-cert-runner/package.json | 4 +- packages/commonwell-jwt-maker/package.json | 4 +- packages/commonwell-sdk/package.json | 4 +- packages/core/package.json | 4 +- packages/eslint-rules/package.json | 55 ++++++++++--------- packages/ihe-gateway-sdk/package.json | 4 +- packages/infra/package.json | 2 +- packages/mllp-server/package.json | 6 +- packages/shared/package.json | 6 +- packages/utils/package.json | 2 +- 15 files changed, 77 insertions(+), 74 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e691656aa..a7621578d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28799,7 +28799,7 @@ } }, "packages/api": { - "version": "1.27.8", + "version": "1.27.9-alpha.0", "license": "ISC", "dependencies": { "@aws-sdk/client-cloudwatch": "^3.800.0", @@ -28884,12 +28884,12 @@ }, "packages/api-sdk": { "name": "@metriport/api-sdk", - "version": "15.0.5", + "version": "15.0.6-alpha.0", "license": "MIT", "dependencies": { "@medplum/fhirtypes": "^2.0.32", - "@metriport/commonwell-sdk": "^5.9.8", - "@metriport/shared": "^0.23.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "dayjs": "^1.11.7", "dotenv": "^16.3.1", @@ -28953,11 +28953,11 @@ "packages/api/packages/shared": {}, "packages/carequality-cert-runner": { "name": "@metriport/carequality-cert-runner", - "version": "1.18.8", + "version": "1.18.9-alpha.0", "license": "MIT", "dependencies": { - "@metriport/ihe-gateway-sdk": "^0.19.8", - "@metriport/shared": "^0.23.8" + "@metriport/ihe-gateway-sdk": "^0.19.9-alpha.0", + "@metriport/shared": "^0.23.9-alpha.0" }, "bin": { "carequality-cert-runner": "dist/index.js" @@ -28965,7 +28965,7 @@ }, "packages/carequality-sdk": { "name": "@metriport/carequality-sdk", - "version": "1.6.8", + "version": "1.6.9-alpha.0", "license": "MIT", "dependencies": { "axios": "^1.8.2", @@ -28989,10 +28989,10 @@ }, "packages/commonwell-cert-runner": { "name": "@metriport/commonwell-cert-runner", - "version": "1.26.10", + "version": "1.26.11-alpha.0", "license": "MIT", "dependencies": { - "@metriport/commonwell-sdk": "^5.9.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", "axios": "^1.8.2", "commander": "^9.5.0", "dayjs": "^1.11.7", @@ -29031,10 +29031,10 @@ }, "packages/commonwell-jwt-maker": { "name": "@metriport/commonwell-jwt-maker", - "version": "1.24.10", + "version": "1.24.11-alpha.0", "license": "MIT", "dependencies": { - "@metriport/commonwell-sdk": "^5.9.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", "commander": "^9.5.0" }, "bin": { @@ -29066,10 +29066,10 @@ }, "packages/commonwell-sdk": { "name": "@metriport/commonwell-sdk", - "version": "5.9.8", + "version": "5.9.9-alpha.0", "license": "MIT", "dependencies": { - "@metriport/shared": "^0.23.8", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "http-status": "~1.7.0", "jsonwebtoken": "^9.0.0", @@ -29117,7 +29117,7 @@ }, "packages/core": { "name": "@metriport/core", - "version": "1.24.8", + "version": "1.24.9-alpha.0", "license": "MIT", "dependencies": { "@aws-crypto/sha256-js": "5.0.0", @@ -29469,7 +29469,7 @@ "packages/core/packages/shared": {}, "packages/eslint-rules": { "name": "@metriport/eslint-plugin-eslint-rules", - "version": "1.0.0", + "version": "1.0.1-alpha.0", "license": "MIT", "devDependencies": { "@typescript-eslint/rule-tester": "^6.0.0", @@ -29485,17 +29485,17 @@ }, "packages/ihe-gateway-sdk": { "name": "@metriport/ihe-gateway-sdk", - "version": "0.19.8", + "version": "0.19.9-alpha.0", "license": "MIT", "dependencies": { - "@metriport/shared": "^0.23.8", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "zod": "^3.22.1" } }, "packages/infra": { "name": "infrastructure", - "version": "1.22.8", + "version": "1.22.9-alpha.0", "dependencies": { "@metriport/core": "file:packages/core", "@metriport/shared": "file:packages/shared", @@ -29558,7 +29558,7 @@ "packages/infra/packages/core": {}, "packages/infra/packages/shared": {}, "packages/mllp-server": { - "version": "0.3.8", + "version": "0.3.9-alpha.0", "license": "ISC", "dependencies": { "@medplum/core": "^3.2.33", @@ -29722,7 +29722,7 @@ }, "packages/shared": { "name": "@metriport/shared", - "version": "0.23.8", + "version": "0.23.9-alpha.0", "license": "MIT", "dependencies": { "@medplum/core": "^2.2.10", @@ -29775,7 +29775,7 @@ "dev": true }, "packages/utils": { - "version": "1.25.8", + "version": "1.25.9-alpha.0", "license": "ISC", "dependencies": { "@aws-sdk/client-athena": "^3.800.1", diff --git a/packages/api-sdk/package.json b/packages/api-sdk/package.json index e303beed51..e44e975833 100644 --- a/packages/api-sdk/package.json +++ b/packages/api-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/api-sdk", - "version": "15.0.5", + "version": "15.0.6-alpha.0", "description": "Metriport helps you access and manage health and medical data, through a single open source API.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -58,8 +58,8 @@ }, "dependencies": { "@medplum/fhirtypes": "^2.0.32", - "@metriport/commonwell-sdk": "^5.9.8", - "@metriport/shared": "^0.23.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "dayjs": "^1.11.7", "dotenv": "^16.3.1", diff --git a/packages/api/package.json b/packages/api/package.json index be5cdc4966..b1dc96dc17 100755 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "1.27.8", + "version": "1.27.9-alpha.0", "description": "", "main": "app.js", "private": true, diff --git a/packages/carequality-cert-runner/package.json b/packages/carequality-cert-runner/package.json index 3aee8d87e0..69b4e63f7f 100644 --- a/packages/carequality-cert-runner/package.json +++ b/packages/carequality-cert-runner/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/carequality-cert-runner", - "version": "1.18.8", + "version": "1.18.9-alpha.0", "description": "Tool to run through Carequality certification test cases - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -41,7 +41,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/ihe-gateway-sdk": "^0.19.8", - "@metriport/shared": "^0.23.8" + "@metriport/ihe-gateway-sdk": "^0.19.9-alpha.0", + "@metriport/shared": "^0.23.9-alpha.0" } } diff --git a/packages/carequality-sdk/package.json b/packages/carequality-sdk/package.json index 6d1c902170..1286f3c5f6 100644 --- a/packages/carequality-sdk/package.json +++ b/packages/carequality-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/carequality-sdk", - "version": "1.6.8", + "version": "1.6.9-alpha.0", "description": "SDK to interact with the Carequality directory - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", diff --git a/packages/commonwell-cert-runner/package.json b/packages/commonwell-cert-runner/package.json index 23db7e9285..9557167ec1 100644 --- a/packages/commonwell-cert-runner/package.json +++ b/packages/commonwell-cert-runner/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-cert-runner", - "version": "1.26.10", + "version": "1.26.11-alpha.0", "description": "Tool to run through Edge System CommonWell certification test cases - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -42,7 +42,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/commonwell-sdk": "^5.9.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", "axios": "^1.8.2", "commander": "^9.5.0", "dayjs": "^1.11.7", diff --git a/packages/commonwell-jwt-maker/package.json b/packages/commonwell-jwt-maker/package.json index 2a70dfa13b..fcc5fe7d14 100644 --- a/packages/commonwell-jwt-maker/package.json +++ b/packages/commonwell-jwt-maker/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-jwt-maker", - "version": "1.24.10", + "version": "1.24.11-alpha.0", "description": "CLI to create a JWT for use in CommonWell queries - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -41,7 +41,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/commonwell-sdk": "^5.9.8", + "@metriport/commonwell-sdk": "^5.9.9-alpha.0", "commander": "^9.5.0" }, "devDependencies": { diff --git a/packages/commonwell-sdk/package.json b/packages/commonwell-sdk/package.json index 876bdeea12..2561bb560f 100644 --- a/packages/commonwell-sdk/package.json +++ b/packages/commonwell-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-sdk", - "version": "5.9.8", + "version": "5.9.9-alpha.0", "description": "SDK to simplify CommonWell API integration - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -60,7 +60,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/shared": "^0.23.8", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "http-status": "~1.7.0", "jsonwebtoken": "^9.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 74bc534aa9..903325d0e3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/core", - "version": "1.24.8", + "version": "1.24.9-alpha.0", "private": true, "description": "Metriport helps you access and manage health and medical data, through a single open source API. Common code shared across packages.", "author": "Metriport Inc. ", @@ -152,8 +152,8 @@ "zod-to-json-schema": "3.22.5" }, "devDependencies": { - "@metriport/eslint-rules": "file:packages/eslint-rules", "@medplum/fhirtypes": "^2.2.10", + "@metriport/eslint-rules": "file:packages/eslint-rules", "@tsconfig/recommended": "^1.0.2", "@types/formidable": "^3.4.5", "@types/jest": "29.5.3", diff --git a/packages/eslint-rules/package.json b/packages/eslint-rules/package.json index 0e6eca5935..81aa809d5f 100644 --- a/packages/eslint-rules/package.json +++ b/packages/eslint-rules/package.json @@ -1,27 +1,30 @@ { - "name": "@metriport/eslint-plugin-eslint-rules", - "version": "1.0.0", - "description": "Custom ESLint rules for Metriport's monorepo", - "main": "index.js", - "keywords": ["eslint", "rules"], - "author": "Metriport", - "license": "MIT", - "scripts": { - "build": "echo \"Skipping build\"", - "build:cloud": "echo \"Skipping build:cloud\"", - "test": "echo \"No test specified yet\"", - "clean": "rimraf dist", - "deepclean": "npm run clean && rimraf node_modules" - }, - "peerDependencies": { - "eslint": ">=8.0.0" - }, - "devDependencies": { - "eslint": "^8.57.0", - "@typescript-eslint/rule-tester": "^6.0.0", - "jest": "^29.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - } \ No newline at end of file + "name": "@metriport/eslint-plugin-eslint-rules", + "version": "1.0.1-alpha.0", + "description": "Custom ESLint rules for Metriport's monorepo", + "main": "index.js", + "keywords": [ + "eslint", + "rules" + ], + "author": "Metriport", + "license": "MIT", + "scripts": { + "build": "echo \"Skipping build\"", + "build:cloud": "echo \"Skipping build:cloud\"", + "test": "echo \"No test specified yet\"", + "clean": "rimraf dist", + "deepclean": "npm run clean && rimraf node_modules" + }, + "peerDependencies": { + "eslint": ">=8.0.0" + }, + "devDependencies": { + "@typescript-eslint/rule-tester": "^6.0.0", + "eslint": "^8.57.0", + "jest": "^29.0.0" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/packages/ihe-gateway-sdk/package.json b/packages/ihe-gateway-sdk/package.json index 5ede33378a..3b2a7eddc9 100644 --- a/packages/ihe-gateway-sdk/package.json +++ b/packages/ihe-gateway-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/ihe-gateway-sdk", - "version": "0.19.8", + "version": "0.19.9-alpha.0", "description": "SDK to interact with other IHE Gateways - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -53,7 +53,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/shared": "^0.23.8", + "@metriport/shared": "^0.23.9-alpha.0", "axios": "^1.8.2", "zod": "^3.22.1" } diff --git a/packages/infra/package.json b/packages/infra/package.json index bb2607983e..1b68262a5f 100644 --- a/packages/infra/package.json +++ b/packages/infra/package.json @@ -1,6 +1,6 @@ { "name": "infrastructure", - "version": "1.22.8", + "version": "1.22.9-alpha.0", "private": true, "bin": { "infrastructure": "bin/infrastructure.js" diff --git a/packages/mllp-server/package.json b/packages/mllp-server/package.json index 677084b374..b67bd24a45 100644 --- a/packages/mllp-server/package.json +++ b/packages/mllp-server/package.json @@ -1,6 +1,6 @@ { "name": "mllp-server", - "version": "0.3.8", + "version": "0.3.9-alpha.0", "description": "MLLP server that reads HL7 messages off of a raw tcp connection", "main": "app.js", "private": true, @@ -36,11 +36,11 @@ "dotenv": "^16.4.5" }, "devDependencies": { + "@metriport/eslint-rules": "file:packages/eslint-rules", "@sentry/node": "^9.1.0", "@tsconfig/node18": "^18.2.4", "@types/node": "^22.13.5", "ts-node": "^10.9.2", - "typescript": "^5.6.3", - "@metriport/eslint-rules": "file:packages/eslint-rules" + "typescript": "^5.6.3" } } diff --git a/packages/shared/package.json b/packages/shared/package.json index 0048839c3a..d5f3c3a14c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/shared", - "version": "0.23.8", + "version": "0.23.9-alpha.0", "description": "Common code shared across packages - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -103,6 +103,7 @@ "devDependencies": { "@faker-js/faker": "^8.0.2", "@medplum/fhirtypes": "^2.2.10", + "@metriport/eslint-rules": "file:packages/eslint-rules", "@tsconfig/recommended": "^1.0.2", "@types/jest": "29.5.3", "@typescript-eslint/eslint-plugin": "^5.48.2", @@ -112,7 +113,6 @@ "prettier": "^2.8.3", "ts-essentials": "^9.3.1", "ts-jest": "29.1.1", - "typescript": "^4.9.5", - "@metriport/eslint-rules": "file:packages/eslint-rules" + "typescript": "^4.9.5" } } diff --git a/packages/utils/package.json b/packages/utils/package.json index 872419bd93..43a8c1d5f2 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "utils", - "version": "1.25.8", + "version": "1.25.9-alpha.0", "description": "", "private": true, "scripts": { From 4b2f27748aeb0e966946263885b740754a1f1dcd Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:27:03 -0300 Subject: [PATCH 3/5] chore(release): publish Ref: #000 - api@1.27.10-alpha.0 - @metriport/api-sdk@15.0.7-alpha.0 - @metriport/carequality-cert-runner@1.18.10-alpha.0 - @metriport/carequality-sdk@1.6.10-alpha.0 - @metriport/commonwell-cert-runner@1.26.12-alpha.0 - @metriport/commonwell-jwt-maker@1.24.12-alpha.0 - @metriport/commonwell-sdk@5.9.10-alpha.0 - @metriport/core@1.24.10-alpha.0 - @metriport/eslint-plugin-eslint-rules@1.0.2-alpha.0 - @metriport/ihe-gateway-sdk@0.19.10-alpha.0 - infrastructure@1.22.10-alpha.0 - mllp-server@0.3.10-alpha.0 - @metriport/shared@0.23.10-alpha.0 - utils@1.25.10-alpha.0 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- package-lock.json | 44 +++++++++---------- packages/api-sdk/package.json | 6 +-- packages/api/package.json | 2 +- packages/carequality-cert-runner/package.json | 6 +-- packages/carequality-sdk/package.json | 2 +- packages/commonwell-cert-runner/package.json | 4 +- packages/commonwell-jwt-maker/package.json | 4 +- packages/commonwell-sdk/package.json | 4 +- packages/core/package.json | 2 +- packages/eslint-rules/package.json | 2 +- packages/ihe-gateway-sdk/package.json | 4 +- packages/infra/package.json | 2 +- packages/mllp-server/package.json | 2 +- packages/shared/package.json | 2 +- packages/utils/package.json | 2 +- 15 files changed, 44 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index a7621578d4..ed95652a35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28799,7 +28799,7 @@ } }, "packages/api": { - "version": "1.27.9-alpha.0", + "version": "1.27.10-alpha.0", "license": "ISC", "dependencies": { "@aws-sdk/client-cloudwatch": "^3.800.0", @@ -28884,12 +28884,12 @@ }, "packages/api-sdk": { "name": "@metriport/api-sdk", - "version": "15.0.6-alpha.0", + "version": "15.0.7-alpha.0", "license": "MIT", "dependencies": { "@medplum/fhirtypes": "^2.0.32", - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "dayjs": "^1.11.7", "dotenv": "^16.3.1", @@ -28953,11 +28953,11 @@ "packages/api/packages/shared": {}, "packages/carequality-cert-runner": { "name": "@metriport/carequality-cert-runner", - "version": "1.18.9-alpha.0", + "version": "1.18.10-alpha.0", "license": "MIT", "dependencies": { - "@metriport/ihe-gateway-sdk": "^0.19.9-alpha.0", - "@metriport/shared": "^0.23.9-alpha.0" + "@metriport/ihe-gateway-sdk": "^0.19.10-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0" }, "bin": { "carequality-cert-runner": "dist/index.js" @@ -28965,7 +28965,7 @@ }, "packages/carequality-sdk": { "name": "@metriport/carequality-sdk", - "version": "1.6.9-alpha.0", + "version": "1.6.10-alpha.0", "license": "MIT", "dependencies": { "axios": "^1.8.2", @@ -28989,10 +28989,10 @@ }, "packages/commonwell-cert-runner": { "name": "@metriport/commonwell-cert-runner", - "version": "1.26.11-alpha.0", + "version": "1.26.12-alpha.0", "license": "MIT", "dependencies": { - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", "axios": "^1.8.2", "commander": "^9.5.0", "dayjs": "^1.11.7", @@ -29031,10 +29031,10 @@ }, "packages/commonwell-jwt-maker": { "name": "@metriport/commonwell-jwt-maker", - "version": "1.24.11-alpha.0", + "version": "1.24.12-alpha.0", "license": "MIT", "dependencies": { - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", "commander": "^9.5.0" }, "bin": { @@ -29066,10 +29066,10 @@ }, "packages/commonwell-sdk": { "name": "@metriport/commonwell-sdk", - "version": "5.9.9-alpha.0", + "version": "5.9.10-alpha.0", "license": "MIT", "dependencies": { - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "http-status": "~1.7.0", "jsonwebtoken": "^9.0.0", @@ -29117,7 +29117,7 @@ }, "packages/core": { "name": "@metriport/core", - "version": "1.24.9-alpha.0", + "version": "1.24.10-alpha.0", "license": "MIT", "dependencies": { "@aws-crypto/sha256-js": "5.0.0", @@ -29469,7 +29469,7 @@ "packages/core/packages/shared": {}, "packages/eslint-rules": { "name": "@metriport/eslint-plugin-eslint-rules", - "version": "1.0.1-alpha.0", + "version": "1.0.2-alpha.0", "license": "MIT", "devDependencies": { "@typescript-eslint/rule-tester": "^6.0.0", @@ -29485,17 +29485,17 @@ }, "packages/ihe-gateway-sdk": { "name": "@metriport/ihe-gateway-sdk", - "version": "0.19.9-alpha.0", + "version": "0.19.10-alpha.0", "license": "MIT", "dependencies": { - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "zod": "^3.22.1" } }, "packages/infra": { "name": "infrastructure", - "version": "1.22.9-alpha.0", + "version": "1.22.10-alpha.0", "dependencies": { "@metriport/core": "file:packages/core", "@metriport/shared": "file:packages/shared", @@ -29558,7 +29558,7 @@ "packages/infra/packages/core": {}, "packages/infra/packages/shared": {}, "packages/mllp-server": { - "version": "0.3.9-alpha.0", + "version": "0.3.10-alpha.0", "license": "ISC", "dependencies": { "@medplum/core": "^3.2.33", @@ -29722,7 +29722,7 @@ }, "packages/shared": { "name": "@metriport/shared", - "version": "0.23.9-alpha.0", + "version": "0.23.10-alpha.0", "license": "MIT", "dependencies": { "@medplum/core": "^2.2.10", @@ -29775,7 +29775,7 @@ "dev": true }, "packages/utils": { - "version": "1.25.9-alpha.0", + "version": "1.25.10-alpha.0", "license": "ISC", "dependencies": { "@aws-sdk/client-athena": "^3.800.1", diff --git a/packages/api-sdk/package.json b/packages/api-sdk/package.json index e44e975833..eb692849cf 100644 --- a/packages/api-sdk/package.json +++ b/packages/api-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/api-sdk", - "version": "15.0.6-alpha.0", + "version": "15.0.7-alpha.0", "description": "Metriport helps you access and manage health and medical data, through a single open source API.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -58,8 +58,8 @@ }, "dependencies": { "@medplum/fhirtypes": "^2.0.32", - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "dayjs": "^1.11.7", "dotenv": "^16.3.1", diff --git a/packages/api/package.json b/packages/api/package.json index b1dc96dc17..1bad773977 100755 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "1.27.9-alpha.0", + "version": "1.27.10-alpha.0", "description": "", "main": "app.js", "private": true, diff --git a/packages/carequality-cert-runner/package.json b/packages/carequality-cert-runner/package.json index 69b4e63f7f..0f77a5ec33 100644 --- a/packages/carequality-cert-runner/package.json +++ b/packages/carequality-cert-runner/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/carequality-cert-runner", - "version": "1.18.9-alpha.0", + "version": "1.18.10-alpha.0", "description": "Tool to run through Carequality certification test cases - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -41,7 +41,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/ihe-gateway-sdk": "^0.19.9-alpha.0", - "@metriport/shared": "^0.23.9-alpha.0" + "@metriport/ihe-gateway-sdk": "^0.19.10-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0" } } diff --git a/packages/carequality-sdk/package.json b/packages/carequality-sdk/package.json index 1286f3c5f6..d0c532af04 100644 --- a/packages/carequality-sdk/package.json +++ b/packages/carequality-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/carequality-sdk", - "version": "1.6.9-alpha.0", + "version": "1.6.10-alpha.0", "description": "SDK to interact with the Carequality directory - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", diff --git a/packages/commonwell-cert-runner/package.json b/packages/commonwell-cert-runner/package.json index 9557167ec1..a31d63b540 100644 --- a/packages/commonwell-cert-runner/package.json +++ b/packages/commonwell-cert-runner/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-cert-runner", - "version": "1.26.11-alpha.0", + "version": "1.26.12-alpha.0", "description": "Tool to run through Edge System CommonWell certification test cases - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -42,7 +42,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", "axios": "^1.8.2", "commander": "^9.5.0", "dayjs": "^1.11.7", diff --git a/packages/commonwell-jwt-maker/package.json b/packages/commonwell-jwt-maker/package.json index fcc5fe7d14..9668ad30f2 100644 --- a/packages/commonwell-jwt-maker/package.json +++ b/packages/commonwell-jwt-maker/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-jwt-maker", - "version": "1.24.11-alpha.0", + "version": "1.24.12-alpha.0", "description": "CLI to create a JWT for use in CommonWell queries - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -41,7 +41,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/commonwell-sdk": "^5.9.9-alpha.0", + "@metriport/commonwell-sdk": "^5.9.10-alpha.0", "commander": "^9.5.0" }, "devDependencies": { diff --git a/packages/commonwell-sdk/package.json b/packages/commonwell-sdk/package.json index 2561bb560f..e1d1846346 100644 --- a/packages/commonwell-sdk/package.json +++ b/packages/commonwell-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/commonwell-sdk", - "version": "5.9.9-alpha.0", + "version": "5.9.10-alpha.0", "description": "SDK to simplify CommonWell API integration - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -60,7 +60,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "http-status": "~1.7.0", "jsonwebtoken": "^9.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 903325d0e3..304cf83214 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/core", - "version": "1.24.9-alpha.0", + "version": "1.24.10-alpha.0", "private": true, "description": "Metriport helps you access and manage health and medical data, through a single open source API. Common code shared across packages.", "author": "Metriport Inc. ", diff --git a/packages/eslint-rules/package.json b/packages/eslint-rules/package.json index 81aa809d5f..50640331eb 100644 --- a/packages/eslint-rules/package.json +++ b/packages/eslint-rules/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/eslint-plugin-eslint-rules", - "version": "1.0.1-alpha.0", + "version": "1.0.2-alpha.0", "description": "Custom ESLint rules for Metriport's monorepo", "main": "index.js", "keywords": [ diff --git a/packages/ihe-gateway-sdk/package.json b/packages/ihe-gateway-sdk/package.json index 3b2a7eddc9..45a1611211 100644 --- a/packages/ihe-gateway-sdk/package.json +++ b/packages/ihe-gateway-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/ihe-gateway-sdk", - "version": "0.19.9-alpha.0", + "version": "0.19.10-alpha.0", "description": "SDK to interact with other IHE Gateways - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", @@ -53,7 +53,7 @@ "url": "https://github.com/metriport/metriport/issues" }, "dependencies": { - "@metriport/shared": "^0.23.9-alpha.0", + "@metriport/shared": "^0.23.10-alpha.0", "axios": "^1.8.2", "zod": "^3.22.1" } diff --git a/packages/infra/package.json b/packages/infra/package.json index 1b68262a5f..dfa36cd50f 100644 --- a/packages/infra/package.json +++ b/packages/infra/package.json @@ -1,6 +1,6 @@ { "name": "infrastructure", - "version": "1.22.9-alpha.0", + "version": "1.22.10-alpha.0", "private": true, "bin": { "infrastructure": "bin/infrastructure.js" diff --git a/packages/mllp-server/package.json b/packages/mllp-server/package.json index b67bd24a45..e8425872bd 100644 --- a/packages/mllp-server/package.json +++ b/packages/mllp-server/package.json @@ -1,6 +1,6 @@ { "name": "mllp-server", - "version": "0.3.9-alpha.0", + "version": "0.3.10-alpha.0", "description": "MLLP server that reads HL7 messages off of a raw tcp connection", "main": "app.js", "private": true, diff --git a/packages/shared/package.json b/packages/shared/package.json index d5f3c3a14c..72e714ae4a 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@metriport/shared", - "version": "0.23.9-alpha.0", + "version": "0.23.10-alpha.0", "description": "Common code shared across packages - by Metriport Inc.", "author": "Metriport Inc. ", "homepage": "https://metriport.com/", diff --git a/packages/utils/package.json b/packages/utils/package.json index 43a8c1d5f2..3aaf93c5db 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "utils", - "version": "1.25.9-alpha.0", + "version": "1.25.10-alpha.0", "description": "", "private": true, "scripts": { From d1c5c5a87b79e5a7b5f90c88e6d7fffb0f087fbe Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:30:50 -0300 Subject: [PATCH 4/5] build: move eslint-rules to the top of workspaces packages Ref eng-532 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed95652a35..6b675ceb77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "hasInstallScript": true, "workspaces": [ + "packages/eslint-rules", "packages/shared", "packages/api-sdk", "packages/ihe-gateway-sdk", @@ -21,8 +22,7 @@ "packages/api", "packages/mllp-server", "packages/infra", - "packages/utils", - "packages/eslint-rules" + "packages/utils" ], "dependencies": { "axios": ">=1.8.2", diff --git a/package.json b/package.json index 21cb0ca335..301145d64f 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "full-hbs-lint": "cd packages/fhir-converter && ./full-hbs-lint.sh" }, "workspaces": [ + "packages/eslint-rules", "packages/shared", "packages/api-sdk", "packages/ihe-gateway-sdk", @@ -50,8 +51,7 @@ "packages/api", "packages/mllp-server", "packages/infra", - "packages/utils", - "packages/eslint-rules" + "packages/utils" ], "lint-staged": { "*.{ts,tsx}": [ From 609cc38723152cca824c457c7998fc327559e8b2 Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Wed, 25 Jun 2025 18:35:35 -0300 Subject: [PATCH 5/5] fix(cw-sdk): additional don't include req headers on errors Ref eng-532 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- .../commonwell-sdk/src/client/document.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/commonwell-sdk/src/client/document.ts b/packages/commonwell-sdk/src/client/document.ts index 1322914462..df72edca1c 100644 --- a/packages/commonwell-sdk/src/client/document.ts +++ b/packages/commonwell-sdk/src/client/document.ts @@ -5,8 +5,8 @@ import { downloadFile } from "../common/fileDownload"; import { convertPatientIdToSubjectId } from "../common/util"; import { DocumentQueryFullResponse, - DocumentQueryResponse, documentQueryFullResponseSchema, + DocumentQueryResponse, documentQueryResponseSchema, } from "../models/document"; import { CommonWell } from "./commonwell"; @@ -40,11 +40,7 @@ export async function query( try { return documentQueryResponseSchema.parse(response.data); } catch (err) { - throw new CommonwellError(`Error parsing document query response`, err, { - headers, - patientId, - response, - }); + throw new CommonwellError(`Error parsing document query response`, err, { patientId }); } } @@ -57,11 +53,7 @@ export async function queryFull( try { return documentQueryFullResponseSchema.parse(response.data); } catch (err) { - throw new CommonwellError(`Error parsing document query response`, err, { - headers, - patientId, - response, - }); + throw new CommonwellError(`Error parsing document query full response`, err, { patientId }); } } @@ -79,10 +71,6 @@ export async function retrieve( headers, }); } catch (err) { - throw new CommonwellError(`Error retrieve document`, err, { - headers, - inputUrl, - outputStream: outputStream ? "[object]" : outputStream, - }); + throw new CommonwellError(`Error retrieve document`, err, { inputUrl }); } }