diff --git a/src/components/DataTable/DataTablePatient.tsx b/src/components/DataTable/DataTablePatient.tsx index 9745e130f..56139fd69 100644 --- a/src/components/DataTable/DataTablePatient.tsx +++ b/src/components/DataTable/DataTablePatient.tsx @@ -48,11 +48,11 @@ const DataTablePatient: React.FC = ({ 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 }, diff --git a/src/types/searchCriterias.ts b/src/types/searchCriterias.ts index 977026477..504cd9425 100644 --- a/src/types/searchCriterias.ts +++ b/src/types/searchCriterias.ts @@ -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', @@ -391,7 +391,7 @@ export const orderByListPatients = [ label: PatientTableLabels.GENDER }, { - id: Order.FIRSTNAME, + id: Order.NAME, label: PatientTableLabels.FIRSTNAME }, {