Skip to content

Commit

Permalink
fix query var name
Browse files Browse the repository at this point in the history
  • Loading branch information
katyasoup committed Dec 11, 2024
1 parent 31f6bf0 commit 05841ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query-connector/src/app/database-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ select q.query_name, q.id, qtv.valueset_id, vs.name as valueset_name, vs.oid as
where q.query_name = $1;
`;

const getValueSetsByConditionId = `
const getValueSetsByConditionIds = `
SELECT c.display, c.code_system, c.code, vs.name as valueset_name, vs.id as valueset_id, vs.oid as valueset_external_id, vs.version, vs.author as author, vs.type, vs.dibbs_concept_type as dibbs_concept_type, ctvs.condition_id
FROM valuesets vs
LEFT JOIN condition_to_valueset ctvs on vs.id = ctvs.valueset_id
Expand All @@ -84,7 +84,7 @@ const dbClient = new Pool(dbConfig);
*/
export const getValueSetsAndConceptsByConditionIDs = async (ids: string[]) => {
const escapedValues = ids.map((_, i) => `$${i + 1}`).join() + ")";
const queryString = getValueSetsByConditionId + escapedValues;
const queryString = getValueSetsByConditionIds + escapedValues;

try {
const result = await dbClient.query(queryString, ids);
Expand Down

0 comments on commit 05841ef

Please sign in to comment.