Skip to content

Commit

Permalink
fix: fixed age ordering bug when deidentified - Ref gestion-de-projet…
Browse files Browse the repository at this point in the history
…#2789
  • Loading branch information
ManelleG committed Nov 27, 2024
1 parent ad33cac commit 0b074f0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/components/DataTable/DataTablePatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const DataTablePatient: React.FC<DataTablePatientProps> = ({

const columns: Column[] = [
{ label: PatientTableLabels.GENDER, code: `${Order.GENDER},${Order.ID}` },
{ label: PatientTableLabels.FIRSTNAME, code: !deidentified ? Order.FIRSTNAME : undefined },
{ label: PatientTableLabels.FIRSTNAME, code: !deidentified ? Order.NAME : undefined },
{ label: PatientTableLabels.LASTNAME, code: !deidentified ? Order.FAMILY : undefined, align: 'left' },
{
label: !deidentified ? PatientTableLabels.BIRTHDATE : PatientTableLabels.AGE,
code: `${Order.BIRTHDATE},${Order.ID}`
code: `${!deidentified ? Order.BIRTHDATE : Order.AGE_MONTH},${Order.ID}`
},
{ label: PatientTableLabels.LAST_ENCOUNTER, align: 'left' },
{ label: PatientTableLabels.VITAL_STATUS },
Expand Down
50 changes: 25 additions & 25 deletions src/types/searchCriterias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,39 +100,39 @@ export enum DirectionLabel {
DESC = 'Décroissant'
}
export enum Order {
ADMINISTRATION_MODE = 'route',
AGE_MONTH = 'age-month',
ANABIO = 'code-anabio',
AUTHORED = 'authored',
BIRTHDATE = 'birthdate',
CODE = 'code',
RESULT_SIZE = 'result_size',
FAVORITE = 'favorite',
RECORDED_DATE = 'recorded-date',
FAMILY = 'family',
DATE = 'date',
PERIOD_START = 'Period-start',
CREATED = 'created',
CREATED_AT = 'created_at',
DATE = 'date',
DESCRIPTION = 'description',
DIAGNOSIS = 'diagnosis',
ANABIO = 'code-anabio',
LOINC = 'code-loinc',
TYPE = 'type-name',
EFFECTIVE_TIME = 'effective-time',
ENCOUNTER = 'encounter',
FAMILY = 'family',
FAVORITE = 'favorite',
GENDER = 'gender',
FIRSTNAME = 'name',
LASTNAME = 'lastname',
BIRTHDATE = 'birthdate',
IPP = 'identifier',
ID = 'id',
IPP = 'identifier',
LASTNAME = 'lastname',
LOINC = 'code-loinc',
MEDICATION_ATC = 'medication-atc',
MEDICATION_UCD = 'medication-ucd',
MODALITY = 'modality',
MODIFIED = 'modified_at',
UPDATED = 'updated_at',
NAME = 'name',
MODALITY = 'modality',
DESCRIPTION = 'description',
PERIOD_START = 'Period-start',
PRESCRIPTION_TYPES = 'category-name',
PROCEDURE = 'procedureCode',
RECORDED_DATE = 'recorded-date',
RESULT_SIZE = 'result_size',
STUDY_DATE = 'started',
CREATED_AT = 'created_at',
ENCOUNTER = 'encounter',
EFFECTIVE_TIME = 'effective-time',
MEDICATION_ATC = 'medication-atc',
MEDICATION_UCD = 'medication-ucd',
PRESCRIPTION_TYPES = 'category-name',
ADMINISTRATION_MODE = 'route',
AUTHORED = 'authored'
TYPE = 'type-name',
UPDATED = 'updated_at'
}
export enum SearchByTypes {
TEXT = '_text',
Expand Down Expand Up @@ -391,7 +391,7 @@ export const orderByListPatients = [
label: PatientTableLabels.GENDER
},
{
id: Order.FIRSTNAME,
id: Order.NAME,
label: PatientTableLabels.FIRSTNAME
},
{
Expand Down

0 comments on commit 0b074f0

Please sign in to comment.