Project Title

El7a2ni Virtual Clinic webiste

Motivation 👩‍⚕️

Our vision is to create a healthcare ecosystem where distance is no longer a barrier to quality care. The Virtual Clinic is not just a platform; it's a commitment to making healthcare accessible, affordable, and patient-centric. Join us as patient or doctor in shaping the future of healthcare by embracing technology to improve the overall healthcare experience for everyone involved.

Build Status⚒️

BuildStatus

Project builds successfully and is fully functional. However, project is currently in development and improvements could be made.

Code Style 📜

The code style is enforced using eslint and prettier. The code style is enforced using pre-commit hooks and pre-commit github action.

Screenshots

Admin

addAdmin Screenshot 2023-12-16 183808 Screenshot 2023-12-16 184839 Screenshot 2023-12-16 184853 Screenshot 2023-12-16 184858 Screenshot 2023-12-16 184914

Patient

chats FamilyMember HealthPackages HomePage MyAppointments MyPrescriptions notifications ViewHealthRecords wallet

Doctor

AddPrescription DrRequests FollowUps jobCredentials myPatients prescriptions Screenshot 2023-12-16 185020

Tech/Framework used 🧰

Features

  • Guests are allowed to use the site with limited functionality(role based)
  • Signup to the website
  • Receive a password reset email

Admin

  • View all Patients, joined Doctor and pending Doctors
  • Accept or reject requests to join the platform or add Another admins
  • Add,Edit and delete Health Packages

Doctor

  • Edit/update personal information (email, hourly rate, affiliation, etc.).

  • Change password with specific validation.

  • Upload Health records for his patients:

  • Upload and submit required documents upon registration (ID, Medical licenses, medical degree).

  • Upload/remove documents for medical history.

  • Appointment Management:

  • View a list of his patients.

  • Add available time slots for appointments.

  • Schedule a follow-up for a patient.

  • Accept or revoke a follow-up session request from a patient. Reschedule and cancel an appointment for a patient. Receive notifications of appointment changes.

Prescription Management:

  • Add/delete medicine to/from the prescription.
  • Add/update dosage for each medicine in the prescription.
  • Download prescriptions in PDF format.

Health Record Management:

  • Add new health records for a patient.

Communication:

  • Chat/video Chat with patients.

Financial Management:

  • View the amount accumulated in the wallet.
  • Receive payments for appointments.
  • Receive a refund in the wallet when canceling an appointment.

Patients:

Profile Management:

  • Edit/update personal information (email, date of birth, gender, etc.) and upload/remove medical history
  • Document Management:

Appointment Management:

  • View a list of all doctors along with their details.
  • View all available appointments of a selected doctor.
  • Select an appointment date and time.
  • View a list of all upcoming/past appointments.
  • Reschedule/Cancel an appointment for themselves or family members. -Receive notifications of appointment changes. Prescription Management:
  • View a list of all prescriptions and Choose to pay directly for the prescription items with a wallet or credit card.
  • Filter prescriptions based on date, doctor, or filled status. Health Package Subscription:
  • View health package options and details and be able to subscribe or unsubscribe. Family Management:
  • Add family members using name, National ID, age, gender, and relation.

Wallet Management:

  • View the amount in the wallet and be able to recieve refunds on cacelling an appointment . Communication:
  • Chat/Video Chat with doctors.

Code Examples

patient (client) React components are used to represent page named FamilyMemberForm for one of the patients as well as smaller reusable components in the frontend

