-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.2.5 - Add Location Coordinates on Questionnaire Submission #3042
Conversation
- Run spotlessApply
…old with extract location and list resources (#3131)
…rcore into questionnaire-location-0-2-5
@@ -41,4 +41,5 @@ data class ApplicationConfiguration( | |||
val showLogo: Boolean = true, | |||
val taskBackgroundWorkerBatchSize: Int = 500, | |||
val eventWorkflows: List<EventWorkflow> = emptyList(), | |||
val logQuestionnaireLocation: Boolean = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please match the architecture on the main
PR. I think we have different configs there
var locationResourceCopy = locationResource | ||
|
||
if (locationResourceCopy == null) { | ||
locationResourceCopy = org.hl7.fhir.r4.model.Location() | ||
} | ||
|
||
locationResourceCopy.id = UUID.randomUUID().toString() | ||
locationResourceCopy.position.latitude = gpsLocation!!.latitude.toBigDecimal() | ||
locationResourceCopy.position.longitude = gpsLocation!!.longitude.toBigDecimal() | ||
locationResourceCopy.position.altitude = gpsLocation!!.altitude.toBigDecimal() | ||
|
||
return locationResourceCopy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we creating a new object?
.addOnSuccessListener { location: Location? -> | ||
if (location != null) { | ||
Timber.d( | ||
"Approx location - lat: ${location.latitude}; long: ${location.longitude}; alt: ${location.altitude}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Approx location - lat: ${location.latitude}; long: ${location.longitude}; alt: ${location.altitude}", | |
"Approximate location - lat: ${location.latitude}; long: ${location.longitude}; alt: ${location.altitude}", |
- Refactor ResourceUtils
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes [link to issue]
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file