Skip to content

Commit

Permalink
fix: add value-quantity to requestor and saveFilters for observation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi-BOUYAHIA committed Jul 12, 2024
1 parent 96187ee commit 79510b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mappers/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ const mapAdministrationToRequestParams = (filters: MedicationFilters) => {

const mapBiologyToRequestParams = (filters: BiologyFilters) => {
const { anabio, loinc, validatedStatus, nda, endDate, startDate, executiveUnits, encounterStatus } = filters
const requestParams: string[] = []
const requestParams: string[] = ['value-quantity=ge0,le0', 'subject.active=true']
if ((anabio && anabio.length > 0) || (loinc && loinc.length > 0)) {
const key = `${ObservationParamsKeys.ANABIO_LOINC}=`
let _anabio = ''
Expand Down
5 changes: 3 additions & 2 deletions src/utils/cohortCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import { hospitForm } from 'data/hospitData'
import { editAllCriteria, editAllCriteriaGroup, pseudonimizeCriteria, buildCohortCreation } from 'state/cohortCreation'
import { AppDispatch } from 'state'

const REQUETEUR_VERSION = 'v1.4.4'
const REQUETEUR_VERSION = 'v1.4.5'

const IPP_LIST_FHIR = 'identifier.value'

Expand Down Expand Up @@ -507,7 +507,7 @@ const constructFilterFhir = (criterion: SelectedCriteriaType, deidentified: bool

case CriteriaType.OBSERVATION: {
const unreducedFilterFhir = [
`subject.active=true&${OBSERVATION_STATUS}=${BiologyStatus.VALIDATED}`,
`subject.active=true&${OBSERVATION_STATUS}=${BiologyStatus.VALIDATED}&value-quantity=ge0,le0`,
filtersBuilders(OBSERVATION_CODE, buildLabelObjectFilter(criterion.code, BIOLOGY_HIERARCHY_ITM_ANABIO)),
filtersBuilders(ENCOUNTER_SERVICE_PROVIDER, buildEncounterServiceFilter(criterion.encounterService)),
filtersBuilders(ENCOUNTER_STATUS_REFERENCE, buildLabelObjectFilter(criterion.encounterStatus)),
Expand Down Expand Up @@ -1411,6 +1411,7 @@ const unbuildObservationCriteria = async (element: RequeteurCriteriaType): Promi
case OBSERVATION_VALUE:
case OBSERVATION_STATUS:
case 'subject.active':
case 'value-quantity':
break
default:
currentCriterion.error = true
Expand Down

0 comments on commit 79510b6

Please sign in to comment.