const FamilyMemberForm = () => {
  const snackbarMessage = useContext(SnackbarContext);
const navigate = useNavigate();
  const [email, setEmail] = useState("");
  const [relation, setRelation] = useState("spouse"); // Default to "spouse"
  const user = useSelector((state) => state.user);
  const role = useSelector((state) => state.user.role);

  const handleSubmit = async (e) => {
    e.preventDefault();

    // Check if the user ID is available
    if (user && user.id) {
      try {
        // Make an API request using Axios to add the family member
        const response = await axios.post(
          ${API_URL}/patient/addFamilyLink/${email}/${user.id},
          {
            relation,
          }
        );
        if (response) {
          snackbarMessage("You have successfully edited", "success");
          navigate("/Home");
        } else {
          snackbarMessage(error: ${response} has occurred, "error");
        }
        console.log("Family member added successfully:", response.data);
      } catch (error) {
        console.error("Error adding family member:", error.message);
      }
    } else {
      console.error("User ID not available.");
    }
  };

  return (
    role==="patient"?(
    <div
      style={{
        width: "80%",
        margin: "0 auto",
        padding: "20px",
        backgroundColor: "#f9f9f9",
        borderRadius: "8px",
        boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
      }}
    >
      <h2>link Family Member</h2>
      <form
        onSubmit={handleSubmit}
        style={{ display: "flex", flexDirection: "column", gap: "10px" }}
      >
        <label>
          Email:
          <input
            type="email"
            value={email}
            onChange={(e) => setEmail(e.target.value)}
            required
            style={{
              width: "100%",
              padding: "8px",
              borderRadius: "4px",
              border: "1px solid #ccc",
            }}
          />
        </label>
        <label>
          Relation:
          <select
            value={relation}
            onChange={(e) => setRelation(e.target.value)}
            required
            style={{
              width: "100%",
              padding: "8px",
              borderRadius: "4px",
              border: "1px solid #ccc",
            }}
          >
            <option value="spouse">Spouse</option>
            <option value="child">Child</option>
          </select>
        </label>
        <button
          type="submit"
          style={{
            width: "30%",
            padding: "10px",
            backgroundColor: "#007bff",
            color: "#fff",
            border: "none",
            borderRadius: "4px",
            postion:"relative",
            maraginLeft:"auto",
      
            cursor: "pointer",
            transition: "background-color 0.3s ease",
          }}
        >
          link Family Member
        </button>
      </form>
      <IconButton
            size="large"
            edge="start"
            color="inherit"
            aria-label="home"
            sx={{ mr: 2 }}
            onClick={() => {
              window.location.href = '/Home';
            }}
          >
            <HomeIcon />
          </IconButton>
    </div>): (
    <>
      <Link to="/Login" sx={{ left: "100%" }}>
        <Typography
          variant="h6"
          noWrap
          component="div"
          sx={{
            flexGrow: 1,
            display: { xs: "none", sm: "flex" },
            fontSize: "20px",
            maragin: "auto",
          }}
        >
          Login
        </Typography>
      </Link>
    </>
  ));

};
export default FamilyMemberForm;

Another example at patient is Download page This code defines a React functional component named DownloadPage. Here's what it does: The main purpose of this component is to capture the content of a specified HTML element, convert it to an image using html2canvas, and then save that image as a PDF file using jsPDF. The code:

const DownloadPage = ({ rootElementId, downloadFileName }) => {
  const downloadFileDocument = () => {
    const input = document.getElementById(rootElementId);

    html2canvas(input).then((canvas) => {
      const imgData = canvas.toDataURL("image/png");
      const pdf = new jsPDF("p", "pt", "a4");
      pdf.addImage(imgData, "JPEG", 10, 50);
      pdf.save(${downloadFileName}.pdf);
    });
  };

  return (
    <div>
      <Button onClick={downloadFileDocument} endIcon={<DownloadIcon />}>
        Download 
      </Button>
    </div>
  );
};

export default DownloadPage;

doctor

Another example at doctor is My appointments Take a specific date and status and filter schedule about it :

