Skip to content

Commit

Permalink
feat: SJIP-569 filter to keep only available biospecimen for request …
Browse files Browse the repository at this point in the history
…report
  • Loading branch information
celinepelletier committed Oct 18, 2023
1 parent 47fa750 commit a3401d0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { contact, generateStudyTab, wantedFields } from './config';
import { resolveSetsInSqon } from '../../utils/sqonUtils';
import { SheetConfig } from '../types';
import generateTxtFile from '../utils/generateTxtFile';
import { addConditionAvailableInSqon } from '../utils/getAvailableBiospecimensFromSqon';

/**
* Generate and write locally.
Expand Down Expand Up @@ -102,7 +103,8 @@ const makeReportQuery = async (
) => {
const nestedFields = getNestedFields(extendedConfig);
const newSqon = await resolveSetsInSqon(sqon, userId, accessToken);
const query = buildQuery({ nestedFields, filters: newSqon });
const newSqonForAvailableOnly = addConditionAvailableInSqon(newSqon);
const query = buildQuery({ nestedFields, filters: newSqonForAvailableOnly });

return {
query,
Expand Down

0 comments on commit a3401d0

Please sign in to comment.