AI prompts
base on Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States. <a href="https://ohc.network/">
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_white_wordmark.svg">
<img alt="CARE Logo" src="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_dark_wordmark.svg" width="400">
</picture>
<br>
<a href="https://digitalpublicgoods.net/r/care"><img src="https://img.shields.io/badge/Verified-DPG%20(Since%20%202021)-3333AB?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMzEiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAzMSAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjIwMDggMjEuMzY3OEwxMC4xNzM2IDE4LjAxMjRMMTEuNTIxOSAxNi40MDAzTDEzLjk5MjggMTguNDU5TDE5LjYyNjkgMTIuMjExMUwyMS4xOTA5IDEzLjYxNkwxNC4yMDA4IDIxLjM2NzhaTTI0LjYyNDEgOS4zNTEyN0wyNC44MDcxIDMuMDcyOTdMMTguODgxIDUuMTg2NjJMMTUuMzMxNCAtMi4zMzA4MmUtMDVMMTEuNzgyMSA1LjE4NjYyTDUuODU2MDEgMy4wNzI5N0w2LjAzOTA2IDkuMzUxMjdMMCAxMS4xMTc3TDMuODQ1MjEgMTYuMDg5NUwwIDIxLjA2MTJMNi4wMzkwNiAyMi44Mjc3TDUuODU2MDEgMjkuMTA2TDExLjc4MjEgMjYuOTkyM0wxNS4zMzE0IDMyLjE3OUwxOC44ODEgMjYuOTkyM0wyNC44MDcxIDI5LjEwNkwyNC42MjQxIDIyLjgyNzdMMzAuNjYzMSAyMS4wNjEyTDI2LjgxNzYgMTYuMDg5NUwzMC42NjMxIDExLjExNzdMMjQuNjI0MSA5LjM1MTI3WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==" alt="DPG Badge"></a>
</p>
</a>
<p align="center"><b>Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.</b></p>
<h2></h2>
<h3 align="center"><a href="https://care.ohc.network" target="_blank">๐ Staging Deployment</a></h3>
<center>
[](https://app.netlify.com/sites/care-ohc/deploys)
</center>
<p align="center">Auto deployed to <a href="https://care.ohc.network/">care.ohc.network</a> for <code>develop</code> branch. All pull requests have preview builds powered by <a href="https://netlify.com">Netlify</a>.</p>
[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/0)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/1)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/2)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/3)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/4)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/5)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/6)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/7)


[](https://cloud.cypress.io/projects/wf7d2m/runs)


[](https://www.codacy.com/gh/ohcnetwork/care_fe?utm_source=github.com&utm_medium=referral&utm_content=ohcnetwork/care_fe&utm_campaign=Badge_Grade)
[](https://codeclimate.com/github/ohcnetwork/care_fe/maintainability)
## Getting started
- ๐ฌ Comment on the issue if you are willing to take it up, and link the pull request with the issue.
- ๐ท๏ธ Tag `@ohcnetwork/care-fe-code-reviewers` for faster resolution.
- ๐ธ Attach screenshots in the pull requests showing the changes made in the UI.
#### Install the required dependencies
```sh
npm install
```
#### ๐ Run the app in development mode
```sh
npm run dev
```
Once the development server has started, open [localhost:4000](http://localhost:4000) in your browser. The page will be automatically reloaded when you make edits and save. You will also see any lint errors in the console.
#### ๐ API Credentials for care.ohc.network
Authenticate to care.ohc.network with any of the following credentials
```yaml
# Doctor at Aluva PHC
- username: care-doctor
password: Ohcn@123
# Staff at Aluva PHC
- username: care-staff
password: Ohcn@123
# Admin at Aluva PHC
- username: care-nurse
password: Ohcn@123
# Facility Admin at Aluva PHC
- username: care-fac-admin
password: Ohcn@123
# Volunteer at Aluva PHC
- username: care-volunteer
password: Ohcn@123
# Administrator
- username: care-admin
password: Ohcn@123
```
#### ๐ฑ Patient Login in Staging
For patient login via phone number:
- In production, an actual SMS with OTP is sent to the provided phone number
- In staging environment, to save costs, SMS messages are not actually sent
- For testing purposes in staging, use the hardcoded OTP: `45612`
#### Contributing to CARE
- Create a branch with branch name of the format `issues/{issue#}/{short-name}` (example `issues/7001/edit-prescriptions`) from the latest [`develop`](https://github.com/ohcnetwork/care_fe/tree/develop) branch when starting to work on an issue.
- Once the changes are pushed to the branch, make a pull request with a meaningful title (example: "๐ Adds support for editing prescriptions" #6369)
- Ensure the issue number is mentioned in the PR with a closing tag by following the PR body template. (Refer: [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- Once the code review is done, the PR will be marked with a "Needs Testing" label where it'll be queued for QA testing.
- Once tested, the PR would be marked with a "Tested" label and would be queued for merge.
### Translations
All strings must be encased in i18n translations. New translation strings must be specified in `src`->`Locale`->`en`. Do not add translations for languages other than english through pull requests. Other language translations can be contributed through [Crowdin](https://crowdin.com/project/ohccarefe)
### Testing
To ensure the quality of our pull requests, we use a variety of tools:
- **Automated E2E Testing:** We use Cypress for end-to-end testing to automatically verify the functionality and performance of our code.
- **Manual Real Device Testing:** We use BrowserStack to manually test our code on real devices, ensuring compatibility and functionality across different platforms and browsers.
#### ๐งช Run cypress tests
To run cypress tests locally, you'll need to setup the backend to run locally and load dummy data required for cypress to the database. See [docs](https://github.com/ohcnetwork/care#self-hosting).
Once backend is running locally, you'll have to ensure your local front-end is connected to local backend, by setting the `REACT_CARE_API_URL` env.
```env
#.env
REACT_CARE_API_URL=http://127.0.0.1:9000
```
Once done, start the development server by running
```sh
npm run dev
```
Once development server is running, then run the cypress tests in either of the ways described below.
```sh
npm run cypress:run # To run all tests in headless mode.
```
```sh
npm run cypress:run:gui # To run all tests in headed mode.
```
```sh
npm run cypress:open # To debug and run tests individually.
```
- Failed test screenshots are saved in `cypress/screenshots`
- All test videos are saved in `cypress/videos`
## ๐ Documentations
- [CARE Documentation](https://docs.ohc.network/docs/care)
- [Swagger API Documentation](https://careapi.ohc.network/swagger/)
- [Testing Documentation](https://docs.coronasafe.network/care-testing-documentation/)
## ๐ Production
#### Build the app for production
```sh
npm run build
```
Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance.
#### Start a production `http-server`
```sh
npm run preview
```
Starts a production http-server in local to run the project with Service worker.
The build is minified and the filenames include the hashes.
**๐ Your app is ready to be deployed!**
<div align="center">
<br />
<a href="https://digitalpublicgoods.net/r/care" target="_blank" rel="noopener noreferrer"><img src="https://github.com/DPGAlliance/dpg-resources/blob/main/docs/assets/dpg-badge.png?raw=true" width="100" alt="Digital Public Goods Badge"></a>
</div>
", Assign "at most 3 tags" to the expected json: {"id":"12661","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"