const handleFilterClick = () => {
    // Filter appointments based on selectedDate and selectedStatus
    const filteredAppointments = appointments.filter((appointment) => {
      const isDateMatch =
        !selectedDate || appointment.date === selectedDate.toISOString().split('T')[0];
      const isStatusMatch = selectedStatus === 'Status' || appointment.status === selectedStatus;
      return isDateMatch && isStatusMatch;
    });

    // Filter by custom date input
    const customDateFilteredAppointments = customDate
      ? filteredAppointments.filter((appointment) => appointment.date === customDate)
      : filteredAppointments;

    // Set the filtered appointments to display
    setAppointments(customDateFilteredAppointments);
  };

  return (
    <div>
      <Paper elevation={3} style={{ padding: '20px' }}>
        <i>
          <IconButton
            color="primary"
            aria-label="Back to Home"
            style={{ position: 'absolute', bottom: '10px', right: '10px' }}
            onClick={() => {
              navigate(-1);
            }}
          >
            <HomeIcon />
          </IconButton>
        </i>
        <h2>Appointments</h2>

        <div style={{ display: 'flex', alignItems: 'center', marginBottom: '20px' }}>
          <LocalizationProvider dateAdapter={AdapterDateFns}>
            <DatePicker
              label="Select Date"
              value={selectedDate}
              onChange={(newDate) => handleDateChange(newDate)}
              renderInput={(params) => (
                <TextField {...params} variant="outlined" />
              )}
              inputFormat="yyyy-MM-dd"
              inputProps={{ endAdornment: <CalendarTodayIcon /> }}
            />
          </LocalizationProvider>

          <Select
            label="Status"
            value={selectedStatus}
            onChange={handleStatusChange}
            style={{ marginLeft: '20px' }}
          
          >
            <MenuItem value="completed">completed</MenuItem>
            <MenuItem value="upcoming">upcoming</MenuItem>
            <MenuItem value="cancelled">cancelled</MenuItem>
            <MenuItem value="rescheduled">rescheduled</MenuItem>
          </Select>


          <TextField
            label="Custom Date"
            variant="outlined"
            value={customDate}
            onChange={handleCustomDateChange}
            style={{ marginLeft: '20px' }}
            inputProps={{ type: 'date' }}
          />

          <IconButton onClick={handleFilterClick} color="primary">
            <FilterListIcon />
          </IconButton>
        </div>

        <TableContainer>
          <Table>
            <TableHead>
              <TableRow>
                <TableCell>Finished</TableCell>
                <TableCell>Date</TableCell>
                <TableCell>Patient</TableCell>
                <TableCell>Status</TableCell>
                <TableCell>View</TableCell>
              </TableRow>
            </TableHead>
            <TableBody>
              {appointments.map((appointment) => (
                <TableRow key={appointment._id}>
                  <TableCell>

                  </TableCell>
                  <TableCell>{appointment.startDate}</TableCell>
                  <TableCell>{appointment.pID.name}</TableCell>
                  <TableCell>{appointment.status}</TableCell>
                  <TableCell>
                    {/* Use Link to navigate to the patient details page */}
                    <Link to={"/myappointments/patientdetails"}>
                      <Button variant="outlined" color="primary">
                        View
                      </Button>
                    </Link>
                  </TableCell>
                </TableRow>
              ))}
            </TableBody>
          </Table>
        </TableContainer>

      </Paper>

    </div>
  );
}

export default Appointments;

server

1-At server this one example of method in patient routes that add family member and it is called addFamilyMemberByEmailAndId:

async function addFamilyMemberByEmailAndId(email, patientId, relation, type) {
  try {
    consolr.log("hi");
    const familyMember = null;
    // Find the patient with the provided email
    if (type === "email") {
      familyMember = await Patient.findOne({ email });
    } else {
      familyMember = await Patient.findOne({ mobile: email });
    }
    console.log(familyMember);

    if (!familyMember) {
      throw new Error("Family member not found with the provided email.");
    }

    // Find the patient with the provided ID
    const patientToUpdate = await Patient.findById(patientId);
    consolr.log(patientId);
    if (!patientToUpdate) {
      throw new Error("Patient not found with the provided ID.");
    }

    // Check if the family member is already in the family array
    const isAlreadyFamily = patientToUpdate.family.some(
      (member) => member.email === email
    );

    if (isAlreadyFamily) {
      throw new Error("Family member is already added to the patient.");
    }
    const ag = calculateAge(familyMember.dBirth);
    // Add the family member to the patient's family array with the provided relation
    patientToUpdate.family.push({
      fullName: familyMember.name,
      NID: 12345678912,
      age: ag,
      gender: familyMember.gender,
      relation,
      pid: familyMember._id, // Assign the related patient's ID to pid
    });

    // Save the updated patient
    await patientToUpdate.save();

    return patientToUpdate;
  } catch (error) {
    throw error;
  }
}

