From fe696083ff12932fba35758e968d1b0e763a9c00 Mon Sep 17 00:00:00 2001 From: Gordon Farrell <93161643+gordonfarrell@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:18:55 -0700 Subject: [PATCH] Add test interpretation and interp code to extended schema saving (#3073) * add interpretation and interpretation code to extended sqlserver saving * remove old comments --- .../api/save-fhir-data/save-fhir-data-service.ts | 14 +++++++++++--- .../ecr-viewer/src/app/api/save-fhir-data/types.ts | 4 +++- .../app/default_schemas/extended.json | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts b/containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts index 0694958d57..dccfb61b72 100644 --- a/containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts +++ b/containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts @@ -359,12 +359,20 @@ export const saveMetadataToSqlServer = async ( sql.VarChar(50), lab.test_result_code_system, ) - .input("test_result_interpretation", sql.VarChar(255), null) // Not implemented - .input("test_result_interpretation_code", sql.VarChar(50), null) // Not implemented + .input( + "test_result_interpretation", + sql.VarChar(255), + lab.test_result_interpretation, + ) + .input( + "test_result_interpretation_code", + sql.VarChar(50), + lab.test_result_interpretation_code, + ) .input( "test_result_interpretation_system", sql.VarChar(255), - lab.test_result_interp_system, + lab.test_result_interpretation_system, ) .input( "test_result_ref_range_low_value", diff --git a/containers/ecr-viewer/src/app/api/save-fhir-data/types.ts b/containers/ecr-viewer/src/app/api/save-fhir-data/types.ts index f363ddb490..fa4aafc5b7 100644 --- a/containers/ecr-viewer/src/app/api/save-fhir-data/types.ts +++ b/containers/ecr-viewer/src/app/api/save-fhir-data/types.ts @@ -9,7 +9,9 @@ interface Lab { test_result_code: string | undefined; test_result_code_display: string | undefined; test_result_code_system: string | undefined; - test_result_interp_system: string | undefined; + test_result_interpretation: string | undefined; + test_result_interpretation_code: string | undefined; + test_result_interpretation_system: string | undefined; test_result_ref_range_low: string | undefined; test_result_ref_range_low_units: string | undefined; test_result_ref_range_high: string | undefined; diff --git a/containers/message-parser/app/default_schemas/extended.json b/containers/message-parser/app/default_schemas/extended.json index 2619f13a14..d209a4afb3 100644 --- a/containers/message-parser/app/default_schemas/extended.json +++ b/containers/message-parser/app/default_schemas/extended.json @@ -194,17 +194,17 @@ "data_type": "string", "nullable": true }, - "test_result_interp": { + "test_result_interpretation": { "fhir_path": "Observation.interpretation.coding.display", "data_type": "string", "nullable": true }, - "test_result_interp_code": { + "test_result_interpretation_code": { "fhir_path": "Observation.interpretation.coding.code", "data_type": "string", "nullable": true }, - "test_result_interp_system": { + "test_result_interpretation_system": { "fhir_path": "Observation.interpretation.coding.system", "data_type": "string", "nullable": true