Skip to content

Commit

Permalink
EA-899-Display-source-on-health-records
Browse files Browse the repository at this point in the history
  • Loading branch information
Arunkumarbwell committed Dec 18, 2023
1 parent 296a6b1 commit 40651c6
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ class HealthSummaryCategoriesDataAdapter<T>(private val launches: List<T>?) :
holder.binding.header.text = getTitle(launch)
val startDate = getDate(launch)
val formattedDate = startDate?.let { formatDate(it) }
holder.binding.textViewDate.text = "Started "+formattedDate ?: ""
holder.binding.textViewDate.text = ("Started $formattedDate")
addTextField(holder, holder.binding.root.context.getString(R.string.status), getDataOne(launch))
addTextField(holder, holder.binding.root.context.getString(R.string.intent), getDataTwo(launch))
}
is Immunization ->{
holder.binding.header.text = getTitle(launch)
val startDate = getDate(launch)
val formattedDate = startDate?.let { formatDate(it) }
holder.binding.textViewDate.text = "Most Recent: "+formattedDate ?: ""
holder.binding.organizationName.text = "from "+launch?.performer?.get(1)?.actor?.onOrganization?.organizationName
holder.binding.textViewDate.text = "Most Recent: $formattedDate"
holder.binding.organizationName.text = "from "+ launch.performer?.get(1)?.actor?.onOrganization?.organizationName
addTextField(holder, holder.binding.root.context.getString(R.string.dose_number), getDataOne(launch))
addTextField(holder, holder.binding.root.context.getString(R.string.manufacturer_name), getDataTwo(launch))
}
is Procedure ->{
holder.binding.header.text = getTitle(launch)
val startDate = getDate(launch)
val formattedDate = startDate?.let { formatDate(it) }
holder.binding.textViewDate.text = "Performed Date: "+formattedDate ?: ""
holder.binding.organizationName.text = "from "+launch?.performer?.get(1)?.actor?.onOrganization?.organizationName
holder.binding.textViewDate.text = "Performed Date: $formattedDate"
holder.binding.organizationName.text = "from "+ launch.performer?.get(1)?.actor?.onOrganization?.organizationName
addTextField(holder, holder.binding.root.context.getString(R.string.bodysite), getDataOne(launch))
addTextField(holder, holder.binding.root.context.getString(R.string.reason), getDataTwo(launch))
addTextField(holder, holder.binding.root.context.getString(R.string.outcome), launch.outcome.toString())
Expand All @@ -78,8 +78,8 @@ class HealthSummaryCategoriesDataAdapter<T>(private val launches: List<T>?) :
holder.binding.header.text = getTitle(launch)
val startDate = getDate(launch)
val formattedDate = startDate?.let { formatDate(it) }
holder.binding.textViewDate.text = "Effective Date: "+formattedDate ?: ""
holder.binding.organizationName.text = "from "+launch?.performer?.get(1)?.onOrganization?.organizationName
holder.binding.textViewDate.text = "Effective Date: $formattedDate"
holder.binding.organizationName.text = "from "+ launch.performer?.get(1)?.onOrganization?.organizationName
addTextField(holder, holder.binding.root.context.getString(R.string.result), getDataOne(launch))
addTextField(holder, holder.binding.root.context.getString(R.string.healthy_range), getDataTwo(launch))
}
Expand All @@ -89,7 +89,6 @@ class HealthSummaryCategoriesDataAdapter<T>(private val launches: List<T>?) :
val formattedDate = startDate?.let { formatDate(it) }
holder.binding.textViewDate.text =
(launch.participant?.get(0)?.individual?.practitionerName?.get(0)?.text.toString() + " " + formattedDate)
?: ""
addTextField(holder, holder.binding.root.context.getString(R.string.reason), getDataOne(launch))
}
is AllergyIntolerance ->{
Expand Down Expand Up @@ -129,13 +128,13 @@ class HealthSummaryCategoriesDataAdapter<T>(private val launches: List<T>?) :
val layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT)
val labelTextView = createDynamicTextView(holder.binding.root.context, "$label")
val labelTextView = createDynamicTextView(holder.binding.root.context, label)
labelTextView.setTextColor(Color.parseColor("#575881"))
layoutParams.topMargin = 30
labelTextView.layoutParams = layoutParams
holder.binding.dataLl.addView(labelTextView)

val valueTextView = createDynamicTextView(holder.binding.root.context, "$value")
val valueTextView = createDynamicTextView(holder.binding.root.context, value)
holder.binding.dataLl.addView(valueTextView)
}

Expand Down

0 comments on commit 40651c6

Please sign in to comment.