|
@@ -1,6 +1,8 @@
|
|
|
import React from 'react';
|
|
|
+import { useSelector } from 'react-redux';
|
|
|
import { Table } from 'antd';
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
+import { RootState } from '../../../states/store';
|
|
|
|
|
|
const columns = [
|
|
|
{
|
|
@@ -10,7 +12,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.patientId"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'patientId',
|
|
|
+ dataIndex: 'patient_id',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -19,7 +21,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.name"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'name',
|
|
|
+ dataIndex: 'patient_name',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -46,7 +48,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.registrationId"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'registrationId',
|
|
|
+ dataIndex: 'accession_number',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -55,7 +57,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.birthDate"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'birthDate',
|
|
|
+ dataIndex: 'patient_dob',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -64,7 +66,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.age"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'age',
|
|
|
+ dataIndex: 'patient_age',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -73,7 +75,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.gender"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'gender',
|
|
|
+ dataIndex: 'patient_sex',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -82,7 +84,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.bodyType"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'bodyType',
|
|
|
+ dataIndex: 'patient_type',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -100,7 +102,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.height"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'height',
|
|
|
+ dataIndex: 'length',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -109,7 +111,7 @@ const columns = [
|
|
|
defaultMessage="worklistTable.pregnancyStatus"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'pregnancyStatus',
|
|
|
+ dataIndex: 'pregnancy_status',
|
|
|
},
|
|
|
{
|
|
|
title: (
|
|
@@ -118,12 +120,18 @@ const columns = [
|
|
|
defaultMessage="worklistTable.referringDoctor"
|
|
|
/>
|
|
|
),
|
|
|
- dataIndex: 'referringDoctor',
|
|
|
+ dataIndex: 'ref_physician',
|
|
|
},
|
|
|
];
|
|
|
|
|
|
const WorklistTable: React.FC = () => {
|
|
|
- return <Table columns={columns} dataSource={[]} rowKey="patientId" />;
|
|
|
+ const worklistData = useSelector(
|
|
|
+ (state: RootState) => state.workEntities.data
|
|
|
+ );
|
|
|
+
|
|
|
+ return (
|
|
|
+ <Table columns={columns} dataSource={worklistData} rowKey="patient_id" />
|
|
|
+ );
|
|
|
};
|
|
|
|
|
|
export default WorklistTable;
|