From 7a0029978ec83addbb1127d44b1764eef0272ffb Mon Sep 17 00:00:00 2001 From: Bob Zhao Date: Wed, 30 Oct 2024 11:40:35 -0400 Subject: [PATCH] more updates --- query-connector/src/app/database-service.ts | 6 +++--- .../src/app/tests/integration/translation.test.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/query-connector/src/app/database-service.ts b/query-connector/src/app/database-service.ts index 6b1073926..98f1ba59b 100644 --- a/query-connector/src/app/database-service.ts +++ b/query-connector/src/app/database-service.ts @@ -192,7 +192,7 @@ export async function translateVSACToInternalValueSet( fhirValueset: FhirValueSet, ersdConceptType: ErsdConceptType, ) { - const id = fhirValueset.id; + const oid = fhirValueset.id; const version = fhirValueset.version; const name = fhirValueset.title; @@ -205,10 +205,10 @@ export async function translateVSACToInternalValueSet( }); return { - valueSetId: "", + valueSetId: `${oid}_${version}`, valueSetVersion: version, valueSetName: name, - valueSetExternalId: id, + valueSetExternalId: oid, author: author, system: system, ersdConceptType: ersdConceptType, diff --git a/query-connector/src/app/tests/integration/translation.test.ts b/query-connector/src/app/tests/integration/translation.test.ts index b619a9534..d6479c550 100644 --- a/query-connector/src/app/tests/integration/translation.test.ts +++ b/query-connector/src/app/tests/integration/translation.test.ts @@ -4,9 +4,10 @@ import { translateVSACToInternalValueSet } from "../../database-service"; import { ValueSet as FhirValueSet } from "fhir/r4"; const EXPECTED_INTERNAL_VALUESET: ValueSet = { - valueSetId: ExampleVsacValueSet.id, + valueSetId: `${ExampleVsacValueSet.id}_${ExampleVsacValueSet.version}`, valueSetVersion: ExampleVsacValueSet.version, valueSetName: ExampleVsacValueSet.title, + valueSetExternalId: ExampleVsacValueSet.id, author: ExampleVsacValueSet.publisher, system: ExampleVsacValueSet.compose.include[0].system, ersdConceptType: "ostc",