2-Another example at doctor controller which is try to find doctor wallet

const viewWallet = async(req , res)=>{
  const {doctorId} = req.params;
  try{
    const doctor = await Doctor.findById(doctorId);

    if(!doctor){
      return res.status(404).json({ error: "Doctor not found" });
    }

    if (!doctor.wallet) {
      // If the patient doesn't have a wallet attribute, add it with a value of zero
      doctor.wallet = 0;
      await doctor.save();
    }

  
    const walletAmount  = doctor.wallet ;

    res.status(200).json({
      message:" wallet amount is fetched successfully",
      doctor: doctor,
      wallet:walletAmount
    })
  }
  catch(error){
    res.status(500).json({ error: "Internal Server Error" });
  }



}

3-last one at patient controller that try to find available slot for doctor

const freeAppiontmentSlot = async (req, res) => {
  try {
    const { doctorId } = req.params;

    // Validate the 'patientId' parameter
    if (!doctorId) {
      return res.status(400).json({ error: "doctorId ID is required" });
    }

    // Find the patient by patientId
    const doctor = await Doctor.findById(doctorId);

    if (!doctor) {
      return res.status(404).json({ error: "Patient not found" });
    }

    // Fetch details about each free Appointment
    const Appointments = await Appointment.find({ drID: doctorId ,status:"Not_Reserved"}).populate(
      "drID"
    );
    return res.status(200).json({
      message: "Free Appointments retrieved successfully",
      Appointments,
    });
  } catch (error) {
    console.error("Error retrieving Appointments:", error);
    return res.status(500).json({ error: "Internal Server Error" });
  }
};

Installation ⬇️

  1. Make sure you have npm and node installed
  2. Go into the server directory and run npm i
  3. Create a .env file, using .env.example as a template
  4. Run node .
  5. From the parent directory, go into the client directory and run npm i
  6. Run npm start
