-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show statin nudge alert when statins can be prescribed (#5074)
Co-authored-by: Siddharth Agarwal <sagarwal@rtsl.org> Co-authored-by: Sasikanth Miriyampalli <hello@sasikanth.dev>
- Loading branch information
1 parent
d7e6744
commit 73c1ea6
Showing
15 changed files
with
348 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
app/src/main/java/org/simple/clinic/summary/StatinModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.simple.clinic.summary | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class StatinModel( | ||
val canPrescribeStatin: Boolean, | ||
val age: Int, | ||
val hasDiabetes: Boolean, | ||
val hasHadStroke: Boolean, | ||
val hasHadHeartAttack: Boolean, | ||
) : Parcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
|
||
<solid android:color="@color/simple_yellow_100" /> | ||
|
||
<stroke | ||
android:width="@dimen/spacing_1" | ||
android:color="@color/simple_yellow_550_alpha_40" /> | ||
|
||
<corners android:radius="@dimen/spacing_4" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="40dp" | ||
android:height="40dp" | ||
android:viewportWidth="40" | ||
android:viewportHeight="40"> | ||
<group> | ||
<clip-path | ||
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"/> | ||
<path | ||
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0" | ||
android:fillColor="#E0B000"/> | ||
<path | ||
android:pathData="M21.154,7.309L21.154,7.309A3.077,3.077 0,0 1,24.231 10.386L24.231,22.693A3.077,3.077 0,0 1,21.154 25.77L21.154,25.77A3.077,3.077 0,0 1,18.077 22.693L18.077,10.386A3.077,3.077 0,0 1,21.154 7.309z" | ||
android:fillColor="#2F363D" | ||
android:fillAlpha="0.32"/> | ||
<path | ||
android:pathData="M21.154,31.538m-3.077,0a3.077,3.077 0,1 1,6.154 0a3.077,3.077 0,1 1,-6.154 0" | ||
android:fillColor="#2F363D" | ||
android:fillAlpha="0.32"/> | ||
<path | ||
android:pathData="M20.192,6.153L20.192,6.153A2.885,2.885 0,0 1,23.077 9.038L23.077,21.73A2.885,2.885 0,0 1,20.192 24.615L20.192,24.615A2.885,2.885 0,0 1,17.308 21.73L17.308,9.038A2.885,2.885 0,0 1,20.192 6.153z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M20.192,30.576m-2.885,0a2.885,2.885 0,1 1,5.769 0a2.885,2.885 0,1 1,-5.769 0" | ||
android:fillColor="#ffffff"/> | ||
</group> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/rootView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="@dimen/spacing_8" | ||
android:layout_marginTop="@dimen/spacing_8" | ||
android:layout_marginBottom="@dimen/spacing_0" | ||
android:background="@drawable/background_statin_alert" | ||
android:elevation="@dimen/spacing_4" | ||
android:paddingHorizontal="@dimen/spacing_8" | ||
android:paddingVertical="@dimen/spacing_12" | ||
android:visibility="gone" | ||
tools:visibility="visible"> | ||
|
||
<ImageView | ||
android:id="@+id/statinAlertIcon" | ||
android:layout_width="@dimen/spacing_56" | ||
android:layout_height="@dimen/spacing_56" | ||
android:contentDescription="@null" | ||
android:scaleType="center" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:srcCompat="@drawable/ic_statin_alert" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/statinAlertTitle" | ||
android:layout_width="@dimen/spacing_0" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/spacing_8" | ||
android:text="@string/statin_alert_title" | ||
android:textAppearance="?attr/textAppearanceSubtitle1Medium" | ||
android:textColor="@color/simple_brown_600" | ||
app:layout_constraintBottom_toTopOf="@id/statinAlertSubtitle" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/statinAlertIcon" | ||
app:layout_constraintTop_toTopOf="@id/statinAlertIcon" | ||
app:layout_constraintVertical_chainStyle="packed" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/statinAlertSubtitle" | ||
android:layout_width="@dimen/spacing_0" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/spacing_8" | ||
android:layout_marginTop="@dimen/spacing_2" | ||
android:textAppearance="?attr/textAppearanceBody1" | ||
android:textColor="@color/simple_brown_600_alpha_80" | ||
app:layout_constraintBottom_toBottomOf="@id/statinAlertIcon" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/statinAlertIcon" | ||
app:layout_constraintTop_toBottomOf="@id/statinAlertTitle" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.