Modern Apps git

← Modern-Apps.git

health: show patient fhir records

Commit
bf4fda97f7734e23972a97ed2b9232b830fe85e4
Author
Vayun <[email protected]>
When
2026-01-26 06:40 UTC (10 months ago)
Parents
cb367c6

Diff

gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 454884d61a..0d87f39378 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -2,6 +2,7 @@ # Tooling & Plugins agp = "9.0.0" coilCompose = "2.7.0"+connectClient = "1.2.0-alpha02" exifinterface = "1.4.2" kotlin = "2.3.0" @@ -42,6 +43,7 @@ pdfViewer = "1.0.0-alpha12"  [libraries] # Core AndroidX+androidx-connect-client = { module = "androidx.health.connect:connect-client", version.ref = "connectClient" } androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "exifinterface" } coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" } compose-markdown = { group = "com.github.jeziellago", name = "compose-markdown", version.ref = "composeMarkdown" }
health/build.gradle.kts
diff --git a/health/build.gradle.kts b/health/build.gradle.ktsindex 39dfdab3ab..13d4190f4d 100644--- a/health/build.gradle.kts+++ b/health/build.gradle.kts@@ -1,5 +1,6 @@ plugins {     alias(libs.plugins.ksp)+    alias(libs.plugins.kotlin.serialization) }  android {@@ -11,7 +12,7 @@ android { }  dependencies {-    implementation("androidx.health.connect:connect-client:1.2.0-alpha02")+    implementation(libs.androidx.connect.client)      // room     implementation(libs.androidx.room.runtime)
health/src/main/AndroidManifest.xml
diff --git a/health/src/main/AndroidManifest.xml b/health/src/main/AndroidManifest.xmlindex ed4885b310..a2690f6a2f 100644--- a/health/src/main/AndroidManifest.xml+++ b/health/src/main/AndroidManifest.xml@@ -36,6 +36,20 @@     <uses-permission android:name="android.permission.health.READ_HYDRATION" />     <uses-permission android:name="android.permission.health.READ_NUTRITION" /> +    <!-- Medical Data -->+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_ALLERGIES_INTOLERANCES" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_CONDITIONS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_LABORATORY_RESULTS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_MEDICATIONS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PERSONAL_DETAILS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PRACTITIONER_DETAILS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PREGNANCY" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PROCEDURES" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_SOCIAL_HISTORY" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_VACCINES" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_VISITS" />+    <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_VITAL_SIGNS" />+     <application         android:allowBackup="true"         android:dataExtractionRules="@xml/data_extraction_rules"
health/src/main/java/com/vayunmathur/health/HealthAPI.kt
diff --git a/health/src/main/java/com/vayunmathur/health/HealthAPI.kt b/health/src/main/java/com/vayunmathur/health/HealthAPI.ktindex cea5ba0033..0ae5937dff 100644--- a/health/src/main/java/com/vayunmathur/health/HealthAPI.kt+++ b/health/src/main/java/com/vayunmathur/health/HealthAPI.kt@@ -5,12 +5,18 @@ import android.content.SharedPreferences import androidx.health.connect.client.HealthConnectClient import androidx.health.connect.client.aggregate.AggregateMetric import androidx.health.connect.client.aggregate.AggregationResult+import androidx.health.connect.client.feature.ExperimentalPersonalHealthRecordApi import androidx.health.connect.client.records.HeartRateRecord+import androidx.health.connect.client.records.MedicalResource import androidx.health.connect.client.records.OxygenSaturationRecord import androidx.health.connect.client.records.Record import androidx.health.connect.client.records.SleepSessionRecord import androidx.health.connect.client.request.AggregateRequest+import androidx.health.connect.client.request.ReadMedicalResourcesInitialRequest+import androidx.health.connect.client.request.ReadMedicalResourcesPageRequest+import androidx.health.connect.client.request.ReadMedicalResourcesRequest import androidx.health.connect.client.request.ReadRecordsRequest+import androidx.health.connect.client.response.ReadMedicalResourcesResponse import androidx.health.connect.client.time.TimeRangeFilter import kotlinx.datetime.DatePeriod import kotlinx.datetime.DateTimePeriod@@ -43,7 +49,6 @@ object HealthAPI {      suspend inline fun <reified T: Record> lastRecord(): T? {         val records = healthConnectClient.readRecords(ReadRecordsRequest(T::class, timeRangeThisWeek()))-        println("${T::class.simpleName}" + records.records)         return records.records.lastOrNull()     } @@ -62,4 +67,22 @@ object HealthAPI {             now.toInstant(TimeZone.currentSystemDefault()).toJavaInstant()         )     }++    @OptIn(ExperimentalPersonalHealthRecordApi::class)+    suspend fun allMedicalRecords(type: Int): List<MedicalResource> {+        val allRecords = mutableListOf<MedicalResource>()++        var pageToken: String? = null+        do {+            val request =+                if (pageToken == null) ReadMedicalResourcesInitialRequest(type, setOf())+                else ReadMedicalResourcesPageRequest(pageToken)++            val response = healthConnectClient.readMedicalResources(request)+            allRecords += response.medicalResources+            pageToken = response.nextPageToken+        } while (pageToken != null)++        return allRecords+    } }\ No newline at end of file
health/src/main/java/com/vayunmathur/health/MainActivity.kt
diff --git a/health/src/main/java/com/vayunmathur/health/MainActivity.kt b/health/src/main/java/com/vayunmathur/health/MainActivity.ktindex b4177c600a..82cf218606 100644--- a/health/src/main/java/com/vayunmathur/health/MainActivity.kt+++ b/health/src/main/java/com/vayunmathur/health/MainActivity.kt@@ -1,10 +1,14 @@ package com.vayunmathur.health +import android.health.connect.HealthPermissions+import android.os.Build import android.os.Bundle+import android.os.ext.SdkExtensions import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.enableEdgeToEdge+import androidx.annotation.RequiresExtension import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Button@@ -23,6 +27,7 @@ import androidx.health.connect.client.permission.HealthPermission import androidx.health.connect.client.records.* import androidx.navigation3.runtime.NavKey import com.vayunmathur.health.ui.MainPage+import com.vayunmathur.health.ui.MedicalRecordsPage import com.vayunmathur.library.ui.DynamicTheme import com.vayunmathur.library.util.MainNavigation import com.vayunmathur.library.util.rememberNavBackStack@@ -62,9 +67,21 @@ val PERMISSIONS = setOf(     HealthPermission.getReadPermission(SleepSessionRecord::class),     HealthPermission.getReadPermission(MindfulnessSessionRecord::class),     HealthPermission.getReadPermission(HydrationRecord::class),-    HealthPermission.getReadPermission(NutritionRecord::class)-)-+    HealthPermission.getReadPermission(NutritionRecord::class),+) + if (SdkExtensions.getExtensionVersion(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) >= 16) {setOf(+    HealthPermissions.READ_MEDICAL_DATA_ALLERGIES_INTOLERANCES,+    HealthPermissions.READ_MEDICAL_DATA_CONDITIONS,+    HealthPermissions.READ_MEDICAL_DATA_LABORATORY_RESULTS,+    HealthPermissions.READ_MEDICAL_DATA_MEDICATIONS,+    HealthPermissions.READ_MEDICAL_DATA_PERSONAL_DETAILS,+    HealthPermissions.READ_MEDICAL_DATA_PRACTITIONER_DETAILS,+    HealthPermissions.READ_MEDICAL_DATA_PREGNANCY,+    HealthPermissions.READ_MEDICAL_DATA_PROCEDURES,+    HealthPermissions.READ_MEDICAL_DATA_SOCIAL_HISTORY,+    HealthPermissions.READ_MEDICAL_DATA_VACCINES,+    HealthPermissions.READ_MEDICAL_DATA_VISITS,+    HealthPermissions.READ_MEDICAL_DATA_VITAL_SIGNS+) } else {setOf()}   class MainActivity : ComponentActivity() {@@ -109,14 +126,20 @@ class MainActivity : ComponentActivity() { sealed interface Route: NavKey {     @Serializable     data object MainPage: Route++    @Serializable+    data object MedicalRecords: Route }  @Composable fun Navigation() {-    val backStack = rememberNavBackStack(Route.MainPage)+    val backStack = rememberNavBackStack<Route>(Route.MainPage)     MainNavigation(backStack) {         entry<Route.MainPage> {-            MainPage()+            MainPage(backStack)+        }+        entry<Route.MedicalRecords> {+            MedicalRecordsPage(backStack)         }     } }\ No newline at end of file
health/src/main/java/com/vayunmathur/health/fhir/Address.kt
diff --git a/health/src/main/java/com/vayunmathur/health/fhir/Address.kt b/health/src/main/java/com/vayunmathur/health/fhir/Address.ktnew file mode 100644index 0000000000..307707d521--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/fhir/Address.kt@@ -0,0 +1,10 @@+package com.vayunmathur.health.fhir++import kotlinx.serialization.Serializable++@Serializable+data class Address(val text: String? = null) {+    fun displayString(): String {+        return text ?: ""+    }+}
health/src/main/java/com/vayunmathur/health/fhir/AdministrativeGender.kt
diff --git a/health/src/main/java/com/vayunmathur/health/fhir/AdministrativeGender.kt b/health/src/main/java/com/vayunmathur/health/fhir/AdministrativeGender.ktnew file mode 100644index 0000000000..bdf843200b--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/fhir/AdministrativeGender.kt@@ -0,0 +1,28 @@+package com.vayunmathur.health.fhir++import kotlinx.serialization.SerialName+import kotlinx.serialization.Serializable++@Serializable+enum class AdministrativeGender {+    @SerialName("male")+    MALE,++    @SerialName("female")+    FEMALE,++    @SerialName("other")+    OTHER,++    @SerialName("unknown")+    UNKNOWN;++    fun displayString(): String {+        return when(this) {+            MALE -> "Male"+            FEMALE -> "Female"+            OTHER -> "Other"+            UNKNOWN -> "Unknown"+        }+    }+}\ No newline at end of file
health/src/main/java/com/vayunmathur/health/fhir/Date.kt
diff --git a/health/src/main/java/com/vayunmathur/health/fhir/Date.kt b/health/src/main/java/com/vayunmathur/health/fhir/Date.ktnew file mode 100644index 0000000000..5835e1c13a--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/fhir/Date.kt@@ -0,0 +1,16 @@+package com.vayunmathur.health.fhir++import kotlinx.datetime.LocalDate+import kotlinx.datetime.format+import kotlinx.datetime.format.MonthNames+import kotlinx.datetime.format.Padding++typealias Date = LocalDate++fun Date.displayString() = this.format(LocalDate.Format {+        monthName(MonthNames.ENGLISH_ABBREVIATED)+        chars(" ")+        day(Padding.NONE)+        chars(", ")+        year()+    })\ No newline at end of file
health/src/main/java/com/vayunmathur/health/fhir/HumanName.kt
diff --git a/health/src/main/java/com/vayunmathur/health/fhir/HumanName.kt b/health/src/main/java/com/vayunmathur/health/fhir/HumanName.ktnew file mode 100644index 0000000000..72cd1b8d22--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/fhir/HumanName.kt@@ -0,0 +1,11 @@+package com.vayunmathur.health.fhir++import kotlinx.serialization.Serializable++@Serializable+data class HumanName(val text: String? = null, val family: String? = null, val given: List<String> = emptyList()) {+    fun displayString(): String {+        if(family != null && given.isNotEmpty()) return "$family, ${given.joinToString(" ")}"+        return text ?: ""+    }+}
health/src/main/java/com/vayunmathur/health/fhir/Patient.kt
diff --git a/health/src/main/java/com/vayunmathur/health/fhir/Patient.kt b/health/src/main/java/com/vayunmathur/health/fhir/Patient.ktnew file mode 100644index 0000000000..529d034d08--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/fhir/Patient.kt@@ -0,0 +1,6 @@+package com.vayunmathur.health.fhir++import kotlinx.serialization.Serializable++@Serializable+data class Patient(val name: List<HumanName> = emptyList(), val gender: AdministrativeGender? = null, val birthDate: Date? = null, val address: List<Address> = listOf())\ No newline at end of file
health/src/main/java/com/vayunmathur/health/ui/MainPage.kt
diff --git a/health/src/main/java/com/vayunmathur/health/ui/MainPage.kt b/health/src/main/java/com/vayunmathur/health/ui/MainPage.ktindex 662a102ba5..b6a111bf0b 100644--- a/health/src/main/java/com/vayunmathur/health/ui/MainPage.kt+++ b/health/src/main/java/com/vayunmathur/health/ui/MainPage.kt@@ -1,6 +1,7 @@ package com.vayunmathur.health.ui  import android.util.Log+import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column@@ -37,9 +38,14 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.health.connect.client.aggregate.AggregationResult+import androidx.health.connect.client.feature.ExperimentalPersonalHealthRecordApi import androidx.health.connect.client.records.*+import androidx.navigation3.runtime.NavBackStack import com.vayunmathur.health.HealthAPI import com.vayunmathur.health.R+import com.vayunmathur.health.Route+import com.vayunmathur.health.fhir.Patient+import com.vayunmathur.library.ui.invisibleClickable import com.vayunmathur.library.util.round import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext@@ -48,8 +54,14 @@ import kotlinx.datetime.toLocalDateTime import kotlin.time.Clock import kotlin.time.toKotlinDuration +val JSON = kotlinx.serialization.json.Json {+    prettyPrint = true+    ignoreUnknownKeys = true+}++@OptIn(ExperimentalPersonalHealthRecordApi::class) @Composable-fun MainPage() {+fun MainPage(backStack: NavBackStack<Route>) {     val now = Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault())     var aggregates: AggregationResult? by remember { mutableStateOf(null) } @@ -127,20 +139,29 @@ fun MainPage() {         ) {             Spacer(modifier = Modifier.height(8.dp)) +            Text("Medical Records", style = MaterialTheme.typography.labelLarge)+            Card(Modifier.invisibleClickable{+                backStack.add(Route.MedicalRecords)+            }) {+                Row(Modifier.fillMaxWidth().padding(16.dp)) {+                    Text("Medical Records")+                }+            }+             // 1. Vitals & Clinical Metrics-            Text("Vitals & Clinical", style = MaterialTheme.typography.labelLarge, color = Color.LightGray)+            Text("Vitals & Clinical", style = MaterialTheme.typography.labelLarge)             VitalsDashboard(br, spo2, rhr, hrv, skinTemp, vo2Max, bloodGlucose, bloodPressure)              // 2. Nutrition Summary-            Text("Nutrition (Today)", style = MaterialTheme.typography.labelLarge, color = Color.LightGray)+            Text("Nutrition (Today)", style = MaterialTheme.typography.labelLarge)             NutritionSummaryCard(aggregates)              // 3. Body Composition-            Text("Body Composition", style = MaterialTheme.typography.labelLarge, color = Color.LightGray)+            Text("Body Composition", style = MaterialTheme.typography.labelLarge)             BodyCompositionDashboard(height, weight, bodyFat, leanBodyMass, boneMass, bodyWaterMass)              // 4. Activity & Energy-            Text("Activity", style = MaterialTheme.typography.labelLarge, color = Color.LightGray)+            Text("Activity", style = MaterialTheme.typography.labelLarge)             EnergyBurned(aggregates?.get(TotalCaloriesBurnedRecord.ENERGY_TOTAL)?.inKilocalories ?: 0.0)              Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {@@ -201,7 +222,7 @@ fun NutritionSummaryCard(res: AggregationResult?) { @Composable fun NutritionMacro(label: String, value: Double?, unit: String) {     Column(horizontalAlignment = Alignment.CenterHorizontally) {-        Text(label, style = MaterialTheme.typography.labelSmall, color = Color.LightGray)+        Text(label, style = MaterialTheme.typography.labelSmall)         Text("${value?.round(1) ?: "--"}$unit", style = MaterialTheme.typography.bodyMedium)     } }@@ -245,16 +266,16 @@ fun MetricSegmentCard(index: Int, total: Int, label: String, value: Any?, unit:             horizontalArrangement = Arrangement.SpaceBetween,             verticalAlignment = Alignment.CenterVertically         ) {-            Text(text = label, style = MaterialTheme.typography.bodyMedium, color = Color.LightGray)+            Text(text = label, style = MaterialTheme.typography.bodyMedium)             Row(verticalAlignment = Alignment.Bottom) {                 val displayValue = when (value) {                     null -> "--"                     is Double -> if (showSign) (if (value >= 0) "+" else "") + value.round(1) else value.round(1).toString()                     else -> value.toString()                 }-                Text(text = displayValue, style = MaterialTheme.typography.bodyLarge, color = Color.White)+                Text(text = displayValue, style = MaterialTheme.typography.bodyLarge)                 Spacer(Modifier.width(4.dp))-                Text(text = unit, style = MaterialTheme.typography.bodySmall, color = Color.LightGray)+                Text(text = unit, style = MaterialTheme.typography.bodySmall)             }         }     }@@ -264,11 +285,11 @@ fun MetricSegmentCard(index: Int, total: Int, label: String, value: Any?, unit: fun MiniMetricCard(label: String, value: String, unit: String) {     Card(modifier = Modifier.fillMaxWidth()) {         Column(Modifier.padding(12.dp)) {-            Text(label, style = MaterialTheme.typography.labelMedium, color = Color.LightGray)+            Text(label, style = MaterialTheme.typography.labelMedium)             Row(verticalAlignment = Alignment.Bottom) {-                Text(value, style = MaterialTheme.typography.titleLarge, color = Color.White)+                Text(value, style = MaterialTheme.typography.titleLarge)                 Spacer(Modifier.width(4.dp))-                Text(unit, style = MaterialTheme.typography.bodySmall, color = Color.LightGray)+                Text(unit, style = MaterialTheme.typography.bodySmall)             }         }     }@@ -358,15 +379,15 @@ fun GenericCard(name: String, titleIcon: ImageVector?, units: String, number: St         Row(Modifier.padding(16.dp).fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.SpaceBetween) {             Column {                 Row(verticalAlignment = Alignment.CenterVertically) {-                    Text(text = name, style = MaterialTheme.typography.titleMedium, color = Color.White)-                    if (titleIcon != null) Icon(titleIcon, null, Modifier.padding(start = 4.dp).size(16.dp), Color.LightGray)+                    Text(text = name, style = MaterialTheme.typography.titleMedium)+                    if (titleIcon != null) Icon(titleIcon, null, Modifier.padding(start = 4.dp).size(16.dp))                 }                 Spacer(Modifier.height(8.dp))                 Row(verticalAlignment = Alignment.Bottom) {-                    Text(text = number, style = MaterialTheme.typography.headlineLarge, color = Color.White, fontSize = 32.sp)-                    Text(text = units, Modifier.padding(start = 4.dp, bottom = 4.dp), style = MaterialTheme.typography.bodyLarge, color = Color.White)+                    Text(text = number, style = MaterialTheme.typography.headlineLarge, fontSize = 32.sp)+                    Text(text = units, Modifier.padding(start = 4.dp, bottom = 4.dp), style = MaterialTheme.typography.bodyLarge)                 }-                Text(text = dateString, style = MaterialTheme.typography.bodySmall, color = Color.LightGray)+                Text(text = dateString, style = MaterialTheme.typography.bodySmall)             }             graphic()         }
health/src/main/java/com/vayunmathur/health/ui/MedicalRecordsPage.kt
diff --git a/health/src/main/java/com/vayunmathur/health/ui/MedicalRecordsPage.kt b/health/src/main/java/com/vayunmathur/health/ui/MedicalRecordsPage.ktnew file mode 100644index 0000000000..d04b67efba--- /dev/null+++ b/health/src/main/java/com/vayunmathur/health/ui/MedicalRecordsPage.kt@@ -0,0 +1,81 @@+package com.vayunmathur.health.ui++import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.padding+import androidx.compose.material3.Card+import androidx.compose.material3.ExperimentalMaterial3Api+import androidx.compose.material3.ListItem+import androidx.compose.material3.ListItemColors+import androidx.compose.material3.ListItemDefaults+import androidx.compose.material3.MaterialTheme+import androidx.compose.material3.Scaffold+import androidx.compose.material3.Text+import androidx.compose.material3.TopAppBar+import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.remember+import androidx.compose.runtime.setValue+import androidx.compose.ui.Modifier+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.unit.dp+import androidx.health.connect.client.feature.ExperimentalPersonalHealthRecordApi+import androidx.health.connect.client.records.MedicalResource+import androidx.navigation3.runtime.NavBackStack+import com.vayunmathur.health.HealthAPI+import com.vayunmathur.health.Route+import com.vayunmathur.health.fhir.Patient+import com.vayunmathur.health.fhir.displayString+import com.vayunmathur.library.ui.IconNavigation+import kotlinx.coroutines.Dispatchers+import kotlinx.coroutines.withContext++@OptIn(ExperimentalMaterial3Api::class, ExperimentalPersonalHealthRecordApi::class)+@Composable+fun MedicalRecordsPage(backStack: NavBackStack<Route>) {+    var patients by remember { mutableStateOf(listOf<Patient>()) }++    LaunchedEffect(Unit) {+        withContext(Dispatchers.IO) {+            patients = HealthAPI.allMedicalRecords(MedicalResource.MEDICAL_RESOURCE_TYPE_PERSONAL_DETAILS).map {+                JSON.decodeFromString<Patient>(it.fhirResource.data)+            }+            println(patients)+        }+    }++    Scaffold(topBar = { TopAppBar({}, navigationIcon = {+        IconNavigation(backStack)+    }) }) { paddingValues ->+        Column(Modifier.padding(paddingValues).padding(horizontal = 16.dp)) {+            Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {+                patients.forEach {+                    PatientCard(it)+                }+            }+        }+    }+}++@Composable+fun PatientCard(patient: Patient) {+    val nameString = patient.name.firstOrNull()?.displayString()+    val addressString = patient.address.firstOrNull()?.displayString()+    Card {+        ListItem({+            Text(nameString ?: "Unknown")+        }, supportingContent = {+            Column {+                if (patient.gender != null)+                    Text(patient.gender.displayString())+                if (patient.birthDate != null)+                    Text(patient.birthDate.displayString())+                if (addressString != null)+                    Text(addressString)+            }+        }, colors = ListItemDefaults.colors(Color.Transparent))+    }+}\ No newline at end of file