React native application used by clinician and feed by MedAl-creator
This project was bootstrapped with TheCodingMachine React Native boilerplate.
Below you'll find information about performing common tasks.
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.
yarn run android
Runs your app in development mode.
yarn test
Runs the jest test runner on your tests.
yarn build
only for Linux and MacOSGenerate release version of app
yarn w-build
only for WindowsGenerate release version of app
yarn test:watch
Watches your code and runs the tests everytime your code is edited
yarn np
Set version number, build number, generate a new release and create a changelog
Please refer to TheCodingMachine React Native boilerplate instruction.
Field | type | Description |
---|---|---|
activities | Array<Activity> | Array of all activities related |
comment | text |
Clinician's comment set during the consultation stage |
consent | boolean |
Tells if the patient consented to share his data for the clinical research |
created_at | datetime |
Date & Time when the patient was created |
diagnosis | Diagnosis | Contains all the date related to the diagnoses |
id | string (UUID) |
Unique identification string for a medical case |
nodes | Array<Node> | Array of nodes |
status | string |
Tells what is the status of the medical case (closed / 1st assessments /...) |
synchronized_at | datetime |
Date & Time when the patient was sent to Medal-Data or Medal-hub |
updated_at | string (UUID) |
Date & Time when the patient was updated for the last time |
version_id | integer |
Medal-Creator's id of the version used |
json_version | integer |
Medal-Creator's incremental of the version used |
{ "proposed": [(array of node id)], "excluded": [(array of node id)], "refused": [(array of node id)], "additional": { "1" : { "id": "1", "managements": [(array of node id)] "drugs": { "agreed": { "14" : { "id": 14 "formulation_id" : 4 } }, "refused": [(array of node id)], "additional": { "15" : { "formulation_id" : 4 "duration": 5 # in days "addedAt": 1689546123 # unix timestamp } } } } }, "agreed": { "1" : { "id": "1", "managements": [(array of node id)] "drugs": { "agreed": { "14" : { "id": 14 "formulation_id" : 4 } }, "refused": [(array of node id)], "additional": { "15" : { "formulation_id" : 4 "duration": 5 # in days "addedAt": 1689546123 # unix timestamp } } } } }, "custom": { "uid" : { "id": uid, "name": "My name", "drugs": { "uid" : { "id": uid "name": "my custom drug", "duration": 5 # in days } } } } }
A list of icons is available with react-native-vector-icons.
We also set a list of custom icons. We split it in 2 components
We're using date-fns to handle date format. Good documentation can be found here
import { ColoredIcon } from '@/Components'
return <ColoredIcon name="about" />
Name | |
---|---|
about | |
consult | |
home | |
logout | |
patient-list | |
qr-scan | |
settings | |
summary | |
synchronize |
import { Icon } from '@/Components'
return <Icon name="about" />
This project is set up to use jest for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called __tests__
or with the .test
extension to have the files loaded by jest. See the the template project for an example test. The jest documentation is also a wonderful resource, as is the React Native testing tutorial.
We're using sementic for version number. We have set up react-native-version-setter to manage version number
Use the following code in the terminal replacing the "files" information with the current release number :
sentry-cli releases \ --org wavemind --project medal-reader \ files 1.3.0-1 \ upload-sourcemaps \ --strip-prefix . \ index.android.bundle index.android.bundle.map