Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into healthx-demo-deep-linking
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jan 28, 2025
2 parents 29e4483 + edd99a5 commit 701111c
Show file tree
Hide file tree
Showing 171 changed files with 2,660 additions and 1,939 deletions.
69 changes: 10 additions & 59 deletions app/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,78 +118,29 @@ flutter pub run flutter_launcher_icons:main

This will generate icons for both iOS as well as Android.

Another option is to use, e.g., <https://easyappicon.com/>.

## Updating screencast and screenshots

🙅 _Not working yet due to login redirect, but keeping script for Sinai_
_version (login without redirect) – can adopt once different login types are_
_supported._

Scripts were created to click through the app using tests and record the
screen.

A simulator with the app in its initial state (or not installed) needs to be
running.

### Screencasts

The `generate_screendocs/generate_screencast.sh` script will create screencast.
It uses Xcode to record the screencast and [`ffmpeg`](https://ffmpeg.org/)
to cut the `full.mov` to relevant subsets (needs to be installed).

To generate GIFs used in the Tutorial,
[ImageMagick](https://imagemagick.org/index.php) is used
(which also needs to be installed).

Run the script with `bash generate_screendocs/generate_screencast.sh`.

## Screenshots

To update the screenshots in `../docs/screenshots`
(used in [📑 App screens](../docs/App-screens.md),
[📑 User instructions](../docs/User-instructions.html), and the
[README](./README.md)), run the following command:
`bash generate_screendocs/generate_screenshots.sh`.

If the error `The following MissingPluginException was thrown running a test:
MissingPluginException(No implementation found for method captureScreenshot on
channel plugins.flutter.io/integration_test)` occurs, the registration in the
file
`ios/.symlinks/plugins/integration_test/ios/Classes/IntegrationTestPlugin.m`
needs to be adapted (see
[issue](https://github.com/flutter/flutter/issues/91668)):

```m
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
[[IntegrationTestPlugin instance] setupChannels:registrar.messenger];
}
```
_Check `e60efb4f2fc3ba2efa7735ffb06ec5fdb64d7af6` for a rudimentary script_
_version, removed afterwards due to too many merge conflicts._

## Adapting test data

If you would like to test with specific test data but you don't have a user with
suitable data available, adapt the code in `utilities/genome_data.dart` as
shown below.
suitable data available, adapt the code that gets the lab results as shown below.

```dart
// TODO(after-testing): remove test data adaption
UserData.instance.labData = UserData.instance.labData!.filter(
(labResult) => labResult.gene != 'UGT1A1'
).toList();
UserData.instance.labData!.add(LabResult(
gene: 'UGT1A1',
variant: '*28/*28',
phenotype: 'Poor Metabolizer',
allelesTested: '',
));
UserData.instance.labData = UserData.instance.labData!.filter(
(labResult) => labResult.gene != 'HLA-B' && labResult.variant != '*57:01 negative'
).toList();
UserData.instance.labData!.add(LabResult(
gene: 'HLA-B',
variant: '*57:01 positive',
phenotype: '*57:01 positive',
allelesTested: '',
));
var labResults = json.map<LabResult>(LabResult.fromJson).toList();
final cyp2c19Result = labResults.firstWhere((labResult) => labResult.gene == "CYP2C19");
labResults = labResults.filter((labResult) => labResult.gene != "CYP2C19").toList();
labResults = [...labResults, LabResult(gene: "CYP2C19", variant: "*2/*2", phenotype: "Poor Metabolizer", allelesTested: cyp2c19Result.allelesTested)];
return labResults;
```

You can use the CPIC API to get reasonable genotype-phenotype pairings, e.g.,
Expand Down
2 changes: 1 addition & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ application offers to export a detailed description.
PGx report | Gene details | Medication search | Medication details |
:-: | :-: | :-: | :-: |
(a) | (b) | (c) | (d) |
![report_screen](../docs/screenshots/gene-report.png) | ![gene_screen](../docs/screenshots/cyp2d6.png) | ![search_screen](../docs/screenshots/drug-search.png) | ![drug_screen](../docs/screenshots/clopidogrel.png) |
![report_screen](../docs/screenshots/gene-report-all.png) | ![gene_screen](../docs/screenshots/cyp2c9.png) | ![search_screen](../docs/screenshots/drug-search.png) | ![drug_screen](../docs/screenshots/ibuprofen.png) |

_Please note that these screenshots might not represent the latest app version._

Expand Down
5 changes: 3 additions & 2 deletions app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
etc.) set the parameter 'android:usesCleartextTraffic' to 'true' -->
<application
android:label="PharMe"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="false"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:usesCleartextTraffic="false"
>
<activity
android:name=".MainActivity"
Expand Down
Binary file not shown.
Binary file added app/android/app/src/main/res/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added app/android/app/src/main/res/playstore-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/splashscreen</item>
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#ffffff</color>
</resources>
2 changes: 1 addition & 1 deletion app/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/splashscreen</item>
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Expand Down
Binary file modified app/assets/images/tutorial/05_bottom_navigation_loopable.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/tutorial/07_ibuprofen_loopable.gif
Binary file modified app/assets/images/tutorial/08_report_and_cyp2c9_loopable.gif
Binary file modified app/assets/images/tutorial/09_faq_and_more_loopable.gif
226 changes: 0 additions & 226 deletions app/generate_screendocs/generate_screencast.sh

This file was deleted.

10 changes: 0 additions & 10 deletions app/generate_screendocs/generate_screenshots.sh

This file was deleted.

Loading

0 comments on commit 701111c

Please sign in to comment.