Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
@@ -57,7 +57,7 @@ PatSafe is a web-based application that connects discharged patients with their
|
|||||||
|
|
||||||
PatSafe was built using **Next.js** and **React.js** for the frontend, while the backend is powered by **MongoDB** and **Clerk** for authentication. The platform utilizes APIs for real-time updates and features such as medication tracking and symptom reporting. We integrated a chatbot powered by **Hugging Face models** for natural language processing, allowing users to interact conversationally and gather helpful medical information.
|
PatSafe was built using **Next.js** and **React.js** for the frontend, while the backend is powered by **MongoDB** and **Clerk** for authentication. The platform utilizes APIs for real-time updates and features such as medication tracking and symptom reporting. We integrated a chatbot powered by **Hugging Face models** for natural language processing, allowing users to interact conversationally and gather helpful medical information.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
### Built With
|
### Built With
|
||||||
@@ -70,6 +70,7 @@ PatSafe was built using **Next.js** and **React.js** for the frontend, while the
|
|||||||
* [![HuggingFace][HuggingFace]][HuggingFace-url]
|
* [![HuggingFace][HuggingFace]][HuggingFace-url]
|
||||||
* [![OpenAI][OpenAI]][OpenAI-url]
|
* [![OpenAI][OpenAI]][OpenAI-url]
|
||||||
* [![LangChain][LangChain]][LangChain-url]
|
* [![LangChain][LangChain]][LangChain-url]
|
||||||
|
* [![Friendli][Friendli]][Friendli-url]
|
||||||
|
|
||||||
|
|
||||||
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
||||||
@@ -192,3 +193,5 @@ Distributed under the Apache 2.0 License. See `LICENSE.txt` for more information
|
|||||||
[OpenAI-url]: https://openai.com/
|
[OpenAI-url]: https://openai.com/
|
||||||
[LangChain]: https://img.shields.io/badge/langchain-1C3C3C?logo=langchain&style=for-the-badge&logoColor=white
|
[LangChain]: https://img.shields.io/badge/langchain-1C3C3C?logo=langchain&style=for-the-badge&logoColor=white
|
||||||
[LangChain-url]: https://www.langchain.com/
|
[LangChain-url]: https://www.langchain.com/
|
||||||
|
[Friendli]: https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Q5SDIxLjkzMzdaIiBkYXRhLXNlbnRyeS1lbGVtZW50PSJwYXRoIiBkYXRhLXNlbnRyeS1zb3VyY2UtZmlsZT0icHJvZHVjdHMudHN4Ij48L3BhdGg+PC9zdmc+&style=for-the-badge
|
||||||
|
[Friendli-url]:https://friendli.ai/
|
||||||
|
|||||||
45
public/HoyaHax2025-icon.svg
Normal file
45
public/HoyaHax2025-icon.svg
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="295"
|
||||||
|
height="295"
|
||||||
|
viewBox="0 0 295 295"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-125,-20)"><path
|
||||||
|
style="fill:#ffffff;fill-opacity:1"
|
||||||
|
d="M 262,300.29875 C 202.51794,294.87038 154.96115,252.52046 142.33287,193.73367 139.26891,179.47042 139.23735,154.77737 142.26547,141 148.03976,114.72804 159.02335,93.953448 177.1475,75.023348 196.00288,55.329496 219.17387,42.497633 247,36.339722 c 10.1509,-2.246391 39.50745,-2.522766 50,-0.470722 56.13462,10.97833 98.35231,53.800034 107.96729,109.51199 1.98491,11.50119 1.96571,32.60699 -0.0401,44.0744 -6.88924,39.38631 -31.39956,74.32707 -65.96629,94.03841 -8.58168,4.89363 -22.32483,10.50022 -31.96089,13.03863 -12.24943,3.22685 -32.41621,4.91473 -45,3.76632 z"
|
||||||
|
id="path1" /><path
|
||||||
|
style="fill:#ffd548;fill-opacity:1"
|
||||||
|
d="m 260.82885,164.12451 c -10.42396,-3.87018 -18.71165,-11.35039 -23.03253,-20.78844 -2.60922,-5.69929 -4.00954,-16.72073 -2.88562,-22.71175 L 235.59063,117 h 6.96303 6.96303 l 6.24165,6.34898 c 5.22365,5.31347 7.1037,6.55436 11.52707,7.60823 2.99465,0.71349 7.16411,0.97753 9.62012,0.60923 5.72951,-0.8592 12.85235,-5.4879 16.17779,-10.51298 L 295.76577,117 h 7.72721 7.72721 l 0.57535,5.57455 c 1.75098,16.96536 -6.59805,32.01836 -21.95078,39.57649 -8.53823,4.20336 -20.76935,5.03524 -29.01591,1.97347 z"
|
||||||
|
id="path3" /><path
|
||||||
|
d="m 273,84.673828 c -8.77873,-0.02119 -16.79747,4.868788 -21.34375,13.015625 -0.8345,1.495406 -2.71863,1.897477 -10.83398,2.310547 L 231,100.5 l -0.29688,6.83984 c -0.18204,4.18188 0.15567,7.38796 0.8711,8.25 0.83676,1.00823 3.5611,1.41016 9.55859,1.41016 7.50419,0 8.56998,0.2368 10.12696,2.24219 4.10348,5.28531 10.44382,10.76068 13.47265,11.63476 5.60674,1.61803 13.93417,1.239 18.26758,-0.83203 4.89492,-2.33939 7.36534,-4.4305 10.93555,-9.25781 l 2.74609,-3.71484 9.16016,-0.28516 L 315,116.5 l 0.29102,-8.25 0.28906,-8.25 h -9.1543 c -9.02304,0 -9.19434,-0.04439 -11.79101,-3.121094 C 286.3331,87.042559 282.17579,84.695978 273,84.673828 Z"
|
||||||
|
style="fill:#0000ff;fill-opacity:1"
|
||||||
|
id="path6" /><path
|
||||||
|
d="m 313.77734,155.76172 -17.88867,12.28515 c -9.83865,6.75735 -18.21896,12.77344 -18.62305,13.36915 -0.40408,0.5957 -0.742,5.04712 -0.75,9.89062 -0.0148,8.52782 0.0799,8.89345 3,11.56055 5.47843,5.00376 5.91181,11.91161 1.04102,16.57812 -7.28954,6.98382 -18.05664,1.91041 -18.05664,-8.50781 0,-1.95218 1.18195,-4.24078 3.53711,-6.84766 l 3.53711,-3.91406 -0.28711,-9.7207 L 269,180.73633 251,168.36914 c -9.9,-6.80164 -18.41804,-12.36625 -18.92969,-12.36719 -2.36493,-0.004 -14.24436,8.92687 -19.49609,14.65821 -9.72128,10.60906 -15.62404,25.43419 -18.04297,45.31445 -1.17474,9.65477 -1.34957,19.37504 -0.36523,20.35937 0.36666,0.36667 36.14166,0.66602 79.5,0.66602 H 352.5 l -0.004,-8.25 c -0.007,-15.35138 -3.97989,-33.86334 -9.67968,-45.11133 -5.5091,-10.87169 -16.13199,-21.68117 -25.92774,-26.38281 z"
|
||||||
|
style="fill:#007cd9;fill-opacity:1"
|
||||||
|
id="path4" /><ellipse
|
||||||
|
style="fill:#007cd9;fill-opacity:1;fill-rule:evenodd;stroke-width:1.08829;stroke-linecap:round"
|
||||||
|
id="path9"
|
||||||
|
cx="273"
|
||||||
|
cy="108.27763"
|
||||||
|
rx="26.665876"
|
||||||
|
ry="23.603806" /><ellipse
|
||||||
|
style="fill:#1aabff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.87685;stroke-linecap:round"
|
||||||
|
id="path10"
|
||||||
|
cx="272.76242"
|
||||||
|
cy="108.17363"
|
||||||
|
rx="18.206409"
|
||||||
|
ry="14.994333" /><ellipse
|
||||||
|
style="fill:#1aabff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.53481;stroke-linecap:round"
|
||||||
|
id="path10-6"
|
||||||
|
cx="311.80646"
|
||||||
|
cy="189.45387"
|
||||||
|
rx="10.335771"
|
||||||
|
ry="9.8255558" /></g></svg>
|
||||||
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/patsafesystemdiagram.png
Normal file
BIN
public/patsafesystemdiagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
@@ -7,6 +7,8 @@ import { useRouter } from 'next/navigation';
|
|||||||
|
|
||||||
import { IntenseChart } from "./IntensityChart"
|
import { IntenseChart } from "./IntensityChart"
|
||||||
import { MedicationTable } from "./MedicationTable"
|
import { MedicationTable } from "./MedicationTable"
|
||||||
|
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||||
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
|
|
||||||
@@ -22,11 +24,11 @@ export default function Dashboard() {
|
|||||||
}
|
}
|
||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
if (userData) {
|
// if (userData) {
|
||||||
if (userData.role != "patient") {
|
// if (userData.role != "patient") {
|
||||||
router.push("/suite/doctor/dashboard");
|
// router.push("/suite/doctor/dashboard");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
@@ -34,6 +36,38 @@ export default function Dashboard() {
|
|||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
<IntenseChart />
|
<IntenseChart />
|
||||||
<MedicationTable medications={userData ? userData.medications : []} />
|
<MedicationTable medications={userData ? userData.medications : []} />
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<h2 className="text-lg font-semibold">How do you feel today?</h2>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Textarea placeholder='Write how you feel?' className='w-full h-full' />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<h2 className="text-lg font-semibold">Doctor's Notes</h2>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
1. Excersise regularly<br />
|
||||||
|
2. Eat Less Red Meats and More Vegetables<br />
|
||||||
|
3. Get Plenty of Sleep<br />
|
||||||
|
4. Drink Plenty of Water<br />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card className='col-span-2'>
|
||||||
|
<CardHeader>
|
||||||
|
<h2 className="text-center text-lg font-semibold">Medical Summary</h2>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
Mr. Hoya is a 19-year-old male who presented on 01/16/2025 with hard cough.
|
||||||
|
Their medical history includes [briefly list 1-2 significant conditions].
|
||||||
|
The physical examination revealed [briefly describe 1-2 key findings].
|
||||||
|
Relevant laboratory and imaging studies were performed, with results [briefly state key findings].
|
||||||
|
A differential diagnosis was considered, with [most likely diagnosis] being the primary consideration.
|
||||||
|
The treatment plan includes [briefly describe 1-2 key treatment components], with scheduled follow-up appointments for ongoing monitoring.
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user