`
API Refrences

Admin API Refrences

Gets a specific user from the database

  GET /api/getUser

Gets all the admins from the database

  GET /api/viewAdmin

Gets all the medicines in the database

  GET /api/viewMedicine

Creates an admin in the database

  POST /api/createAdmin

Gets all the doctors whose their working status are pending (their contarct is still pending)

  GET /api/viewPendDr

Gets all the doctors whose their working status are accepted (their contarct is accepted)

  GET /api/viewJoinedDr

Gets all the patients in the database

  GET /api/viewPatients

Delete patient

  DELETE /api/deletePatient/${id}
Parameter Type Description
id String Id of the patient to delete

DELETE doctor

  DELETE /api/deleteDoctor/${id}
Parameter Type Description
id String Id of the doctor to delete

DELETE admin

  DELETE /api/deleteAdmin/${id}
Parameter Type Description
id String Id of the admin to delete

adds a health package in the database

  POST /api/addPack

DELETE health package

  DELETE /api/deletePack/${id}
Parameter Type Description
id String Id of the health package to delete

UPDATE health package

  PUT /api/updatePack/${id}
Parameter Type Description
id String Id of the health package to update

Gets all the health packages in the database

  GET /api/viewHealthP

Sends an accept email to a doctor for his/her contract

  POST /api/sendAcceptEmail

Sends a reject email to a doctor for his/her contract

  POST /api/sendRejectEmail

Patient API Refrences

Creates an appointment for a specific patient with a specific doctor

  POST /createAppointment/:patientID
Parameter Type Description
patientID String Id of the patient

ADDS a patient to the database

  POST /api/addPatient

ADDS a family member of a specific patient to the database

  POST /api/addFamilyMember/:patientId
Parameter Type Description
patientId String Id of the patient

VIEWS family members of a specific patient

  GET /api/viewFamilyMembers/:patientId
Parameter Type Description
patientId String Id of the patient

VIEWS ALL THE DOCOTRS to a specific Patient with their rates based on the patient's subscribed health package

  GET /api/viewDoctors/:patientId
Parameter Type Description
patientId String Id of the Patient

GETS the doctors by specifying their NAME OR SPECIALITY

  GET /api/searchDoctorsByNameOrspeciality/:patientId
Parameter Type Description
patientId String Id of the patient (USELESS)

GETS the doctors by specifying their SPECIALITY AND REQUESTED TIME

  GET /api/searchDoctorsBySpecialtyOrAvailability/:patientId"
Parameter Type Description
patientId String Id of the patient(USELESS)

VIEWS the prescriptioins of a specific patient

  GET /api/viewPrescriptions/:patientId
Parameter Type Description
patientId String Id of the patient

reschedule an appointment of a patient with a doctor

  PUT /api/rescheduleAppointment/:appointmentId
Parameter Type Description
appointmentId String Id of an appointment

filter appointments of a specific patient based on the start date , end date , and status of the appointment

  GET /api/patientFilterAppointments

GETS all the appointments of a specific patient

  GET /api/viewAppoints/:patientId"
Parameter Type Description
patientId String Id of the patient

GETS all the appointments of a doctor that has status Not_Reserved

  GET /api/freeAppiontmentSlot/:doctorId
Parameter Type Description
doctorId String Id of the doctor

Reserve an appointemnt slot for a patient chnaging its status to upcoming

  PATCH /api/reserveAppointmentSlot/:AppointmentId
Parameter Type Description
AppointmentId String Id of the appointment

GETS a user from the databse by specifying their username

  GET /api/getUser

GETS all doctors in the database

  GET /api/getAlldoctors

GETS a specific prescription from the database

  GET /api/viewSpecificPrescription/:id
Parameter Type Description
id String Id of the prescription

GETS all the appointments of a doctor that has status Not_Reserved

  GET /api/appointmentPatients/:doctorId
Parameter Type Description
doctorId String Id of the doctor

GETS all the health records of a patient

  GET /api/viewPatientHealthRecords/:patientid
Parameter Type Description
patientid String Id of the patient

make patient subscribe to a health package using wallet

  PATCH /api/SubscriptionPayment/:patientId/:healthPackageId
Parameter Type Description
patientId String Id of the patientID
healthPackageId String Id of the health package

make patient subscribe to a health package using Credit Card

  PATCH /api/CCSubscriptionPayment/:patientId/:healthPackageId
Parameter Type Description
patientId String Id of the patientID
healthPackageId String Id of the health package

UPDATE an appointment accordingly after a successful credit card transaction

  PUT /api/successCreditCardPayment/:patientID/:appointmentID
Parameter Type Description
patientID String Id of the patient
appointmentID String Id of the appointment

Adds a new family member to a patient

  POST /api/addFamilyLink/:patientId
Parameter Type Description
patientid String Id of the patient

SUBSCRIBES for a patient a specific package

  Patch /api/subscribeToHealthPackage
Query Parameter Type Description
patientId String Id of the patient
healthPackageId String Id of the health package

UNSUBSCRIBES for a patient a specific package

  Patch /api/unSubscribeToHealthPackage
Query Parameter Type Description
patientId String Id of the patient
healthPackageId String Id of the health package

GETS all the health packages of a patient

  GET /api/viewHealthPackagesPatient/:patientId
Parameter Type Description
patientId String Id of the patient

GETS the wallet of a patient

  GET /api/viewWallet/:patientId
Parameter Type Description
patientId String Id of the patient

GETS the health package of a patient

  GET /api/healthPackageInfo/:patientId/:healthPackageId
Parameter Type Description
patientId String Id of the patient
healthPackageId String Id of the health package

Creates a checkout to pay for the health package with the credit card using stripe

  GET /api/createCheckoutSession/:pid/:id
Parameter Type Description
pid String Id of the patient
id String Id of the health package

Creates an appointment checkout session to pay for the appointment using stripe

  POST /api/createAppointmentCheckoutSession/:amount/:appointmentId/:patientId
Parameter Type Description
amount String amount that will pe payed
appointmentId String Id of the appointment
patientId String Id of the patient

GETS all the appointments of a patient with doctors assigned to them

  GET /api/MyDoctors/:patientId
Parameter Type Description
patientid String Id of the patient

SCHEDULE an appointment of a doctor with a patient

  POST /api/scheduleAppointment

Calculate the amount patient will pay for a doctor taking into consideration their subscribed package

  GET /api/calculateAmount/:drId/:patientId
Parameter Type Description
drId String Id of the doctor
patientId String Id of the patient

Pays for the appointment by wallet

  POST /api/payAppWithWallet

Uplaod a file of a patient that represents his/her medical history

  POST /api/upload/:id
Parameter Type Description
id String Id of the patient

GETS all the files (medical history) of a patient

  GET /api/getAllFiles/:id
Parameter Type Description
id String Id of the patient

DOWNLOADS a specific file(medical history) for a specific patient

  GET /api/download/:id/:pid
Parameter Type Description
id String Id of the file
pid String Id of the patient

DELETES a specific file(medical history) for a specific patient

  GET /api/delete/:id/:pid
Parameter Type Description
id String Id of the file
pid String Id of the patient

cancel an appointment between a doctor and a patient

  PATCH /api/CancelAppointment/:aid/:did/:pid
Parameter Type Description
aid String Id of the appointment
did String Id of the doctor
pid String Id of the patient

GETS all the notifications of a patient

  GET /api/:patientId/notifications
Parameter Type Description
patientId String Id of the patient

ADDS a new notifications to a patient

  POST /api/:patientId/notifications
Parameter Type Description
patientId String Id of the patient

UPDATES the notifications array of a patient

  PATCH /api/:patientId/notifications
Parameter Type Description
patientId String Id of the patient

SENDS an email to the patient

  POST /api/:patientId/send-email
Parameter Type Description
patientId String Id of the patient

Creates a followUp between a doctor and a patient

  POST /api/requestFollowUp/:pid/:did
Parameter Type Description
pid String Id of the patient
did String Id of the doctor

Doctor API Refrences

blaballbalbalblablablbalbalbalablba

  POST /api/upload/:id
Parameter Type Description
id String Id of the doctor

BLLLLLLLBLBBLBLBLBLLLLBLBLBBLBBBL

  GET /api/download/:drId
Parameter Type Description
patientId String Id of the patient

BLLLBLBLBLBLBLBLLBLBLLBLLBBLBL

  GET /api/downloadf/:drId
Parameter Type Description
patientId String Id of the patient

GETS the contract of a specific doctor

  GET /api/getContract/:id
Parameter Type Description
id String Id of the doctor

ADDS a new prescription to the database

  POST /api/addPrescription

GETS a user from the database based on ther username

  POST /api/getUser

ADDS a doctor to the database

  POST /api/addDoctor

GETS all the patients of a doctor

  GET /api/getPatients/:id
Parameter Type Description
id String Id of the doctor

GETS the doctor by id

  GET /api/getDr/:id
Parameter Type Description
id String Id of the doctor

ADDS an appointment slot to a doctor

  POST /api/addAppointmentSlot/:doctorId
Parameter Type Description
doctorId String Id of the doctor

SEARCH the patients in the database by name

  GET /api/searchPatientByName
QUERY Parameter Type Description
name String Name of the patient

GETS all the appointments of a doctor that is assigned to a patient

  GET /api/Mypatients/:doctorId
Parameter Type Description
doctorId String Id of the doctor

Creates a followUp appointment for a doctor with a patient

  POST /api/createFollowUpAppointment/:drID
Parameter/QUERY Type Description
drID String Id of the doctor
patientID String Id of the patient

GETS all th patients of upcoming appointments for a doctor

  GET /api/patientsInUpcomingApointments/:doctorId
Parameter Type Description
doctorId String Id of the doctor

MOFIFIES a doctor in the database

  PUT /api/editDoctor/:id
Parameter Type Description
id String Id of the doctor

GETS the appointemnts of a doctor with a specific status ,start date , and end date

  GET /api/doctorFilterAppointments/:doctorId
Parameter Type Description
doctorId String Id of the doctor

GETS the appointemnts of a doctor

  GET /api/appointmentPatients/:doctorId
Parameter Type Description
doctorId String Id of the doctor

reschedule an appointemnt of a doctor with a patient

  PUT /api/rescheduleAppointment/:appointmentId
Parameter Type Description
appointmentId String Id of the appointemnt

GETS a doctor from the database

  GET /api/getDoctor/:doctorId
Parameter Type Description
doctorId String Id of the doctor

UPDATES the contarct of a doctor to be accepted

  PUT /api/acceptContract/:doctorId
Parameter Type Description
doctorId String Id of the doctor

ADDS a health records to a patient

  POST /api/addHealthRecord/:patientID
Parameter Type Description
patientID String Id of the patient

GETS the wallet of a doctor

  GET /api/viewWallet/:doctorId
Parameter Type Description
doctorId String Id of the doctor

DOWNLOADS the doctor's contract

  GET /api/download/:drid
Parameter Type Description
drid String Id of the doctor

GETS the notifications of a doctor

  GET /api/:doctorId/notifications
Parameter Type Description
doctorId String Id of the doctor

ADDS a new notification to a doctor

  POST /api/:doctorId/notifications
Parameter Type Description
doctorId String Id of the doctor

UPDTAES the notictaions array of a specific doctor

  PATCH /api/:doctorId/notifications
Parameter Type Description
doctorId String Id of the doctor

SENDS an email to the doctor

  POST /api/:doctorId/send-email
Parameter Type Description
doctorId String Id of the doctor

UPDATES the dosage of a specific medicine that is in a prescription

  PUT /api/update/:prescriptionID
Parameter Type Description
prescriptionID String Id of the prescription

ADDS a medicine to a specific prescription

  POST /api/add/:prescriptionID
Parameter Type Description
prescriptionID String Id of the prescription

DELETES a medicine from a specific prescription

  DELETE /api/delete/:prescriptionID
Parameter Type Description
prescriptionID String Id of the prescription

GETS all the followUp requests for a specific doctor

  GET /api/FollowUpRequests/:doctorId
Parameter Type Description
doctorId String Id of the doctor

DELETES(rejects) a specific followUp request from the database

  DELETE /api/rejectFollowUp/:id
Parameter Type Description
id String Id of the followUp

Accepts a followUp request and creates an appointemnt

  POST /api/acceptFollowUp/:id
Parameter Type Description
id String Id of the followUp request

CANCELS an appointemnt between a doctor and a patient

  PATCH /api/CancelAppointment/:aid/:did/:pid
Parameter Type Description
aid String Id of the appointemnt
did String Id of the doctor
pid String Id of the patient

GETS all the patients that was given a prescription from this doctor

  GET /api/getPatientsByDoctorId/:doctorId
Parameter Type Description
doctorId String Id of the doctor

GETS all the prescriptions of a patient

  GET /api/viewPrescriptions/:patientId
Parameter Type Description
patientId String Id of the patient
  Get /api/chat/${id}
Parameter Type Description
id String Id of the patient to open his chats
Tests
Admin

addPack pendDR viewAdmin viewMedicine

Doctor

addHealthRecord viewPrescription addAppointment viewPrescription getPatients 98a736a4c06) 440c24)

Patient ![CreateAppointment](https://github.com/advanced-computer-lab-2023/Aplus-Cant-Lose-Clinic/assets/98600518/afc1787f-3f8b-4edc-a258-661ff20344af)

getallDoctors specificPerscription viewFamilyMember viewFreeAppointments

## How to use 🤷‍♀️
  • npm and node installed.
  • navigate to the server directory and run npm i.
  • Create a .env file using .env.example as a template,
  • run node
  • Finally, navigate to the client directory and run npm i,
  • then npm start to start the application.
  • This will start the client server, and you can access the website by navigating to the URL returned from npm start in your web browser. This will allow you to access the full range of features available on El7a2ni Virtual clinic.

Contribute ➕

  • Fork the repository
  • Clone the repository
  • Install dependencies
  • Create a new branch
  • Make your changes
  • Commit and push your changes
  • Create a pull request
  • Wait for your pull request to be reviewed and merged

Credits 🙏

license 🪪

GNU GPL v3