From f014fab59225065ca25b5420c9a036d5cb242410 Mon Sep 17 00:00:00 2001 From: divija-zemoso Date: Wed, 28 Sep 2022 10:50:16 +0530 Subject: [PATCH 1/5] get appointment by id --- src/patients/visits/FilterPatientModal.tsx | 28 ++++- .../appointments/AppointmentDetailForm.tsx | 102 ++++++++++++------ .../appointments/ViewAppointments.tsx | 27 ++--- .../appointments/constants/Appointment.tsx | 5 + .../appointments/edit/EditAppointment.tsx | 69 ++++++++---- .../appointments/new/NewAppointment.tsx | 91 ++++++++++------ .../appointments/service/Appointments.tsx | 28 +---- .../appointments/service/Patients.tsx | 42 ++++++++ .../appointments/view/ViewAppointment.tsx | 64 ++++++++--- src/shared/model/Appointment.ts | 2 + 10 files changed, 318 insertions(+), 140 deletions(-) create mode 100644 src/scheduling/appointments/service/Patients.tsx diff --git a/src/patients/visits/FilterPatientModal.tsx b/src/patients/visits/FilterPatientModal.tsx index e483305b1e..9ab199cbe6 100644 --- a/src/patients/visits/FilterPatientModal.tsx +++ b/src/patients/visits/FilterPatientModal.tsx @@ -2,7 +2,11 @@ import React, { useState } from 'react' import { Label, Modal, Select } from '@hospitalrun/components' import useTranslator from '../../shared/hooks/useTranslator' import { Button } from 'react-bootstrap' -import { appointmentTypes } from '../../scheduling/appointments/constants/Appointment' +import { + appointmentStatus, + appointmentTypes, +} from '../../scheduling/appointments/constants/Appointment' +// import { getAllPatients } from '../../scheduling/appointments/service/Patients' interface Props { show: boolean @@ -11,13 +15,21 @@ interface Props { } const FilterPatientModal = ({ show, onCloseButtonClick, onFieldChange }: Props) => { + // const func = () => { + // console.log('ALL PATIENTS DATA', getAllPatients()) + // } + + // useEffect(() => { + // func() + // }, []) + const { t } = useTranslator() - const [patientId, setpatientId] = useState('') + const [patientStatus, setPatientStatus] = useState('') const [appointmentType, setappointmentType] = useState('') const clearValues = () => { - setpatientId('') + setPatientStatus('') setappointmentType('') } @@ -32,9 +44,17 @@ const FilterPatientModal = ({ show, onCloseButtonClick, onFieldChange }: Props) onChange={(values) => setappointmentType(values[0])} /> +
+
+
+
+